News:

11 March 2016 - Forum Rules

Main Menu

[NES]Understanding MMC1 mapping

Started by yugisokubodai, May 02, 2022, 07:58:33 AM

Previous topic - Next topic

KingMike

In your previous example, you were comparing an RTS in the $C000-FFFF range, to one in the $8000-BFFF range.

The difference is that, generally, $C000-FFFF is locked to the last bank (and thus code executed in that range remains in the same bank), whereas $8000-BFFF is swappable).
I know MMC1 can reverse that so that the $8000 range is locked, but I believe that is uncommon practice and I haven't seen it.

The SNES CPU (65816) is different because the CPU was designed with "bank swapping" integrated (only a few odd games have separate mapper chips), so that it basically has 16MB to work with, whereas the NES CPU (6502) only has 64KB to access (the space shared between ROM, RAM, and I/O access ports), so therefore games had to use mappers separate of the CPU.

Why FEFF and not FFFF? I don't know. Programmer's choice.
"My watch says 30 chickens" Google, 2018

DragonAtma

Assuming it's little-endian, FEFF is as high as you get without being the maximum (it'd be FFFE in big-endian). I've done the same in python (using 98 or 9998 for "this is a dummy value").
In memory of my beloved cats, Anastasia (9/30/06-9/18/17, illness) and Josephine (1/19/06-9/23/17, cancer).
My mods: Romance of the Three Kingdoms II, Gemfire, 7th Saga, and more


pianohombre

Can someone please explain what is PRG and CHR? Or maybe post a link? I've seen some hacks will require PRG-0 or PRG-1 roms. Never understand what that meant. Also, is this format exclusively for NES roms? Thanks.
"Programming in itself is beauty,
whether or not the operating system actually functions." - Linus Torvalds

Bavi_H

Quote from: pianohombre on July 09, 2022, 03:50:51 PMwhat is PRG and CHR? [...] I've seen some hacks will require PRG-0 or PRG-1 roms. Never understand what that meant.

In NES cartridges, a PRG chip contains program code and data, a CHR chip contains graphics data.


If a game gets revised, usually only the PRG chip needs to be updated. In that case, the original version of the game is called PRG0, and updates are sequentially numbered PRG1, PRG2, or so on.

  • For example, in the USA version of Super Mario Bros. 2,
    the original version ("PRG0") has these ROM chips:

    • ROM  Label     CRC32
      PRG  NES-MW-0  07854B3F
      CHR  NES-MW-0  F2BA1170
      Both           57AC67AF

    the revised version ("Revision A" or "PRG1") has these ROM chips:

    • ROM  Label     CRC32
      PRG  NES-MW-1  9ED99198
      CHR  NES-MW-0  F2BA1170
      Both           CA594ACE

yugisokubodai

Tldr version: PRG is where execution code and data, pointers stored. CHR is where graphic stored.

pianohombre

Oh that's cool. Sounds like the Super FX/Cx4 chip added to some SNES games.
"Programming in itself is beauty,
whether or not the operating system actually functions." - Linus Torvalds