DosBox 68k port to Amiga/Atari
Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team
DosBox 68k port to Amiga/Atari
Hiya,
Not sure if this is the right place to post this.
I've spent some time recently trying to port the popular DosBox program to Amiga AGA (060 only).
The actually code has been relatively easy to port across and I already have it running on my A1200.
The problem is that it's going to be far too slow to be of any use on real hardware without a custom written 68k softcore which requires somebody skilled in 68k assembler and someone who is also familiar with the x86.
If anyone on this forum has the skills to help then you can read all about the progress to date here -> http://www.amigacoding.de
I'm not sure if DosBox has ever been ported to Atari before but if we can get a 68k core developed then it would obviously make it much easier for someone to port it across to this platform.
Not sure if this is the right place to post this.
I've spent some time recently trying to port the popular DosBox program to Amiga AGA (060 only).
The actually code has been relatively easy to port across and I already have it running on my A1200.
The problem is that it's going to be far too slow to be of any use on real hardware without a custom written 68k softcore which requires somebody skilled in 68k assembler and someone who is also familiar with the x86.
If anyone on this forum has the skills to help then you can read all about the progress to date here -> http://www.amigacoding.de
I'm not sure if DosBox has ever been ported to Atari before but if we can get a 68k core developed then it would obviously make it much easier for someone to port it across to this platform.
- Eero Tamminen
- Fuji Shaped Bastard
- Posts: 2282
- Joined: Sun Jul 31, 2011 1:11 pm
Re: DosBox 68k port to Amiga/Atari
There's a straight SDL port:NovaCoder wrote:I've spent some time recently trying to port the popular DosBox program to Amiga AGA (060 only).
The actually code has been relatively easy to port across and I already have it running on my A1200.
I'm not sure if DosBox has ever been ported to Atari before but if we can get a 68k core developed then it would obviously make it much easier for someone to port it across to this platform.
http://www.atari-forum.com/viewtopic.php?f=3&t=24259
What kind of games you were thinking it to be used with, and do you think they are going to be fast enough even with 68k softcore?NovaCoder wrote: The problem is that it's going to be far too slow to be of any use on real hardware without a custom written 68k softcore which requires somebody skilled in 68k assembler and someone who is also familiar with the x86.
I mean, DosBox is nice, but even on x86 it has always needed several hundred Mhz machine to play anything interesting, for which one doesn't have better options.
ScummVm etc are much better for 80's & 90's adventure games, and many of the other commercial games from 80's (especially platformers & 2D shooters) have Amiga & Atari ports that work & look much better than anything under DosBox would.
Games that would actually be interesting to play with DosBox are from 90's, typically VGA (256-colors) or better and 3D. Many of them (like Wolf3D, Doom & Quake) have source ports to higher-end 68k machines and even those work barely fast enough. There's no chance that such games would work well enough under emulation on popular Atari machines.
(Wolf3D has a really nice 68000 Atari ST(e) port, Doom II will soon have a playable 68030+DSP version and there's some interest on 060 Quake...)
As to what instructions would most benefit from JITting, have you profiled which ones are most used in the games that interest you? E.g. if they are FPU heavy, accelerating usage of (specific) FPU instructions could be most beneficial.
Re: DosBox 68k port to Amiga/Atari
Hiya,
I was hoping to get to a mid to high end 386SX speed with a overclocked 060 (eg 80Mhz). Without a soft core it's more like a slow 286 at the moment
Yes ScummVM runs a lot better and is not as heavy because it's not actually trying to emulate the x86 CPU.
I haven't managed to profile it, the tools-set that I use (gcc) is not very advanced.
I'm not an assembler guy, but as far as I can tell it would take some assembler smarts to get this emulator running at a decent speed on 68k.
I was hoping to get to a mid to high end 386SX speed with a overclocked 060 (eg 80Mhz). Without a soft core it's more like a slow 286 at the moment

Yes ScummVM runs a lot better and is not as heavy because it's not actually trying to emulate the x86 CPU.
I haven't managed to profile it, the tools-set that I use (gcc) is not very advanced.
I'm not an assembler guy, but as far as I can tell it would take some assembler smarts to get this emulator running at a decent speed on 68k.
Re: DosBox 68k port to Amiga/Atari
Get rid of the SDL stuff and rewrite other time consuming stuff like display rendering in 68k assembly. That's what I'd do.
286 performance sounds great imo.
286 performance sounds great imo.
Ain't no space like PeP-space.
Re: DosBox 68k port to Amiga/Atari
Aside from games, this could just be fun for running DOS applications - I guess there is also PC-Ditto for this.
STE: Desktopper case, IDE interface, UltraSatan (8GB + 512Mb) + HXC floppy emulator. Plus some STE's/STFM's
- Eero Tamminen
- Fuji Shaped Bastard
- Posts: 2282
- Joined: Sun Jul 31, 2011 1:11 pm
Re: DosBox 68k port to Amiga/Atari
IMHO profiling is a mandatory pre-condition for optimizations on any non-trivial code.NovaCoder wrote:I haven't managed to profile it, the tools-set that I use (gcc) is not very advanced.

Latest Hatari (Atari ST/STE/TT/Falcon emulator) includes a profiler:
http://hg.tuxfamily.org/mercurialroot/h ... #Profiling
With the profiler post-processor, you can get function/symbol level CPU (and DSP) instruction/cycles/cache usage lists and callgraphs of those, even export the data to Kcachegrind:
http://kcachegrind.sourceforge.net/html/Home.html
It's used to optimize Doom II:
http://www.atari-forum.com/viewtopic.php?f=68&t=24561
for (16Mhz) Atari Falcon:
http://en.wikipedia.org/wiki/Atari_Falcon
This page in the above thread has examples of the profiler & its post-processor output:
http://www.atari-forum.com/viewtopic.ph ... &start=300
*.dot files in attachments are in the GraphViz dot callgraph format, you can view them with "dotty" coming with GraphViz, or with Xdot:
http://code.google.com/p/jrfonseca/wiki/XDot
Re: DosBox 68k port to Amiga/Atari
Old thread but I recently released my updated 68k port of DOSBox for Amiga AGA/RTG. It's still missing a JIT so it's bloody slow but just about usable for some old PC games and utilities on an FPGA or overclocked 060.
I've included the hacked source code with the Aminet release in case anyone wants to do an Atari port.
https://youtu.be/a2AW7tDV3Fo

I've included the hacked source code with the Aminet release in case anyone wants to do an Atari port.
https://youtu.be/a2AW7tDV3Fo

Re: DosBox 68k port to Amiga/Atari
great job NovaCoder
Mega ST 1 / 7800 / Portfolio / Lynx II / Jaguar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net / AT Speed C16
Hatari / Steem SSE / Aranym / Saint
http://260ste.appspot.com/
SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net / AT Speed C16
Hatari / Steem SSE / Aranym / Saint
http://260ste.appspot.com/
Re: DosBox 68k port to Amiga/Atari
Thanks!
Daniel, New Beat - http://newbeat.atari.org.
Like demos? Have a look at our new Falcon030 demo It's that time of the year again, or click here to feel the JOY.
Like demos? Have a look at our new Falcon030 demo It's that time of the year again, or click here to feel the JOY.
Re: DosBox 68k port to Amiga/Atari
thx NovaCoder!
・Falcon ct60e・Atari MegaSTE ・Atari STe ・MIST ・MISTer・
Re: DosBox 68k port to Amiga/Atari
I remember trying http://www.atari-forum.com/viewtopic.php?t=24259 on the Milan. It was slow and the keyboard mapping made it unusable. If that could be fixed it would be a good start.
Re: DosBox 68k port to Amiga/Atari
Keyboard mapping can be easyly fixed. You just ned to do small change in config file.PeterS wrote:I remember trying http://www.atari-forum.com/viewtopic.php?t=24259 on the Milan. It was slow and the keyboard mapping made it unusable. If that could be fixed it would be a good start.
I had the same issue on my FireBee but I forgot what exactly I had to change in config file.
But you can search the forum what to. Its written somewhrere here

Re: DosBox 68k port to Amiga/Atari
You found it! 
So now we would need someone to optimise (speedup) DosBox and remain to be portable also for the FireBee

So now we would need someone to optimise (speedup) DosBox and remain to be portable also for the FireBee

Re: DosBox 68k port to Amiga/Atari
I tried this change and it does work.
usescancodes=false
The majority of the keys are mapped correctly on the Milan's PC keyboard.
Not sure how old my version of DosBox, it works and I installed a ran an ancient version of Tetris. It runs but very, very slowly.
usescancodes=false
The majority of the keys are mapped correctly on the Milan's PC keyboard.
Not sure how old my version of DosBox, it works and I installed a ran an ancient version of Tetris. It runs but very, very slowly.
Re: DosBox 68k port to Amiga/Atari
Don't forget that you can also use CTRL+F1 to open DosBox's key mapper program and reassign your keys.PeterS wrote:I tried this change and it does work.
usescancodes=false
The majority of the keys are mapped correctly on the Milan's PC keyboard.
Not sure how old my version of DosBox, it works and I installed a ran an ancient version of Tetris. It runs but very, very slowly.
Re: DosBox 68k port to Amiga/Atari
Just released my final update to this port to fix up the native MIDI support. This is now a pretty solid port and would probably be usable for some old EGA/VGA on an overclocked 060. Source code is available (SDL based port) for anyone who wants to port this over to Atari.
https://youtu.be/tb-0EsIrbfw
https://youtu.be/tb-0EsIrbfw