Can't Get Dosbox Working


Prosthetic_Mind

Still Fresh
Joined
Sep 6, 2008
Messages
43
Ok, so I've had my GP2X F-200 for more than 6 months now and been very happy, but ultimately I've been trying to get dosbox working without success. With DosBox 0.72-5 it seems that no matter what config I put in, it seems to just load up the command prompt initializing the sound card without actually running the game, and leaves me at the command prompt, unable to do anything due to not having a keyboard hooked up. It's obvious that it's running the config, because the buttons I bind actually show up on the commandline, but it doesn't run the starting script to run the game.
 
Prosthetic_Mind said:
Ok, so I've had my GP2X F-200 for more than 6 months now and been very happy, but ultimately I've been trying to get dosbox working without success. With DosBox 0.72-5 it seems that no matter what config I put in, it seems to just load up the command prompt initializing the sound card without actually running the game, and leaves me at the command prompt, unable to do anything due to not having a keyboard hooked up. It's obvious that it's running the config, because the buttons I bind actually show up on the commandline, but it doesn't run the starting script to run the game.
Sounds like a problem with the autoexec section of your dosbox.conf. Post what you have for that part.
 
Last edited by a moderator:
Pickle said:
Sounds like a problem with the autoexec section of your dosbox.conf. Post what you have for that part.
sure. I've tried multiple configs, including both of the auto-config generators

[autoexec]
mount C "/mnt/sd/dosbox/SSHOCK"
c:
cls
SSHOCK.EXE
exit

[autoexec]
mount C "/mnt/sd/dosbox/SSHOCK"
c:
SSHOCK
exit

are two examples of ones that haven't worked
 
Last edited by a moderator:
I dont see anything wrong with that, can you post your gpe script? You should see the commands trying to execute if the dosbox.conf is being loaded right.
Also system shock is not going to be even close to playable even if it does load.
 
Pickle said:
I dont see anything wrong with that, can you post your gpe script? You should see the commands trying to execute if the dosbox.conf is being loaded right.
Also system shock is not going to be even close to playable even if it does load.
guide says it can run, albeit with low fps. I figure that with some tweaking I may be able to get it to work on some level.

here are the 2 gpes that I haven't been able to get working

#! /bin/sh
/mnt/sd/cpu_speed.gpe 1 -20 250
DIRROOT=/mnt/sd/dosbox
DIRGAME=${DIRROOT}/SSHOCK
cd ${DIRGAME}
${DIRROOT}/dosbox -conf ${DIRGAME}/dosbox.conf
cd /usr/gp2x
exec /usr/gp2x/gp2xmenu


#! /bin/sh
DIRROOT=/mnt/sd/dosbox
DIRGAME=${DIRROOT}/SSHOCK
cd ${DIRGAME}
${DIRROOT}/dosbox -conf ${DIRGAME}/dosbox.conf
cd /usr/gp2x
exec /usr/gp2x/gp2xmenu

EDIT: I mean, it originally came out on floppies and minimum reqs are 4 MB, I should be able to get it running with the settings on low.
 
Last edited by a moderator:
I dont see anything wrong with those either. Can you verify you have the following:

dosbox is in dir with the same case: /mnt/sd/dosbox
game is in dir with the same case: /mnt/sd/dosbox/SSHOCK
The 3 files needed to run: the gpe script, dosbox.conf, mapper.txt are located in the game directory.

If thats correct im out of ideas, I guess you post your dosbox.conf in full. The script must be working as dosbox loads to the prompt, but then you dont see any of the commands from the dosbox.conf in your game dir execute, which to me points to the dosbox.conf. But I didnt see anything wrong with that section, unless what you posted isnt in the right dosbox.conf located in the game dir.

What guide are you refering to? The critical requirement for the game isnt the memory but the is clockspeed needed. If it tells you anything I couldnt get doom to run at the lowest of detail levels.
Im not trying to get you to stop trying, but I dont want you to be surprised when it doesnt work as you expect.
 
http://wiki.gp2x.org/wiki/DosBox

"System Shock Barely Works 200MHz, fps is very low, approximately 0,5-1 fps VGA 0.72 "

dosbox.conf 1
dosbox.conf 2

the dosbox folder is in the root directory, and SSHOCK is inside the dosbox folder, with all the capital letters double and triple checked.

also it obviously pays attention to mapper.txt because the keystrokes that I set in it can be put in at the dos prompt.
 
rename the folder SSHOCK to sshock and update all the other files to match. I duplicated what you see and by setting it to lower case it was fine.
 
Pickle said:
rename the folder SSHOCK to sshock and update all the other files to match. I duplicated what you see and by setting it to lower case it was fine.
ok, thanks. I didn't figure that it would be weird about the case, but it's good to know.
 
Last edited by a moderator:
Prosthetic_Mind said:
Pickle said:
rename the folder SSHOCK to sshock and update all the other files to match. I duplicated what you see and by setting it to lower case it was fine.
ok, thanks. I didn't figure that it would be weird about the case, but it's good to know.

Well if you get it to work let me know, make sure you use the dynamic core and post back with how it ran,
 
Last edited by a moderator:
Pickle said:
does it work yet?
I had some problems getting it running after getting the exe to work, and I eventually had to mess with some INIs, I've been pretty busy lately though, so there's still plenty to work on.

EDIT: as expected, it's running too slowly. In your experience, what are the highest settings that the GP2X port of dosbox can handle? I'm fairly familiar with doxbox on the PC, and I can run them side by side, but the speed is an issue. I plan on jacking up the ram to 8 mb, seeing how high I can force the cycles, and of course overclocking my GP2X to get optimal results. Do you know of any "sweet spots" where it behaves more efficiently?
 
Last edited by a moderator:
It doesn't seem realistic. I've played with it a good bit, and I guess that even though a direct port should be feasible, the efficiency of doxbox on the GP2X is too low to get it to run. If I knew more about optimizing ARM binaries I'd give it a shot myself, but I bet that the creator has already put a good amount of time and effort into getting it to work as well as possible.

If only Looking Glass hadn't been shattered and sold off in so many pieces that there would be one entity with enough intellectual property rights to release the source code under GPL.
 
Prosthetic_Mind said:
It doesn't seem realistic. I've played with it a good bit, and I guess that even though a direct port should be feasible, the efficiency of doxbox on the GP2X is too low to get it to run. If I knew more about optimizing ARM binaries I'd give it a shot myself, but I bet that the creator has already put a good amount of time and effort into getting it to work as well as possible.
Did you make sure to use dynamic in your dosbox.conf?
Im not sure exactly what you mean by a direct port being possible or optimizing the ARM binaries. Theres not much we can do other than hope M-HT comes up with more improvements to the dynarec, but i think its hit the limit. Dosbox is about as fast as it can be on the GP2X.

Prosthetic_Mind said:
If only Looking Glass hadn't been shattered and sold off in so many pieces that there would be one entity with enough intellectual property rights to release the source code under GPL.

Its quite unforuntate the source was never released.
 
Last edited by a moderator:
What I was thinking about when I was talking about direct ports was the idea that some programs in linux can be cross-compiled to a different platform that also runs on linux regardless of architecture, meaning in some cases you can just copy the code and it runs. Some tweaking is involved of course, but it doesn't involve a complete rewrite.

As for optimizing binaries, there are almost always little flaws a compiler can make when creating a binary to be run on a system, so if you have the knowledge of machine code and a good understanding of the way the system handles things hardware-wise, you can basically get things to work much better at no expense other than the prohibitive amount of time it takes to do it manually.

Let me put it like this- most programs nowadays are written in a manner so that they are the most easy to read and the fastest to type out, but there are other, potentially much more cryptic, difficult, and time consuming methods that work much, much, better.
If you use these methods then you can get things to run with incredible efficiency, to the point of where it seems miraculous that you can get so much out of so little.

Edit: sorry if it's a little cryptic, but I'm doing some of this stuff in my classes and it makes me excited to think about the possibilities and how it's done even if I am still just learning.

Hey, I didn't realize you were the guy who ported it, thanks for the good work! Out of curiosity, how much did you have to rewrite?
 
I didnt really have to rewrite much at all dosbox is written to be portable (thus why it is slow). The big problem with dosbox is the memory requrement, I made one change that saved 15 MB. Ive also added SDL/TTF code to do the virtual keyaboard. It also been the work of many our people, one guy does the touscreen, another did the dynamic backend.

ok i tke your refering to dosbox alone with the direct port? Theres nothig you can do to SS1 or any dos app to make it run better sense you dont have any source code.
As for optimizing sure I agree there is probally problems with the code, although keep in mind with dosbox a lot of time is spent in the core code. But sense a dynamic core is used there really isnt much you can do with optimizing since the dynamic core is generating the arm code.
I think your also thinking if a situation where some applications use ARM code directly, like some programs like mame use code for cercatin cpus written all in ARM, of course this is really fast, but it wont run on any other arch. Its a big tradeoff, yu can get faster but you cant port it to run on another arch.

The only way to get x86 dos applications to run faster on the gp2x is to build a full recompiling dynamic emulator as I understand it. The current core only recompilies certain parts of the code.
 
Sorry for stealing this thread. I've just jumped into Dosbox. I've copied 0.72-5 to my card root and installed a random game (Hoyle's book of games part 1) in a subdir of the dosbox dir. Took the sample config/mapper/gpe (from the Duke Nukem sample dir), edited the paths and got it running all at once, including mouse emulation on my F200's touchscreen.

But I've got many questions left, all about the GP2X port. Is there some place where I can find docs about the GP2X port? Like using the virtual keyboard on the touchscreen (at least I understood there must be something like that in the last few builds) and exiting dosbox without the need to reboot the GP2X (can't type "exit" at the prompt without virtual keyboard). Maybe there are "secret" key combo's to activate extra's?
 
Squirrel61 said:
Sorry for stealing this thread. I've just jumped into Dosbox. I've copied 0.72-5 to my card root and installed a random game (Hoyle's book of games part 1) in a subdir of the dosbox dir. Took the sample config/mapper/gpe (from the Duke Nukem sample dir), edited the paths and got it running all at once, including mouse emulation on my F200's touchscreen.

But I've got many questions left, all about the GP2X port. Is there some place where I can find docs about the GP2X port? Like using the virtual keyboard on the touchscreen (at least I understood there must be something like that in the last few builds) and exiting dosbox without the need to reboot the GP2X (can't type "exit" at the prompt without virtual keyboard). Maybe there are "secret" key combo's to activate extra's?
Maybe try the README that comes with the zip? :huh:
 
Last edited by a moderator:
Pickle said:
Maybe try the README that comes with the zip? :huh:


That's what I started with. In contrary to most users, I start by reading the readme or whatever docs come with a program. But it didn't help me much. I've re-read it and have come to the conclusion that my mapper must be wrong.
 
Last edited by a moderator:
Squirrel61 said:
Pickle said:
Maybe try the README that comes with the zip? :huh:


That's what I started with. In contrary to most users, I start by reading the readme or whatever docs come with a program. But it didn't help me much. I've re-read it and have come to the conclusion that my mapper must be wrong.



Well i wrote it, so if something isnt clear I would like to know so I can fix it.
If you ask specific items I will help.

First you mentioned the VK (virt keyboard), its all button driven it doesnt react to the touchscreen if thats what you were expecting to do. Pretty much you map a key to turn it on and start turns it off.
Getting back to the menu can be done a number of ways
First to tell dosbox to quit you can:
1. Exit the game normally and have an exit command in your autoexec section of the dosbox.conf to terminate dosbox
2. Theres a built in mapper action that can be mapped to a button that can terminate dosbox in whatever state its in,
Once dosbox has terminted there are two ways to start up gmenu2x
1. Set your icon in gmenu2x to restart itself (I use this method)
2. Put the commands yourself in the mygame.gpe script

Any more questions just fire away,
 
Last edited by a moderator:
Back
Top