Getting Bochs to run

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.
Jimferd

Getting Bochs to run

Post by Jimferd »

Howdy,

Being a simpleton, I didnt want to read through hours of documentation on setting up bochs, so I've come to ask you, How is it done? I've tried several times and had the worst hell of my life, except maybe for watching the new Tomb Raider movie.
Thanks!

Sweet! This is post no. 2000!
Tim

Re:Getting Bochs to run

Post by Tim »

The defaults usually work OK. Try setting Bochs up against the small Linux hard disk image that comes with the download, then, once you know that works, switch to one of your own.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Getting Bochs to run

Post by Pype.Clicker »

Jimferd wrote: Howdy,

Being a simpleton, I didnt want to read through hours of documentation on setting up bochs, so I've come to ask you
lazy you!

for a basic start, all you have to do is something like
romimage: file=/usr/lib/bochs/bios/BIOS-bochs-latest, address=0xf0000
vgaromimage: /usr/lib/bochs/bios/VGABIOS-elpin-2.40
floppya: 1_44=disk.bin, status=inserted
boot: a
megs: 32
with corrected path for your romimages...
Jimferd

Re:Getting Bochs to run

Post by Jimferd »

i dont even know what a friggen ROM image is.
:-\
bkilgore

Re:Getting Bochs to run

Post by bkilgore »

It's an image (image in the disk image sense, as opposed to picture sense) ofa chunk of memory. In other words, bochs takes the file you specify, and sticks it's contents into the memory location you specify, before running your operating system.

The BIOS image contains information about how the BIOS looks in memory what the computer starts, and the VGA image contains how the VGA memory looks when the computer starts.

This way, the bochs people didn't have to write their own BIOS (or if they did, they didn't have to have it running as code as part of the program), and they didn't have to write their own video card. They simply copied an image of an existing chunk of ROM and let it interact with the "computer" that it's loaded onto.

This makes it very easy to, in practice, switch to different emulated video cards or BIOSes.
Jimferd

Re:Getting Bochs to run

Post by Jimferd »

Where would I get such nifty images? Where do i get a jim-dandy copy of bochs? bochs.sf.net yes? What do i need to do to test it with my os again? Sorry, I'm a simpleton.
Thanks
bkilgore

Re:Getting Bochs to run

Post by bkilgore »

these "nifty images" come with bochs, as does a default configuration file that includes the lines to load them, so you shouldn't really have to worry about that. As far as loading your os, you'll need a disk image of your os, and you just tell bochs to load it as the floppy, either through the configuration interface, or the bochsrc.txt configuration file. The line to load your os image if it is called disk.bin and located in the same directory as bochs is as shown in pype's post:

Code: Select all

floppya: 1_44=disk.bin, status=inserted
as far as downloading bochs, yes, i would say get it right from sourceforge. The even have a few precompiled binaries if you need them, or go through the manual to see how to configure specific build options and build it yourself.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Getting Bochs to run

Post by Pype.Clicker »

Jimferd wrote: Sorry, I'm a simpleton.
what's a simpleton ?
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:Getting Bochs to run

Post by distantvoices »

a simpleton is, according to dict.leo.org, a silly guy or someone who trades a silly look around himself just to avoid thinking too much. I don't know the emotional attitude of that word in english, but in german it's translations are of negative attitude. It's nothing I want to be named nor name myself...

@jimferd: being a simpleton is merely nothing else than being an idiot. Do you really want to hide behind THAT excuse?
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
Peter_Vigren

Re:Getting Bochs to run

Post by Peter_Vigren »

To me, a simpleton sounds like someone who wants it all to be simple. That is, that he or she doesn't want to work hard for things to work out... Then I wonder what a simpleton plan to do on an OS board...

But it's nothing wrong to be lazy _sometimes_. But if it is the most characteristic trait of a person... it may suck to try to get an OS going... it may suck indeed...

My coffee tastes bad...
slacker

Re:Getting Bochs to run

Post by slacker »

does bochs run on windows xp? cause i seem to have trouble setting it up on xp..anyone know?
Tim

Re:Getting Bochs to run

Post by Tim »

Yep, works fine on Windows XP here.
adeelmahmood1

Re:Getting Bochs to run

Post by adeelmahmood1 »

[glow=red,2,300]The Complete SIMPLETON's Guide to run BOCHS :)[/glow]
Note: for Windows
1. go to this page http://sourceforge.net/project/showfiles.php?group_id=12580&release_id=135273
2.within the highlighted files download
"Bochs-2.0.2.exe" to a folders in ur hard drive e.g. C:\Bochs2
3.Now open ur windows explorer and goto C:\Bochs2 and run the downloaded file. this will install bochs in ur C:\Program Files\Bochs-2.0.2 (By default)
4.Now go to C:\Program Files\Bochs-2.0.2 and u will find a file in there 'bochsrc-sample.txt'
5.Now open this bochsrc-sample file and delete all the text in it and copy this text into it
[hr]
# how much memory the emulated machine will have
# if you have less than 64MB of memory in your actuall computer, set this lower(16 is good)
megs: 32

# filename of ROM images
# note that if before a filename we put "../" then the file is looked
# for in the directory above that the current directory(the one the configuration
# file is in).
romimage: file=BIOS-bochs-latest, address=0xf0000
vgaromimage: VGABIOS-elpin-2.40

# we want a floppy drive(called a), the disk image that we are using is called "floppy.img"
floppya: 1_44=floppy.img, status=inserted

# choose the boot disk.
boot: a

# where do we send log/error messages?
log: bochsout.txt

# disable the mouse unless your OS uses it
mouse: enabled=0
[hr]
ok now close the file and rename it to 'bochsrc.txt'
6. OK now u r done now u can copy any OS img file into this directory just make sure that the name of img file is
'floppy.img' and then click on bochs.exe to run.
Nightlover

Re:Getting Bochs to run

Post by Nightlover »

Hello everybody,
I am also someone who does not get "bochs for win32" to run.

@Adeel Mahmood
Thanks four your guide.

Let's say I have bootloader which sourcecode looks like:

Code: Select all

[BITS 16]   
[ORG 0x7C00] 

main:???     
jmp main

times 510-($-$$) db 0
dw 0xAA55
I assembled this source to a file called floppy.img
and copied that file to 1.44 Floppy Disk.

I used exactly the same bochsrc.txt which Adeel Mahmood showed us in his guide.

But if I start bochs.exe with the floppy disk inserted bochs stops the emulation and prints out some error message.

*edit*
==============================
Bochs is exiting with the following message:
[BIOS ] BIOS panic at rombios.c, line 1563
==============================



Now to my questions:
Is it right to copy the floppy.img to the floppy disk with the windows explorer or do I have to copy the floppy.img to the first sector of the floppy disk with the help of for e.g. partcopy.

Is it necassary to format the floppy disk before putting the floppy.img on it.

Thanks in advance.

Bye,
Nightlover
slacker

Re:Getting Bochs to run

Post by slacker »

i got it to run on xp..which is really weird cause i've tried it so many times before unsuccesfully.
Post Reply