Page 1 of 1

Help In Creating img for bochs.

Posted: Mon Apr 17, 2017 6:34 pm
by zlixine
Hello Devs, after I spent sometime in creating game engine, I decided to comeback to os development, so I have a simple problem, I am trying to follow the tutorial at this brokenthorn http://www.brokenthorn.com/Resources/OSDevIndex.html , I am using Windows 10 home 32bit edition, I have bochs installed with MagicISO, my question is how to create a bootable floppy file to be used in bochs? I tried to follow the way http://www.brokenthorn.com/Resources/OSDev3.html but I failed, any other ideas?

Re: Help In Creating img for bochs.

Posted: Mon Apr 17, 2017 7:03 pm
by neon
Hello,

We use ImDisk internally which supports mounting floppy disk images (as well as hard disks/cd's/partitions/etc.) The tutorials use Virtual Floppy Disk, but ImDisk appears to be better supported on later versions of Windows. To create the disk image, just open ImDisk, go to File->Mount new virtual disk, give it a drive letter and a size and select Ok. You can then right click the disk and select Save disk contents as image file and open it later as needed.

If the disk is mounted on drive a:, the following configuration should work:

Code: Select all

romimage:    file=BIOS-bochs-latest
vgaromimage: file=VGABIOS-lgpl-latest 
floppya: 1_44=a:, status=inserted
log:         OSDev.log
error:       action=report 
info:        action=report
boot:        floppy
Please note that we are aware of some errors within the text of the tutorials and are planning a rewrite/revision. If there are any doubts or concerns, or if problems persist, please feel free to let us know.

Re: Help In Creating img for bochs.

Posted: Mon Apr 17, 2017 7:10 pm
by StudlyCaps
Hi, you say you failed to follow Brokenthorn 3. Can you tell us what it was that didn't work? Did you get an error? Did it all appear to work but not boot? If so, what did it say? We can't help you if we don't know what problem you're having.

Also, rather than going through the hassle of setting up a virtual floppy on windows you can replace "1_44=a:" in bochsrc with "1_44=<filename.img>" replacing <filename.img> with the path to a file you want to use as a floppy disk image. This means that when you read a sector of the floppy (such as the first sector to boot from) it will just use a 512 byte chunk of the file with no special format or conversion.

Re: Help In Creating img for bochs.

Posted: Thu Apr 20, 2017 4:19 pm
by zlixine
Thanks neon, it works perfectly.