Mame4All 2.5 Gp2X


sbock

Chaos is our mode and modus
Joined
Dec 22, 2005
Messages
3,778
Location
Germany
Franxis released a new MAME4all version for the GP2x.

mame4all1.jpg



Changes:

-Added volume control to the frontend. Also the default volume is lowered down.
-Fixed memory bug with games containing multiple FM sound systems. This stops some games crashing on exit.
-New option to enable DRZ80 only for the sound CPUs. Improves the compatibility of DRZ80.
It is automatically enabled to gain speed in several games (e.g. several Capcom, Sega and Midway games).
-Several other fixes taken from Slaanesh code (GP32 and Dingoo ports).
-Added new skins from GP32 and Dingoo ports (by Antiriad and Slaanesh).
-Added script to use 64 MB of additional virtual memory (swap file on the SD card).
It will reduce the life of the SD card. Use at your own risk!.
-GP2X: Upper memory is used as primary memory for all memory allocations to avoid lock-ups due to memory management bugs.
Not used for the Neo·Geo executable (to be able to run the heaviest games).
-Source code clean-up to avoid port definitions in the common part. Also improved makefiles are created.
-Preliminary integration of the ARMNEC core (created by Oopsware). Some games start to run but nothing playable yet.
Disabled for now.

Download: Archive.
Source: Archive.
Homepage:here.
 

Attachments

  • mame4all1.jpg
    mame4all1.jpg
    8.6 KB · Views: 196
Hi,

Thanks for this new version :)

I tried some games these past few days, but unfortunately most of them run slower than before :(

For example, my beloved HangOn ran smoothly @ 260MHz with low sound quality (11 KHz fast), one ASM core (I can't remember which though) and RAM tweaks ON.

Now the animations freeze every now and then, and I have to turn the sound off because it makes the game too slow to play...

Same thing for Batman, Ghouls'n Ghosts, NewZealand Story, Robocop, Shadow Dancer, etc...

I hope it can be fixed ! If I can do anything to help, please let me know !

Bye and keep up the hard work ! Magic Sam
 
Magic Sam said:
Hi,

Thanks for this new version :)

I tried some games these past few days, but unfortunately most of them run slower than before :(

For example, my beloved HangOn ran smoothly @ 260MHz with low sound quality (11 KHz fast), one ASM core (I can't remember which though) and RAM tweaks ON.

Now the animations freeze every now and then, and I have to turn the sound off because it makes the game too slow to play...

Same thing for Batman, Ghouls'n Ghosts, NewZealand Story, Robocop, Shadow Dancer, etc...

I hope it can be fixed ! If I can do anything to help, please let me know !

Bye and keep up the hard work ! Magic Sam

I have the same problems as you.
 
Last edited by a moderator:
Magic Sam said:
Hi,

Thanks for this new version :)

I tried some games these past few days, but unfortunately most of them run slower than before :(

For example, my beloved HangOn ran smoothly @ 260MHz with low sound quality (11 KHz fast), one ASM core (I can't remember which though) and RAM tweaks ON.

Now the animations freeze every now and then, and I have to turn the sound off because it makes the game too slow to play...

Same thing for Batman, Ghouls'n Ghosts, NewZealand Story, Robocop, Shadow Dancer, etc...

I hope it can be fixed ! If I can do anything to help, please let me know !

Bye and keep up the hard work ! Magic Sam

Tell me the version running faster than latest version.

Now the GP2X and the WIZ version are built with same compiler options and settings.
Maybe i have to revert some changes. I have extensively tested the WIZ version, but for the GP2X i have only compiled and try if it runs, nothing more.
 
Last edited by a moderator:
@Magic Sam & paradroid: By any chance either of you two are using the Open2x firmware?

@Franxis: I'm using Open2x DR7, and MAME4ALL 2.5 is running slower than the previous GP2X version. e.g. Galaga was running full-speed w/o frame-skip @133MHz before, but now @225MHz, it still needs frame-skip to run full-speed. :(

I think this has something to do with how MAME4ALL and Open2x handles the upper-memory.

Fortunately there is a setting in Open2x that fixes this. By enabling the 'Cache upper memory' to force full MMUhack, it runs normally again, but as a result the front-end will suffer graphical glitches (the games aren't affected).

Here is the snippet of the release notes for Open2x DR7:
* MMUhack built right into the Open2X kernel. Write buffering
is turned on by default for any and all apps and will not
affect compatibility. This provides a small speedup to a lot
of apps. Write caching is a configurable option for each
link but that often requires that the program originally
used mmuhack.o, lest screen artifacts occur. Most people
will never need this as Open2X now automatically loads its
own version of the MMUhack module when it detects a game is
trying to load its own. (Open2X uses a wrapper for insmod
and modprobe for this purpose)

Senor Quack can probably shed some more insight.

Thanks for still supporting the GP2X, and I hope this gets sorted out. :)

(BTW, the graphics in Knuckle Joe still gets jumbled when rotated, and Q*bert is still missing some sound effects. :p )
 
Hi,

@ Manjuu: you are right, thanks a lot !

Enabling full MMU hack in Open2X solves the problem and everything works fine now :)

Bye, Magic Sam
 
It is possible to solve speed issue on next version without enabling mmuhack in open2x?
The graphical glitches introduced in the menù by mmuhack are very annoying for me.
 
Open2x uses a wrapper in place of modprobe and insmod. It does this because it uses a newer kernel than GPH's and so the mmuhack.o that is included with games is incompatible with it. So, the wrapper script searches for mmuhack.o or mmuhack.ko in the parameters passed to it and replaces it with mmuhack_open2x.o which is the newer mmuhack we include in the firmware. Then, it calls the real modprobe we have hidden in a directory with the new parameters. I looked at this new version of mame (the binary package) and it is using the normal mmuhack.o that everyone includes so I can think of no reason it wouldn't work with Open2X.

The reason Open2X's force full MMUhack option doesn't work with the front end is because the front end probably does some alpha blending and that is not compatible with mmuhack, so it causes flickering.

Later today I will look at the source code of Mame and see how it is trying to load the mmuhack module. I will also post the source to the wrapper script for insmod and modprobe so Franxis can see more clearly how we are doing things in Open2X.
 
OK, I tried out this new version of MAME and can verify all that people reported here. I can also verify that MAME is successfully trying to load its version of mmuhack.o, Open2X's insmod wrapper is intercepting this and is successfully loading the private Open2X-specific mmuhack.

So, nothing is wrong with Open2X as far as I can tell. What has me wondering is if anyone with a non-Open2X firmware can verify that Outrun is running at full speed? So far in this thread no non-Open2X users have reported in so who knows?

I will post the insmod wrapper that I wrote that Open2X uses here:
Code:
#!/bin/bash
# This is a wrapper for Open2X's real insmod.
# It will launch the real insmod, /sbin/open2x/insmod
# (Under busybox, modprobe is really just a softlink to insmod
#  this also handles modprobe too
#
# Before passing the command line to the real insmod, it will find
# and replace any instances of *mmuhack.o with a reference to the
# open2x-specific mmuhack since all mmuhack modules out there are
# compiled with gcc 2.95 to match the GPH kernel whereas Open2X uses
# gcc 3.4 for its kernel. 
#
/sbin/open2x/insmod ${@//*mmuhack.o/mmuhack}

There is an almost identical one for modprobe, too. The mmuhack it loads is in /lib/modules and it shows me it is loading successfully.

I might have time tomorrow to see if I can install a GPH firmware on my GP2X and see if MAME works then. I really don't think this is an Open2X bug, I think it is a MAME bug but we shall see.

Here is proof the insmod wrapper is working properly:
Code:
Found 0 Joystick(s)

mame hangon -clock 200 -depth 8 -frameskip 0 -samplerate 16000 -fastsound -uclock 20 -uclocks 20 -cyclone -drz80 -ramtweaks -volume -4
Installing NK's kernel module for Squidge MMU Hack...
Using /lib/modules/2.4.26-open2x/kernel/drivers/gp2x/mmuhack.o
Warning: loading /lib/modules/2.4.26-open2x/kernel/drivers/gp2x/mmuhack.o will taint the kernel: no license
  See http://www.tux.org/lkml/#export-tainted for information about tainted modules
Module mmuhack loaded, with warnings
RAM Tweaks Activated
Using /lib/modules/2.4.26-open2x/kernel/drivers/input/joydev.o
 
Senor Quack said:
So, nothing is wrong with Open2X as far as I can tell. What has me wondering is if anyone with a non-Open2X firmware can verify that Outrun is running at full speed? So far in this thread no non-Open2X users have reported in so who knows?

I might have time tomorrow to see if I can install a GPH firmware on my GP2X and see if MAME works then. I really don't think this is an Open2X bug, I think it is a MAME bug but we shall see.

Out Run doesn't run at fullspeed on the GP2X. It does on the WIZ with high overclocking.

In the initialization the complete upper memory is mapped (0x2000000 - 0x3FFFFFF) and the mmuhack is applied.
In the closing the memory is unmapped and the hack is removed.
Maybe the size of the upper memory is different in Open2X?
Thanks for taking the time to detect the bug :).
 
Last edited by a moderator:
225,0FS,22k,Cyc+Z80,Tweaks; GP2X-F200 4.0.0

Hang-On - fine at about 83%
Outrun - slow at 42%
Shadow Dancer - OK at 56%
Batman - OK at 67%
TNZS - fine at 91%
Robocop - fine at 77%
 
OK, I spent several hours trying to get to the root of the problem and I basically got nowhere. My GP2X randomly drops the USB networking connection with my new laptop and I don't have a serial->USB converter or a computer that supports USBnet so I am hampered by that.

I even tried to verify line by line that Open2X's mmuhack is the exact same as the one included with MAME and it is. I also verified that MAME is loading it properly and of course it is. I even tried to compile a custom version of MAME that has a frontend compatible with mmuhack but for some reason I could not get a version without artifacts on the screen.

I have to pack for a trip and will probably not have time for 7 months to do anything with this. Franxis, I suggest for the next version perhaps creating a version of the frontend that is compatible with mmuhack so Open2X users can just enable the option (Cache upper memory) that Open2X has and not get screen artifacts. Sorry for all this trouble :)
 
bman said:
225,0FS,22k,Cyc+Z80,Tweaks; GP2X-F200 4.0.0

Hang-On - fine at about 83%
Outrun - slow at 42%
Shadow Dancer - OK at 56%
Batman - OK at 67%
TNZS - fine at 91%
Robocop - fine at 77%

What do all these % mean?
 
Last edited by a moderator:
paradroid said:
Please, Franxis get a solution for open2x users. :(

I have no Open2x installed. The only thing i could do is to modify the frontend to avoid the screen artifacts.

Maybe one of these two solutions:
- Use an intermediate buffer to build the image+text and then send it complete to the framebuffer (instead of writing the text over the image directly in the framebuffer).
- Modify the frontend to use the mmu-hack (invalidating the cache after the screen refresh). I'm not sure it would work taken into account the hack seems to do not run in Open2x and it has to be forced externally.

I will post a modified frontend in the forums to be checked by anyone with Open2x installed. If any of them works correctly i will include it in the next version.

Regards Open2x users ;) .
 
Last edited by a moderator:
Franxis said:
paradroid said:
Please, Franxis get a solution for open2x users. :(

I have no Open2x installed. The only thing i could do is to modify the frontend to avoid the screen artifacts.

Maybe one of these two solutions:
- Use an intermediate buffer to build the image+text and then send it complete to the framebuffer (instead of writing the text over the image directly in the framebuffer).
- Modify the frontend to use the mmu-hack (invalidating the cache after the screen refresh). I'm not sure it would work taken into account the hack seems to do not run in Open2x and it has to be forced externally.

I will post a modified frontend in the forums to be checked by anyone with Open2x installed. If any of them works correctly i will include it in the next version.


Regards Open2x users ;) .

Thank you for your possible solution. :)
I'll test your new frontend in open2x firmware when done. ;)
 
Last edited by a moderator:
Back
Top