Amiga.org

Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: peroxidechicken on October 26, 2002, 03:22:03 AM

Title: some people call it hacking
Post by: peroxidechicken on October 26, 2002, 03:22:03 AM
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.  
Title: Re: some people call it hacking
Post by: Glaucus on October 26, 2002, 03:40:56 AM
Quote
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
Title: Re: some people call it hacking
Post by: Piru on October 26, 2002, 04:29:45 AM
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.
Title: Re: some people call it hacking
Post by: peroxidechicken on October 28, 2002, 12:33:50 AM
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?