Poor Ultima 6 Performance In Dosbox


gnarface

Still Fresh
Joined
Feb 23, 2011
Messages
14
Location
USA
Greetings people,

Perhaps someone out there can shed some light on how I can improve performance for this game in DOSBox on my WIZ. From Google searches it seems to be a well known fact that this game runs kinda slow in DOSBox on any system that doesn't have a lot of MHZ, especially non-x86 architectures like the one the WIZ uses. The primary complaint in general seems to be that the music is choppy or stutters and is sometimes prone to even squawk and chirp badly.

Of course the game plays fine on my 2.7GHZ dual-core Athlon64 but that's obviously not the point as it is far less portable than my WIZ.

So I set about trying to tweak the hell out of everything in the configuration file and the only thing I could find that made a significant impact on performance was the cycles setting. The DOSBox wiki (which I assume is referring to your average modern x86 desktop here) recommends setting core=normal and cycles=3000. No problem there except the WIZ even overclocked can only run stably at about 700 or 800 MHZ so I guessed that would be a bit too high right away. Just to be diligent though I tested all the way up to 5000 anyway. No significant impact on the audio. Frame rate drops from around 7-12 to flat 1 but the interface is so slow it hardly matters either way.

The sweet spot for game play (ignoring the persistently terrible audio performance) just as far as frame rates and interface responsiveness is concerned seems to be anywhere between 1800 and 3000, although the README file for the WIZ port of DOSBox does recommend using values between 600 and 1200 that README was actually written for the DOSBox port of a different handheld - something before the WIZ that I believe had lower clockspeed, GP2x maybe?

So eventually just to be able to say I tried everything I start turning the cycles down below 1200 incrementally as the game play and responsiveness and frame rates get gradually slower and slower. Predictably by the time I'm at 600 there is only 1 frame per second and at 500 its really dragging and at 400 I can barely move. The audio still chops like crazy - somewhat differently than it does at 3000 perhaps but not really by much, and certainly it does not sound better.

Then I turned the cycles to 300 and that is where things get weird. The audio clicks into place like a derailed toy train that finally managed to pull all its wheels back on the track all by itself. Ringing out clear and clean the music at cycles 300 performs so well compared to all the settings above 300 that I was frankly shocked.

Of course this isn't of much use other than as a really strange observation because at this setting the game runs so slow it is completely unplayable, and when I turned it down to 200 just for fun DOSBox crashed the moment I took one step.

Anyway, I just thought I'd share this little story in case someone else has been trying to get this game to work or has seen similar behavior in another game and/or has had any luck in improving the situation.

Thanks for reading :)

Edit: Perhaps it would be worthwhile for someone to try compiling the latest copy of DOSBox for the WIZ? dl.openhandhelds.org says the WIZ port is based on the latest version of DOSBox (0.72 at the time) but since then 0.74 has been released.
 
lol, i find it humorous you keep lowering the cycles rate expecting some kind of miracle. When in fact by lowering it you are crippling dosbox more and more, like shooting your self yourself in the foot hoping it will make you run faster for a marathon.

I think the ideal cycles for the wiz is about 1500, but it can really vary based on what other things are being emulated, most sound related. I wouldnt have gone below 1000.
You want to find the best cycles that you dont choke the emulated application nor request more cycles than the wiz can emulate.
I would make sure your using the dynamic core, add some frameskip, disable all sound device in the conf, disable all sound in the game itself, and evaluate performance by incrementing the cycle count at 100 increments starting from 1000 cycles.

To be honest I think ultima 6 might be a bit beyond the wiz capabilities.
 
Pickle said:
lol, i find it humorous you keep lowering the cycles rate expecting some kind of miracle.

I find it humorous that you seem to have missed the point that it was an experiment I tried just to say I had tried everything, fully knowing that I would be "shooting myself in the foot." You do understand the concept of experimentation right? The reason I posted about it was that in a way a miracle DID happen - the music started working great, which was not the case under any other setting. To me, that makes it extra weird that such a LOW setting (one notch above "crash" it would seem) would cause this to happen.

Pickle said:
I would make sure your using the dynamic core

I thought this version of DOSBox (0.72) does not support dynamic core? Do you actually know for a fact that it is a valid setting? When I said I had been tweaking the hell out of everything believe me that included every core setting in the book. Changing cores did not seem to affect much as far as performance at all with the exception that setting it to "simple" seemed to make it much more prone to random crashing during manual changes to the cycles setting.

Pickle said:
add some frameskip

As I said, I had been tweaking the hell out of everything. If frameskip had helped I would have mentioned that.

Pickle said:
disable all sound device in the conf

Did you miss the part about how the whole point of this experiment was that I was trying to get music working well and barring that gameplay was fine in general anywhere from 1800 cycles and up? Maybe it is my fault for not being clearer about that point.

It would be interesting to know if there is a way to get DOSBox to log an error file on the WIZ so that I could try to figure out why the installer is crashing. I have had to copy the installed Ultima 6 directory from another machine and despite what I've been told I'm not 100% sure that this doesn't introduce a performance penalty.

Pickle said:
To be honest I think Ultima 6 might be a bit beyond the wiz capabilities.

If I didn't know from first-hand experience that much more recent, more cpu-intensive games play perfectly through ScummVM, I would be inclined to agree with you here. The problem is clearly due to the type of emulation that DOSBox is, and what I've been trying to figure out with this experiment is how close I can get it to an optimal configuration in order to compensate for the inherent overhead, since there is very little hard documentation on the subject.
 
Last edited by a moderator:
It could make sense the music could work at low cycles since the cpu emulation isnt allowed to take up most (or all) of the the process time, which should be an indicator to you how much more processing power is needed to run the game itself.

dynamic core is supported, keep in mind it isnt a full dynamic recompiler so effects are minimal. The core emulation is the most cpu intensive process occurring in dosbox. So its no surprise sound is bad. There just isnt enough cpu time to emulate all of the cycles needed for decent gameplay plus the additional time needed for music.
I dont think 0.74 is going to give the boost you would need. I know there is an better fmopl emulation implemented.

I hardly ever install dos apps from handheld devices, usually on the pc side. Theres never going to be a performance impact by doing so. Just make sure you set the lowest setting when installing. No idea why it crashed, but I dont think its worth spending the time to debug, since you can do it from another machine and its a one time exercise.

ScummVM is totally a different application (and approach) for specific games. To make a comparison to dosbox is basically useless. You will always be able to run the same game in scummvm faster than running it natively in dosbox. ScummVM operates on much a higher level of emulation than dosbox. I hope you understand what i mean.

Really ive found wiz can run EGA/CGA with pc speaker/sb blaster/adlib sound. Really something along the lines of a pandora's level of process power could manage it i expect.
 
Pickle posted on 25 March 2011 - 09:40 AM said:
lol, i find it humorous you keep lowering the cycles rate expecting some kind of miracle.
...was not. Apparently it was naive of me to assume that the cycles settings would apply directly to the amount of cycles dedicated to sound processing equally as they apply to the rest of the engine, so thank you for clearing that up for me. That is far more information than I managed to gain from reading the entire DOSBox wiki on the subject.

However the badly stuttering music still makes a recognizable approximation of the actual song in most cases. It does not seem to me like it is so very far from being able to actually play properly. At around 1800 cycles with the CPU overclocked to 700MHZ the game play is perfectly acceptable and there is *far* more music than silence which would suggest to me the buffer remains full most of the time despite frequent under-runs. Since interface responsiveness isn't very critical in this particular game, maybe if there were a way to change the audio priority vs the rest of the engine's priority in some other way without turning the cycles down so far there would be enough horsepower to go around (with the WIZ overclocked to say 700MHZ if necessary) for a sufficiently responsive interface (it is just an RPG after all) while the music more or less played uninterrupted. Any thoughts on possible ways to do that that? All I'm looking for here is a way to squeeze that extra little bit of performance out of DOSBox that I think would make this game actually playable with music on the WIZ.

[quote name='Pickle' date='25 March 2011 - 11:52 AM' timestamp='1301082734' post='944551']
I dont think 0.74 is going to give the boost you would need. I know there is an better fmopl emulation implemented.
[/quote]I'm not sure what you're saying here. Are you suggesting that swapping out the fmopl.c/.h in the current version of the WIZ port with some other version's might have some beneficial effect? Or did you mean to say "isn't" a better fmopl emulation implemented?

[quote name='Pickle' date='25 March 2011 - 11:52 AM' timestamp='1301082734' post='944551']
I dont think its worth spending the time to debug, since you can do it from another machine and its a one time exercise.
[/quote]So that's a "no" then...

[quote name='Pickle' date='25 March 2011 - 11:52 AM' timestamp='1301082734' post='944551']
ScummVM is totally a different application (and approach) for specific games. To make a comparison to dosbox is basically useless. You will always be able to run the same game in scummvm faster than running it natively in dosbox. ScummVM operates on much a higher level of emulation than dosbox. I hope you understand what i mean.
[/quote]Oh I quite understand what you mean here. I'm quite familiar with the differences in the nature of the way ScummVM approaches emulation. That's why I specifically stated that I was looking for a way to to compensate for the inherent overhead of the way DOSBox approaches emulation vs the way ScummVM does. Its not so much the resource requirements of Ultima 6 that are the issue here, but rather more those of DOSBox. I just wanted to make that point 100% clear. Maybe I did not do a good job at that. I'm completely aware of the fact that if Ultima 6 were running as a native Linux binary on the WIZ rather than inside a whole emulated replica of DOS there would be tons of extra horsepower to go around and we wouldn't even be having this conversation.

[quote name='Pickle' date='25 March 2011 - 11:52 AM' timestamp='1301082734' post='944551']
Really something along the lines of a pandora's level of process power could manage it i expect.
[/quote]I thought the Pandora was only 66MHZ faster when not overclocked? Does the different version of the ARM core that it uses make that much of a performance difference? Or is there something else about it you know that I don't?
 
Last edited by a moderator:
what i mean by the fmopl is that 0.74 has a new implementation that is more efficient/faster than previous versions. So if ultima 6 is doing music through fmopl then it may help to move to 0.74.

The pandora is so much faster than wiz/caanoo hardware, to give you an idea ive measured the max cycles to about 5000 cycles. So in theory if 2000 cycles was enough to run the game then theres still 3000 cycles worth of process time left for other emulation stuff like sound.

there have been discussions about dosbox and ways to make it faster, and really theres no good way other than to write something from scratch with arm in mind from the beginning.
 
Pickle said:
what i mean by the fmopl is that 0.74 has a new implementation that is more efficient/faster than previous versions. So if ultima 6 is doing music through fmopl then it may help to move to 0.74.
fmopl == FM synthesis? I know that Ultima 6 does music via your choice of popular soundcards from the time (sound blaster, adlib, roland, etc...) but does sound effects via PC speaker only, so in the DPSBox config you have to have both enabled for both to work. But its clear that the music is much heavier than the sound effects (largely because sound effects are not very frequent in this game while the music is constant) so if fmopl is whats used to drive sound card emulation I wouldn't doubt performance improvements there could directly affect music performance in this situation.

Pickle said:
The pandora is so much faster than wiz/caanoo hardware,
Interesting. That's good to know. I guess that Cortex A8 core really does have performance enhancements beyond just its clock speed. The wikipedia page makes note of a separate audio processor with a fancy name that probably doesn't hurt either.

Pickle said:
there have been discussions about dosbox and ways to make it faster, and really theres no good way other than to write something from scratch with arm in mind from the beginning.
I just wish stuff like Nuvie was mature enough already to be a better option. Maybe I'll look into cross-compiling 0.74 for my WIZ although I suspect that any edits to the code that might become necessary would be above my head. Thanks for all your info.
 
Last edited by a moderator:
gnarface said:
I just wish stuff like Nuvie was mature enough already to be a better option. Maybe I'll look into cross-compiling 0.74 for my WIZ although I suspect that any edits to the code that might become necessary would be above my head. Thanks for all your info.

Have you tried out Ultima 6 in the Amiga Emulator? Runs pretty quick but you have to overclock.
 
Last edited by a moderator:
Crookedmouth said:
gnarface said:
I just wish stuff like Nuvie was mature enough already to be a better option. Maybe I'll look into cross-compiling 0.74 for my WIZ although I suspect that any edits to the code that might become necessary would be above my head. Thanks for all your info.

Have you tried out Ultima 6 in the Amiga Emulator? Runs pretty quick but you have to overclock.

Yea I tried that one out first. It works acceptably if you overclock heavily, but I had a lot of trouble with random crashes. Maybe I need a different kickstart rom? Or mabye I need to have all of them. Anyways it wasn't the official port - for this version of Ultima the official version was the DOS one and the Amiga port had a reduced color count and a different soundtrack. I found that to be disappointing on principle so although I love the Amiga I decided to pound my head against the DOS version for a while.
 
Last edited by a moderator:
Personally I've decided not to bother with DOSBox on my Wiz after failing to get Betrayal at Krondor to run playably (took 90 seconds to even get the game to appear on the screen). Even if I find something that runs at 1500 cycles, I'd still most likely have to futz with mapper stuff to be able to control it via the Wiz' d-pad and buttons.

There are a few good native Wiz ports of DOS games, like Star Control 2 (aka Ur-Quan Masters; runs quite well on the Wiz, even with voices and 3DO music!) and Tyrian, as well as some decent statically-recompiled games like X-COM.
 
Back
Top