Screen Tile Split like MMC3

radel1996

New member
Do you know guys about how Works MMC3, im using a screenshot by krzysiobal
7047451800_1491216066.png


The MMC3 adds a scanline based IRQ counter to make split screen scrolling easier to perform (mainly to allow the playfield to scroll while the status bar remains motionless at the top or bottom of the screen), along with two selectable 8KB program ROM banks and two 2KB+four 1KB selectable character ROM banks.

For the Mapper 30 Also its can?
 

Kasumi

New member
Mapper 30 does not have the two 2KB and four 1KB selectable character ROM banks. MMC3 can swap just a part of the background, or just a part of the sprites, even in the middle of the screen.

Mapper 30 can swap, but it must swap all of 256 background tiles, and all of the 256 sprite tiles at the same time. (So if you want some things to not change, they must be duplicated in multiple banks.) It has 4 of those 8KB banks available. These banks can be updated, but only very slowly unless the game is not drawing anything.

Swaps on MMC3 also use much less CPU because mapper 30 does not have a scanline counter that trigger an IRQ.

In short: It's possible to do something like The Jetsons' title screen with mapper 30, but MMC3 has way more control this sort of thing. As far as I know, there's no direct support for it in NES Maker either way.
 

Shodanbot

New member
Kasumi said:

I'm asking you for further clarification on mapper 30 if you'll give me the time or have the knowledge.

Now, I was going through the basics of how the Nintendo carts stores and calls for any tile data on a ROM. MMC3 was the one that I was looking at. Unfortunately, NESMaker doesn't support it and may never support it, but I guess you never know. One thing I noticed is that MMC3 allows for very little or no tile repetition. Little Samson makes fantastic use of it.

So, let's say I've got three sets of PC tiles each with 90-100 arranged tiles for the various actions the PC can take and 1 set of about 90 to 120 background tiles and several sets of NPCs and special effects ranging from 60-80 tiles. Anyway, what I would like to know is if there be any significant problems on mapper 30 (with performance and ROM memory) when duplicating these already large tilesets as much as 3 times across different sets and switching them out during play? I don't intend to do this, but it would be helpful to understand the limits before I go into the deep end with this tool.
 

Mihoshi20

Member
Shodanbot said:
Kasumi said:

I'm asking you for further clarification on mapper 30 if you'll give me the time or have the knowledge.

Now, I was going through the basics of how the Nintendo carts stores and calls for any tile data on a ROM. MMC3 was the one that I was looking at. Unfortunately, NESMaker doesn't support it and may never support it, but I guess you never know. One thing I noticed is that MMC3 allows for very little or no tile repetition. Little Samson makes fantastic use of it.

So, let's say I've got three sets of PC tiles each with 90-100 arranged tiles for the various actions the PC can take and 1 set of about 90 to 120 background tiles and several sets of NPCs and special effects ranging from 60-80 tiles. Anyway, what I would like to know is if there be any significant problems on mapper 30 (with performance and ROM memory) when duplicating these already large tilesets as much as 3 times across different sets and switching them out during play? I don't intend to do this, but it would be helpful to understand the limits before I go into the deep end with this tool.

I'll let Kasumi handle the technical end as they are amazing at that sort of thing and seem to know the NES inside and out. Though the MMC chips are a fair bit advanced. Mapper 30/UNROM-512 is a fair bit closer to Mapper 02/UNROM games, though it supports a wider feature set such as animated tiles, save ram, and more storage space. I'd look more into Mapper 02 games like Castlevania, 1943, Blades of Steel, DuckTales, DuckTales 2, Contra, Ghosts 'n Goblins, MegaMan 1, TopGun, etc to get a feel for the potential as those are all Mapper 02 games.
 

Kasumi

New member
Background-wise, Little Samson is actually doing less than it could be to avoid tile repetition. They have repeated 8x8s tiles in the tileset, and you can avoid doing that on any mapper. The first level could have used 41 more unique 8x8 tiles than it actually used had they not repeated 8x8 tiles. So background-wise, MMC3 doesn't have much to do with why it looks good.

Sprites... it's a hard question to answer. Or I mean. The short answer is you can't really do that on Mapper 30, but that's not a helpful answer.

Let's check out that fan game I made:
7hSnoxV.gif

On the left, you can see the gameplay. On the right are the 256 sprite tiles NES can have in memory at any one time. I tried to slow it down so it's easier to see: When Ajna (the player character) moves, the top 64 tiles change to a set of 64 tiles that contains whatever is needed to display what she's doing on that specific frame. When the enemy moves, the bottom 64 tiles change to a set of 64 tiles that contains whatever is needed to display what it's doing on that specific frame.

This is a benefit of MMC3. You can swap a 64 tile portion of sprite tiles without affecting the other 192 sprite tiles. Both Ajna and that enemy have their own portion of the sprite tiles. MMC3 gets six portions of the 512 tiles NES has in memory at one time. (256 for the background and 256 for sprites.) It can swap each "portion" fully independently.

There are no "portions" in swapping using mapper 30. ALL of the tiles! Not just all the sprite tiles. ALL the 256 tiles from both the sprite AND the background set must be swapped all together at once.

On mapper 30, you have four sets of 512 tiles available to swap to during play.

What does this mean for your example? Say you have four sets of 128 tiles for your player character. (I say four instead of three because it makes the examples easier. I say 128 instead of 90-100 because it makes the examples easier.) If you want your NPCs to animate independently of your player character, you can only use 128 total tiles for them. Why? Because there are only four sets of tiles. Your player character has the tiles for different animation frames on all four of them. If an NPC wants to switch to a different set than the player character, one of the two will be displayed with the wrong set of tiles. The reason why 128 tiles for the NPCs works is because the same 128 is duplicated in all four sets. (So all frames will contain the same tiles on the NPC side, and thus, will just display the same thing.) The second something is different in the four sets, it becomes harder to animate independently of something else that wants to be different in the four sets.

Even if you use three sets, like in your example, it doesn't help. Because if you have three sets for your player character, and two sets for NPCs, three times two is six which is more than the four you have. If you had two sets for your player character and two sets for your NPCs, you could do it. If your two player character sets were 0 and 1, and your two NPC sets were 2 and 3, your four "swap sets" would be
0 and 2, 0 and 3, 1 and 2, 1 and 3. So even in a situation where the two need different portions, it still fits in the four sets you have through the power of duplication.

You could have two background frames, and two player sets animated independently. You could have four background frames and one player set. Anything that needs tiles spread across multiple sets needs its total number of sets multipled with anything else that needs tiles spread across multiple sets. If the result is greater than 4, you can't really do it (with swapping) on mapper 30.

Edit: Oh, and sort of an example of the 128 tile thing. Check out the above GIF again. Notice how the very end of Ajna's tiles are the HUD tiles. These don't change. If I wanted the HUD to animate independently of her rather than remain static, I'd need to multiply the number of Ajna's sets by the number of the HUD sets I wanted to allow it to happen. Technically I still need to do this! It's just that the number of HUD sets is 1. Alternatively, I could give the HUD it's own portion, but that'd be kind of overkill and steal a "portion" from something else. It'd mean one less really animated thing could be on the screen at the same time.

It gets tricky to say what you can do, though. Mapper 30 can "update" tiles (instead of swapping them), but the limitations of this are odd to make simple. The size of your character matters, and how your data is stored matters and if you scroll matters and all kinds of other things matter when you're "updating" tiles. Basically nothing matters when you swap.

But one example is this: Say your player character is only 16x16. You can "update" just their four tiles every frame, and this leaves 252 tiles for everything else, that can be swapped independently of the player character. I can't even really answer how big you could go without actually building it, it's tied to a lot of things.
 

Shodanbot

New member
Thank you, Mihoshi for your recommendations.

Kasumi your detailed and clear explanation cleared up a few misunderstandings of mine. Thank you. I was reading the NESdev wiki for mapper specifications and this excellent explanation of MMC3:

https://megacatstudios.com/blogs/press/thinking-with-banks

I will try to keep my Player/NPC 16x16 pixels or less and with a few simple animations that either have 4 or less (better) unique frames, with tile swaps for parts of the frames and little details like blinking eyes and so on.
 
Top Bottom