What's new

Linux speed limiter patch for mupen64 0.2

lsd

New member
Hi,

I downloaded mupen64 0.2 on my XP2200+ Linux box last night and I was amazed by the speed - it seemed to have no trouble playing Mario64 and Mario Kart 64 at full speed. I think congratulations are in order for the developers :)

However, the problem now is that it runs too quickly. I noticed that the Windows port has a speed limiter, but the Linux port had no such feature, so I decided to port it across. Attached to this post you should find a patch - apply it to emu64/main/gui_gtk/main_gtk.c - and I've also attached the complete patched file, which you can just drop in place of the original. Recompile and you should be ready to go :)

I've also put the patches on the web at http://linuxgamers.net/lsd/mupen64/ in case there are problems with the attached files.
 

ShadowPrince

Moderator
I though on Linux speed limited by sound plugin.
May be some problem with implementation in plugin itself,or particular problem with your setup.Anyway,good job.

P.s attachments doesn't work,downloaded it from site.
 
Last edited:

Hacktarux

Emulator Developer
Moderator
Interesting... what do u mean when you say too quickly ? Which game were you running with which sound plugin and how fast was it ?

With the mupen64 sound plugin, the speed should be limited by the sound plugin. In the next release it'll even be more important to get perfect sound timing to limit the speed in the sound plugin. Thx to Azimer, it should limite speed with a good precision, with my current source code mario is limited to a solid 30fps without using a speed limiter but only by synchronizing with the sound.
 
OP
L

lsd

New member
I've just been using the mupen64 sound plugins, playing mainly Mario64 and Mario Kart 64. Things were kinda synched with the sound, but not in a pleasant way - what was happening was that it would only sync up with the sound every half-second or so. The video was running as fast as possible, rendering and displaying this half-second worth of video as quickly as it could, and then the video would pause until the sound had caught up. This made trying to play either game quite jumpy, as things would run at almost double-speed, but with lots of pauses.

This effect was the most obvious on the save-game-select screen in Mario64, where you move the cursor around the screen to select a saved game - the cursor would move quite a lot in a split-second, and then not move at all until the sound had caught up. My patch has eliminated these problems for me, though it has also left the sound a little out of sync - sound seems to play about a half-second after the event that's caused it.
 

Hacktarux

Emulator Developer
Moderator
I was more talking about the next version than the current release. Anyway here's a binary with the sync code i was talking about and without any speed limiter, tell me how it works on your computer :)

PS: it's pretty unstable beta binary, use it at your own risk, no support will be provided to get this file working on your computer.
 
OP
L

lsd

New member
Cool - thanks for the binary :) It's definitely better than the standard 0.2 release, especially once you get in to the game - mario64 ran quite smoothly. It still seems a bit jumpy on simpler introductory screens like the save-game-select screen in mario64, but I'm sure you'll have everything working beautifully for the next release. In the meantime, I think I'll keep using my patched version.

btw, is there source available for the Linux port of glNintendo64? I'd like to try compiling mupen64 and plugins on my Powerbook running Linux. Also, is there anything I should watch out for when compiling on PPC?
 

Hacktarux

Emulator Developer
Moderator
To compile the core and my plugins you need to define the BIG_ENDIAN macro and to undefine the X86 macro in the makefile. I haven't taken care of endianess issues in my sound plugin so maybe you'll have some problems...

If you want to compile TR64 you need to contact Flea who has ported it to MacOSX. Concerning GlNintendo64, you have to contact blight for the source code and no work has been done on endianess for this plugin.
 

Flea

New member
I can send you the TR64gl source that has been endian-fixed if you need it. I haven't even seen the source for glNintendo64, so I'm not sure how much work that would take to endian fix. Hacktarux's sound plugin should be fine (there's a little fix in the buffering which would cause stereo to be reversed if you left it, but that's not a big issue).
 

nullroute

Lost and loving it
lsd said:
btw, is there source available for the Linux port of glNintendo64? I'd like to try compiling mupen64 and plugins on my Powerbook running Linux. Also, is there anything I should watch out for when compiling on PPC?
I'm working on a port of the latest version ( 0.4.1 currently ). The source is posted in the glXn64 v0.4.1-beta thread in section General Emulation->Plugins. It currently will not compile on a ppc tho, its got some x86 asm still in it and its got tons of intel'isms burried deep within it. But if you want to run it on pc linux, have fun ;)
 

Top