Okay, I'm doing my homework here. Do I have the following correct?
1- An NES game consists of a PRG and a CHR file. The PRG contains the game code, while the CHR contains the tiles used in the game's sprites.
2- A physical NES game has three chips on the PCB: the PRG, the CHR, and the CIC.
3- Not all games have a seperate CHR section. Zelda is an example.
Okay, so I think I have all that correct. If so, it should be possible to make a basic graphic hack of a given game just by changing only the CHR chip, right?
Now, on the other hand, for those games that don't have a seperate CHR section, how do the physical carts still have three chips?
(Trying not to be TOO newbieish!)
Just trying to get the basics straight...
Moderator: Moderators
-
godslabrat
- Posts: 3
- Joined: Tue Apr 24, 2007 4:26 pm
- Location: Oklahoma City
Re: Just trying to get the basics straight...
Short answer: yesgodslabrat wrote: 1- An NES game consists of a PRG and a CHR file. The PRG contains the game code, while the CHR contains the tiles used in the game's sprites.
Long answer: CHR is connected to the PPU, PRG is connected to the CPU. This means that the only real difference between the two is that PRG is visible via CPU addressing space (the normal $0000-FFFF address range), and CHR is visible via PPU addressing space (aka "VRAM" even though it's not always RAM -- the CPU can still access CHR via register $2007, but there is no direct access)
Note that the above is the only real difference between PRG and CHR. CHR is sometimes used for things other than character graphics. Some games (which were short on PRG space), stored game data there (SMB1's title screen, for example). Other games used CHR-ROM for additional Nametables.
Basically...yeah... and an MMC (mapper) if present. But there's no real rule. Some games have multiple PRG chips. Many others have an additional RAM chip and battery for SRAM. And others just have RAM without a battery for extra work space. And even some have a PRG chip, RAM chip, CHR-ROM chip, CHR-RAM chip, CIC, and the mapper.2- A physical NES game has three chips on the PCB: the PRG, the CHR, and the CIC.
They still have CHR -- they just have CHR-RAM which is not present in a ROM file (however would still exist as a chip on the cartridge).3- Not all games have a seperate CHR section. Zelda is an example.
Pretty much yeah.Okay, so I think I have all that correct.
Well it wouldn't look very good... but yeah.If so, it should be possible to make a basic graphic hack of a given game just by changing only the CHR chip, right?
CHR RAM still needs to exist on the cartridge since there is no CHR RAM inside the actual NES apart from the 2k for nametables (which I guess still technically qualifies as CHR, since it's connected to the PPU bus).Now, on the other hand, for those games that don't have a seperate CHR section, how do the physical carts still have three chips?
Last edited by Disch on Wed May 16, 2007 6:09 pm, edited 1 time in total.
Re: Just trying to get the basics straight...
If the original game uses a CHR-ROM board, yes.godslabrat wrote:1- An NES game consists of a PRG and a CHR file. The PRG contains the game code, while the CHR contains the tiles used in the game's sprites.
Correct. EDIT: But as Disch said, there could be more. Or less... a while ago there was a discussion if it would be possible to wire things up in a way that 1KB of the internal 2KB of RAM would be used for pattern data, which would result in a cart with no CHR chip at all.2- A physical NES game has three chips on the PCB: the PRG, the CHR, and the CIC.
Read below...3- Not all games have a seperate CHR section. Zelda is an example.
By doing this you can only replace patterns. It will not be possible to change the colors of the characters, or the arrangement of the tiles in any way.Okay, so I think I have all that correct. If so, it should be possible to make a basic graphic hack of a given game just by changing only the CHR chip, right?
Because carts always need a CHR chip, but sometimes it's a RAM chip and sometimes it's a ROM chip. CHR-ROM games are manufactured with a ROM chip containing all the tiles the game is possibly going to need, while CHR-RAM games are manufactured with an empty RAM chip in place of that, and it's a task for the game program (contained in the PRG ROM) to fill that memory with tiles as the game runs.Now, on the other hand, for those games that don't have a seperate CHR section, how do the physical carts still have three chips?
So, when backing up CHR-RAM games into ROM files, you only need the PRG ROM, because it contains the program and the data necessary to fill the (emulated) CHR-RAM chip with the tiles. Games with CHR-ROM must have the CHR data backed-up separately, and appended to the PRG ROM.