DOSBox doesn't work properly


46 posts   Page 2 of 2   1, 2
by payturr » Wed Aug 08, 2012 3:16 am
Well networking doesn't work fine in either, so now I have 2 big problems - no internet, and no dosbox
Posts: 64
Joined: Mon Jul 09, 2012 9:46 pm
by payturr » Wed Aug 08, 2012 3:33 am
Okay, internet works now - didn't try the basic guide to fixing networking by resetting the router. ._. will post again with DOSBox results.
Posts: 64
Joined: Mon Jul 09, 2012 9:46 pm
by payturr » Wed Aug 08, 2012 4:18 am
No success - still no dosbox in console -.-
Posts: 64
Joined: Mon Jul 09, 2012 9:46 pm
by lostintime » Wed Aug 08, 2012 6:30 am
Are you using a USB hub with your Pi? That was the cause of Ethernet problems for me. Starting X windows would cause the network to die. Starting GPM had the same effect, so it was apparently something to do with the mouse. Removing the hub and connecting the keyboard and mouse directly to the Pi fixed that.
Posts: 29
Joined: Sun Jul 22, 2012 7:30 am
by obcd » Wed Aug 08, 2012 8:13 am
dosbox always emulates the cpu, even on x86 platform.
dosbox also emulates the graphic card. For that, it needs x as it uses sdl which gets the framebuffer from x.
There is no way to run it without x. Maybe what you saw on the video was a script that first starts x and dosbox afterwards. As the dosbox startup screen is text orientated, it looks like it's still a console window. If they actually start x without a desktop on top, you won't even notice it was started.
If you do the same, you will still have the screen problems. It will not be a fix for your issues.

There is a project going on that runs dos on the nintendo ds. I don't think the spec's are so much better than those of the Pi. I assume that the non accelerated video access is eating to much cpu power making sdl applications rather slow on the pi. I keep on lurking this forum's for a pi hardware accelerated sdl library, but couldn't find one so far. A hardware accelerated x desktop would be nice as well.
Posts: 890
Joined: Sun Jul 29, 2012 9:06 pm
by abishur » Wed Aug 08, 2012 1:20 pm
obcd wrote:dosbox always emulates the cpu, even on x86 platform.
dosbox also emulates the graphic card. For that, it needs x as it uses sdl which gets the framebuffer from x.
There is no way to run it without x.


*Technically*, there's no way to run it without SDL. You can, as I do all the time with my pi, run dosbox straight from the console without ever starting X in the sense of going into the LXDE GUI. As long as you run it with sudo then it will start the appropriate environment for it to run in without any fancy scripts ;-)

The only difference I can think of between our two setups is I'm using HDMI to connect to my TV and you're using composite. Do you have any special things in your config.txt in the boot partition?

The most I have activated is disable overscan, force the HDMI output (in case I reset it without having the TV on), and set the HDMI mode to 16.
Dear forum: Play nice ;-)
User avatar
Moderator
Moderator
Posts: 4225
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
by 7F20 » Mon Aug 20, 2012 3:33 am
abishur wrote:
obcd wrote:dosbox always emulates the cpu, even on x86 platform.
dosbox also emulates the graphic card. For that, it needs x as it uses sdl which gets the framebuffer from x.
There is no way to run it without x.


*Technically*, there's no way to run it without SDL. You can, as I do all the time with my pi, run dosbox straight from the console without ever starting X in the sense of going into the LXDE GUI. As long as you run it with sudo then it will start the appropriate environment for it to run in without any fancy scripts ;-)

The only difference I can think of between our two setups is I'm using HDMI to connect to my TV and you're using composite. Do you have any special things in your config.txt in the boot partition?

The most I have activated is disable overscan, force the HDMI output (in case I reset it without having the TV on), and set the HDMI mode to 16.


OK, I had this problem, but I tried a monitor with an HDMI, and it worked, so whatever the problem with the blacked-out/blank screen is, I think it's exclusive to the composite output.
I would like to figure this out as well because I wanted to use this via composite if possible.

PS My config file did not write in /usr/bin... it wrote in /home/pi/.dosbox automatically when I installed via apt-get install dosbox

and the file name is dosbox-0.74.conf which is what it should be according to the official dosbox linux info.
I know it's okay to use whatever name you want, but since that's the auto-created file, someone else out there may be looking for it...
User avatar
Posts: 13
Joined: Tue Jul 24, 2012 2:45 am
Location: New York
by 7F20 » Mon Aug 20, 2012 6:27 pm
Ok, So I have also tried it on another monitor that can take DVI, and it works when I output the HDMI as DMT and the default resolution, but as soon as I change it to CEA 480p (which allows me to make better use of the screen size) Dosbox no longer works from the command line anymore.

It is loading with the config file for sure because I put some lines in there to mount a game directory, and it's doing that.

So contrary to what I found before, it's not only the composite output that doesn't work, but certain video modes that seem to be a problem.
User avatar
Posts: 13
Joined: Tue Jul 24, 2012 2:45 am
Location: New York
by abishur » Tue Aug 21, 2012 1:50 am
This is just random conjecture based on what you're describing, but perhaps dosbox requires a certain minimum resolution? Or that there's something in the config that tries to set the framebuffer too high? (well I say config, but I don't necessarily mean the user accessible conf file ;-))
Dear forum: Play nice ;-)
User avatar
Moderator
Moderator
Posts: 4225
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
by 7F20 » Wed Aug 22, 2012 7:09 pm
abishur wrote:This is just random conjecture based on what you're describing, but perhaps dosbox requires a certain minimum resolution? Or that there's something in the config that tries to set the framebuffer too high? (well I say config, but I don't necessarily mean the user accessible conf file ;-))


Well, I have spent a little more time researching this, and I can't find mention of a minimum resolution for the dosbox console anywhere in the dosbox documentation. Besides, SDL should be acting as a layer between Dosbox and the graphics hardware on the Pi, so I don't see how it would be an issue. I considered that there may be some pass-through problems, but Dosbox supports composite output in CGA mode, the relevant thread on the Dosbox forum is here:
http://vogons.zetafleet.com/viewtopic.php?t=12319

So I tried that and I still could not get anything but a blank screen when attempting to start from the console. I started it from inside LXDE and it showed that it was in CGA composite mode, and that worked, but the goal is to get it running from console because of the performance difference.
If I had to guess, and that's what this is, I would say it has something to do with the way the Pi is handling SDL. I think the Pi is forcing digital HDMI out when I try to start Dosbox. (evidenced by the fact that it also won't work in HDMI VGA out mode)

Also, I thought it would be good to link to the only thread on the Dosbox forum that addresses the Raspberry Pi, so here that is:
http://vogons.zetafleet.com/viewtopic.p ... =raspberry

I wish I could do more, but figuring this out is beyond me at this point. Hope somebody else chimes in eventually. :)
User avatar
Posts: 13
Joined: Tue Jul 24, 2012 2:45 am
Location: New York
by diveroli » Tue Sep 11, 2012 5:47 pm
As commented in another thread, my RPi does only two resolutions: 1980x1080 (very stretched and illegible in a small monitor) or, with hdmi_safe, 640x480, which I am using at present.

For two days I found that running DOSBox from the console produced a garbled keyboard (in most cases a keypress would produce the result equivalent to subtracting 8 units from the ANSI code!).

Today, instead running DOSBox from the console hangs the RPI (why? did not change a thing!)

So I am forced to run DOSBox from LXDE: low performance, lower line missing.

There are other inconveniences at running it from LXDE: if you wish to exit DOSBox, change something in the config file or add a new app before restarting it, you are forced to logout from LXDE, because the very handy Midnight Commander (an adaptation of the old Norton COmmander) only runs from Console: this one hangs if you try to run it from LXDE!

It is really annoying to have to go back and forth, and often hard-restarting RPi, simply because some non-graphic text-only programs run OK from LXDE but if run from console hang the RPi, while others run OK from console but crash the RPi if run from LXDE.
Posts: 20
Joined: Sat Sep 08, 2012 10:20 pm
by abishur » Tue Sep 11, 2012 5:57 pm
diveroli wrote:For two days I found that running DOSBox from the console produced a garbled keyboard (in most cases a keypress would produce the result equivalent to subtracting 8 units from the ANSI code!).


That's very interesting, I've always had the exact opposite problem where running it from LXDE had it working fine, but it would get garbled on console.

Are you running them as the same user? I.E. is you just do "startx" then wouldn't that be using the default "Pi" user, but if you did sudo dosbox wouldn't you be using root? That would be two separate conf files, right?
Dear forum: Play nice ;-)
User avatar
Moderator
Moderator
Posts: 4225
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
by 7F20 » Wed Sep 12, 2012 6:56 pm
abishur wrote:
diveroli wrote:For two days I found that running DOSBox from the console produced a garbled keyboard (in most cases a keypress would produce the result equivalent to subtracting 8 units from the ANSI code!).


That's very interesting, I've always had the exact opposite problem where running it from LXDE had it working fine, but it would get garbled on console.

Are you running them as the same user? I.E. is you just do "startx" then wouldn't that be using the default "Pi" user, but if you did sudo dosbox wouldn't you be using root? That would be two separate conf files, right?


Umm. No disrespect intended here, but it seems like you misread his post, he is also having problems with a garbled keyboard in console. he is at the same place as us (assuming someone else has not solved the problem there seems to be with running in VGA or composite mode) but i think he just didn't read the whole thread on the keyboard problems that answered his questions better than this thread.
I'm not saying the keyboard issue is non-existent, but that there is another thread for it.
search "dosbox keyboard"
User avatar
Posts: 13
Joined: Tue Jul 24, 2012 2:45 am
Location: New York
by abishur » Wed Sep 12, 2012 8:48 pm
7F20 wrote:
abishur wrote:
diveroli wrote:For two days I found that running DOSBox from the console produced a garbled keyboard (in most cases a keypress would produce the result equivalent to subtracting 8 units from the ANSI code!).


That's very interesting, I've always had the exact opposite problem where running it from LXDE had it working fine, but it would get garbled on console.

Are you running them as the same user? I.E. is you just do "startx" then wouldn't that be using the default "Pi" user, but if you did sudo dosbox wouldn't you be using root? That would be two separate conf files, right?


Umm. No disrespect intended here, but it seems like you misread his post, he is also having problems with a garbled keyboard in console. he is at the same place as us (assuming someone else has not solved the problem there seems to be with running in VGA or composite mode) but i think he just didn't read the whole thread on the keyboard problems that answered his questions better than this thread.
I'm not saying the keyboard issue is non-existent, but that there is another thread for it.
search "dosbox keyboard"


Whoops, you're right. I read it backwards :oops:
Dear forum: Play nice ;-)
User avatar
Moderator
Moderator
Posts: 4225
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
by diveroli » Thu Sep 13, 2012 2:36 pm
After lenghty experiments, my final suggestions. Under Raspbian, DOSBOx can be run in two ways:

- from the console: this I do not recommend because, though it is nice to see the whole screen covered by DOSBox, DOSBox may crash, or else it may start OK then a game you run may hang: in either case, the whole RPi crashes (or so it seems, I am unable to "key" my way out).

- from LXDE (either Run or LZ terminal produce a new DOSBox window): the DOSBox window now has a smaller size (640x480), includes a few very useful parameters on top, and if it crashes you just close the window. Finally, I cannot observe any detrimental effect in processing power: I testedFlight Simulator 3 both ways, and could not observe any significant difference in frame rates.

Best of luck,
Joe
Posts: 20
Joined: Sat Sep 08, 2012 10:20 pm
by 7F20 » Mon Sep 24, 2012 11:12 pm
Please list specific troubleshooting steps that you went through in you "lengthy experiments."

I believe that all of the folks working on this issue have experimented by trying different games in and out of console, and are clearly experiencing some differences in the performance. If you have some new data, that isn't just running different games/programs in dosbox, then it would be nice to have that documented here.




diveroli wrote:After lenghty experiments, my final suggestions. Under Raspbian, DOSBOx can be run in two ways:

- from the console: this I do not recommend because, though it is nice to see the whole screen covered by DOSBox, DOSBox may crash, or else it may start OK then a game you run may hang: in either case, the whole RPi crashes (or so it seems, I am unable to "key" my way out).

- from LXDE (either Run or LZ terminal produce a new DOSBox window): the DOSBox window now has a smaller size (640x480), includes a few very useful parameters on top, and if it crashes you just close the window. Finally, I cannot observe any detrimental effect in processing power: I testedFlight Simulator 3 both ways, and could not observe any significant difference in frame rates.

Best of luck,
Joe
User avatar
Posts: 13
Joined: Tue Jul 24, 2012 2:45 am
Location: New York
by malakai » Mon Oct 08, 2012 10:13 pm
Here's my experience and console was not the way to go for me constant lockups wiped a SD Card now to restore and start again :twisted:

I did get sound to work
sudo modprobe snd_bcm2835
sudo amixer cset numid=3 1

a basic config got warcraft 2 open and playing but I read moby dick while i waited it didn't crash though.

removed the comments and such so it's not a wall of text

Code: Select all
[sdl]
fulldouble=false
output=surface
sensitivity=100
mapperfile=mapper.txt

[dosbox]
machine=vga
memsize=8

[cpu]
core=simple
cputype=386
cycles=1200

[mixer]
nosound=false
rate=22050
blocksize=2048
prebuffer=30

[sblaster]
sbtype=sb1
sbbase=220
irq=7
dma=1
hdma=5
mixer=true
oplmode=auto
oplrate=22050

[gus]
gus=false
gusrate=22050
gusbase=240
irq1=5
irq2=5
dma1=3
dma2=3
ultradir=

[speaker]
pcspeaker=true
pcrate=22050
tandy=auto
tandyrate=22050
disney=true

[joystick]
joysticktype=none

[dos]
xms=true
ems=true
umb=true

[autoexec]
mount C home/pi/dosprog
c:

To run:
dosbox -userconfig

midi was 14:0 forgot to put that in there run your mixer with the -l switch

Popping and buzzing very low but still there. Warcraft I almost playable, Mario ok but not the best port. Blood worked after tweaking setup. Arkanoid playable that's about it for now back to restoring.
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)
User avatar
Posts: 1383
Joined: Sat Sep 15, 2012 10:35 am
by omicrondelta » Wed Oct 17, 2012 2:57 pm
You WILL NOT get DOSBox working in a console. Ever. Well, not ever unless you hack the source yourself. It's linked against SDL, so therefore it's designed to work in an X environment.

If you want to emulate DOS in a console, then use dosemu.
Posts: 2
Joined: Wed Oct 17, 2012 2:54 pm
by abishur » Wed Oct 17, 2012 3:20 pm
omicrondelta wrote:You WILL NOT get DOSBox working in a console. Ever. Well, not ever unless you hack the source yourself. It's linked against SDL, so therefore it's designed to work in an X environment.

If you want to emulate DOS in a console, then use dosemu.


An interesting pronouncement seeing as I run it from console all the time... :?

Or perhaps it's a semantics game? ;-) Technically speaking it's just run from console outside the X11 environment and initiates an instance of X. This saves a ton of resources, and it works very well, but *technically* one could make the argument that it isn't "working" in console.
Dear forum: Play nice ;-)
User avatar
Moderator
Moderator
Posts: 4225
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
by JRT » Wed Oct 17, 2012 5:01 pm
I run it on Raspbmc which doesn't even have an x environment, so it doesn't need one.
Posts: 28
Joined: Tue Jul 17, 2012 2:44 pm
by Overtonesinger » Wed Oct 31, 2012 1:03 pm
Maybe we should ask author of this "DOSBox Turbo" (ARMv7 optimised DOSBox with full x86 CPU emulator!) , which runs smoothly DOOM2, UFO and nearly everything... (with FRAMESKIP = 6) on my 4.0.3 ICSandwitch powered "HTC One-V" with ARMv7 1 GHz CPU and 256 MB RAM... to just compile this outstanding piece of software for ARMv6 also !
For Raspberry Pi, please! Lets all write to him. :D
What do You say? ;)

Here is the link to the app at GooglePlay (it is very, very cheap app.) :
https://play.google.com/store/apps/deta ... tix.dosbox


Filip
Posts: 1
Joined: Wed Oct 31, 2012 12:35 pm