PDA

View Full Version : some people call it hacking


peroxidechicken
10-25-2002, 08:22 PM
Does anyone know the significance of the contents of the cpu registers at boot time?
I modified a bootblock (the hard way!) to find out those contents when booting from 1.3 and 3.1 and now I'm trying to step through the bootblock code of a wb2+ unfriendly non-dos game.

One more question - can the exec call DoIO be used to read from a floppy?

Thanks in advance.

Glaucus
10-25-2002, 08:40 PM
One more question - can the exec call DoIO be used to read from a floppy?

Isn't DoIO() just another way of doing SendIO() + WaitIO() ??? I suppose it would then depend on the device you're using, probably trackdisk.device, correct? It should work fine, provided the OS is up nad running. Why do you ask?

- Mike

Piru
10-25-2002, 09:29 PM
IN:
a0 - ptr to bootblock buffer (PC - 12) (not guaranteed!)
a1 - struct IOStdReq * of the booting device
a3 - struct IOStdReq * (same as a1, but not guaranteed!)
a5 - expansionbase (not guaranteed!)
a6 - execbase

a1 and a6 are guaranteed to contain these values [at least KS 1.2-3.1], since almost all bootloaders rely on them.

OUT:
d0 - zero if bootblock succeeded, else nonzero
a0 - if d0 is zero, a0 is ptr to dos.library resident RT_INIT function that is called later to fire up dos.

peroxidechicken
10-27-2002, 05:33 PM
Back at last. Thanks for that info. What I really need are the RKMs or I'll be bugging you all with this stuff everyday.
I'm trying to DOSify a non-dos game - I found a site dedicated to WHDload which sounds very much like what I'm interested in. Just need to get it on a floppy...
Hey, how come monam does such a crap job of disassembling? Can anyone recommend a better tool?