PowerPak save state mappers

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderators: B00daW, Moderators

User avatar
thefox
Posts: 3141
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

PowerPak save state mappers

Post by thefox » Sat Feb 06, 2010 9:29 am

EDIT: Latest downloads here: http://kkfos.aspekt.fi/projects/nes/save-state-mappers/

Old info for version 1.0:

So, here's a little something I've been working on the last couple of days: http://removed

These mappers allow players to save/load the game state in real time using Select+A/Select+B buttons. So far I've implemented NROM and UNROM (Castlevania, Mega Man, Duck Tales and so on) support.

The save state can also be saved to SAV files on the CF card. Note that the SAV file has to be 16KB for this to work. (Actually, for NROM games it should probably work with just 8KB, but I didn't test it.)

Currently saved:
- CPU 2KB memory + registers
- PPU palette + nametables + CHR-RAM + $2000 + $2001
- mapper state

"TODO":
- more mappers
- more complete save state (include APU etc)
- configurable buttons
- more save state slots (not really that useful because state can be saved to CF)
- hex editor
- the possibilities are endless ;)


EDIT 2011-01-30: removed old link
Last edited by thefox on Sun Jul 17, 2011 4:42 am, edited 5 times in total.

Jagasian
Posts: 421
Joined: Wed Feb 09, 2005 9:31 am

Post by Jagasian » Fri Feb 12, 2010 2:04 pm

Pretty cool.

User avatar
tokumaru
Posts: 11755
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru » Fri Feb 12, 2010 2:17 pm

I haven't tried yet (haven't had time for playing), but this is definitely a great idea! I didn't even know the PowerPak could do this.

User avatar
MottZilla
Posts: 2832
Joined: Wed Dec 06, 2006 8:18 pm

Post by MottZilla » Sat Feb 13, 2010 1:42 am

I haven't had time to try it yet either but it sounds awesome if it's anything like the Game Doctor SF's instant game save feature.

User avatar
deksar
Posts: 21
Joined: Tue Jan 12, 2010 7:54 am

Post by deksar » Sat Feb 13, 2010 1:43 am

great feature! Thanks a lot!
i wish it was for all the mappers :(

User avatar
thefox
Posts: 3141
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Post by thefox » Sat Feb 13, 2010 8:51 am

deksar wrote:great feature! Thanks a lot!
i wish it was for all the mappers :(
More mappers will come later. The problem is I can't simply add this functionality in to the existing mappers, I have to implement everything from scratch. I will probably do AxROM and CNROM next, then go for MMC1.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi

jamesv833
Posts: 3
Joined: Thu Feb 11, 2010 7:51 pm

Post by jamesv833 » Sun Feb 14, 2010 1:25 am

Just tried it, works great thanks for the 16kb sav file. great work. :D

User avatar
thefox
Posts: 3141
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Post by thefox » Tue Mar 09, 2010 12:37 am

I've now implemented AxROM, CNROM and MMC1, just need to polish them a bit before releasing. MMC3 is also partially working but the scanline counter is giving me some trouble.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi

thewizdawg
Posts: 5
Joined: Fri Nov 13, 2009 7:06 am

Post by thewizdawg » Tue Mar 09, 2010 5:08 pm

Hello,

I've tried the save states and it seems to work. However when I do a reset on the game instead of going back to start screen, it goes back to PowerPak main menu. Can you check/fix this?

User avatar
thefox
Posts: 3141
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Post by thefox » Tue Mar 09, 2010 8:41 pm

thewizdawg wrote:Hello,

I've tried the save states and it seems to work. However when I do a reset on the game instead of going back to start screen, it goes back to PowerPak main menu. Can you check/fix this?
Yeah I'm aware of this. It's because the example mapper schematics don't have that functionality in them. But I'll look into it at some point.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi

User avatar
No Carrier
Posts: 290
Joined: Tue Dec 13, 2005 4:19 pm
Location: Gainesville, FL - USA
Contact:

Post by No Carrier » Sun Mar 14, 2010 9:16 am

This sounds great! Gonna give it a try soon!

ccovell
Posts: 1014
Joined: Sun Mar 19, 2006 9:44 pm
Location: Japan
Contact:

Post by ccovell » Mon Apr 05, 2010 7:38 pm

Hey, I just tried out these mappers on my Famicom (Titler) and although the game saving/restarting works great, the palettes get all screwed up on restarting. Also, 3rd-party controllers are unusable. Has anyone else had palette glitching with these mappers?

User avatar
thefox
Posts: 3141
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Post by thefox » Tue Apr 06, 2010 5:18 am

ccovell wrote:Hey, I just tried out these mappers on my Famicom (Titler) and although the game saving/restarting works great, the palettes get all screwed up on restarting. Also, 3rd-party controllers are unusable. Has anyone else had palette glitching with these mappers?
Hmm that's strange, I've never had any problems with palette. I've seen some other problems, like the status bar doesn't work right in Castlevania for a brief moment after loading and sometimes CHR-RAM wouldn't load correctly in Darkwing Duck. Also in Dragon's Lair sprites would get corrupted. I haven't looked further in to these problems yet.

And yeah, I forgot to OR the Famicom external controller bit in, thanks for reminding me. :) Another possible problem is with games that use DPCM as it doesn't correctly handle multiple reads per frame so if a bit gets corrupted it might save/load automatically in some rare cases.

...

In other news I've been also trying to add support for TURBOing the buttons (disabling/enabling through a menu). In concept it seems to be working although it's complicated by some games reading the controller multiple times per frame.

Still haven't been able to figure out what's the best way to implement the MMC3 scanline counter because of my limited Verilog skills. If anybody has any tips I'd appreciate it. :) I'm talking hardware side here, the "abstract" functioning is well explained in the wiki.

User avatar
kyuusaku
Posts: 1665
Joined: Mon Sep 27, 2004 2:13 pm

Post by kyuusaku » Tue Apr 06, 2010 8:23 am

thefox wrote:In other news I've been also trying to add support for TURBOing the buttons (disabling/enabling through a menu). In concept it seems to be working although it's complicated by some games reading the controller multiple times per frame.
You're overpowering the input buffers? To me that doesn't sound like a good idea.

User avatar
thefox
Posts: 3141
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Post by thefox » Tue Apr 06, 2010 8:48 am

kyuusaku wrote:
thefox wrote:In other news I've been also trying to add support for TURBOing the buttons (disabling/enabling through a menu). In concept it seems to be working although it's complicated by some games reading the controller multiple times per frame.
You're overpowering the input buffers? To me that doesn't sound like a good idea.
No. I do it like this (simplified):
- watch $4016 strobes and $4016/$4017 reads to get the pad state
- I (attempt to) detect when CPU is executing instructions like LDA $4016 and patch the hibyte on every 2nd time redirecting it to a FPGA register I have set up, like $4816 (this will only work when game is executing code in the ROM since I can't patch RAM code)
- the FPGA reg returns the pad state that was read the previous time with some of the buttons forced to 0, so when player holds a a button down on every 2nd frame game will read 1 and every 2nd frame 0

Of course this solution is not completely transparent as it will halve the times the controller is actually read (from 60Hz to 30Hz on most if not all games), but I think it should be usable.

Post Reply