Color/Monochrome bit

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
atari2600a
Posts: 324
Joined: Fri Jun 29, 2007 10:25 pm
Location: Earth, Milkyway Galaxy, The Universe, M-Theory
Contact:

Color/Monochrome bit

Post by atari2600a »

I was wondering, does this bit (bit #0 in $2001) actually cut the chroma from the composite signal, or does it just assume a monochrome display is used & uses a different palette or something...

I was wondering because as you might remember, I want to create a Doctor Who game that progresses through all the doctors, & I might be able to make use of this on the first 2 doctors. Also I'm to lazy to set this bit for myself to test it out.

Code: Select all

          *=$0000
loop      JMP loop
          .eof
bunnyboy
Posts: 449
Joined: Thu Oct 27, 2005 1:44 pm
Location: CA
Contact:

Post by bunnyboy »

I don't know what it is actually doing to the signal, but the effect is that the bottom digit of the color palette is set to 0. Looking at the palette that means only colors 30,20,10,00 are used. I don't see it being useful for normal gameplay because there is no black!
dvdmth
Posts: 354
Joined: Wed Mar 22, 2006 8:00 am

Post by dvdmth »

The grayscale bit simply masks the lower four bits of each palette entry, so colors $00-0F get drawn as color $00, colors $10-1F become $10, and so on. Games typically use this bit for flashing effects, such as the effect when you pick up a Triforce piece at the end of each level in Legend of Zelda.
"Last version was better," says Floyd. "More bugs. Bugs make game fun."
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

There is a game that uses this, combined with the color emphasis bits, to simulate water that moves up and down. So the top part of the screen is displayed normally, then somewhere during the frame the monochrome bit is set, along with blue emphasis. It doesn't look that much like water to me, but this is as good as can be because there is no easy way to rewrite the whole palette midframe to simulate better water colors. Oh, this game is called Noah's Ark.
atari2600a
Posts: 324
Joined: Fri Jun 29, 2007 10:25 pm
Location: Earth, Milkyway Galaxy, The Universe, M-Theory
Contact:

Post by atari2600a »

Well I couldn't get FCEU running too well on my Ubuntu Linux 7.10 install (pure command line interface, all it does is pull up an X window for graphics) but I was able to run Noah's Ark (Um...It's a friends...& he needed it dumped...& I own the written consent of both Nintendo & whomever made this game to-- STOP PRESSURING ME!!!) & it's very interesting how they used that bit!

Code: Select all

          *=$0000
loop      JMP loop
          .eof
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Post by Bregalad »

tokumaru wrote:There is a game that uses this, combined with the color emphasis bits, to simulate water that moves up and down. So the top part of the screen is displayed normally, then somewhere during the frame the monochrome bit is set, along with blue emphasis. It doesn't look that much like water to me, but this is as good as can be because there is no easy way to rewrite the whole palette midframe to simulate better water colors. Oh, this game is called Noah's Ark.
If I were to do this, I'd definitely take another route : I'd use horizontal mirroring (or possibly 1-screen) in order to get the game level being displayed in color in one nametable, and in blue on the other nametable, and just switch nametables with $2000 (if possible also do a horizontal waving effect via $2005). That way the stuff emerged in water would actually look blue and not an annoying blueish white. (By the way water is transparent, not blue, but it looks blue because that's the sky's color).
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

Bregalad wrote:I'd use horizontal mirroring (or possibly 1-screen) in order to get the game level being displayed in color in one nametable, and in blue on the other nametable, and just switch nametables with $2000 (if possible also do a horizontal waving effect via $2005).
That is a very interesting idea! However, there is the huge price of drawing everything (tiles/metatiles and attributes) twice, which can take too much time if you need fast scrolling. Also, you get a lot of limitations on the colors you can use, because you must have palettes to handle the blue as well as the regular level, while in Noah's Ark, the water effect still leaves all the palettes avaliable.

In my game, in water levels, the level of the water will mostly never change, so I'll just have a palette to use for everything underwater (meaning I'll have to deal with the palette limitations I mentioned above). One of the sprite palettes will also have the similar tones, for underwater sprites. Everything does look a bit monochrome, except that the palette used for the background and the one used for sprites are slightly different, so it doesn't look so dull.
(By the way water is transparent, not blue, but it looks blue because that's the sky's color).
Heh, not every water is transparent... You certainly haven't seen how dirty the water in Copacabana beach can be! >_< Just kidding, but yeah, there are rivers that have brownish water, and they are not poluted or anything, it's possibly just mud I guess.

I also remember that in a city named "Rio das Ostras" I've been to a few times, there is a pond called "Lagoa da Coca-Cola", which has this name because the color of the water is really close to that of Coca-Cola (duh). I don't know why, there's probably some chemistry involved, and I'm really not good at it. But the water is quite clean, as far as I remember.
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Post by Bregalad »

Having the playfield rendered in both nametalbes at the same time shouldn't be a big problem, considering how Mega Man 3-6 only use one nametable during gameplay just letting the second bland unused, and how Kirby's Adventures make copies of the playfield in both name table for it's particular scrolling system to work proprely. I guess thins thing would limit the speed to 4 pixel per frame, which seems rather fast (considering a frame can write a column of tiles, and that two columns should be drawn when scolling 8 pixels). Maybe optimised code could even up this limit to a higer speed.
Also a game could do this on a level or a part of a level and scroll normaly everywhere else.
A trick could be to have the protagonist forced to swim in the area in quesiton, trus making it impossible to go fast. Almost make me missing all the swiming areas of Final Fantasy X.

For me using a palette to draw another color on the screen is not a waste or a limitation, it's just a fair use of the NES palettes. Having 3 non-blue BG palettes left is largely sufficiant to do anything you want. Just look how gorgeous the Aquaria level looks in Castlevania III ! Here, the water won't budge when there is stuff inside it, and when the water raises then it stop being transparent, but still the level looks very good.
I also remember that in a city named "Rio das Ostras" I've been to a few times, there is a pond called "Lagoa da Coca-Cola", which has this name because the color of the water is really close to that of Coca-Cola (duh). I don't know why, there's probably some chemistry involved, and I'm really not good at it. But the water is quite clean, as far as I remember.
Sounds fun. You could also do a video game level with cola-cola colored water, (or brown-mud water) but it would be rather a weird/dark level, while a level with clean water would look more clean or icy.
Post Reply