Added new 'tv.phosphor' commandline argument to accomplish the above,
and associated UI item in Video Settings.
Updated docs for 'tv.phosphor' and 'tia.debugcolors'. More work is
needed on this, since I need to add screenshots for this new functionality.
This is allowed, since after analyzing the code, we see the pixel format
will always be ARGB8888 mode, so we can hard-code the logic to do the
conversion.
This leads to a measurable performance improvement, since we eliminate
3 function calls per RGB colour lookup. And the calls themselves involved
IF statements and various other shifts that weren't needed. Assuming
normal phosphor mode with 160x210 pixels, this saves 100,800 function calls
per frame!
This has been in patch form for about a year, and I'm finally
getting around to applying it. Basically, we separate the Cart
class into 3 classes:
- Cart: stuff specific to cartridge emulation
- BSTypes: various bankswitch types, both as enum and strings
- CartDetector: actual bankswitch auto-detection code
Also made more use of smart pointers, and added const in a few
more places.
I promise to get back to the phosphor stuff soon. This is just
to clear my head a little.
the fixed debug colors to user-defined preferences. Note that there
are 6 registers (P0,M0,P1,M1,PF,BL), and the option takes a string
of 6 characters, where each represents a colour for the respective
positional register (ROYGBP are the choices).
I may add a UI item for this, but this is as far as I will go with
allowing user editing.
For now, Blargg phosphor mode simply shows the same image as without phosphor.
This is a WIP, and if we can't get it finished for 5.0, it will be released as-is.
Phosphor blend now defaults to 0 in the base properties, and is converted to
50 before being passed to higher levels. This needs to change when we
get to issue #144.
- converted many pointers to references
- merged code from several files into one class
- broke up some methods into more managable chunks
This will allow it to be easy to add the phosphor code during
NTSC TV emulation.