0xAA55 Boot Code Signature

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Slasher

0xAA55 Boot Code Signature

Post by Slasher »

hi,
i just go Bochs 2.0, was previously using Bochs 1.4. The thing is, when i wrote boot code i added the boot signature as follows at the end of my code
.....
.....
.....
510 - ($ - $$) db 0
db 0xaa
db 0x55

this worked fine in Bochs 1.4 and on my PC. When i ran the same code in Bochs 2.0, it complained that the floppy was not BOOTABLE!!!
so i went to my code and made this change
.....
.....
.....
510 - ($ - $$) db 0
db 0x55
db 0xaa

I switched the order of the bytes of the boot signature.
It worked in Bochs 2.0 and on the real pc.
if you are getting this error message from Bochs 2.0 that is the way to solve it!

I think its because of the way Intel writes Words in reverse order ie [low byte][high byte] (little endian)
Has anyone had this happen to them? and is my reasoning correct?

Also the patch for vbe(i used with Bochs 1.4 with no problems) seems to cause an error in rombios.c when i use it as my video rom in Bochs 2.0, any ideas?
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re:0xAA55 Boot Code Signature

Post by df »

i think bochs just used to ignore the boot signature, as do most bios, etc.
-- Stu --
Post Reply