fceux 2.2.3 not outputting 64kb wram file for mmc5

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: fceux 2.2.3 not outputting 64kb wram file for mmc5

Post by tepples »

Once you're close to actually needing both 32K halves battery-backed in your project, feel free to file an issue and attach the source and binary of your test ROM. If you have an easily reproducible test and a good reason, Rainwarrior and the rest of the FCEUX dev team are fairly good at acting on enhancement requests.
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: fceux 2.2.3 not outputting 64kb wram file for mmc5

Post by rainwarrior »

Looks like zeromus already put in 64k MMC5 SRAM save support yesterday:
https://sourceforge.net/p/fceultra/code/3373/
User avatar
Bregalad
Posts: 8056
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: fceux 2.2.3 not outputting 64kb wram file for mmc5

Post by Bregalad »

infidelity wrote: I even changed the 10th byte from A0, to 0A, and I still get 32kb output.
Sorry my bad it was effectively $a0 that you were supposed to use. So clearly you are right and the current emus are wrong/bugged when it comes to NES 2.0 support.
Looks like zeromus already put in 64k MMC5 SRAM save support yesterday:
https://sourceforge.net/p/fceultra/code/3373/
This code is awful and does not support the NES 2.0 header at all, it just prepares several cases, probably made-up to support existing games, and quickly added infidelity's case as a work arround. They are not caring about future homebrew using different available RAM sizes on MMC5. It also does not output a proper error message if an unavailable RAM size is used.
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: fceux 2.2.3 not outputting 64kb wram file for mmc5

Post by rainwarrior »

Bregalad wrote:This code is awful and does not support the NES 2.0 header at all
Sure, but it solves this particular problem that currently more than zero people are interested in.

If you'd like to submit a patch that offers proper iNES 2 WRAM size support, I'm sure it'd be considered.
User avatar
Bregalad
Posts: 8056
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: fceux 2.2.3 not outputting 64kb wram file for mmc5

Post by Bregalad »

Well I don't know but I'd code it something like that (pseudocode):

Code: Select all

switch(save_game_size)
{
	case 0x00:
		// simulate ELROM cart with no PRG-RAM
		break;
	case 0x07:
	case 0x70:
	    // simulate EKROM cart with 8kb PRG-RAM
		break;
	case 0x80:
	case 0x77:
	case 0x08:
		// simulate ETROM cart with 2x 8kb PRG-RAM chips
		break;
	
	case 0x90:
	case 0x09:
		// simulate EWROM cart with 32kb PRG-RAM
		break;
	
	case 0x79:
	case 0x97:
		// simulate hypotetical cart (ETROM ?) with 8kb and 32kb PRG-RAM chips
		break;
	
	case 0x99:
	case 0xa0:
	case 0x0a:
		// simulate hypotetical (ETROM ?) cart with 2x 32kb PRG-RAM chips
		break;
	
	default:
		// show some warning message that NES 2.0 header has an non-supported PRG-RAM size and default to something
}
Even this could be largely improved, but at least it show the idea.
infidelity
Posts: 490
Joined: Fri Mar 01, 2013 4:46 am

Re: fceux 2.2.3 not outputting 64kb wram file for mmc5

Post by infidelity »

rainwarrior wrote:Looks like zeromus already put in 64k MMC5 SRAM save support yesterday:
https://sourceforge.net/p/fceultra/code/3373/
It was zeromus who I was originally directed to, about the 64kb issue. However, he was quite snippy after I asked him how to obtain the latest build. I couldn't find it via goggle, and I've never compiled anything from the link rainwarrior posted. Could someone explain how I obtain this latest build of fceux?

And could someone direct me to those I should contact, that take care of Nestopia & Ninrendulator, so those can be updated too?
infidelity
Posts: 490
Joined: Fri Mar 01, 2013 4:46 am

Re: fceux 2.2.3 not outputting 64kb wram file for mmc5

Post by infidelity »

Can someone please help me, in explaining how or where to obtain fceux r3372? Or is it r3374? Either way I've had no luck finding these build via google.
calima
Posts: 1745
Joined: Tue Oct 06, 2015 10:16 am

Re: fceux 2.2.3 not outputting 64kb wram file for mmc5

Post by calima »

Click the "buildbot builds" link on fceux downloads page:
https://ci.appveyor.com/project/zeromus ... /artifacts
infidelity
Posts: 490
Joined: Fri Mar 01, 2013 4:46 am

Re: fceux 2.2.3 not outputting 64kb wram file for mmc5

Post by infidelity »

Thank you. :-)
Post Reply