Help In Creating img for bochs.

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
User avatar
zlixine
Posts: 23
Joined: Wed Mar 11, 2015 8:13 pm

Help In Creating img for bochs.

Post 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?
Attachments
os.rar
(1.58 KiB) Downloaded 23 times
Developing ZeroX Operating System;
I code C++ so much that I am ending English Statements & Replies with semi-colon instead of dot;
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Re: Help In Creating img for bochs.

Post 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.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
StudlyCaps
Member
Member
Posts: 232
Joined: Mon Jul 25, 2016 6:54 pm
Location: Adelaide, Australia

Re: Help In Creating img for bochs.

Post 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.
User avatar
zlixine
Posts: 23
Joined: Wed Mar 11, 2015 8:13 pm

Re: Help In Creating img for bochs.

Post by zlixine »

Thanks neon, it works perfectly.
Developing ZeroX Operating System;
I code C++ so much that I am ending English Statements & Replies with semi-colon instead of dot;
Post Reply