Post subject: Rerecording in Mame32.
Joined: 11/16/2005
Posts: 13
Location: Copenhagen, Denmark
Is there a Mame32 ver. out there that support a re-recording feature ala something like Famtasia..? if not can sombody add a re-recording support in a Mame32 emulator..?
Joined: 4/25/2004
Posts: 498
The main problem with this, I think, is that the savestates themselves are unstable for some games. (Like the Gradius series...last time I tried to load a savestate, the graphics scrambled and the game froze. o_O) So, since rerecording is kinda impossible without savestates, the savestate system will need to be fixed first. And since just about every arcade game's architecture is different, the amounts and types of data the savestate will need to store will change across games. I get the feeling it'll be a while before someone manages to fix MAME's savestates...<_<
Active player (411)
Joined: 3/16/2004
Posts: 2623
Location: America, Québec
Imo, it's not a good reason to not implement rerecording. There are many good games that using savestates work well.
Joined: 12/14/2004
Posts: 261
Location: Mars
4matsy wrote:
The main problem with this, I think, is that the savestates themselves are unstable for some games. (Like the Gradius series...last time I tried to load a savestate, the graphics scrambled and the game froze. o_O)
VS Mario Bros's savestate also does'nt load correctly.
Radz.
Active player (411)
Joined: 3/16/2004
Posts: 2623
Location: America, Québec
Shakespeare wrote:
VS Mario Bros's savestate also does'nt load correctly.
VS Mario Bros is the same as the NES version. And luckily for you there's VS version as ROM for NES emulators.
Joined: 12/14/2004
Posts: 261
Location: Mars
Phil wrote:
Shakespeare wrote:
VS Mario Bros's savestate also does'nt load correctly.
VS Mario Bros is the same as the NES version. And luckily for you there's VS version as ROM for NES emulators.
Althought Gameplay is Same, In VS Mario Bros in the first Warp Zone, there is only 1 pipe. Which Warp you to Level 6 instead of Level 8. That's the change.
Radz.
Player (206)
Joined: 5/29/2004
Posts: 5712
Really? I heard there were a lot more level changes than that, later on...
put yourself in my rocketpack if that poochie is one outrageous dude
Active player (411)
Joined: 3/16/2004
Posts: 2623
Location: America, Québec
The VS Mario on NES is the same as the Arcade since it is ported by hacker(s). No?
Joined: 12/14/2004
Posts: 261
Location: Mars
Bag of Magic Food wrote:
Really? I heard there were a lot more level changes than that, later on...
Some Minor Changes, Actually can't be noticed easily. So a TAS might be good to watch.
Phil wrote:
The VS Mario on NES is the same as the Arcade since it is ported by hacker(s). No?
Yes
Radz.
Player (206)
Joined: 5/29/2004
Posts: 5712
What? Why would it be good to watch what's almost the same thing?
put yourself in my rocketpack if that poochie is one outrageous dude
Joined: 12/14/2004
Posts: 261
Location: Mars
Bag of Magic Food wrote:
What? Why would it be good to watch what's almost the same thing?
Becuase of Warp Zone Changes, How will you Enter Leverl 8?
Radz.
Player (206)
Joined: 5/29/2004
Posts: 5712
...... Aren't the other levels already in the full run?
put yourself in my rocketpack if that poochie is one outrageous dude
Joined: 12/14/2004
Posts: 261
Location: Mars
Bag of Magic Food wrote:
...... Aren't the other levels already in the full run?
Off course Yes. But I still recommend someone to try this.
Radz.
Post subject: Adding re-recording support to advancemame
Joined: 5/29/2006
Posts: 11
EDIT: Since a bunch of people are downloading the first version of the patch, which doesn't work as well, I think I'll make a webpage for this patch which explains my progress, any bugs, and how I'm coming along with them. http://krispnet.ath.cx:800/krispy/advancemame-rerecording/ Then I won't have to flood the forum or bump the topic every time I make a small improvement. My original post to this topic:
chucky wrote:
if not can sombody add a re-recording support in a Mame32 emulator..?
This is an interesting coincidence, I felt like trying to make a video of the arcade version of gradius3 to see how it compared to the SNES version. I made a patch to AdvanceMAME to support re-recording and savestates. Here's a patch against advancemame-0.104.0, tested on Linux. (I'm hosting it on my own computer, so I might take it down because of bandwidth.) The archive contains 3 things: a readme, the patch, and a sample .inp for grdius3e which _should_ play through the entire game without desynching, on any mame. It's not perfect, but there are enough near deaths to detect desynchs. http://krispnet.ath.cx:800/krispy/files/advancemame-0.104.0-rerecording-patch.7z (81 KB) It's got speedup, slowdown, frame advance, and each savestate now records the entire input history. Read the readme, I have too much to say.
4matsy wrote:
The main problem with this, I think, is that the savestates themselves are unstable for some games. (Like the Gradius series...last time I tried to load a savestate, the graphics scrambled and the game froze. o_O)
The only problem I had with gradius3 was the screen would be malformed after loading a state. The game still played correctly, if you could imagine where the solid things would be :) I added a few lines of code to fix the screen, and everything seems to work. gradius3 is the only game I tested (and I used re-recording to make that .inp)
4matsy wrote:
So, since rerecording is kinda impossible without savestates, the savestate system will need to be fixed first. And since just about every arcade game's architecture is different, the amounts and types of data the savestate will need to store will change across games. I get the feeling it'll be a while before someone manages to fix MAME's savestates...<_<
Fortunately, for gradius3 at least, MAME saves all the data needed to reconstruct the machine state. It just uses a little trick to save render time, which causes the graphics glitch upon loading a state.
Player (71)
Joined: 8/24/2004
Posts: 2562
Location: Sweden
Sounds awesome! I will take a look at this when I get back from work. :D I can help you host the file if you want. Edit: I uploaded the file to my webserver. http://133an.sytes.net/~highness/advancemame-0.104.0-rerecording-patch.7z
Post subject: a bug, doh.
Joined: 5/29/2006
Posts: 11
In case anyone's using my patch, I should warn you of a bug I just found. Advancemame records keystrokes every vsync, but it records states anytime. It's possible for the game and recording to desynch by 1 frame when you load state. Workarounds: reset and use -playback every so often, or hold the exact same buttons when you load state as when you save state. I'll try to fix this tomorrow.
Player (71)
Joined: 8/24/2004
Posts: 2562
Location: Sweden
Sounds nasty. I rather not use it if thats the case. :D
Joined: 5/29/2006
Posts: 11
Yes, it is nasty :( EDIT: rewrote the post I feel stupid, I was in too much of a hurry to get something out everyone could play with. I took the time to read through most of the MAME emulation code, and more importantly, to properly test what I wrote. Now I'm fairly sure this will work without desync on any MAME platform that supports savestates, and generates recordings that similar versions of MAME can play. I just hope I didn't upload the wrong file, now :X http://krispnet.ath.cx:800/krispy/files/advancemame-0.104.0-rerecording-patch3.7z (22KB)
nesrocks
He/Him
Player (246)
Joined: 5/1/2004
Posts: 4096
Location: Rio, Brazil
if it has recording from power on it will be usefull to this site.
Joined: 5/29/2006
Posts: 11
it only records from power on :)
Joined: 11/16/2005
Posts: 13
Location: Copenhagen, Denmark
oh man this is so cool, but does the patch only work in adv mame? i only use mame32 will it work there? if not could you make a patch for mame32?
Joined: 5/29/2006
Posts: 11
Yes, that patch only works for that specific version of advmame. I'm not familiar with mame32, but I think all mames share most of their emulation code. I think the differences would be how mame32 handles speedup/slowdown/frame advance and how to bind them to keys. Plus, compiling it would be interesting... I don't have a working installation of Windows right now :S I went over to the mame32 website, and I find it curious that the source code distribution is only shipped as an .exe installer o.O (fwiw, advancemame is supposed to build on Windows) I'll try to take a look at it tonight or tomorrow, no promises on making it till I check it out though. Here's a little test we could do, I made a recording of the first mission of Metal Slug while I was building this. It should beat the first mission with a score of 48700 without getting hit. You might need to backup/delete the metal slug memory card and nvram files. http://krispnet.ath.cx:800/krispy/files/mslug-m1.7z Does it work or not/what version of mame32?
Joined: 11/16/2005
Posts: 13
Location: Copenhagen, Denmark
krispy wrote:
Plus, compiling it would be interesting... I don't have a working installation of Windows right now :S I went over to the mame32 website, and I find it curious that the source code distribution is only shipped as an .exe installer o.O (fwiw, advancemame is supposed to build on Windows) I'll try to take a look at it tonight or tomorrow, no promises on making it till I check it out though.
Okay thanks, making a rerecording patch for Mame32 would be so awesome!! and something thats not been done before, i really really hope you get it done, cheers:)
Joined: 5/29/2006
Posts: 11
Well, I unpackaged the source and looked at it a while. It uses the unmodified MAME source for emulation (yay). But after reading through half of win32ui.c, i've come to the conclusion: - The code is sufficiently complex that I can't design a change to the UI without being able to compile/run what I make. - It's been 4-6 years since I wrote native win32 ui code. I'm not sure what's the best way to integrate the time management features just from looking at it. If someone else can do the UI, I can supply code that supports the re-recording part, or explain how I came up with it. I plan to clean up and document my patch this weekend. If you're in a hurry to do TAS work with some MAME, advancemame should run under Windows and provide what you need to get started. Plus, the recordings it produces should run perfectly under Mame32 when you finish.
Joined: 11/16/2005
Posts: 13
Location: Copenhagen, Denmark
hey krispy, anything new on the rerecording patch for mame32..?