Super Mario Bros and palette..

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
User avatar
oRBIT2002
Posts: 687
Joined: Sun Mar 19, 2006 3:06 am
Location: Gothenburg/Sweden

Super Mario Bros and palette..

Post by oRBIT2002 »

I'm working on a "little project" but I've once again stumbled into some familiar bugs I had when coding my first NES-emu along time ago.
Check out the attached screenshot and check the coin-palette in the statusbar. There's a "black box" around it, and I'm obviously doing something wrong with the palette-stuff.
Anyone gets a feeling of what I'm doing wrong?
Thanks in advance.
Attachments
smb.png
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Super Mario Bros and palette..

Post by tepples »

Are you making sure to use the color value written to $3F00/$3F10 instead of $3F04, $3F08, or $3F0C when rendering?
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Super Mario Bros and palette..

Post by tokumaru »

SMB is known to rely on proper palette mirroring.
User avatar
oRBIT2002
Posts: 687
Joined: Sun Mar 19, 2006 3:06 am
Location: Gothenburg/Sweden

Re: Super Mario Bros and palette..

Post by oRBIT2002 »

Thanks, that was obviously the issue. :)
Still has got some palette-issues, some blocks gets a bit greenish (but only in SMB so far..).
User avatar
mikejmoffitt
Posts: 1353
Joined: Sun May 27, 2012 8:43 pm

Re: Super Mario Bros and palette..

Post by mikejmoffitt »

Things going green in SMB usually means they are using BG Palette 0, which holds pipe and bushes colors. Make sure your attribute table is moving properly with your tiles when you scroll and handle nametable mirroring.
User avatar
oRBIT2002
Posts: 687
Joined: Sun Mar 19, 2006 3:06 am
Location: Gothenburg/Sweden

Re: Super Mario Bros and palette..

Post by oRBIT2002 »

There's only a few blocks going green here and there (parts of the clouds, and parts of the bottom ground floor), so we'll see what's causing that behaviour... :)
Post Reply