Page 1 of 1

few questions about bochs

Posted: Fri Jan 08, 2016 2:39 am
by ggodw000
i am exploring the amd's simNow and bochs side-by-side.
Personally, i am preferring amd's simNow far better than bochs but its debug capability seems limited.
So i am looking at both, although bochs's user interface feels really weird and unintuitive.

This is my 2nd attempt, few weeks back, first time I tried Bochs, I do remember i struggled real hard just to create simple floppy image on bochs and wasting several hours using the several tools that bochs help file recommended. None of them really worked and it was like chasing after a rabbit hole. So far I remember trying bximage.exe tool and some other weird dos tool that came with it, all of them just exited without any message or crashed when i attempted to create bootable disk image.

So this time, I decided I am not going to do that route. I am wondering what is the most straight forward way to do it? Obviously help and controls are not intuitive. with AMD's sim now, I was virtually able to use hyper-v FDD image instantly and interchangeably and was able to get up and running in less than few minutes.

With bochs i did setup floppya image by uncommenting the hugely long boshsrc.txt file and used the hyper-v fdd image by placing it on the installation root directory, but either it is not finding the image or it is not compatible. It just always says no bootable device all the time. Here is the line:

# You can set the initial status of the media to 'ejected' or 'inserted'.
# floppya: 2_88=path, status=ejected (2.88M 3.5" media)
# floppya: 1_44=path, status=inserted (1.44M 3.5" media)
floppya: 1_44=floppya.img, status=inserted, write_protected=0
# floppya: 1_2=path, status=ejected (1.2M 5.25" media)
# floppya: 720k=path, status=inserted (720K 3.5" media)
# floppya: 360k=path, status=inserted (360K 5.25" media)
# floppya: 320k=path, status=inserted (320K 5.25" media)
# floppya: 180k=path, status=inserted (180K 5.25" media)
# floppya: 160k=path, status=inserted (160K 5.25" media)

floppa.img (renamed hyper-v file) is placed in installation root directory, same location as other files i.e. bochsrc.txt file and others are residing.
C:\bosh.res\Bochs-2.6.8\Bochs-2.6.8\floppya.img

Is floppy format used by Bochs compatible with hyperv floppy image?
In case I manage to setup the floppy, how hard is it to copy the file to and from its image if it is proprietary format?

I will definitely dump this tool, if I can explore simNow tool enough that it gives debug capability enough that i can get back to main project and work on debugging.

Re: few questions about bochs

Posted: Fri Jan 08, 2016 2:43 am
by FallenAvatar
Bochs expects flat binary files for floppies and hard drives. It looks for them in the CWD. (And uses the standard Windows Path past that) It took me 15mins to write an image creation tool in c#. I'd offer you the tool if I wasn't half way through rewriting it to support multiple partition hard drive images.

Since it seems like you main issue is bochs finding the image, i would simply point to having the floppy image in the CWD when you launch Bochs.

- Monk

P.S. The above it how I test my ASM only debug code without issue in Bochs.

Re: few questions about bochs

Posted: Fri Jan 08, 2016 11:16 am
by Octocontrabass
ggodw000 wrote:boshsrc
Why are you manually editing bochsrc to load your disk image? When you launch Bochs (in Windows), it will open its GUI and you can use that to select the disk image you want to load. You can also use this GUI to create a new bochsrc file, so you don't have to select the disk image every time.
ggodw000 wrote:Is floppy format used by Bochs compatible with hyperv floppy image?
It looks like both use the same format, so you should be able to load the same file in both Bochs and Hyper-V.

Re: few questions about bochs

Posted: Mon Feb 01, 2016 9:28 pm
by ggodw000
Octocontrabass wrote:
ggodw000 wrote:boshsrc
Why are you manually editing bochsrc to load your disk image? When you launch Bochs (in Windows), it will open its GUI and you can use that to select the disk image you want to load. You can also use this GUI to create a new bochsrc file, so you don't have to select the disk image every time.

tutorial said to use text editor, may be i did not look enough, still going by SimNow for now.
ggodw000 wrote:Is floppy format used by Bochs compatible with hyperv floppy image?
It looks like both use the same format, so you should be able to load the same file in both Bochs and Hyper-V.
that 'd be beneficial