It is currently Mon Dec 11, 2017 2:11 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: MMC5 with CHR-RAM
PostPosted: Tue Jul 12, 2016 4:48 pm 
Offline
User avatar

Joined: Wed Mar 23, 2016 2:24 am
Posts: 7
Hi everyone!

I'm just twiddling with some demo effects using a 16x16 tile set which is updated using chr-ram during the empty screen areas.

I'm currently trying to move this from an MMC3 mapper to MMC5 (because I need some more PRG-RAM and the extended attribute data).
But I can't get anything into CHR-RAM yet.
What I've done is to change byte 6 (mapper id) from $40 to $50.
Nametable0 ($2000) and CHR-RAM ($0000) are filled just like before.
When I use CHR-ROM instead (by changing byte 5 in the header), I can see my (constant) nametable.
I'm testing with Nintendulator, Nestopia and a PAL NES with Everdrive N8.

So what's the trick to write to CHR-RAM?


Top
 Profile  
 
 Post subject: Re: MMC5 with CHR-RAM
PostPosted: Fri Jul 15, 2016 6:35 pm 
Offline
User avatar

Joined: Wed Mar 23, 2016 2:24 am
Posts: 7
Ok, had a closer look into the Nintendulator source code and there's absolutely no support for CHR-RAM for MMC5...
Is there a reason why it would be impossible to connect CHR-RAM to the MMC5?


Top
 Profile  
 
 Post subject: Re: MMC5 with CHR-RAM
PostPosted: Fri Jul 15, 2016 7:28 pm 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2982
Location: Tampere, Finland
Emulators (and flash cart mappers) often implement only a subset of features that are used by commercial games. (Support for more than 8 KB of CHR-RAM was also a feature that was missing for a long time in many emulators.)

There's no intrinsic reason why CHR-RAM couldn't be used with MMC5.

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


Top
 Profile  
 
 Post subject: Re: MMC5 with CHR-RAM
PostPosted: Fri Jul 15, 2016 7:37 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5886
Location: Canada
hellfire wrote:
Ok, had a closer look into the Nintendulator source code and there's absolutely no support for CHR-RAM for MMC5...
Is there a reason why it would be impossible to connect CHR-RAM to the MMC5?

I don't think there's a "reason", I think the implementation is just a consequence of the original iNES format not having a way to specify CHR-RAM size (amended in a more recent revision of the format), and the lack of extant MMC5 games using CHR-RAM.

Almost any mapper should be able to substitute CHR-RAM for CHR-ROM.


Top
 Profile  
 
 Post subject: Re: MMC5 with CHR-RAM
PostPosted: Fri Jul 15, 2016 10:29 pm 
Offline
User avatar

Joined: Wed Nov 10, 2004 6:47 pm
Posts: 1845
Somewhat related:

One thing that always confused me about MMC5... when using 8x16 sprites there is 12K of CHR used for rendering, but only 8K of addressing space in PPU memory. We all know how this works in rendering (sprites use front 8K, BG uses back 4K) -- but what about software access via $2007?

Would $2007 reads/writes access only the sprite patterns? Or would it depend on something else?

This seems like a detail you'd need to figure out if you want CHR-RAM on MMC5 ... since you'd need to know what CHR you're writing to.


Top
 Profile  
 
 Post subject: Re: MMC5 with CHR-RAM
PostPosted: Sat Jul 16, 2016 7:56 pm 
Offline
User avatar

Joined: Mon Feb 07, 2011 12:46 pm
Posts: 941
Disch wrote:
Would $2007 reads/writes access only the sprite patterns? Or would it depend on something else?

This seems like a detail you'd need to figure out if you want CHR-RAM on MMC5 ... since you'd need to know what CHR you're writing to.
It is a detail I would want even if it is not CHR-RAM, because we should need to know all of the detail needed for correct implementation, even if they are features that are not currently used by anything.

_________________
.


Top
 Profile  
 
 Post subject: Re: MMC5 with CHR-RAM
PostPosted: Tue Jul 19, 2016 2:57 pm 
Offline
User avatar

Joined: Wed Mar 23, 2016 2:24 am
Posts: 7
rainwarrior wrote:
I think the implementation is just a consequence of the original iNES format not having a way to specify CHR-RAM size, and the lack of extant MMC5 games using CHR-RAM.
Almost any mapper should be able to substitute CHR-RAM for CHR-ROM.

Well, I somehow expected the Everdrive could handle CHR-RAM as it already works on RAM anyway. Too optimistic, of course. Even seems like they just ripped off the existing mapper code (which makes perfectly sense when they just want to get the games running).

Too bad a lot of hardware potential just lies to waste now.
So, basically we have to wire some RAM to an actual MMC5, check how it behaves and update the mapper code for Nintendulator and the Everdrive/Powerpak...
That's probably too much of a quest for me right now. So I'll stick with the MMC3 for some longer.


Top
 Profile  
 
 Post subject: Re: MMC5 with CHR-RAM
PostPosted: Wed Jul 20, 2016 8:00 am 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3967
Would a real MMC5 board route the write pins correctly to CHR-RAM?

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
 Post subject: Re: MMC5 with CHR-RAM
PostPosted: Wed Jul 20, 2016 10:09 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19329
Location: NE Indiana, USA (NTSC)
Not a stock board. Early NES games had all 72 contacts on the Game Pak edge connector. Later board revisions removed unused contacts, such as the unused expansion pins in the middle and the PPU /WR pin on CHR ROM boards, presumably to save money on gold-plating them. This is why some repro makers prefer Super Mario Bros. 2 when making translated Final Fantasy III: it's one of the few NES games with MMC3 and WRAM published before Nintendo made this change. By the MMC5 era, Nintendo had already been leaving these pins off the board, meaning the PPU /WR pin on the 72-pin connector touches the PCB's substrate, not a contact.

(EA did the same thing on its Genesis games. This worried me when I bought a used loose BlockOut at a pawn shop, as most of the unused pins were on one side of the edge connector, making me think the cart may be damaged. Fortunately, it worked in my Genesis 3.)

As for a modified board, you'll have to ask someone who has made a repro of Rockman 4 Minus Infinity.


Top
 Profile  
 
 Post subject: Re: MMC5 with CHR-RAM
PostPosted: Wed Jul 20, 2016 11:12 am 
Online

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6507
Location: Seattle
Fortunately, you're mistaken; PPU /WR is present on (at least) my NES-ELROM-01, because that connects to MMC5 pin 33.


Top
 Profile  
 
 Post subject: Re: MMC5 with CHR-RAM
PostPosted: Wed Jul 20, 2016 11:41 am 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10164
Location: Rio de Janeiro - Brazil
And what does the MMC5 do with that signal?


Top
 Profile  
 
 Post subject: Re: MMC5 with CHR-RAM
PostPosted: Wed Jul 20, 2016 11:42 am 
Online

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6507
Location: Seattle
I'd guess it's for handling writes to the 3rd nametable via the PPU's bus.


Top
 Profile  
 
 Post subject: Re: MMC5 with CHR-RAM
PostPosted: Wed Jul 20, 2016 12:05 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19329
Location: NE Indiana, USA (NTSC)
Thanks for the clarification about the possibility of writing to ExRAM through the PPU.

In that case, bending up your CHR RAM's /WE and connecting it to MMC5 pin 33 should allow it to work. Is a test ROM needed? How big is the CHR RAM that you plan to use: 8Kx8 or 32Kx8?


Top
 Profile  
 
 Post subject: Re: MMC5 with CHR-RAM
PostPosted: Thu Jul 21, 2016 3:27 am 
Offline
User avatar

Joined: Wed Mar 23, 2016 2:24 am
Posts: 7
tepples wrote:
How big is the CHR RAM that you plan to use: 8Kx8 or 32Kx8?

How would you write more than 8kB into PPU_DATA when the nametables start at $2000?


Top
 Profile  
 
 Post subject: Re: MMC5 with CHR-RAM
PostPosted: Thu Jul 21, 2016 5:44 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19329
Location: NE Indiana, USA (NTSC)
Write 8K, write to bank regs, write 8K more... Videomation manages it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: Google Adsense [Bot] and 7 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