MAME Mac OS X savestate trouble in DDP

A place where you can chat about anything that isn't to do with games!
User avatar
Frederik
Posts: 2554
Joined: Sun Nov 06, 2005 7:14 pm

MAME Mac OS X savestate trouble in DDP

Post by Frederik »

This propably has been asked already here but I can´t find it, so I´ll keep it short and if you know a similar thread, feel free to point me to it.

I used several versions of MAME Mac OS X and I simply can´t do savestates - all it gives is the old "Unable to save state - Anonymous timers pending" in DoDonpachi (and other games, but I mainly want to focus on DDP now and I need savestates for practicing the later stages badly).

I know that savestates in DDP ARE possible, since I´ve done it back when I had XP on earlier versions (although it sometimes crashed). This is just one of those "emulating things perfect" quirks, right? Is there ANY solution to this? I searched forums and sites but can´t find anything to solve this. Isn´t there a hack or something?

I also have trouble running ESP Ra.De. on the later versions ("Files missing"), and the earlier ones don´t recognize my gamepad, but run it. If there is any way to solve this, too, I´d be more than thankful.

I know there are not too many people using MAME Mac OS X, but I´d figured some of you might have experience with these specific titles. I just want my self-made level select badly.
:(

Thanks in advance.

(I use MAME OS X 0.122 at the moment, though I tried almost every avaiable older version from Sourceforge. I also tried the PPC MacMAME, but it runs very laggy...)
User avatar
Arvandor
Posts: 1680
Joined: Mon Dec 12, 2005 4:00 am
Location: Utah *ugh*

Post by Arvandor »

There are some PC versions of MAME that can't savestate DDP either, like MamePlus I'm pretty sure.

I don't know what to tell you aside from trying to find a different MAME (if there is more than one version for Macs), or just live without savestates. I still do most of my DDP play on MAME32, and have yet to use savestates for that game, ever =)
Image
User avatar
PROMETHEUS
Posts: 2450
Joined: Tue Feb 27, 2007 1:00 am
Location: France

Post by PROMETHEUS »

Yeah just try other versions. If you want to get good fast I REALLY recommend not giving up on finding a setup that will let you use save states.
User avatar
ReKleSS
Posts: 420
Joined: Sat Sep 03, 2005 1:38 am

Post by ReKleSS »

It's a MAME thing, it broke when they overhauled the state saving stuff. It's quite easy to fix, if you have the source:

in mame0123/src/mame/drivers/cave.c change

Code: Select all

        timer_set(ATTOTIME_IN_USEC(17376-time_vblank_irq), NULL, 0, cave_vblank_start);
        timer_set(ATTOTIME_IN_USEC(17376-time_vblank_irq + 2000), NULL, 0, cave_vblank_end);
(lines 127-128) to

Code: Select all

        timer_set(ATTOTIME_IN_USEC(0), NULL, 0, cave_vblank_start);
        timer_set(ATTOTIME_IN_USEC(2000), NULL, 0, cave_vblank_end);
To the best of my knowledge this doesn't break anything else.

The problem is that the cave hardware needs an interrupt on vsync start and vsync end, but the mame core doesn't allow for it. Instead at vsync start it sets the vsync start and end timers for the next frame. This changes it to set them for the current frame, so the timers don't run through the frame.

From what I remember, it broke after 0.99.
弾もまたいで通る
User avatar
Neon
Posts: 3529
Joined: Tue Jan 25, 2005 10:31 pm

Post by Neon »

I always practiced it and eventually cleared the first loop on Saturn, it's better than on PSX in that respect because it's slower but also the A+B+C+Start reset method brings you back to the arcade mode main screen. I think it also has a stage select. So maybe try it on Saturn.
User avatar
Frederik
Posts: 2554
Joined: Sun Nov 06, 2005 7:14 pm

Post by Frederik »

ReKleSS wrote:It's a MAME thing, it broke when they overhauled the state saving stuff. It's quite easy to fix, if you have the source:

in mame0123/src/mame/drivers/cave.c change

Code: Select all

        timer_set(ATTOTIME_IN_USEC(17376-time_vblank_irq), NULL, 0, cave_vblank_start);
        timer_set(ATTOTIME_IN_USEC(17376-time_vblank_irq + 2000), NULL, 0, cave_vblank_end);
(lines 127-128) to

Code: Select all

        timer_set(ATTOTIME_IN_USEC(0), NULL, 0, cave_vblank_start);
        timer_set(ATTOTIME_IN_USEC(2000), NULL, 0, cave_vblank_end);
To the best of my knowledge this doesn't break anything else.

The problem is that the cave hardware needs an interrupt on vsync start and vsync end, but the mame core doesn't allow for it. Instead at vsync start it sets the vsync start and end timers for the next frame. This changes it to set them for the current frame, so the timers don't run through the frame.

From what I remember, it broke after 0.99.
Million thanks! That´s exactly what I needed. (Didn´t try it yet, but I´ll keep you updated).

I can´t use older versions, since they don´t recognize my gamepad, and the oldest MAME version the Mac port is based on is 0.109, the one that has the same problems. On XP, is used to stick with 0.99, but well, that´s not avaiable for Mac.
Last edited by Frederik on Mon Feb 18, 2008 12:40 pm, edited 1 time in total.
User avatar
Frederik
Posts: 2554
Joined: Sun Nov 06, 2005 7:14 pm

Post by Frederik »

Did that in the source, but now I have to *compile* that, right? To be honest, I have absolutely no idea how to do that. MAMEDev has the tools for Windows, but I can´t find anything for compiling it on Mac OS X... ARGH.
User avatar
unsane
Posts: 662
Joined: Sun Oct 28, 2007 3:02 pm
Location: BC, Canada
Contact:

Post by unsane »

Are you sure you can't just use a middling version before the anonymous timers thing was added? Not sure of the numbers (.99?), someone else could tell you what old windows mame versions allow save states in Cave games, and then you could just find the equivalent version for mac.

On a separate note, if someone compiles the above lines from ReKleSS into the latest Windows mame, please put it up on a file sharing site and link us. :)
User avatar
Frederik
Posts: 2554
Joined: Sun Nov 06, 2005 7:14 pm

Post by Frederik »

unsane wrote: On a separate note, if someone compiles the above lines from ReKleSS into the latest Windows mame, please put it up on a file sharing site and link us. :)
Yeah, basically a hacked "MAME without bullshit" version.

And no, sadly there ISN´T an older version without savestate errors for Mac OS X, as I said before - MAME Mac OS X is a pretty new project, and started with the 0.109 version, which already has this savestate thing in it. A similar project called MacMAME has only 0.103 as far as I can tell, but it runs like shit on my Intel Mac since it´s made for PowerPC processors (older Mac models). (EDIT: I found older version but it still doesn´t like my gamepad, maybe I´ll need to try a different pad...)

As far as I can tell, hacking the recent MAME Mac OS is the only option I´ve got. It´s times like these I wish I hadn´t given away my XP disc, so I could dual-boot my machine.

I just read that there is a port called XMAME for Unix-like systems, running under X11 (something I installed to run GIMP on my system) which has older versions of MAME, maybe that will work. I´ll keep you updated.
User avatar
Frederik
Posts: 2554
Joined: Sun Nov 06, 2005 7:14 pm

Post by Frederik »

I just found MacMAME 0.6something, and while it doesn´t detect my gamepad (PS2 Streetfighter pad in some generic USB converter), it did run the attract mode of ESP.Ra.De very fluently. However, DDP International didn´t appear in the game list and I didn´t feel like downloading the missing extra data for the japanese ROM.
:x :roll:
User avatar
Arvandor
Posts: 1680
Joined: Mon Dec 12, 2005 4:00 am
Location: Utah *ugh*

Post by Arvandor »

May I counter-suggest whoever said to play the Saturn version?

The graphics, pixely explosions, and missing/changed sound effects don't bother me. What bothers me is some minor gameplay differences that make it almost unplayable if you're used to the arcade version.

If Prometheus were to play a Saturn copy, I can nearly gaurantee you he'd die once (maybe twice) on stage 1-3 due to some differences in the green teleport ships. Also, your rapid-shot is LOADS weaker in the Saturn version for whatever reason, and there's a lot less slowdown in stage 1-5 (which means it's still doable, but a lot harder... Loop 2 would be death).

I always get frustrated whenever I play my Saturn copy now >_<
Image
User avatar
Frederik
Posts: 2554
Joined: Sun Nov 06, 2005 7:14 pm

Post by Frederik »

Praise the lord.

MacMAME 0.66.2 runs DDP perfectly, and saves states perfectly. It does not, however, detect my gamepad right from the start, I have to "configure" each button in the launch menu every time I start the program, and it has some minor hiccups when I load a state, but that´s just peanuts compared to getting to practice the stage 3 boss and my favourite part of stage 4 (the three big enemies flying over streams of little tanks in the second half of the stage) OVER AND OVER AND OVER AND OVER AGAIN.

I´d still rather have MAME Mac OS X do savestates, but right now I am happy with my 5 years old version. 8)
Pulsewidth
Posts: 83
Joined: Fri Apr 03, 2009 4:14 pm
Location: UK

Post by Pulsewidth »

I tested the patch ReKleSS posted, and while it does enable savestates it also increases control latency by 1 frame, so it's not a perfect solution.
User avatar
Icarus
Posts: 7318
Joined: Mon Jan 31, 2005 2:55 am
Location: England

Post by Icarus »

I'm more interested in finding a hacked version of MAMEplus or MAMEUIFX that allows NVRAM to be used when recording and playing back inputs. Not being able to record working inputs for the RF series properly is a massive irritation.
Image
User avatar
finisherr
Posts: 608
Joined: Wed Jun 08, 2011 12:39 pm
Location: Seattle

Re: MAME Mac OS X savestate trouble in DDP

Post by finisherr »

I'm having issues with this too. Anyone know of any Mac Mames that can save game states of DDP without any problems?
User avatar
croikle
Posts: 426
Joined: Thu Aug 07, 2008 12:45 am

Re: MAME Mac OS X savestate trouble in DDP

Post by croikle »

You want something all the way back at 0.99 or before. For example, http://www.macmame.org/files/MacMAME-0.97u1.dmg.
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: MAME Mac OS X savestate trouble in DDP

Post by BPzeBanshee »

I thought SDL MAME OSX worked fine with Savestates and all? They had a bit of problems with loading DoDonPachi in the early .142 revisions but I believe they are all fixed now, so everything should work.
User avatar
croikle
Posts: 426
Joined: Thu Aug 07, 2008 12:45 am

Re: MAME Mac OS X savestate trouble in DDP

Post by croikle »

Oh, cave anonymous timers is fixed now? I should look into that.
User avatar
Despatche
Posts: 4196
Joined: Thu Dec 02, 2010 11:05 pm

Re: MAME Mac OS X savestate trouble in DDP

Post by Despatche »

Yes, they fixed those recently. I remember a big fuss about it here, even, though maybe not.
Rage Pro, Rage Fury, Rage MAXX!
User avatar
finisherr
Posts: 608
Joined: Wed Jun 08, 2011 12:39 pm
Location: Seattle

Re: MAME Mac OS X savestate trouble in DDP

Post by finisherr »

So if there is some way that I can run MAME .142 on my Mac then I should be able to save DDP? I think the most recent version of MAME available on macs right now is .135, which is kind of a bummer.
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: MAME Mac OS X savestate trouble in DDP

Post by BPzeBanshee »

finisherr wrote:So if there is some way that I can run MAME .142 on my Mac then I should be able to save DDP? I think the most recent version of MAME available on macs right now is .135, which is kind of a bummer.
As I've mentioned, get SDLMAME. It's updated to the latest standard MAME versions in each main cycle for 32-bit machines and each revision for 64-bit machines, so at time of writing its at .142u5 if you have a brand new Mac or .142 if you have an older Mac like I do.

Get it here - http://sdlmame.parodius.com/
User avatar
Zaarock
Posts: 1877
Joined: Mon Nov 07, 2005 4:18 pm
Location: Finland

Re: MAME Mac OS X savestate trouble in DDP

Post by Zaarock »

The newest version of the MAME OS X app (.135) has a lot of weird problems, including memory problems that make it run slow if I remember right, so you'll probably want to avoid it anyway.
User avatar
finisherr
Posts: 608
Joined: Wed Jun 08, 2011 12:39 pm
Location: Seattle

Re: MAME Mac OS X savestate trouble in DDP

Post by finisherr »

BPzeBanshee wrote:
finisherr wrote:So if there is some way that I can run MAME .142 on my Mac then I should be able to save DDP? I think the most recent version of MAME available on macs right now is .135, which is kind of a bummer.
As I've mentioned, get SDLMAME. It's updated to the latest standard MAME versions in each main cycle for 32-bit machines and each revision for 64-bit machines, so at time of writing its at .142u5 if you have a brand new Mac or .142 if you have an older Mac like I do.

Get it here - http://sdlmame.parodius.com/
Is this an entirely new emulator or a file I drop in my rom folder? When I download the file it doesn't allow me to install. The file name is sdlmame0142-intel_osx.tar.bz2.
User avatar
finisherr
Posts: 608
Joined: Wed Jun 08, 2011 12:39 pm
Location: Seattle

Re: MAME Mac OS X savestate trouble in DDP

Post by finisherr »

Shit, I have OSX 10.5. That's why.
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: MAME Mac OS X savestate trouble in DDP

Post by BPzeBanshee »

Actually, it's the emulator itself in a .tar compressed file within a compressed .bz2 file, but yes if you have 10.5 it won't work anyway (apparently).

Not meaning to sound arrogant (I hate it when people act as if everyone has the kind of money to fork out 100 bucks for online shit here), but if you can afford it I think you'll find that upgrading to 10.6 with an installation disc from your local Apple-licensed store will be cheap and very beneficial for lots of things besides having a working modern version of MAME. On my iMac (I have Boot Camp setup so I run Windows most of the time anyway) it was 10.5 and was rather slow and unresponsive at times, such performance issues were solved with 10.6. Even if your Mac isn't as bad as mine was I think you'll find you'll see a fair few performance improvements.

I was quite surprised by the price of it too - it was $40 AUS here, in the place where games like Call of Duty go for $120+.
User avatar
finisherr
Posts: 608
Joined: Wed Jun 08, 2011 12:39 pm
Location: Seattle

Re: MAME Mac OS X savestate trouble in DDP

Post by finisherr »

Ok, so I got Mac OS 10.6 so I can run MAME SDL .142, but I have no idea how to "compile" or "build" this program. Any hints? Anyone have a complete version of this MAME?
e_tank
Posts: 148
Joined: Wed Apr 23, 2008 5:04 am

Re: MAME Mac OS X savestate trouble in DDP

Post by e_tank »

try following this guide
User avatar
finisherr
Posts: 608
Joined: Wed Jun 08, 2011 12:39 pm
Location: Seattle

Re: MAME Mac OS X savestate trouble in DDP

Post by finisherr »

Yeah, I actually compiled the thing and it seems to be working. However, there is some slight audio skipping and after I save a game state the game will intermittently speed up by about 4x for about 1 second. Kinda lame. Oh well.

MAME OS X seems to run smoother; but, I could have done some of this compiling incorrectly.
e_tank
Posts: 148
Joined: Wed Apr 23, 2008 5:04 am

Re: MAME Mac OS X savestate trouble in DDP

Post by e_tank »

it might be something you can fix by experimenting with difference configuration options.

here's some you'll probably want to set right away and not mess around with:
autoframeskip 0
frameskip 0
throttle 1
sleep 1
speed 1.0
video opengl
keepaspect 1

try experimenting with the following:
samplerate: i use 48000 (same as what i run pulseaudio at (i'm on linux), which is also my sound cards native sample rate). if you still have sound issues at 48000 try lowering this to 44100.
audio_latency: default is 2, though i have it set to 1 with no problems. if it's skipping try increasing this a bit.
waitvsync: i'd suggest only disabling this if it gives you problems or if your concerned about input lag.
syncrefresh: i have this disabled. when combined with waitvsync this will cause mame to sync the game to your monitors refresh rate (~60 fps for most monitors) rather than the games actual rate. this may provide a smoother experience, but if the games actual refresh rate is different from your monitors it will come at the cost of the game running a little faster or slower then it was intended to (faster in the case of ddp).
multithreading: i have this set.
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: MAME Mac OS X savestate trouble in DDP

Post by BPzeBanshee »

The website I mentioned before actually had a complete binary build in it for the latest release. OSX should have its own unzipper to extract the .tar.gz.
Post Reply