It is currently Tue Oct 24, 2017 2:22 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Sat Aug 31, 2013 9:09 am 
Offline
User avatar

Joined: Wed Jun 26, 2013 12:35 pm
Posts: 116
Location: Baltimore
Your immediate question might be why would I want to do this?

Basically I'm looking to develop my game for a board that's being developed by infiniteneslives, which you may have heard of as the Homebrew FDS project. It was a good time to make a switch - I'd done enough sloppy development in my "sandbox" to start fresh and create a more solid engine, and I wanted more freedom to create lots of content, and this will be the cheapest way to realize physical cartridges of a large game for sure. I chose MMC5 because of its ability to be configured similar to the HBFDS mapper, support for lots of storage, and bankswitched CHR ROM. Thing is, from my tests it looks like it does not support bankswitched CHR RAM, which HBFDS will - 32KB of it at the least. I can enable CHR RAM but I cannot bankswitch it. This is fine for my sprites (I am planning to do dynamic updates there) but not for BG (which I want to have fast bulk switching for animation and splitscreen HUD so that the playfield can have more detail and animate lushly)

To get around this I thought the easy way was to somehow get FCEUX to allow writing to CHR ROM. I will store 8 blank CHR banks in the ROM file, configure MMC5 for 4KB bankswitching, and write to them from PRG ROM as needed, switching them in like bankswitched PRG RAM.

Compiling FCEUX looks non-trivial (as is the code) so if there's a commandline option or setting anyone knows of that disables write-protecting of ROM, that seems like it could work (though I suppose it's possible it might toss out any changes on a bankswitch...). Otherwise I guess I'll dive in - if anyone can offer me tips on the code in that case that would be a big help.

_________________
sonder


Top
 Profile  
 
PostPosted: Sat Aug 31, 2013 9:21 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2963
Location: Tampere, Finland
sonder wrote:
Compiling FCEUX looks non-trivial (as is the code) so if there's a commandline option or setting anyone knows of that disables write-protecting of ROM, that would work. Otherwise I guess I'll dive in - if anyone can offer me tips on the code in that case that would be a big help.

Your request is highly unusual so it's hard to see why there would be a command line option for it. You're most likely going to have to modify the code.

OT: Why does the wiki page for MMC5 (http://wiki.nesdev.com/w/index.php/MMC5) say CHR capacity: Up to 1024 KB ROM (RAM support unknown). More speficially, why "RAM support unknown"? My NES mapper/signal skills may be a little bit rusty here, but is there any reason for MMC5 to even care whether it's connected to a RAM chip or to a ROM chip?

_________________
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: kkfos.aspekt.fi


Top
 Profile  
 
PostPosted: Sat Aug 31, 2013 9:31 am 
Offline
User avatar

Joined: Wed Dec 06, 2006 8:18 pm
Posts: 2801
Somewhere in the code there is just a simple check most likely, seeing if it should accept or throw away attempts to write the CHR pattern table memory. You could disable it if you find it. MMC5 can support CHR-RAM, the reason for saying "unknown" would best be because no MMC5 game ever used CHR-RAM. No board produced was configured for CHR-RAM. There was the FDS doki doki panic to mmc5 hack afterall that used chr-ram.


Top
 Profile  
 
PostPosted: Sat Aug 31, 2013 9:47 am 
Offline
User avatar

Joined: Wed Jun 26, 2013 12:35 pm
Posts: 116
Location: Baltimore
MottZilla wrote:
Somewhere in the code there is just a simple check most likely, seeing if it should accept or throw away attempts to write the CHR pattern table memory. You could disable it if you find it. MMC5 can support CHR-RAM, the reason for saying "unknown" would best be because no MMC5 game ever used CHR-RAM. No board produced was configured for CHR-RAM. There was the FDS doki doki panic to mmc5 hack afterall that used chr-ram.


I think that technically, because I was able to enable CHR-RAM at all, that's the support it gives. But I believe the RAM is not programmed to obey MMC5 bank switching in FCEUX for some reason; I tested it. Maybe that's a bug? If mmc5 doki doki panic used it, maybe I'm not doing something. Because NES 2.0 allows for defining how much CHR RAM there is, above 8KB, which I've done.

_________________
sonder


Top
 Profile  
 
PostPosted: Sat Aug 31, 2013 5:02 pm 
Offline
User avatar

Joined: Wed Dec 06, 2006 8:18 pm
Posts: 2801
It's possible the emulator isn't setup to allow bankswitching CHR-RAM on certain mappers. This wouldn't be that strange. With enough time, you could fix that.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: Google Adsense [Bot] and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group