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.
Avarok
Member
Member
Posts: 102
Joined: Thu Aug 30, 2007 9:09 pm

Bochs

Post by Avarok »

Yeah, so I'm devving in windows. Don't ask. It's stupid.

So... bochs:

I'm at a loss why their program can't use command line parameters like every other fucking program on earth, or perhaps a gui, or even a config file following a standard?

Anyways, after three hours of struggling with trying to get it to load ANY image at all, let alone one of mine properly configured... I'm going to admit to needing some help.

How do I make this error message go away?

Code: Select all


00000000000i[APIC?] local apic in  initializing
========================================================================
                       Bochs x86 Emulator 2.2.6
              Build from CVS snapshot on January 29, 2006
========================================================================
00000000000i[     ] reading configuration from C:\Code\bochs\freedos\freedos.bvm

00000000000p[     ] >>PANIC<< could not look up environment variable 'BXSHARE'
00000000000e[CTRL ] notify called, but no bxevent_callback function is registere
d
00000000000i[SYS  ] Last time is 0
00000000000i[     ] restoring default signal behavior
========================================================================
Bochs is exiting with the following message:
[     ] could not look up environment variable 'BXSHARE'
========================================================================
00000000000i[CTRL ] quit_sim called with exit code 1

What I mean to ask is, what the hell is the answer to this BXSHARE thing?
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies.
- C. A. R. Hoare
User avatar
bluecode
Member
Member
Posts: 202
Joined: Wed Nov 17, 2004 12:00 am
Location: Germany
Contact:

Post by bluecode »

You use a environment variable in your configuration file. This normally looks like: $BXSHARE
jnc100
Member
Member
Posts: 775
Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:

Post by jnc100 »

My setup:

1) Add your bochs program directory to your path.
2) Create a 'bochsrc' file in the directory for your os:

Code: Select all

floppya:1_44=kernel/image
debug: action=ignore
info: action=report
error: action=report
panic: action=report
cpu:count=1,ips=1000000
Replacing kernel/image with the relative path to your floppy image.
3) From your os directory, run 'bochs'

Regards,
John.
sancho1980
Member
Member
Posts: 199
Joined: Fri Jul 13, 2007 6:37 am
Location: Stuttgart/Germany
Contact:

Post by sancho1980 »

while we're at it (problems with bochs)..

1) i have installed minix on bochs and when i boot up i get a message telling me "no dma support", a message that is output by the minix loader, not by bochs itself...

when i install minix on qemu i dont get that, but i prefer bochs, because of the debugger, so does any one have an idea how to enable dma in bochs?

2) when i press [shift-3] under bochs, i get an error in the bochs console telling me this is an unsupported key..the gues os isnt informed so effectively i cannot type the pound-sterling character (using an irish keyboard)..is there any reason for that strange behaviour?
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

2) when i press [shift-3] under bochs, i get an error in the bochs console telling me this is an unsupported key..the gues os isnt informed so effectively i cannot type the pound-sterling character (using an irish keyboard)..is there any reason for that strange behaviour?
Not sure of the reason - probably a scancode emulation issue. My keyboard driver reports a hash (#) when this key is pressed - the scancodes must be different to a 102-key layout. I don't get this problem in qemu.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

Strange, I tried reproducing the behaviour with a dutch keyboard (which has both special characters and more keys than an US keyboard), but it correctly converts the special characters to the corresponding scancodes. (my kb uses µ±¨£€¶«»§¬¦). I tested with bochs 2.3 on windows xp, so you might want to upgrade your 2.2.6.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Avarok
Member
Member
Posts: 102
Joined: Thu Aug 30, 2007 9:09 pm

Post by Avarok »

Okay... so I downloaded the BIOS image and vga-bios image. Unfortunately, that seems to be far from enough. The "bochs for windows" thing only came with the exe.

Code: Select all

C:\Code\bochs>freedos.bvm
00000000000i[APIC?] local apic in  initializing
========================================================================
                       Bochs x86 Emulator 2.2.6
              Build from CVS snapshot on January 29, 2006
========================================================================
00000000000i[     ] reading configuration from C:\Code\bochs\freedos.bvm
00000000000p[     ] >>PANIC<< C:\Code\bochs\freedos.bvm: directive 'C:\Code\boch
s\bios=C' not understood
00000000000e[CTRL ] notify called, but no bxevent_callback function is registere
d
00000000000i[SYS  ] Last time is 0
00000000000i[     ] restoring default signal behavior
========================================================================
Bochs is exiting with the following message:
[     ] C:\Code\bochs\freedos.bvm: directive 'C:\Code\bochs\bios=C' not understo
od
========================================================================
00000000000i[CTRL ] quit_sim called with exit code 1

I tried putting the path to the BIOS files in there, but nothing I do seems to work. The bochs website only mentions the "cool new feature that lets you use environment variables in bochsrc files"

*sigh*
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies.
- C. A. R. Hoare
sancho1980
Member
Member
Posts: 199
Joined: Fri Jul 13, 2007 6:37 am
Location: Stuttgart/Germany
Contact:

Post by sancho1980 »

sancho1980 wrote:while we're at it (problems with bochs)..

1) i have installed minix on bochs and when i boot up i get a message telling me "no dma support", a message that is output by the minix loader, not by bochs itself...
any ideas how to enable dma in bochs..i have loocked into the docs but there seems to be no special option in bochs to compile with or without dma support. also, when editing the settings of the virtual machine, i cannot find any such option...
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

DMA support is enabled by default. Why the minix loader complains about it is beyond me.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post by Solar »

Avarok wrote:

Code: Select all

00000000000p[     ] >>PANIC<< C:\Code\bochs\freedos.bvm: directive 'C:\Code\bochs\bios=C' not understood
[/quote]

Do you really have a line "C:\Code\bochs\bios=C" in your config file?

Without looking up Bochs config syntax, shouldn't C be set

1) the other way round,

2) to a harddisk image file instead of the BIOS image?
Every good solution is obvious once you've found it.
Avarok
Member
Member
Posts: 102
Joined: Thu Aug 30, 2007 9:09 pm

Post by Avarok »

It's because I did this:

Code: Select all

SET BXSHARE=C:\Code\bochs\bios
I tried numerous other things to set it as an environment variable based on what people said it was supposed to be. It doesn't work. Bochs has no man, and the /? or --help are practically useless.

:cry: I just want to be able to load ANY fucking image. :cry:

If I can do that, I'll figure out the rest. Actually, I just want to be able to dump the register contents when my OS triple faults. :?
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies.
- C. A. R. Hoare
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

1. DONT USE BACKSLASH!

2. DONT EVER USE BACKSLASH!!!

3. backslash is why your command isn't working.

JamesM
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

Avarok wrote:Bochs has no man, and the /? or --help are practically useless.
It does have a nice homepage with screens full of documentation :wink:
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Avarok
Member
Member
Posts: 102
Joined: Thu Aug 30, 2007 9:09 pm

Post by Avarok »

:( Well, here goes. Time to RTFM. :(

Qemu worked just fine the first time I ran it without a 140 page manual, sans the absence of a way to dump the registers.

Okay... the documentation says that I should have roughly 25-30 files in my bochs directory, but the exe is the only download for windows that works, and it is actually *just the exe*, and doesn't work without the other files I don't think. It's certainly not a self extracting.

~~~

So I figured out that if I download the platform independent .tar.gz and unzip it using 7-Zip or WinRAR, I can actually get the rest of the program. Hopefully that will run.

~~~

Nope. It's just some source that won't compile on windows without paying for MSVC (as if). Next attempt will be to see if I can find another website that will actually let me download the whole program that it says I should have in the bochs documentation.

~~~

Okay, so I tried downloading the exe again, this time (I don't know where I got the last one) it *is* an installer. So now that I have the full package, I should be getting different errors.

~~~

Okay, I have bochs running freedos. The provided version of linux crashes without any changes (minor update: it now prints a gazillion "01 ". Now I just gotta figure out how to make bochs capable of running x86-64 (it has the mode somewhere) and I'll be one step closer.
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies.
- C. A. R. Hoare
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

you should for starters install Cygwin. Once you have that, you can compile all sorts of programs from source, including Bochs.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Locked