Page 1 of 1
How to use Bochs in Windows 2000
Posted: Sun Dec 14, 2003 2:39 pm
by lets sexx
Hello Gurus,
I made an Hello World OS in my floppy disk. Now I want to use Bochs to simulate this OS from a file not from diskette. So I made an image file of my OS and named it floppy.img.
I saved this file to c:\Program Files\Bochs-2.0.0, this is the directory of Bochs.exe. When I run Bochs.exe I got this message "BIOS panic at rombios.c, line 1563
My Bochsrc.txt is this
megs: 32
romimage: file=BIOS-bochs-latest, address=0xf0000
vgaromimage: VGABIOS-elpin-2.40
floppya: 1_44=floppy.img, status=inserted
boot: a
log: bochsout.txt
mouse: enabled=0
What's wrong here?
Please Help
Love
Christy
Re:How to use Bochs in Windows 2000
Posted: Sun Dec 14, 2003 3:27 pm
by Tim
Check your bochs.out file for the reason why the BIOS is panicing. Common reasons are:
-- BIOS unable to read from the disk image file
-- Boot sector doesn't end with 0xAA and 0x55
Re:How to use Bochs in Windows 2000
Posted: Sun Dec 14, 2003 3:51 pm
by lets sexx
Hi Tim,
Thanks for your reply.
Here is a part of the bochsout.txt that I think indicates the error message.
00000542231i[BIOS ] Boot from Floppy 0 failed
00000548070i[BIOS ] FATAL: Not a bootable disk
00000548369p[BIOS ] >>PANIC<< BIOS panic at rombios.c, line 1563
Perhaps the software that I use to make the image is not good enough. Do you know of any good image maker that is free,
sorry I am totally newbie in this field.
I want to know what consist of that image that Bochs needs in order to run my os. Is it the bootsector of my floppy disk plus the kernel plus the application?
Thanks again
Love
Christy
Re:How to use Bochs in Windows 2000
Posted: Sun Dec 14, 2003 4:05 pm
by Slasher
how did you make your floppy Image?
The reason for your crash is that your boot sector code does not have the 0xAA 0x 55 signature at the end as Tim pointed out.
In you asm boot sector file, end it with
times 510 -($ - $$) db 0; this
dw 0xAA55
or
times 510 - ($ - $$) db 0
db 0x55
db 0xAA
the times 510 - ($ - $$) db 0 will pad the file with zeros up to 510th byte. $ mean current address and $$ mean start address. so $ - $$ will give the size of the code so far,X, which if subtracted from 510 give how much bytes need to be padded with 0. DW 0xAA55 will put the signature at the 511th and 512th byte position as required by Bios. Db 0x55 Db 0xaa does the same thing.
Re:How to use Bochs in Windows 2000
Posted: Sun Dec 14, 2003 5:18 pm
by Ozguxxx
Is it a must for a bootsector to end with 0xaa55?
Re:How to use Bochs in Windows 2000
Posted: Sun Dec 14, 2003 5:35 pm
by Tim
Some BIOSes check for the signature, some don't. So the presence of the signature is required for maximum compatibility.