nesdev.com
http://forums.nesdev.com/

NES graphic memory limit
http://forums.nesdev.com/viewtopic.php?f=21&t=12465
Page 1 of 3

Author:  Espozo [ Tue Mar 03, 2015 7:40 pm ]
Post subject:  NES graphic memory limit

In this post, lidnariq wrote:
Once you have more than 8 KiB, you're either going to be using RAM for CHR, and so there's no need to have any specific size limitation; or else the smallest cheapest available ROM now is 128 KiB. So once you add any mapper at all, don't feel like you need to hold back.
What kind of memory limitations does the NES have for graphics? Because it has the CHR rom like the Neo Geo, could you actually have better animation on the NES than on the SNES with a special mapper?

Author:  tepples [ Tue Mar 03, 2015 8:04 pm ]
Post subject:  Re: Newcomer to NES programming

With a suitable mapper, you could probably feed a nearly VHS quality video signal into the NES PPU.

Author:  lidnariq [ Tue Mar 03, 2015 8:04 pm ]
Post subject:  Re: Newcomer to NES programming

Yes. Well, sorta. It's still only a 2bpp plane, and that's a bigger thing in terms of visual richness than changing total content.

The late-stage advanced mappers often provided eight independent 1KiB banks to control this, allowing for (e.g.) a quarter of tiles to be animated while half were used for fixed background things and another quarter could change as the level progressed, as well as grouped animations on random subsets of sprites.

But between the 6502 being an 8-bit microcomputer, and memory and bandwidth on the NES being limited, there was very little pressure to go past 256 KiB of data.

Author:  Sik [ Wed Mar 04, 2015 1:42 am ]
Post subject:  Re: Newcomer to NES programming

Espozo wrote:
lidnariq wrote:
Once you have more than 8 KiB, you're either going to be using RAM for CHR, and so there's no need to have any specific size limitation; or else the smallest cheapest available ROM now is 128 KiB. So once you add any mapper at all, don't feel like you need to hold back.
What kind of memory limitations does the NES have for graphics? Because it has the CHR rom like the Neo Geo, could you actually have better animation on the NES than on the SNES with a special mapper?

That's how After Burner can change the entire background so quickly (albeit that's swapping the nametable rather than the tiles).

For a more straight example, the beginning of stage 7-1 in Return of the Joker at 17:38. Admittedly that's just changing a few tiles that happen to be spread everywhere, but that part definitely looks a lot more animated than the vast majority of 2D games from later generations.

EDIT: also, this can be useful for making parallax =P

Author:  Espozo [ Wed Mar 04, 2015 11:02 pm ]
Post subject:  Re: Newcomer to NES programming

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:

Attachment:
chr rom graphics.png
chr rom graphics.png [ 11.17 KiB | Viewed 2207 times ]

Working with the NES's limited color palette is extremely annoying. If there are 64 different slots for colors, why are there several ones left black? You know, I find it a little humorous that the Atari 2600's color palette is over twice as large as the NES.

Author:  tepples [ Wed Mar 04, 2015 11:22 pm ]
Post subject:  Re: Newcomer to NES programming

Espozo wrote:
Working with the NES's limited color palette is extremely annoying. If there are 64 different slots for colors, why are there several ones left black?

Because there are only 12 possible hues, plus one column of grays. This leaves a bunch of unused (black) entries.

Author:  Sik [ Fri Mar 06, 2015 4:17 am ]
Post subject:  Re: Newcomer to NES programming

Two columns of gray and ten color hues. But yeah I really wonder why didn't they try to extend it so that all 16 columns were covered instead of just 14 (also the lack of yellow is annoying).

Author:  tepples [ Fri Mar 06, 2015 6:44 am ]
Post subject:  Re: Newcomer to NES programming

Sik wrote:
But yeah I really wonder why didn't they try to extend it so that all 16 columns were covered instead of just 14

Cost. In 1983, each gate on an integrated circuit cost a lot more than it does in 2015.

Quote:
(also the lack of yellow is annoying).

That's an NTSC problem if anything. Pure yellow is out of NTSC's gamut.

Author:  lidnariq [ Fri Mar 06, 2015 9:41 am ]
Post subject:  Re: Newcomer to NES programming

Sik wrote:
ten color hues.
<pedantic>Twelve.</pedantic>
Quote:
why didn't they try to extend it so that all 16 columns were covered instead of just 14
Perhaps because the 2600's analog delay line was deemed insufficiently precise.

Or maybe because the NES is very clearly inspired by the Colecovision, and that used a 2√óNTSC crystal, divided in two to make the Z80 system clock, and then multiplied by 3 to make the TMS9928A clock. The TMS9928A generates component natively, but has a very fixed palette (15 colors including white and black), and requires an external IC to convert to modulated video. An obvious simplification (and cost reduction) is to avoid the awkward analog frequency doubler and just use some multiple of 3√óNTSC to get both the desired horizontal pixel count and colorburst frequency.

At that point, they could have used the 2600's analog delay line, but doing the same thing digitally is simpler and doesn't require any tuning or on-die capacitors.

On the other hand, I think that it should have been easy to extend the palette in the other direction (the two missing MSBs), though, with more options for saturation and/or brightness.

Author:  Sik [ Fri Mar 06, 2015 4:57 pm ]
Post subject:  Re: Newcomer to NES programming

tepples wrote:
Cost. In 1983, each gate on an integrated circuit cost a lot more than it does in 2015.

Isn't the value just fed to a 16 step counter though, which is then used to generate part of the analog signal? I'd imagine that the analog part would have been feasibly enough to tweak that the range would fall within something that covered all 16 columns.

Then again discussing a hardware decision that was decided over 30 years ago is stupid...

tepples wrote:
That's an NTSC problem if anything. Pure yellow is out of NTSC's gamut.

There isn't even a color similar to yellow though, the closest to it is a light orange that doesn't pass for yellow no matter what (pure red isn't there either but at least there's a color close enough to pass for it).

lidnariq wrote:
<pedantic>Twelve.</pedantic>

Wait... *headdesk* I can't do math (apparently I substracted two twice)

Author:  tepples [ Fri Mar 06, 2015 8:20 pm ]
Post subject:  Re: Newcomer to NES programming

Sik wrote:
tepples wrote:
Cost. In 1983, each gate on an integrated circuit cost a lot more than it does in 2015.

Isn't the value just fed to a 16 step counter though, which is then used to generate part of the analog signal?

It can be thought of as a 12-step counter, as the master clock rate is six times the color burst rate. The counter ticks on both rises and falls.

Quote:
tepples wrote:
That's an NTSC problem if anything. Pure yellow is out of NTSC's gamut.

There isn't even a color similar to yellow though, the closest to it is a light orange that doesn't pass for yellow no matter what

Which yellow is in Dr. Mario?
Image
Screenshot by mobygames

Author:  Myask [ Fri Mar 06, 2015 8:55 pm ]
Post subject:  Re: Newcomer to NES programming

Mednafen debugger: PPU memory wrote:
Code:
3F00: 0F 31 2C 0A  0F 32 28 0A  0F 28 15 21  0F 00 22 0A
3F10: 0F 37 30 18  0F 28 15 0F  0F 28 15 21  0F 28 21 0F

Looks like 28. The use of blue as the "highlight" on it seems to help.
For "fun", edit sprite and BG palette entry 2 to 0F 28 28 28.

Author:  Bregalad [ Sat Mar 07, 2015 2:06 am ]
Post subject:  Re: Newcomer to NES programming

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 ?

By the way this picture is extremely good looking.

Quote:
If there are 64 different slots for colors, why are there several ones left black?

None are "left black", there is just this transparent colour that repeats every first colour of every palette.

Author:  ccovell [ Sat Mar 07, 2015 7:11 am ]
Post subject:  Re: Newcomer to NES programming

Bregalad wrote:
Quote:
If there are 64 different slots for colors, why are there several ones left black?

None are "left black", there is just this transparent colour that repeats every first colour of every palette.

He's not talking about the palette RAM entries, but rather the table of possible colours in the PPU.

Well, there is a great explanation (document?) by Kevin Horton about how the PPU generates its colour signals in the NTSC domain. Colour $X0 is the high voltage for each brightness level, and the corresponding $XD the low voltage, and the PPU makes the colours in between by oscillating between the two voltages with different phases. Quite smart and interesting. Maybe Nintendo (Ricoh) could have added a couple more hues in there, but then the hues wouldn't rotate cleanly at 30 degrees(?) for each hue setting.

Author:  Sik [ Sat Mar 07, 2015 9:18 am ]
Post subject:  Re: NES graphic memory limit

Bleh, looking at the palette 28 looks ochre instead =/ Dammit context.

Page 1 of 3 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/