Dosbox 0.72-1 For Gp2x


fusion_power said:
The whole config and Mapping thing is very frustrating, a good Frontend for GP2X would be great, where you can map the Buttons and set the cfg. straight out of the program without using a PC or external Editor.
I am really wanting to do something like this, I already have it in my mind, I just need to find the time to do it... :rolleyes:
 
Last edited by a moderator:
fusion_power said:
Wow, DosBox on GP2X really works! :) Nice. I have tried it with Keen4, even my old Savegames work after 15 Years or so and the good old PC-Speaker-Sound is also very familar :D .
The whole config and Mapping thing is very frustrating, a good Frontend for GP2X would be great, where you can map the Buttons and set the cfg. straight out of the program without using a PC or external Editor.
It took some time to get Keen4 to work, the Example files from the Wiki are incomplete, there are no diagonals in the Button-Mapping for example and it was a little bit of work to set diagonals for the Game.

I haven't tried the ingame-Menu but the scaling example from the readme works. I can't switch back to unscaled mode but however, all in all the DosBox on the GP2X is a nice gimmic. :)
I did post the diag's mapped to arrows somewhere maybe this thread.
The scaling is only turned off and on from the dosbox.conf. The easy way is just remove the gp2x_fullscreen line, its set to false by default.
 
Last edited by a moderator:
As for mapping controls, I may have mentioned this before in another thread but I think one of the better ways of configuring controls is the way in which the PSP version of DOSBOX does it.
They have an INPUTMAP command which can be used within a .bat file.
the INPUTMAP command maps a command to a key:

ie.
INPUTMAP up w
INPUTMAP down x
INPUTMAP left a
INPUTMAP right d
INPUTMAP b space
INPUTMAP a enter
INPUTMAP exec game.exe

etc.

The last line executes the game.

You need to create a .bat file for each game you want to run but once it's done, it's easy to share with others.
If this isn't a standard DOSBOX feature, it could probably be borrowed <_< from the PSP DOSBOX code easily enough?

I usually run the game on my Mac version of DOSBOX to see what controls are available and then construct the .bat file as I go.
 
slaanesh said:
They have an INPUTMAP command which can be used within a .bat file.
You need to create a .bat file for each game you want to run but once it's done, it's easy to share with others.
If this isn't a standard DOSBOX feature, it could probably be borrowed <_< from the PSP DOSBOX code easily enough?
I just tried it on the windows build the command didnt work. They must have added it. Maybe we can look into it.

If the command was there also it probally could even be added the autoexec part the of the dosbox.conf, getting rid of one more file to keep track of.
 
Last edited by a moderator:
bman said:
Did I miss where I can map a right mouse click on an F200? Trying to get Menzoberranzan to work.
Sorry, no right-mouse yet... must think a way to make it work with the available buttons.
 
Last edited by a moderator:
Pickle said:
If the command was there also it probally could even be added the autoexec part the of the dosbox.conf, getting rid of one more file to keep track of.
Well the idea is that it's not generic - you have specific .bat files for each game as invariably the controls are different for each game.
Whilst there might be some generic controls that work well (like cursor keys mapped to the joypad controller) it's just as likely that things like a "fire" button are space, enter or some other keystroke.
There are two other forms of mapping that I think would be very handy:

1). Map simultaneous keystrokes to a single button. ie. INPUTMAP start CTRL+C
2). Map consecutive keystrokes (macro) to a single button. ie. INPUTMAP start s,t,a,r,t

In 1). if you hit the 'start' button the resulting PC keystroke is CTRL+C at the same time.
In 2). if you hit the 'start' button the resulting PC keystrokes "s t a r t" would be sent one after the other.

The second option would be useful for registering names and other strings as well as being able to map several keys to one stroke so that one button could do several functions depending on the context.
It could also be useful for selecting starting up parameters as many old PC games would ask you what configuration you would like:

Press V for VGA, E for EGA, C for CGA
Press 1 for PC Speaker, 2 for Tandy Sound, 3 for Adlib
Press J for Joystick, K for Keyboard

So instead of having to map all these keys you could just map one button and it would send the right sequence of characters.

What do you think?

(Of course the best portable option would be a virtual keyboard with touchscreen support and a means of mapping buttons to keystrokes on-the-fly :D )
 
Last edited by a moderator:
Hitnrun said:
Sorry, no right-mouse yet... must think a way to make it work with the available buttons.
Is there any reason why holding down L (or R) and then pressing the stylus can't count as right a mouse click?

slaanesh said:
(Of course the best portable option would be a virtual keyboard with touchscreen support and a means of mapping buttons to keystrokes on-the-fly :D )
Is there any reason we couldn't have scumm type predictive text input overlay thing for games that require a lot of typing?
Perhaps the pixels at the bottom of the screen that are left blank for certain unscaled games could have a virtual keyboard? Alternatively, the way UAE on GP2X handles a keyboard could also work for DOSBox? I just don't know how much - in the way of resources - this would take away from DOSBox, which already struggles to emulate the soundblaster and vga. Mind you, most Soundblaster/VGA games had mouse input too, so it might not matter too much?
 
Last edited by a moderator:
Hitnrun said:
fusion_power said:
The whole config and Mapping thing is very frustrating, a good Frontend for GP2X would be great, where you can map the Buttons and set the cfg. straight out of the program without using a PC or external Editor.
I am really wanting to do something like this, I already have it in my mind, I just need to find the time to do it... :rolleyes:

I have time but no talent for such things - the life is unfair. ^_^

Pickle said:
I did post the diag's mapped to arrows somewhere maybe this thread.
The scaling is only turned off and on from the dosbox.conf. The easy way is just remove the gp2x_fullscreen line, its set to false by default.
Yo, with a nice frontend, all the config-stress is gone. ;) And my diagonals are working fine, my mapper.txt for keen4 looks like this:

CODE

hand_decfskip "key 107" (increase frameskip with Left shoulder)
hand_incfskip "key 108" (decrease frameskip with right shoulder)
hand_cycledown "key 114" (decrease cycles emulated per second with volume -)
hand_cycleup "key 113" (increase cycles emulated per second with volume +)
key_esc "key 106" (Esc = Select)
key_lctrl "key 109" (ctrl = A)
key_lalt "key 110" (alt = B)
key_space "key 112" (space= X)
key_enter "key 105" (enter= Start)
key_up "key 97" (key up - Joystick up)
key_up "key 98"
key_up "key 104"
key_left "key 98"
key_left "key 99" ()
key_left "key 100"
key_down "key 100"
key_down "key 101" ()
key_down "key 102"
key_right "key 102"
key_right "key 103" ()
key_right "key 104"
key_y "key 115" (Key Y = Joystick button, necesary for quitting the game)
hand_g2zoom "key 107 mod2"
hand_g2nozoom "key 108 mod2"
hand_g2zleft "key 99 mod2"
hand_g2zright "key 103 mod2"
hand_g2zup "key 97 mod2"
hand_g2zdown "key 101 mod2"
hand_g2zmore "key 111 mod2"
hand_g2zless "key 112 mod2"
mod_2 "key 115" "key 305"
hand_g2debug "key 106 mod2"


I think I can kick all the scaling-stuff, it doesn't look that good and it makes emulation slow. The On-Screen-Display is a nice gimmick but why I need a external font? AND the OSD could be onto the bottom of the screen instead ontop. Many older Dos-Games have the smaller 320x200 res. and Dosbox places the Image upwards so we have many free space under the Game-screen if the Game is unscaled. ;)
And maybe the unscaled Game-Screen could be placed in the middle of the GP2X-screen so we have black bars up and down, looks more like 16:9 I think. :D
 
Last edited by a moderator:
Could you please explain what is happening here:

key_up "key 97" (key up - Joystick up)
key_up "key 98"
key_up "key 104"
key_left "key 98"
key_left "key 99" ()
key_left "key 100"
key_down "key 100"
key_down "key 101" ()
key_down "key 102"
key_right "key 102"
key_right "key 103" ()
key_right "key 104"

Is that only for joystick? How can we do diagonals that would be on the keyboard (say, the numeric keyboard's diagonals)
 
BadAstronaut said:
Could you please explain what is happening here:

key_up "key 97" (key up - Joystick up)
key_up "key 98"
key_up "key 104"
key_left "key 98"
key_left "key 99" ()
key_left "key 100"
key_down "key 100"
key_down "key 101" ()
key_down "key 102"
key_right "key 102"
key_right "key 103" ()
key_right "key 104"

Is that only for joystick? How can we do diagonals that would be on the keyboard (say, the numeric keyboard's diagonals)
Nope, it also works for the F-200's D-pad as the diagonals are registered as seperate buttons.

You can map more than one key to a button, and they would be executed at the same time when the button is pressed.

This is mapping two directions to each of the diagonals. For "key 98" (which is the Up-Left diagonal), it maps both key_up & key_left which when combined result into a Up-Left diagonal in the game (if supported). Likewise to "key 100", "key 102", & "key 104".

For the numeric keypad, it would be something like this:

CODE

key_kp_7 "key 98"
key_kp_8 "key 97"
key_kp_9 "key 104"
key_kp_4 "key 99"
key_kp_6 "key 103"
key_kp_1 "key 100"
key_kp_2 "key 101"
key_kp_3 "key 102"
 
Last edited by a moderator:
I have found that some games work with HOME/PGUP/arrows as diagonals and controls and not KP1-9. This may be a trial and error per instance unless DOSBOX can enable NUMLOCK automatically.
 
BadAstronaut said:
Is there any reason why holding down L (or R) and then pressing the stylus can't count as right a mouse click?
Another possibility would be to have a "tap" be a left-mouse click, while keeping the stylus on the screen longer would count as a right-mouse click. Or vice-versa. Not sure how well that would work, but there could be an option to turn this off for games that don't need a right mouse button.
 
Last edited by a moderator:
fusion_power said:
I think I can kick all the scaling-stuff, it doesn't look that good and it makes emulation slow.
The On-Screen-Display is a nice gimmick but why I need a external font? AND the OSD could be onto the bottom of the screen instead ontop. Many older Dos-Games have the smaller 320x200 res. and Dosbox places the Image upwards so we have many free space under the Game-screen if the Game is unscaled. ;)


You need the font because we used the SDL_ttf library, that's how it knows to draw the letters/numbers.
It's not exactly that simple, the game is actually setting SDL into a 320x200 mode, when your in that mode you dont actually have access to that area of the screen, in other word the SDL buffer is only 320x200. Maybe it would be possible to switch modes on the fly, but could break something.

fusion_power said:
And maybe the unscaled Game-Screen could be placed in the middle of the GP2X-screen so we have black bars up and down, looks more like 16:9 I think. :D


I think it would be easier to do this from the low level SDL side.
 
Last edited by a moderator:
is there a method to map left and right mouse buttons to gp2x keys?
also the touchscreen is really not accurate, and yes, i have gp2x_blabla to true...

oh also, when clicking with the stick the emu slow down a lot :(

edit:
the osd is also messed up, but maybe is the font i tried it with :\
How about having the font directly in the release? there are plenty of free to use fonts out there so can you add the one you used to the emulator?

edit#2:
ok, mouse touchscreen emulation is totally useless or hard to use at the moment: no gp2x buttons binds, slowdown, need the game scaled to work and it will slowdown the game as well an in some cases will mess up the graphics :(
So, in sum i wasted about an hour on this trying also an old version i had, basically the only new thing is an unuseful OSD that barely works

anyway, nice stuff, it's almost the same as the old one for me atm but it could be turn great with this thing to bind the mouse buttons
 
Eclipse said:
is there a method to map left and right mouse buttons to gp2x keys?
also the touchscreen is really not accurate, and yes, i have gp2x_blabla to true...


Right now when ever you touch the screen it registers as a left click. I think we could add an option to use the a button as a modifier to do right clicks.
It could be possible to generate mouse button events with the buttons.

Eclipse said:
oh also, when clicking with the stick the emu slow down a lot :(


Thats strange, the only thing i can think is that the SDL is running a lot more code once you use the touchscreen.

Eclipse said:
edit:
the osd is also messed up, but maybe is the font i tried it with :\
How about having the font directly in the release? there are plenty of free to use fonts out there so can you add the one you used to the emulator?


The only thing that ive seen is a flickering effect. I tried to get rid of it, but why it occurs aludes me.
I thought about including the font i found, it was "free", but I didnt see anything on releasing it.

Eclipse said:
edit#2:
ok, mouse touchscreen emulation is totally useless or hard to use at the moment: no gp2x buttons binds, slowdown, need the game scaled to work and it will slowdown the game as well an in some cases will mess up the graphics :(
So, in sum i wasted about an hour on this trying also an old version i had, basically the only new thing is an unuseful OSD that barely works


I cant say too much about the touchscreen as ive never tried it. I dont have a F200.
But it should improve as SDL gets more ironed out. Im wondering what exactly about the OSD that you dont like?

Eclipse said:
anyway, nice stuff, it's almost the same as the old one for me atm but it could be turn great with this thing to bind the mouse buttons

To me the biggest/best change is stability. With all of the other dosbox versions you were lucky if it even loaded up the game you wanted it to. I think with this version at least the game will load.
Dosbox in general is still going to be slow, about the only thing that will change it is a dynarec.
 
Last edited by a moderator:
Pickle said:
Eclipse said:
is there a method to map left and right mouse buttons to gp2x keys?
also the touchscreen is really not accurate, and yes, i have gp2x_blabla to true...


Right now when ever you touch the screen it registers as a left click. I think we could add an option to use the a button as a modifier to do right clicks.
It could be possible to generate mouse button events with the buttons.

Eclipse said:
oh also, when clicking with the stick the emu slow down a lot :(


Thats strange, the only thing i can think is that the SDL is running a lot more code once you use the touchscreen.

Do a search on google site:gp32x.de EVENTTHREAD and you'll find a mention of a halfway fix for this in this thread several posts down:

http://www.gp32x.de/board/index.php?showt...3819&st=480

Also: please, when adding the right-click modifier, also add an option to never register clicks at all with the touchscreen taps, let them only move the cursor itself and have any and all clicking solely done with GP2X buttons. (Sometimes, like with the ScummVM GP2X port, it gets annoying wanting to float your cursor over something but not click on it)
 
Last edited by a moderator:
Manjuu said:
BadAstronaut said:
Could you please explain what is happening here:

key_up "key 97" (key up - Joystick up)
key_up "key 98"
key_up "key 104"
key_left "key 98"
key_left "key 99" ()
key_left "key 100"
key_down "key 100"
key_down "key 101" ()
key_down "key 102"
key_right "key 102"
key_right "key 103" ()
key_right "key 104"

Is that only for joystick? How can we do diagonals that would be on the keyboard (say, the numeric keyboard's diagonals)
Nope, it also works for the F-200's D-pad as the diagonals are registered as seperate buttons.

You can map more than one key to a button, and they would be executed at the same time when the button is pressed.

This is mapping two directions to each of the diagonals. For "key 98" (which is the Up-Left diagonal), it maps both key_up & key_left which when combined result into a Up-Left diagonal in the game (if supported). Likewise to "key 100", "key 102", & "key 104".

For the numeric keypad, it would be something like this:

CODE

key_kp_7 "key 98"
key_kp_8 "key 97"
key_kp_9 "key 104"
key_kp_4 "key 99"
key_kp_6 "key 103"
key_kp_1 "key 100"
key_kp_2 "key 101"
key_kp_3 "key 102"



Exactly. Because the Keyboard only has 4 Arrows for direction, in many games we have to push 2 Buttons at once for diagonal directions. With the GP2X Stick this is impossible because Diagonals are seperate Buttons, (F-200 Pad could work the PC-Keyboard way, but I haven't a F-200) so I have simply mapped 2 directions for the diagonals and for my surprise, it works! :)

Pickle said:
fusion_power said:
I think I can kick all the scaling-stuff, it doesn't look that good and it makes emulation slow.
The On-Screen-Display is a nice gimmick but why I need a external font? AND the OSD could be onto the bottom of the screen instead ontop. Many older Dos-Games have the smaller 320x200 res. and Dosbox places the Image upwards so we have many free space under the Game-screen if the Game is unscaled. ;)


You need the font because we used the SDL_ttf library, that's how it knows to draw the letters/numbers.
It's not exactly that simple, the game is actually setting SDL into a 320x200 mode, when your in that mode you dont actually have access to that area of the screen, in other word the SDL buffer is only 320x200. Maybe it would be possible to switch modes on the fly, but could break something.

fusion_power said:
And maybe the unscaled Game-Screen could be placed in the middle of the GP2X-screen so we have black bars up and down, looks more like 16:9 I think. :D


I think it would be easier to do this from the low level SDL side.

Ah, OK, this makes sense.
 
Last edited by a moderator:
Senor Quack said:
Do a search on google site:gp32x.de EVENTTHREAD and you'll find a mention of a halfway fix for this in this thread several posts down:
http://www.gp32x.de/board/index.php?showt...3819&st=480



I assume your refering to this: add SDL_INIT_EVENTTHREAD to SDL_Init()
Has this worked for you? The person with the problem in the thread says later it didnt work for him.
 
Last edited by a moderator:
Back
Top