NES graphic memory limit

A place for your artistic side. Discuss techniques and tools for pixel art on the NES, GBC, or similar platforms.

Moderator: Moderators

User avatar
Drew Sebastino
Formerly Espozo
Posts: 3496
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: NES graphic memory limit

Post by Drew Sebastino »

Bregalad wrote:
Espozo wrote:You know, I was bored so I converted these graphics to work on the NES. I think you can guess what game it is from. :wink:
Legend of Mana ?
Image
I always thought that the worst thing about the NES's color palette is how vibrant it is. For example, the light brown is extremely yellow and it makes making beach sand impossible. It's also near impossible to make a "dollar bill" green, because there is no middle ground between extremely green and grey. The commodore 64 color palette is only 16 entries long, and although it is duller than the NES's, I've seen pictures where they were able to smoothly transition colors and use a color around different colors to give the impression that there are more colors total than there really are. Watch this video: https://www.youtube.com/watch?v=EAUprwhQTZY
Last edited by Drew Sebastino on Sat Mar 07, 2015 8:03 pm, edited 2 times in total.
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Newcomer to NES programming

Post by tokumaru »

Espozo wrote:
chr rom graphics.png
Looks decent, considering all the limitations. Nice use of gray as an intermediary color. I wonder if dithering could improve this a bit.

I didn't bother checking: are you respecting the 16x16-pixel attribute grid here? Or is this an MMC5 ExRAM mock-up, with 8x8-pixel attribute areas? What about tile count, are you respecting any sort of limitation?
User avatar
Drew Sebastino
Formerly Espozo
Posts: 3496
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: NES graphic memory limit

Post by Drew Sebastino »

tokumaru wrote:I didn't bother checking: are you respecting the 16x16-pixel attribute grid here? Or is this an MMC5 ExRAM mock-up, with 8x8-pixel attribute areas? What about tile count, are you respecting any sort of limitation?
I'm using 8x8-pixel attribute areas. and about tile count, I was not respecting any sort of limitation. I thought it had been said that you had pretty much infinite tiles to use on the NES if you had a mapper that could supply it. In fact, I thought I remember someone saying you could have a different palette for every 8x1 pixel area, even though I didn't bother because that seems pretty hard to work with.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: NES graphic memory limit

Post by lidnariq »

Espozo wrote:someone saying you could have a different palette for every 8x1 pixel area,
Me (among many others). Requires new hardware, though, although the InviteNES is apparently supporting it for the main menu. I do have a demo with a separate palette for every 16x1 pixel area, using mapper 19.
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: NES graphic memory limit

Post by tokumaru »

Espozo wrote:I'm using 8x8-pixel attribute areas. and about tile count, I was not respecting any sort of limitation. I thought it had been said that you had pretty much infinite tiles to use on the NES if you had a mapper that could supply it.
Yes, what you have there can be accomplished with an MMC5. In addition to 8x8-pixel attribute areas, it allows access to 16384 (i.e. 256KB) tiles at once.
In fact, I thought I remember someone saying you could have a different palette for every 8x1 pixel area, even though I didn't bother because that seems pretty hard to work with.
It's technically possible, but AFAIK nobody ever implemented this feature in an actual mapper. It has been proven to work on real hardware, but those were just tests.
User avatar
Drew Sebastino
Formerly Espozo
Posts: 3496
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: NES graphic memory limit

Post by Drew Sebastino »

tokumaru wrote:it allows access to 16384 (i.e. 256KB) tiles at once.
I can't help but find it funny that the NES, with chip or not, can have access to 4x the graphics memory of the SNES. (So much for "Super". :roll: ) The way I thought of Metal Slug was because both the Neo Geo and the NES both use chr rom instead of vram. Didn't someone say using vram is less expensive than using chr rom, because I don't see how. If it is, why did Nintendo decide to go the cheaper route when they made the SNES, seeing that they didn't with the NES? I just thought that if memory was so expensive back then, than they would have actually saved money if they didn't have any vram and just had a bus that went from the cartridge to the PPUs or something.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: NES graphic memory limit

Post by lidnariq »

RAM built in to the console is cheaper in aggregate, because it only has to be paid for once, rather than a new chunk of memory in every cartridge.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: NES graphic memory limit

Post by tepples »

Consider three points against reliance on CHR ROM on the Super NES:
  • As lidnariq ninja'd me, if there's CHR memory on all carts, the cost has to be paid for each cart. On the other hand, the original plan was for every Super NES to to include a DSP-1, but that was cut. And when Sega tried a console upgrade that "only has to be paid for once", the 32X went over like 99 lead balloons.
  • Wider edge connectors need tighter (more expensive) tolerances.
  • Even with CHR ROM, it would still need ~16K of RAM for the mode 7 nametable. And by the time you have that much RAM in the bill of materials, you might as well make it a RAM-based system.
User avatar
Drew Sebastino
Formerly Espozo
Posts: 3496
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: NES graphic memory limit

Post by Drew Sebastino »

Good points. I still find it strange Nintendo went all the way with the NES and not the SNES, but I guess it has to do partially with, like you said, the Mode 7 nametable. I always thought that vram was the thing that brought the SNES back the most, especially compared to something like the Neo Geo. As previously discussed, I don't think the Neo Geo laps the SNES on anything really, except for maybe the animation. Donkey Kong Country has very smooth animation, but it doesn't animate objects that are half as large as the screen...
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: NES graphic memory limit

Post by tokumaru »

Memory prices change very quickly, so I bet Nintendo was counting on that when they designed the NES the way they did. Including more RAM on the system would have significantly increased its price back when it was designed, but a couple of years later they'd release games with not only large PRG and CHR ROMs, but also 8KB of RAM, which was way more than there was inside the console itself. For some reason, this reasoning didn't work with the SNES.

The NES can still be wired from the cartridge to use its internal VRAM for tiles (making it possible for carts to only contain a PRG-ROM and a CIC, no CHR), but since there are only 2KB of VRAM, and 1KB has to be used for name and attribute tables, you end up with only 64 tiles for everything. If you reduce the screen size a bit you might be able to steal some of the NT/AT RAM for extra tiles. I still think this would make a good theme for a coding compo.
zzo38
Posts: 1096
Joined: Mon Feb 07, 2011 12:46 pm

Re: NES graphic memory limit

Post by zzo38 »

tokumaru wrote:The NES can still be wired from the cartridge to use its internal VRAM for tiles (making it possible for carts to only contain a PRG-ROM and a CIC, no CHR), but since there are only 2KB of VRAM, and 1KB has to be used for name and attribute tables, you end up with only 64 tiles for everything. If you reduce the screen size a bit you might be able to steal some of the NT/AT RAM for extra tiles. I still think this would make a good theme for a coding compo.
That's called mapper 218. If all four palettes are the same, you can reuse the memory normally used for the attribute table to make up extra tiles instead. Sprites can still use different colors though.
(Free Hero Mesh - FOSS puzzle game engine)
Sik
Posts: 1589
Joined: Thu Aug 12, 2010 3:43 am

Re: NES graphic memory limit

Post by Sik »

I'm surprised that nobody mentioned the obvious point that no NES game ever made use of that much CHR-ROM simultaneously. Also I'm not aware of any mapper that lets you map each tile individually (is there any in a licensed game?), so that imposes limits on how you can use the memory.

Also on the SNES: it has enough memory that you can fill the entire screen with unique tiles (at least in 4bpp mode).
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: NES graphic memory limit

Post by tepples »

Sik wrote:Also I'm not aware of any mapper that lets you map each tile individually (is there any in a licensed game?)
MMC5 in ExGrafix mode comes very close, with 14-bit tile indices for up to 16384 different possibilities for each tile in a scene. This allows use of a quarter megabyte of background tiles at once, which should be enough if you have separate 256K banks of tiles for sprites, the status bar, Chinese characters for dialogue, the menu system, other levels, etc.
Also on the SNES: it has enough memory that you can fill the entire screen with unique tiles (at least in 4bpp mode).
So does the NES, so long as you use 1bpp mode with palettes breaking up the image into individual bitplanes (0F200F20 0F0F2020), and you use some sort of scanline interrupt to switch the pattern table partway down.
Sik
Posts: 1589
Joined: Thu Aug 12, 2010 3:43 am

Re: NES graphic memory limit

Post by Sik »

Yeah, but Espozo complained on the SNES video memory as being too low =P
User avatar
Drew Sebastino
Formerly Espozo
Posts: 3496
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: NES graphic memory limit

Post by Drew Sebastino »

The thing about graphics on these 2D systems is, you either need a ton of space for graphics to store all the animations, (Neo Geo) or you need a moderate amount of space but have the ability to update about the entire thing in a couple of frames (GBA). Frankly, the SNES (and many other consoles from the time period) have neither. 64KB is okay for just displaying a picture, but if you want to animate that picture, you are going to run into trouble... I'm pretty sure I haven't seen anything like this on the SNES, not because the video hardware couldn't display it, (BG 3 is still a pain) it's because it couldn't really be animated. Off course, complaining about 20+ year old hardware doesn't do any good...
Image
Post Reply