Is it possible to add new colors to the palette?

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

Moderator: Moderators

User avatar
AlexE
Posts: 46
Joined: Fri Jan 29, 2016 3:16 pm
Location: York, PA
Contact:

Is it possible to add new colors to the palette?

Post by AlexE » Tue Feb 02, 2016 11:29 am

Say you want a shade of red that is simply not on the predetermined 64-color palette of the NES. Would it be possible to create new colors for the PPU to display? I assume this would be done, if possible, through the use of custom-made mappers.

Image

Or are mappers ONLY for supplying additional RAM to the CPU and APU?

tepples
Posts: 22145
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Is it possible to add new colors to the palette?

Post by tepples » Tue Feb 02, 2016 11:41 am

Mappers on the NES do two things: memory paging and interval timing. The "paging" part makes additional ROM or RAM available to the CPU and PPU, and "interval timing" is used to notify the CPU that the electron beam has reached a particular point down the screen. That's why Nintendo's ASIC mappers are called "Memory Management Controller" (MMC). Even the mighty MMC5's ExGrafix mode is just an extremely fine-grained CHR ROM mapper, specifying a 4K bank number for each tile.

You can tint the entire screen using the emphasis bits in $2001. A mapper's interval timer may help you build a raster effect that tints one strip of scanlines different from another strip. But apart from that, mappers can't affect the palette. That's why the color bar test cards in the NES port of the 240p test suite aren't exact matches for the 75% intensity pure colors on the SMPTE EG 1-1990 test card.

User avatar
tokumaru
Posts: 11907
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Is it possible to add new colors to the palette?

Post by tokumaru » Tue Feb 02, 2016 12:02 pm

You can only customize the palette if you change the PPU, or attach some extra hardware to it (e.g. NESRGB and Hi-Def NES), which means the console has to be modified. It can't possibly be done from the cartridge side, because the cartridge is not at all involved with color generation, so there're no signals related to this in the cartridge connector.

The only way you'd be able to change video characteristics that depend on more than external memory access is if you put a custom video chip inside the cartridge and connect a cable from that to the TV, instead of using the console's video jack. Most would consider this cheating though, since you could just as well put an entire 3DS inside the cartridge and use the NES just for input, meaning games wouldn't be running on the NES at all. Needless to say, it would not be economically viable to sell cartridges containing entire video systems (or more modern gaming systems!) in them, not to mention the time you'd spend developing your own video chip.

lidnariq
Posts: 9848
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Is it possible to add new colors to the palette?

Post by lidnariq » Tue Feb 02, 2016 1:21 pm

tokumaru wrote:The only way you'd be able to change video characteristics that depend on more than external memory access is if you put a custom video chip inside the cartridge
Oh, wait, that gives me the most terrible idea! We could intentionally cause voltage sag by drawing huge amounts of power on the cartridge. This would couple back into the video signal and allow us to change the color of things.

And we should never ever do it, because one'd have to calibrate it on every different console you wanted to use, and some consoles would never work anyway.

User avatar
tokumaru
Posts: 11907
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Is it possible to add new colors to the palette?

Post by tokumaru » Tue Feb 02, 2016 2:49 pm

The calibration screen should be interesting... "Press A until the picture looks correct OR your NES explodes"

User avatar
AlexE
Posts: 46
Joined: Fri Jan 29, 2016 3:16 pm
Location: York, PA
Contact:

Re: Is it possible to add new colors to the palette?

Post by AlexE » Wed Feb 03, 2016 3:54 pm

tokumaru wrote:The calibration screen should be interesting... "Press A until the picture looks correct OR your NES explodes"
That's what I call "gaming on the edge".

calima
Posts: 1239
Joined: Tue Oct 06, 2015 10:16 am

Re: Is it possible to add new colors to the palette?

Post by calima » Fri Feb 05, 2016 2:16 am

tokumaru wrote:The only way you'd be able to change video characteristics that depend on more than external memory access is if you put a custom video chip inside the cartridge and connect a cable from that to the TV, instead of using the console's video jack. Most would consider this cheating though, since you could just as well put an entire 3DS inside the cartridge and use the NES just for input, meaning games wouldn't be running on the NES at all. Needless to say, it would not be economically viable to sell cartridges containing entire video systems (or more modern gaming systems!) in them, not to mention the time you'd spend developing your own video chip.
Ha, I just saw several of those a few days ago. Carts for the SNES and NES that take input and power from there, but have their own video output, and play $ANOTHER_CONSOLE's games.

User avatar
Estlib
Posts: 83
Joined: Tue Jul 14, 2009 4:23 am

Re: Is it possible to add new colors to the palette?

Post by Estlib » Sat Feb 20, 2016 5:19 pm

What about the port underneath?
NOPE.

lidnariq
Posts: 9848
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Is it possible to add new colors to the palette?

Post by lidnariq » Sat Feb 20, 2016 6:35 pm

Well, you could add an arbitrary video overlay system via the expansion port, but I'm not really clear to what end. You don't have access to any other PPU signals, so you can't trivially lock to the same pixel clock.

User avatar
tokumaru
Posts: 11907
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Is it possible to add new colors to the palette?

Post by tokumaru » Sat Feb 20, 2016 6:44 pm

I never noticed that there was a video out pin in the expansion port... Not that I can see any advantage in getting the composite video from there rather than from the back of the console... I mean, even if you were gonna pull a 32X you'd still need the add-on to output its own video signal, so it might just as well generate something advanced enough that doesn't require any of the blurry video from the PPU.

tepples
Posts: 22145
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Is it possible to add new colors to the palette?

Post by tepples » Sat Feb 20, 2016 7:33 pm

lidnariq wrote:Well, you could add an arbitrary video overlay system via the expansion port, but I'm not really clear to what end. You don't have access to any other PPU signals, so you can't trivially lock to the same pixel clock.
In theory, composite out (pin 21) and master clock are all you need. The PPU outputs one dot of picture or blanking every 4 master clocks (5 on PAL), it outputs vertical sync every vblank, and it outputs horizontal sync and a "color burst" (dark area with hue $08) before every line. But the real WTF is that there's no master clock on the expansion port.

User avatar
rainwarrior
Posts: 7891
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Is it possible to add new colors to the palette?

Post by rainwarrior » Sat Feb 20, 2016 7:49 pm

tepples wrote:...the real WTF is that there's no master clock on the expansion port.
Why? The cartridge can easily route it to an expansion pin.

User avatar
Movax12
Posts: 529
Joined: Sun Jan 02, 2011 11:50 am

Re: Is it possible to add new colors to the palette?

Post by Movax12 » Sat Feb 20, 2016 9:10 pm

tokumaru wrote:You can only customize the palette if you change the PPU, or attach some extra hardware to it (e.g. NESRGB and Hi-Def NES), which means the console has to be modified. It can't possibly be done from the cartridge side, because the cartridge is not at all involved with color generation, so there're no signals related to this in the cartridge connector.

The only way you'd be able to change video characteristics that depend on more than external memory access is if you put a custom video chip inside the cartridge and connect a cable from that to the TV, instead of using the console's video jack.
Or, devices like the Hi-Def NES could be modified/designed to allow for software to detect that they are installed and ask to modify the palette. But this would be a pretty specific target market ...

Sik
Posts: 1589
Joined: Thu Aug 12, 2010 3:43 am

Re: Is it possible to add new colors to the palette?

Post by Sik » Sun Feb 21, 2016 2:34 pm

tokumaru wrote:I never noticed that there was a video out pin in the expansion port... Not that I can see any advantage in getting the composite video from there rather than from the back of the console... I mean, even if you were gonna pull a 32X you'd still need the add-on to output its own video signal, so it might just as well generate something advanced enough that doesn't require any of the blurry video from the PPU.
Well, the biggest advantage would be that you wouldn't need a passthrough cable which would look cleaner as well as being less prone to get connected wrong by a clueless or distracted person. The 32X needed a passthrough cable in addition to changing where the video output goes.

User avatar
AlexE
Posts: 46
Joined: Fri Jan 29, 2016 3:16 pm
Location: York, PA
Contact:

Re: Is it possible to add new colors to the palette?

Post by AlexE » Mon Feb 22, 2016 12:04 am

Movax12 wrote:
tokumaru wrote:Or, devices like the Hi-Def NES could be modified/designed to allow for software to detect that they are installed and ask to modify the palette. But this would be a pretty specific target market ...
That reminds me of how Shantae for the Game Boy Color had special features when used on a Game Boy Advance. Maybe there could be some backwards compatibility between the vanilla NES and the Hi-Def NES in the same manner.

Post Reply