few questions about 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
ggodw000
Member
Member
Posts: 396
Joined: Wed Nov 18, 2015 3:04 pm
Location: San Jose San Francisco Bay Area
Contact:

few questions about bochs

Post 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.
key takeaway after spending yrs on sw industry: big issue small because everyone jumps on it and fixes it. small issue is big since everyone ignores and it causes catastrophy later. #devilisinthedetails
FallenAvatar
Member
Member
Posts: 283
Joined: Mon Jan 03, 2011 6:58 pm

Re: few questions about bochs

Post 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.
Octocontrabass
Member
Member
Posts: 5588
Joined: Mon Mar 25, 2013 7:01 pm

Re: few questions about bochs

Post 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.
ggodw000
Member
Member
Posts: 396
Joined: Wed Nov 18, 2015 3:04 pm
Location: San Jose San Francisco Bay Area
Contact:

Re: few questions about bochs

Post 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
key takeaway after spending yrs on sw industry: big issue small because everyone jumps on it and fixes it. small issue is big since everyone ignores and it causes catastrophy later. #devilisinthedetails
Post Reply