Glitch on "colour bits" of $2001 on FCEUX?!

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Glitch on "colour bits" of $2001 on FCEUX?!
by on (#140247)
I was programming my game, when suddenly I decided to intensify reds in my game over screen. I used good ol' PPUMASK ($2001) to do the trick but it seems like it just goes pitch black on FCEUX... This also happens on commercial games like Noah's Ark and possibly Rampart so it's definitely an emulator error. Is it a real glitch or did I set some sort of weird setting on my emulator? Here's a little video I taped to show the problem

https://www.youtube.com/watch?v=YhLmWRXzhDg
Re: Glitch on "colour bits" of $2001 on FCEUX?!
by on (#140249)
Support in FCEUX for tint bits is incomplete. It renders the emulated video to a 256-color surface, which is fine for no emphasis but not for multiple emphasis settings, so it only supports about one nonzero set of tint bits per frame.

Does it do this in both old PPU and new PPU modes?
Re: Glitch on "colour bits" of $2001 on FCEUX?!
by on (#140260)
It's both PPU modes. The problem is the 256 colour palette more than it is the PPU emulation.

Off the top of my head, what I remember about the FCEUX palette is it's divided in 64 colour blocks like this:
1. no emphasis
2. all emphasis on
3. best-fit-emphasis per frame (whichever was on for the most scanlines)
4. reserved for UI

Basically, on FCEUX you can only use one emphasis setting (aside from off or all-on) per frame.

Also a couple of the emphasis colours it uses are really strange, but that's a different issue. Emphasis is one of FCEUX's most poorly emulated features, I think.


I've got some ideas on how to improve it, and I've left a bug ticket about it (with an offer to help fix it), but it's not something I'd get around to for a few months, personally. It'll get resolved sooner or later, I hope, but probably later.
Re: Glitch on "colour bits" of $2001 on FCEUX?!
by on (#140261)
By the way, FCEUX is under active development. If you're interested in its improvement you should submit bug reports.
https://sourceforge.net/p/fceultra/bugs/
Re: Glitch on "colour bits" of $2001 on FCEUX?!
by on (#140292)
rainwarrior wrote:
By the way, FCEUX is under active development. If you're interested in its improvement you should submit bug reports.
https://sourceforge.net/p/fceultra/bugs/


How do you post a bug on sourceforge?
Re: Glitch on "colour bits" of $2001 on FCEUX?!
by on (#140297)
First create a user account on SourceForge.net, then follow the "Create Ticket" link in the left column of the bug list.
Re: Glitch on "colour bits" of $2001 on FCEUX?!
by on (#140325)
tepples wrote:
First create a user account on SourceForge.net, then follow the "Create Ticket" link in the left column of the bug list.


Thanks, will do :)
Also, I tried setting the old PPU, and it seems that it works with the old PPU. The only thing is that it has a small jitter I don't get on other emus.
Edit:After setting it to the old PPU, I set the new PPU again, and this time, there are no more glitches on the emu. However, when I turn the emu off with the new PPU and then turn it back on, the glitch reappears.
Still, I'm going to submit this bug ticket on Sourceforge