Author Topic: DOSBox fixes for RS-97  (Read 431 times)

jbanes (OP)

  • *
  • Posts: 12
DOSBox fixes for RS-97
« on: September 16, 2018, 02:26:48 am »
Ok, fair warning. DOS games are some of the games I'm most nostalgic for. So imagine my elation when I realized that the OpenDingux firmware for the RS-97 had a DOSBox version!

Yeah. Unfortunately, the port didn't play well with the screwy 320x480 screen of the RS-97. On top of that, it's really slow. I did manage to configure that instance to mostly fill the screen, but text mode became unusable. Some of the old shareware games would run, but almost all of them felt slow.

I did see there was an experimental patch in the extras directory. I don't know if it needs to be reconfigured or something, but it didn't work for me? So I finally broke down, got a toolchain going, and have started hacking DOSBox into shape:

https://github.com/jbanes/rs97-dosbox

My version has the following enhancements (so far):

  • Games correctly fill the screen
  • Keyboard is no longer squished on the screen
  • Performance enhancements to the blitters means faster games
  • Power button now forcibly exits DOSBox (good for games like Ultima that have no way to exit)

I'm continuing to hack at it in my "fun time", so feel free to try it out and offer feedback. Note that I'm stripping the source code down to be RS-97 specific, so don't expect to merge this back into the mainline. This is mostly being done so I can hack the heck out of it without worrying about cross-platform capability. I might merge the changes back into the mainline later if I feel it's reached a sufficiently stable state. (Don't count on it though.)

My goal is to continue to improve usability and performance. I suspect at some point I'm going to need to get a MIPS core going as I really want to be able to play One Must Fall on this. :)

Even without that, there are quite a few games in a playable state now. Please note that if a game is running too slow, you may need to turn off the music to get it up to speed. Music seems to add quite a bit to the processing time and thus turning it off is the easiest win you can get. And to be honest, most of the DOS games are improved by not having music. Except for One Must Fall. One Must Fall must have music. No exceptions! ;)

Latest images:









Earlier Images:




A600

  • *
  • Posts: 10
Re: DOSBox fixes for RS-97
« Reply #1 on: September 16, 2018, 02:54:38 am »
Did you try enabling the dynamic recompiler?

https://github.com/dmitrysmagin/dosbox-gcw0/blob/master/gcw0.sh

HercTNT

  • *
  • Posts: 483
Re: DOSBox fixes for RS-97
« Reply #2 on: September 16, 2018, 03:57:18 am »
This is amazing!! i really hope this can be improved even more. Could we please get a proper tutorial on how to get our first game running?

jbanes (OP)

  • *
  • Posts: 12
Re: DOSBox fixes for RS-97
« Reply #3 on: September 16, 2018, 04:40:19 am »
Did you try enabling the dynamic recompiler?

I did not. To be honest, I didn't even realize it would work on MIPS. Thanks for the suggestion! I've enabled the recommended settings, compiled and checked in. Provides a nice little performance boost! Not enough yet to leave music on in some of the more intensive games. Damn good progress though. Duke Nukem 2 feels full speed and I think all the Epic Pinball tables are now playable.

Really appreciate the suggestion! Let me know if you have any other ideas. :)

HercTNT

  • *
  • Posts: 483
Re: DOSBox fixes for RS-97
« Reply #4 on: September 16, 2018, 05:02:31 am »
I'm an idiot. i realized the readme has a full tutorial. When will it be available to download? i'm chomping at the bit to try it ;)

jbanes (OP)

  • *
  • Posts: 12
Re: DOSBox fixes for RS-97
« Reply #5 on: September 16, 2018, 05:27:23 am »
This is amazing!! i really hope this can be improved even more. Could we please get a proper tutorial on how to get our first game running?

Thank you for your kind thoughts! I'm hoping others find it useful.

In terms of installing it, I've made some quick instructions below. Note that I'm assuming you already have the OpenDingux firmware on your device.

  • Go to the GitHub project at https://github.com/jbanes/rs97-dosbox
  • Click on "dosbox", then "bin", then "dosbox"
  • Click the "Download" button in the upper-right
  • Make sure the downloaded file is named "dosbox" with no extension
  • Replace the dosbox executable on your RS-97 with the downloaded executable. The easiest way to do this is to plug your RS-97 into your computer using the USB cable. On the "ROMs" drive, navigate to "emus/dosbox" folder and drag/drop to replace the "dosbox" file.
  • Copy your favorite DOS game on to your RS-97. You can load it onto an SD Card or copy it into the "roms" folder when you have the USB cable plugged in.
  • Unplug your RS-97 from your computer and make sure it's turned on
  • Navigate to the Emulation tab and start DOSBox using the standard icon
  • You're going to need to mount a directory for DOSBox. Which means typing some commands on the virtual keyboard. Click the left shoulder button to bring up the keyboard. Pressing "A" will type a key, while "B" will lock a key down. You only want to use "B" on the Shift key. Otherwise you'll have some runway typing going on. ;)
  • If you copied the game to an external sd card, type "mount c /mnt/ext_sd/<mygame>" and enter, replacing <mygame> with your DOS game's directory.
  • If you copied the game to the "roms" folder, type "mount c /mnt/int_sd/roms/<mygame>" and enter, replacing <mygame> with your DOS game's directory.
  • Type "c:" and hit enter
  • Type the name of the game's executable, hit enter, and you should be off to the races!

If you're using an alternate firmware like Useless, you'll have to find someone who can talk you through it as I'm afraid I haven't tried anything but the CFW work yet.

Some fun tips for a better experience:

  • The start button is the enter key, select is the escape button, Y is space, and Right shoulder is the backspace. You can use these to speed up your command-line typing.
  • DOSBox supports tab completion. So if I have a directory called "EPIC" I can type "cd e" and then click the tab key to get "cd EPIC". This saves a LOT of typing.
  • You can either type "exit" from the DOS prompt to get out of the program, or you can hit the power button.
  • If a game is running slow, try going into the game's configuration and disabling the music.
  • If you hold Y while the keyboard is on the screen, you can move the keyboard around the screen with the D-Pad

Hope you have fun!

HercTNT

  • *
  • Posts: 483
Re: DOSBox fixes for RS-97
« Reply #6 on: September 16, 2018, 06:49:16 am »
First of all, thank you for that tutorial. It's greatly appreciated. I followed instructions and replaced the binary. However, when you start dosbox, the screen goes black and says loading then dumps back to desktop. there is never an option to do anything past that. obviously i'm doing something wrong, i just can't figure out what it could be. I even tried creating a new link to the downloaded binary.

A600

  • *
  • Posts: 10
Re: DOSBox fixes for RS-97
« Reply #7 on: September 16, 2018, 10:54:45 am »
That's because the binary is compiled for uClibc and the Useless firm needs binaries for musl so I compiled the binary with the musl toolchain (untested):

http://s000.tinyupload.com/index.php?file_id=68034723891280962186

HercTNT

  • *
  • Posts: 483
Re: DOSBox fixes for RS-97
« Reply #8 on: September 16, 2018, 05:52:48 pm »
Thank you, dosbox now goes to a prompt. However, following jbanes instructions i cannot mount the roms directory as drive c no matter what i do.  I have alien carnage in the roms directory. so per instructions i type "mount c /mnt/int_sd/roms/harry"
then all i should have to do is type c and hit enter then type carnage.exe correct?
dosbox keeps telling me there is no drive c.
That's because the binary is compiled for uClibc and the Useless firm needs binaries for musl so I compiled the binary with the musl toolchain (untested):

http://s000.tinyupload.com/index.php?file_id=68034723891280962186
[/quote

jbanes (OP)

  • *
  • Posts: 12
Re: DOSBox fixes for RS-97
« Reply #9 on: September 16, 2018, 07:42:14 pm »
@A600 - Thanks for intuiting that HercTNT needs a useless compile and then building it for Herc. Dude, you're amazing!

Thank you, dosbox now goes to a prompt. However, following jbanes instructions i cannot mount the roms directory as drive c no matter what i do.  I have alien carnage in the roms directory. so per instructions i type "mount c /mnt/int_sd/roms/harry"
then all i should have to do is type c and hit enter then type carnage.exe correct?
dosbox keeps telling me there is no drive c.

Other than just typos in the mount command, sounds like one of two problems. Either...

  • The directory structure of the Useless firmware is different. If this is the problem, you'll need to use a file browser to try and figure it out.
  • You aren't switching to the "c" drive correctly. Note that you need to type "c" and then a colon. Precisely, "c:" and then enter. Keep in mind that the virtual keyboard defaults to a semi-colon. If you accidentally type "c;" you'll get an "Invalid Command". Make sure you lock the "shift" on the keyboard in order to get the right key.

If you still have problems, try taking a photo with your phone or something so we can see what's happening.

jbanes (OP)

  • *
  • Posts: 12
Re: DOSBox fixes for RS-97
« Reply #10 on: September 16, 2018, 08:05:56 pm »
So I've been doing some testing with the dynamic recompilation core. While it's very fast for many games, it appears to have trouble with Apogee games that use the Commander Keen engine. Games that I've found that have issues so far are:

  • Bio Menace
  • Commander Keen: Invasion of the Vorticons (playable but does a weird out of order frame stutter)
  • Commander Keen: Goodbye Galaxy
  • Monster Bash

I'm going to play with it for a bit. But I may decide to disable the core in the GitHub check-ins until I can figure out the best way to approach this issue.

HercTNT

  • *
  • Posts: 483
Re: DOSBox fixes for RS-97
« Reply #11 on: September 16, 2018, 08:46:31 pm »
@A600 - Thanks for intuiting that HercTNT needs a useless compile and then building it for Herc. Dude, you're amazing!

Thank you, dosbox now goes to a prompt. However, following jbanes instructions i cannot mount the roms directory as drive c no matter what i do.  I have alien carnage in the roms directory. so per instructions i type "mount c /mnt/int_sd/roms/harry"
then all i should have to do is type c and hit enter then type carnage.exe correct?
dosbox keeps telling me there is no drive c.

Other than just typos in the mount command, sounds like one of two problems. Either...

  • The directory structure of the Useless firmware is different. If this is the problem, you'll need to use a file browser to try and figure it out.
  • You aren't switching to the "c" drive correctly. Note that you need to type "c" and then a colon. Precisely, "c:" and then enter. Keep in mind that the virtual keyboard defaults to a semi-colon. If you accidentally type "c;" you'll get an "Invalid Command". Make sure you lock the "shift" on the keyboard in order to get the right key.

If you still have problems, try taking a photo with your phone or something so we can see what's happening.

No need for the photo. I figured out what I did wrong. I knew it was something I was doing, I just did not know what. It was the syntax. I got alien carnage running. while slow, it's amazing it's working so well. I'm extremely impressed with how far dosbox for this has come in a short time. Thank you and a600 for the work on this. hopefully their is still some room for future improvement as i can't wait to see what's possible ;)

jbanes (OP)

  • *
  • Posts: 12
Re: DOSBox fixes for RS-97
« Reply #12 on: September 16, 2018, 08:49:18 pm »
I got alien carnage running. while slow, it's amazing it's working so well.

I'm glad to hear you got it working!

Fun fact about Halloween Harry / Alien Carnage: The game was designed to run a bit slow. (At least by modern standards.) Try going into the game options and enable "Turbo" to make it more palatable.

HercTNT

  • *
  • Posts: 483
Re: DOSBox fixes for RS-97
« Reply #13 on: September 16, 2018, 10:10:54 pm »
i found this, not sure if it helps at all

https://www.dosbox.com/wiki/Performance

I have my fingers crossed that in the future a frontend might be possible to streamline the process of running games. are autoexecs possible on this version of dosbox? Could a rom directory be hard coded in reducing need for typing?

As always thanks!!!

jbanes (OP)

  • *
  • Posts: 12
Re: DOSBox fixes for RS-97
« Reply #14 on: September 17, 2018, 02:49:12 am »
I have my fingers crossed that in the future a frontend might be possible to streamline the process of running games. are autoexecs possible on this version of dosbox? Could a rom directory be hard coded in reducing need for typing?

So launchers are currently out of scope for what I'm trying to do here. Launchers are very dependent on the menu system you're using. Once this code is integrated into firmware distributions we can look at developing a standardized solution.

Some key tips however, are:

1. Edit the /mnt/int_sd/.dosbox/dosbox-SVN.conf file to add a standard mount into the autoexec section. That should make your life a bit easier. You can also edit the launcher file to pass in the commands.

2 DOSBox programs usually have a related ".conf" file. You can see this with any GOG.com download. It's pretty easy to change these to a specific extension and then create a launcher that filters for them as if they're ROMs. I've done that with the gmenu2x launcher in the CFW firmware.