Dosbox 0.65 For Gp2x


bOingball

Still Fresh
Joined
Aug 8, 2006
Messages
86
This port is based on the work from 'Jim "bjimba" Russell' who compiled an older Dosbox CVS to run on the GP2X.

I've basically put bjimba's patch into the latest stable 0.65 build.

I've done this as the orignal Dosbox did not work on my GP2X (all I was getting was a black screen)
when trying to load a game.

This version seems to work with some games but not all. (like the orignally included blockout game)

Some of the main features of v0.65 are :

* 4/15/16/32bpp VESA mode support
* Lot's of fixes for better VGA compatibility
* Improved CGA composite output
* Improved screen updating for more speed
* PCjr machine mode added
* Speedup cpu cores and fix endian issues
* FPU core speedup with assembly
* Improved keyboard and bios handling
* Lockfree mouse mode added again
* Improved builtin dos with umbs and better fat support
* Added VCPI emulation and fixed some issues with ems
* Improved support for booter games

Download is available at : http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,5,1750

Please try out and enjoy.

This Dosbox will work on Firmware v2.0.0

Regards
bOingball
 
Glad you like it Hackgrid!.

A few extra notes to add.

The dosbox.conf file format has changed a little bit to make it work with version 0.65.

Code:
 [sdl]
 mapperfile=./mapper.txt has changed to mapperfile=mapper.txt
 
 [cpu]
 core=normal has changed to core=simple as default as this should be faster on the GP2X
 cycles=xxx has been added, as before Dosbox was using it's default of 3000 which will kill performance on the GP2X, please try different cycles number for different games, I've been going from about 450 - 1200 to see if I can get the game smooth and work correctly.

 [sblaster]
 type=sb1 has been changed to sbtype=sb16 (this is needed in 0.65).

 [dos]
 umb=true has been added as v0.65 supports umb emulation.

 [autoexec] format is case sensitive! - if you game is called GAME.COM it will need to be added in this section as GAME.COM (game.com will cause Dosbox to crashout to the main menu).

I hope everyone enjoys this release, and optimising it is my next job, also if a new version does come out I'll work on porting that to the GP2X as well.

Regards
bOing
 
This is sweet! I got Pool of Radiance running! Plays decently fast, although the sound isn't right.

Thanks bOingball!
 
In fact many good dos games ar available on many platforms.
Is there any missing .?
 
Hmmm.

Tried out Duke Nukem 1 again, with all the same settings and changed the core=simple. The speed is about the same as the old version, and the sound is actually a bit rougher and buggy. Kind of dissapointing. Although, I don't have to load up a Neo Geo game before running the program anymore.

I was overclocking at 266mhz and added frameskip=2 as well!

Loaded up Raptor: Call of the shadows, not fast enough to be playable. Took forever to load too.

I'd thought there would be a major speed increase but no go, even after tweaking all the settings for 2 hours.

Anyway kind of a downer, but I hope you continue with porting dosbox, I've been fiddling with it for awhile and love the dos games. Again, I've only gotten really old EGA games like Duke Nukem 1 playable. I'm remaining optimistic that the port will improve.

Thanks for your efforts!
 
rmatheso have you tried to change the cycles in the config, if you leave it it will start at 3000 (which the 200Mhz Gp2x can't handle) - I usually start at 1000 and go 200 down and 200 up to see which seems to make it faster.

Please post your results :)

also I'll try duke 1 tonight and post what i think is the best config file - could you post your mapper.txt as I could do with having a pre-setup keys :)

Regards
bOing
 
Will do, It's late now but I'll see what I can dig up for tomorrow.

I'm using the Dosbox config creator 0.2 to re-map the keys. It also creates the config files as well, although I have to cross-reference the settings between the old and new setting files from both versions.

Anyway I tested Duke 1 at 500 Cycles, overclocked to 266mhz just like the old version. Here's what the OLD dosbox config files looked like:

mapperfile=./mapper.txt

fulldouble=false
fullfixed=false
fullresolution=0x0

output=surface

[dosbox]
machine=vga
captures=capture
memsize=4

[render]
frameskip=2
aspect=true
scaler=none

[cpu]
core=dynamic
cycles=500
cycleup=10
cycledown=10

[mixer]
# nosound -- Enable silent mode, sound is still emulated though.
# rate -- Mixer sample rate, setting any devices higher than this will
# probably lower their sound quality.
# blocksize -- Mixer block size, larger blocks might help sound stuttering
# but sound will also be more lagged.
# prebuffer -- How many milliseconds of data to keep on top of the blocksize.

nosound=false
rate=11025
blocksize=64
prebuffer=1000

[midi]
# mpu401 -- Type of MPU-401 to emulate: none, uart or intelligent.
# device -- Device that will receive the MIDI data from MPU-401.
# This can be default,alsa,oss,win32,coreaudio,none.
# config -- Special configuration options for the device. In Windows put
# the id of the device you want to use. See README for details.

mpu401=none
device=default
config=

[sblaster]
# sbtype -- Type of sblaster to emulate:none,sb1,sb2,sbpro1,sbpro2,sb16.
# sbbase,irq,dma,hdma -- The IO/IRQ/DMA/High DMA address of the soundblaster.
# mixer -- Allow the soundblaster mixer to modify the dosbox mixer.
# oplmode -- Type of OPL emulation: auto,cms,opl2,dualopl2,opl3.
# On auto the mode is determined by sblaster type.
# oplrate -- Sample rate of OPL music emulation.

sbtype=none
sbbase=220
irq=7
dma=1
hdma=5
mixer=true
oplmode=auto
oplrate=11025

[gus]
# gus -- Enable the Gravis Ultrasound emulation.
# gusbase,irq1,irq2,dma1,dma2 -- The IO/IRQ/DMA addresses of the
# Gravis Ultrasound. (Same IRQ's and DMA's are OK.)
# gusrate -- Sample rate of Ultrasound emulation.
# ultradir -- Path to Ultrasound directory. In this directory
# there should be a MIDI directory that contains
# the patch files for GUS playback. Patch sets used
# with Timidity should work fine.

gus=false
gusrate=11025
gusbase=240
irq1=5
irq2=5
dma1=3
dma2=3
ultradir=C:ULTRASND

[speaker]
# pcspeaker -- Enable PC-Speaker emulation.
# pcrate -- Sample rate of the PC-Speaker sound generation.
# tandy -- Enable Tandy Sound System emulation (off,on,auto).
# For auto Tandysound emulation is present only if machine is set to tandy.
# tandyrate -- Sample rate of the Tandy 3-Voice generation.
# disney -- Enable Disney Sound Source emulation.

pcspeaker=true
pcrate=11025
tandy=auto
tandyrate=11025
disney=true

[bios]
# joysticktype -- Type of joystick to emulate: none, 2axis, 4axis,
# fcs (Thrustmaster) ,ch (CH Flightstick).
# none disables joystick emulation.
# 2axis is the default and supports two joysticks.

joysticktype=2axis

[serial]
# serial1-4 -- set type of device connected to com port.
# Can be disabled, dummy, modem, directserial.
# Additional parameters must be in the same line in the form of
# parameter:value. Parameters for all types are irq, startbps, bytesize,
# stopbits, parity (all optional).
# for directserial: realport (required).
# for modem: listenport (optional).

serial1=dummy
serial2=disabled
serial3=disabled
serial4=disabled

[dos]
# xms -- Enable XMS support.
# ems -- Enable EMS support.
# umb -- Enable UMB support (false,true,max).

xms=false
ems=false
umb=false

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

AND HERE'S THE NEW

[sdl]
# fulldouble -- Use double buffering.
# output -- Can only be Surface for the gp2x.
# sensitivity -- Mouse sensitivity.
# mapperfile -- File used to load/save the key/event mappings from.

fulldouble=false
output=surface
sensitivity=100
mapperfile=mapper.txt

[dosbox]

# machine -- The type of machine tries to emulate:hercules,cga,tandy,pcjr,vga.
# memsize -- Amount of memory dosbox has in megabytes.

machine=vga
memsize=4

[render]
frameskip=2
aspect=true
scaler=none

[cpu]
# core -- CPU Core used in emulation: simple,normal,full.
# Try simple first as this is the fastest, then normal and last full
# cycles -- Amount of instructions dosbox tries to emulate each millisecond.
# Too low and the game will crash randomly / not start up
# Too high and expect slowness
# Just right and you will get a nice speed boost
# 600-1200 ish seems to be about the sweet spot for the things I've tested. (older games)
# cycleup -- Amount of cycles to increase/decrease with keycombo.
# cycledown Setting it lower than 100 will be a percentage.

core=simple
cycles=600
cycleup=10
cycledown=10

[mixer]
# nosound -- Enable silent mode, sound is still emulated though.
# rate -- Mixer sample rate, setting any devices higher than this will
# probably lower their sound quality.
# blocksize -- Mixer block size, larger blocks might help sound stuttering
# but sound will also be more lagged.
# prebuffer -- How many milliseconds of data to keep on top of the blocksize.

nosound=false
rate=11025
blocksize=64
prebuffer=1000

[sblaster]
# sbtype -- Type of sblaster to emulate:none,sb1,sb2,sbpro1,sbpro2,sb16.
# sbbase,irq,dma,hdma -- The IO/IRQ/DMA/High DMA address of the soundblaster.
# mixer -- Allow the soundblaster mixer to modify the dosbox mixer.
# oplmode -- Type of OPL emulation: auto,cms,opl2,dualopl2,opl3.
# On auto the mode is determined by sblaster type.
# All OPL modes are 'Adlib', except for CMS.
# oplrate -- Sample rate of OPL music emulation.

sbtype=none
sbbase=220
irq=7
dma=1
hdma=5
mixer=true
oplmode=auto
oplrate=22050
[gus]
# gus -- Enable the Gravis Ultrasound emulation.
# gusbase,irq1,irq2,dma1,dma2 -- The IO/IRQ/DMA addresses of the
# Gravis Ultrasound. (Same IRQ's and DMA's are OK.)
# gusrate -- Sample rate of Ultrasound emulation.
# ultradir -- Path to Ultrasound directory. In this directory
# there should be a MIDI directory that contains
# the patch files for GUS playback. Patch sets used
# with Timidity should work fine.

gus=false
gusrate=22050
gusbase=240
irq1=5
irq2=5
dma1=3
dma2=3
ultradir=C:\ULTRASND

[speaker]
# pcspeaker -- Enable PC-Speaker emulation.
# pcrate -- Sample rate of the PC-Speaker sound generation.
# tandy -- Enable Tandy Sound System emulation (off,on,auto).
# For auto Tandysound emulation is present only if machine is set to tandy.
# tandyrate -- Sample rate of the Tandy 3-Voice generation.
# disney -- Enable Disney Sound Source emulation.

pcspeaker=true
pcrate=11025
tandy=auto
tandyrate=11025
disney=true

[dos]
# xms -- Enable XMS support.
# ems -- Enable EMS support.
# umb -- Enable UMB support (false,true,max).

xms=false
ems=false
umb=false

[autoexec]
# lines of code to boot the dos program go here
mount C "/mnt/sd/dosbox/duke"
c:
DN1.EXE

It is good that the release doesn't crash anymore. B)
 
I just tried it at work and it seems to run ok, I can't really test it here as the pc speaker noise is annoying and everyone seems to be looking at me ;)

I used
core=simple
cycles=900

no frame skip, it loaded withing a few seconds and I was in the game.

could you post your mapper.txt so I can play it tonight?

also set [speaker] to
pcspeaker=true
pcrate=22050
tandy=off
tandyrate=22050
disney=false

I'll help with anygame as long as you post what you are getting, if I can see a reason why it's being slow I'll investigate it fully :)
 
mapper.txt for Duke Nukem 1:

# standard keys

key_up "key 97"
key_left "key 99"
key_down "key 101"
key_right "key 103"

#here we add the dirty digital stick recognition

key_up "key 98"
key_left "key 98"

key_up "key 104"
key_right "key 104"

key_down "key 100"
key_left "key 100"

key_down "key 102"
key_right "key 102"

# game specific keys

key_y "key 111"
key_ralt "key 109"
key_s "key 110"
key_rctrl "key 112"
key_enter "key 105"
key_esc "key 106"
key_f1 "key 107"
key_q "key 108"
key_1 "key 114"
key_r "key 113"
key_p "key 115"


Have fun!
 
Blah posted on Aug 16 2006 at 01:00 AM said:
You do realize Pool of Radiance is also availiable on Atari ST, Apple 2, Macintosh, C64, NES, and Amiga.

What does that have to do with anything? This is the dosbox thread foo!
 
Last edited by a moderator:
DOSBox has always, in my estimation, been designed for super-fast systems, and portability. My AMD 2600+ home system seems capable of behaving like a 50mhz 486DX in Dosbox. Maybe a 75. With that type of ratio, the best you could hope for it on a 250mhz processor would be, what, low-end 386? Mid 286? Granted that quite a number of games were coded for 286's. I would probably not get too excited.

It may be because I'm not a programmer at all, but how much work is it to assign different threads to different processors. I thought that maybe a boost could occur if one processor focused on the cpu instructions, and the other on sound and/or video.

It's easy for me to say, especially since major developers are having problems designing for the XBox360's dual-core, leaving lots of cpu power on the table becuase they can't find a way to make use of it.

Since I'm brain-dumping, why not write a simple MP3 player which uses the 2nd processor, since it's idle most of the time (or is it).

Anyhow these are points l'd like an expert to address some day.

Thanks much and keep up the great work!
 
markiej posted on Aug 16 2006 at 03:00 PM said:
DOSBox has always, in my estimation, been designed for super-fast systems, and portability. My AMD 2600+ home system seems capable of behaving like a 50mhz 486DX in Dosbox. Maybe a 75. With that type of ratio, the best you could hope for it on a 250mhz processor would be, what, low-end 386? Mid 286? Granted that quite a number of games were coded for 286's. I would probably not get too excited.

It may be because I'm not a programmer at all, but how much work is it to assign different threads to different processors. I thought that maybe a boost could occur if one processor focused on the cpu instructions, and the other on sound and/or video.

It's easy for me to say, especially since major developers are having problems designing for the XBox360's dual-core, leaving lots of cpu power on the table becuase they can't find a way to make use of it.

Since I'm brain-dumping, why not write a simple MP3 player which uses the 2nd processor, since it's idle most of the time (or is it).

Anyhow these are points l'd like an expert to address some day.

Thanks much and keep up the great work!

I'll have a look at the CPU Simple core tonight to see what it possible.

I'm not a massive programmer, I'm not even a good one but I do claim to be sometimes when things work. ;)

The more people that test this version with games the more we get an idea on what it's like :)

bOing
 
Last edited by a moderator:
If you want some OLD games to check out, head to this spot {link removed, I dont think abondware is considered Warez, but just in case} Underdogs If this type of link is not OK here, please delete. I am going to go home and try some of these. Some of the old Starfleet strategy games where pretty fun ( i spose text would be the problem with these). I also loved the SIEGE games, I wonder if they will work or if Fatasy Empires or even Dragon Strike or Dungeon master will work?

Holy shnikie thats alot of old good gaming there.. Im sure the younger people wont think so ,but I'm a bit excited, I hope i can get it working (dosbox) and can test a few.

Clok
 
Well I've just had a go at Duke Nukam 1 and to be honest it seems fast and nippie, I'm leaving my gp2x cpu at 200Mhz, I tried cycles=600 and left the render settings out (Frameskip).

I'm going to try and get GTA 1 to work on it now. - mission and a half I bet ;)

Regards
bOing
 
GTA can't work as it needs a SuperVGA card and 16Mb RAM, the menu system loads in the demo but then crashes when trying to start :(

I might mess with it later tonight after the football :)

bOing
 
Back
Top