It is currently Fri Jul 20, 2018 1:46 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 31 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: Sun Feb 19, 2006 9:30 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20280
Location: NE Indiana, USA (NTSC)
Palette entries actually range from 0 to 63. The unused values aren't bunched up at the end.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 20, 2006 1:12 pm 
Offline

Joined: Thu Nov 17, 2005 2:44 pm
Posts: 34
Bunched up?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 20, 2006 1:17 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20280
Location: NE Indiana, USA (NTSC)
The NES color values normally regarded as unused are $0D, $0E, $1D-$20, $2D-$2F, and $3D-$3F. $0D is the sync level, which should be avoided so as not to confuse TVs. $1D, $2D, and $3D are various nearly-duplicate gray levels that don't show up on the PlayChoice PPU, which commercial games tended not to use. The $xE and $xF values other than $0F are duplicates of $0F (canonical black). $20 is a duplicate of $30 (canonical white).

You may have guessed that the unused values were together at the end ($34-$3F), which is what I meant by "bunched up".


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 20, 2006 1:24 pm 
Offline
User avatar

Joined: Sun Jun 05, 2005 2:04 pm
Posts: 2149
Location: Minneapolis, Minnesota, United States
dxprog wrote:
New question, though. What do you do when a palette entry is greater than 51?


Greater than 51? You don't do anything special when a pallete entry is greater than 51. Are you refferring to $51? Or 51 in decimal. If you are reffering to hex, I think it's like this:

0 - 3F = color values
40 - 7F = mirror of 0 - 3F
80 - BF = mirror of 0 - 3F
C0 - FF = mirror of 0 - 3F

So if you store 40 in PPU address $3F00, then it will read as color $0, because 40 - 7F is a miror of 00 - 3F. So color $51 would be color $11. I suppose it's not really like a mirror, it's like a color mirror. Do you understand what I mean?

Edit: If tepples answered your question correctly, then I was way off on what you were asking. But yeah, I suggest you use $3F for black. It's like the official black color. Actually, a lot of people use $0F, but it bothers me to use that, because black seems like it should be at the end of the color selection, so I use $3F.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 20, 2006 10:54 pm 
Offline

Joined: Thu Nov 17, 2005 2:44 pm
Posts: 34
Yeah, that was 51 decimal (I work primarily in VBasic, sue me :-P).


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 20, 2006 11:06 pm 
Offline
User avatar

Joined: Sun Jun 05, 2005 2:04 pm
Posts: 2149
Location: Minneapolis, Minnesota, United States
Are your questions on that matter answered?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 20, 2006 11:44 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
A good convention is to write decimal numbers without a designator: 789, hexadecimal numbers as 0xBEEF, 0BEEFh, or $BEEF. If you need to write a lot of hexadecimal numbers, then announce a temporary "change of default base" to hex.

If we had easy subscripts here, we'd just write

Code:
789
   10

BEEF
    16


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 21, 2006 12:23 am 
Offline

Joined: Thu Nov 17, 2005 2:44 pm
Posts: 34
When I'm using hex I usually prefix it with $. And, yeah, my question's answered. Wrap after $3F. Thanks :-)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 22, 2006 1:16 pm 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7443
Location: Chexbres, VD, Switzerland
$bfff or 0xbfff are both good. BFFFh is confusing to be, because you'll try to still read the final "h" as to be the value, and so hex number like that are hard to read.

Could someone tell me the effect of displaying the color $1d ?
Without using $xd color, the darkest available gray is $00, and it isn't very dark, so the NES basically doesn't allow dark grays at all.
But with the use of $xd colors, is it possible to have a drarker gray than $00 ? Because you'd usually like to have a black border arround sprites, but you won't like haing the black border of sprites mess up with black parts of BG. So having dark-gray border arround sprites would be a good choise, but $00 is way too light.

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 24, 2006 4:31 pm 
Offline
User avatar

Joined: Sun Jun 05, 2005 2:04 pm
Posts: 2149
Location: Minneapolis, Minnesota, United States
Well, the effect of $1D all depends on the TV, or so I understand.

$1D will probably show up as black on most emulators. But on a real NES hooked up to a TV, it may show up as a darker gray, which is good. But you probably don't want to take a risk of putting a game with that color code on it onto a cartridge, then having it show up as some weird pink color, or something. If it does show up as a darker gray, than I say go for it, use it. But I wouldn't want to risk using that, then having it show up as a lame pink on a different TV, or something random like that.

I agree. The grays that the NES provides are total shit. For vincents hair in FFVII NES, I use a dark blue, because if his hair was black, and the background was black, it wouldn't show up, and it'd look really dumb. I'm just saying, you could find some ways around it by using another dark color, but they are like way too light, I agree.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 24, 2006 9:30 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20280
Location: NE Indiana, USA (NTSC)
Can you get a decent gray by flickering $08 with $02?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 24, 2006 9:42 pm 
Offline
User avatar

Joined: Sun Jun 05, 2005 2:04 pm
Posts: 2149
Location: Minneapolis, Minnesota, United States
You mean like changing the pallete values every frame to $02 or $08? That's a really annoying subroutine to do. And constant writes to $2006/$2007 isn't healthy, because you could mess up the scroll if your not careful. I've done something like that where every NMI the pallete updates, and it was not healthy. There were alot of scrolling issues. I don't like that EVERY time you write to $2007 you have to restore the scroll. I suppose it doesn't matter that much though.

If you want to save time, I'm sure you'd want to do as little writes as possible. But I just don't like doing constant writes to $2006/$2007. It bothers me. And that'd look kinda ugly, the constant flickering. I don't know, I'll have to try and see.

EDIT: I forgot to say, flickering $00 and $3F would get you a decent dark gray, as apposed to $02 and $08.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 24, 2006 10:02 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20280
Location: NE Indiana, USA (NTSC)
Celius wrote:
And constant writes to $2006/$2007 isn't healthy, because you could mess up the scroll if your not careful. I've done something like that where every NMI the pallete updates, and it was not healthy. There were alot of scrolling issues. I don't like that EVERY time you write to $2007 you have to restore the scroll.

No, you just have to set the scroll after the last VRAM or palette update of vblank. If you have a scrolling game (not a fixed game such as Donkey Kong or something inspired by Tetris), chances are you're already doing this.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 24, 2006 10:51 pm 
Offline
User avatar

Joined: Sun Jun 05, 2005 2:04 pm
Posts: 2149
Location: Minneapolis, Minnesota, United States
Oh, I guess I'm just retarded then. I thought it was every write to $2006/$2007. Thanks for the info, though.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 25, 2006 3:19 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7443
Location: Chexbres, VD, Switzerland
On a standard configuration, you'll want to do all your PPU updates through $2006 and $2007 during VBlank, and write proper scroll to $2005 and nametable index to $2000 once it's done.
Things are going weird if you want to do anything midframe.

Yeah, having the color black randomly shows up as pink would be RALLY anoying.
Using blue for black hair really is a good idea. Magus has blue hair in Chrono Trigger, but he actually looks like to have a black hair.
Howver, you won't have all your sprites surrounded with a blue shadow.
Flickering is also risked, as it would show nice on some TVs and ugly on some others.
On my TV, sprite flickering is nearly unnoticeable, and under an emulator on my PC it looks awfull. I think the same goes for color flickering.

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 31 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group