[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making a bootable Pascal RAM disk



In article <C7B871.76y@r-node.hub.org>, you write...
>    Nobody on the local user group BBS even volunteered an answer, so
>I'm appealing to the higher wisdom of the net.  :)
>> I'm trying to design a non-volatile RAM-Disk for an Apple ][+ which will
>> allow me to boot UCSD Pascal 1.2.  I can find information on how to
>> build a block structured device driver, but all the references I have
>> neglect to discuss the intricacies of making the device a bootable
>> device.  Does anyone know what's required to do this or where to go to
>> find out?

	I think I still understand devices and booting on an Apple ][+,
but I'm sure I'll make some little mistake that someone in netland will
have to correct:

	When you boot a disk (ala PR#6) (or for the old-timers 6 ctrl-p),
what you do is change the subroutine for character output.  In particular,
it is changed to $C600 if you do PR#6, $C500 if you do PR#5, etc.  This
address maps to a ROM (or RAM, I suppose, if you wish!) on card number
6 (or 5 or whatever).  So the next charcter that the monitor (or AppleSoft)
tries to print causes the execution of the code stored in $C600.  On the
disk II controller card, the code in the PROM from $C600-$C6FF started
the boot from floppy.

	So what you want to do is set up a 256-byte PROM (or RAM) on your
NVRAM card.  Each peripheral slot has an address line that is activated
when appropriate (except for slot 0).  Example: there is a line to slot
1 when there is a reference to $C100-$C1FF, a line to slot 2 when there
is a ref. to $C200-$C2FF, etc.  This is the line you want to use to activate
the boot PROM.

	The reference I know about all this is the manual that came with
my Apple II+.  Not the Applesoft one; there was one that talked about the
hardware and peripheral cards.  Maybe even better would be the "Red Book",
which I've seen but never owned.  I'm very far away from my manuals right
now, so I can't help you about the more technical details, but they are there.

	I believe that the usual Disk II boot code ($C600-$C6FF) reads
in track 0, sector 0, to which control is then passed.  (Maybe it can read
more than one sector? not sure).  The track 0-sector 0 code then continues
with the rest of the booting process.  Obviously you'll have to modify
this code as well so it loads from the NVRAM instead of floppy, and modify
Pascal's RWTS (read-write track-sector) routine so it knows how (and when)
to read from the NVRAM instead of the floppy.

	It shouldn't be too hard to fool around with the boot code for
Pascal; unlike many copy-protected games, I'm sure it is rather easy to
disassemble and fix.  Many of the ][+ games I cracked when I had nothing better
to do (mis-spent youth!) had self-modifying and encoded boot routines just
to make things more challenging!

				Tim (shoppa@almach.caltech.edu)