home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.sys.apple2      Discussion about Apple II micros      56,720 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 55,180 of 56,720   
   Steve Nickolas to Kent Dickey   
   Re: ProDOS boot block?   
   25 Dec 21 19:00:18   
   
   From: usotsuki@buric.co   
      
   On Sat, 25 Dec 2021, Kent Dickey wrote:   
      
   > In article ,   
   > Steve Nickolas   wrote:   
   >> My head exploded when trying to parse the ProDOS boot block.   
   >>   
   >> I'm trying to see whether it's possible to remove the Apple /// stuff and   
   >> add some 6502-8086 diglot stuff, given that I have an 8086 boot block that   
   >> does more or less the same thing, and that I could stuff into the second   
   >> block.   
   >>   
   >> -uso.   
   >   
   > I don't understand what you are asking.  Are you trying to make a boot block   
   > that will work on 8086 and an Apple II?  If so, you'll need to work out   
   > opcodes to start the block with that make sense for both architectures.   
   > I don't understand why you'd want to do this and what you think this will   
   > achieve.  For the Apple II part, the first byte needs to be $01 and will   
   > not be executed.  If you want it can be any value from $01 to $0f, but   
   > higher values will result in wasted time (it will read more sectors into   
   > memory which will in general not be useful).   
      
   That indeed was the trick.   
      
   > As for the ProDOS boot block, it's basic operation is to find the PRODOS   
   > file in the volume directory, and boot from a 5.25" Disk II or a "Smartport"   
   > device (really, the ProDOS entry point).  It looks at the boot slot   
   > $CnFF to get the ProDOS entry point (generally $07, so the entry point is   
   > $Cn07), and then makes READBLOCK calls to find PRODOS.  For Disk II, it   
   > creates a fake driver (so the rest of the code can think in terms of blocks),   
   > which then does the needed head moves (slower than needed, but short code)   
   > and re-uses the $Cn5C entry point to read the sector data.  It's clever,   
   > but not too complex.   
   >   
   > You mention Apple ///, but again I don't know what you mean.  There's   
   > special code to handle $CnFF being >= $F9, and maybe that's for Apple ///,   
   > but I didn't trace through that code to figure out what it was doing.   
   > My understanding is an Apple /// will boot from Block 1 (and Block 1 is   
   > usually all 0's on volumes created on an Apple II).   
   >   
   > Kent   
      
   I actually wrote this code:   
      
   http://6.buric.co/p86head.a86.txt   
      
   This is pretty close to what I understand the 6502 code does in principle,   
   but written from scratch in 8086 ASM (NASM dialect) - and I have written a   
   "hello world" test, though my head exploded trying to go further and   
   actually write a kernel.   
      
   I'm currently trying to write a small Apple ][ emulator in order to test   
   the code further, but I am very unfluent in 8086 being mainly a C   
   programmer.   
      
   -uso.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca