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

Boot hacking and AGS 3.0 updates



I abandoned my first boot0/boot1 loader method, which more or less
just dumped sectors of data directly into ram and jumped to the DOS
cold start routine.  In the interest of maximum compatibility I
devised a plan to replicate boot0/boot1 processes using a minimally-
modified boot1 stub, with some help and suggestions from Nick.  Here's
what I do:

1) Load RWTS serial driver at $25c
2) Look at Track 0, Sector 0 and look at first byte to determine how
many sectors to load
3) Load sectors into memory the same way that the C6 rom does normally
-- HOWEVER I do a find/replace on the sectors looking for:
LSR
LSR
LSR
LSR
ORA #$C0
and replace with
LSR
LSR
LSR
LSR
LDA #$02
This is why I picked $25c -- $c65c is normally used to read a sector
during boot1
4) Write a small stub to $300 to set ZP locations the same way that C6
rom does (slot, IO Buffer address, track), and then jumps to $801
5) When $25c is called, it sends the ZP data relevant to track/sector
and IO Buffer to the java program.  The sector is pumped into the
apple's memory to the requested location
6) At the end of handling the sector, the RWTS driver performs a jump
to $801 (same as C6)

As the boot process continues, sectors are scanned when sent over to
look for certain patterns indicating other RWTS routines.  The code is
not 100% relocatable so the address where the RWTS sector is loaded is
assumed to be where it will be used, and the code is relocated on the
fly to that base address.  Those sectors have replacement versions
that work more or less in similar ways and have corresponding java
logic to handle the different variations. (right now DOS 3.3 and
MiniRWTS)

In addition to everything DOS3.3-based working, I've found some other
things that were DOS 3.3 based with custom boot sectors are also
working, here and there at least.  One I'm very ecstatic to see
working is Rad Warrior. :-D

-B