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

Re: Faking RWTS13: Trying to figure out how to do something



Lyrical Nanoha wrote:
On Mon, 28 Nov 2005, Linards Ticmanis wrote:

Lyrical Nanoha wrote:

or something like that. (It looks like the boot sector is loaded at $0300, so we might have to be careful.)


The boot sector is loaded at $0300 - but the bytes will be in a different order in memory compared to where they are on disk as seen by the RWTS of a full-fledged DOS 3.2, because there's not enough room in the 256 bytes of ROM to decode a 13-sector boot sector in the standard DOS 3.2 way.


I did disassemble the boot sector, but I can't make heads or tails of it since it seems to be doing some very bizarre things. The link is in a previous post I made to the group. For one, there is an address, $CxD1, which a trace never leads to, but which contains part of the boot code. Relocating the boot sector to $8600 and running it on a system with a 16-sector ROM didn't work, either - but I don't know what it's trying to do or how it loads the sector. If the code didn't use tricks like that, I would just be able to relocate it down to $8600 and call it.

Trace it carefully, and you will see that it constructs a return address
on the stack than then RTSs to it.

In fact, you may want to literally trace this code in an emulator.

Relocation to another page boundary should work as long as the code at
xxD1 is not moved or the constant $D0 pushed on the stack is adjusted
appropriately.

-michael

Music synthesis for 8-bit Apple II's!
Home page:  http://members.aol.com/MJMahon/

"The wastebasket is our most important design
tool--and it is seriously underused."