bsnes/sfc/ppu/window/window.hpp
Tim Allen 6d9f43a37b Update to v095r05 release.
byuu says:

Changelog:
- GBA: lots of emulation improvements
- PPU PRAM is 16-bits wide
- DMA masks &~1/Half, &~3/Word
- VRAM OBJ 8-bit writes are ignored
- OAM 8-bit writes are ignored
- BGnCNT unused bits are writable*
- BG(0,1)CNT can't set the d13
- BLDALPHA is readable (fixes Donkey Kong Country, etc)
- SNES: lots of code cleanups
- sfc/chip => sfc/coprocessor
- UI: save most recent controller selection

GBA test scores: 1552/1552, 37/38, 1020/1260

(* forgot to add the value to the read function, so endrift's I/O tests
for them will fail. Fixed locally.)

Note: SNES is the only system with multiple controller/expansion port
options, and as such is the only one with a "None" option. Because it's
shared by the controller and expansion port, it ends up sorted first in
the list. This means that on your first run, you'll need to go to Super
Famicom->Controller Port 1 and select "Gamepad", otherwise input won't
work.

Also note that changing the expansion port device requires loading a new
cart. Unlike controllers, you aren't meant to hotplug expansion port
devices.
2015-11-12 21:15:03 +11:00

90 lines
1.6 KiB
C++

struct Window {
struct {
bool bg1_one_enable;
bool bg1_one_invert;
bool bg1_two_enable;
bool bg1_two_invert;
bool bg2_one_enable;
bool bg2_one_invert;
bool bg2_two_enable;
bool bg2_two_invert;
bool bg3_one_enable;
bool bg3_one_invert;
bool bg3_two_enable;
bool bg3_two_invert;
bool bg4_one_enable;
bool bg4_one_invert;
bool bg4_two_enable;
bool bg4_two_invert;
bool oam_one_enable;
bool oam_one_invert;
bool oam_two_enable;
bool oam_two_invert;
bool col_one_enable;
bool col_one_invert;
bool col_two_enable;
bool col_two_invert;
uint8 one_left;
uint8 one_right;
uint8 two_left;
uint8 two_right;
uint2 bg1_mask;
uint2 bg2_mask;
uint2 bg3_mask;
uint2 bg4_mask;
uint2 oam_mask;
uint2 col_mask;
bool bg1_main_enable;
bool bg1_sub_enable;
bool bg2_main_enable;
bool bg2_sub_enable;
bool bg3_main_enable;
bool bg3_sub_enable;
bool bg4_main_enable;
bool bg4_sub_enable;
bool oam_main_enable;
bool oam_sub_enable;
uint2 col_main_mask;
uint2 col_sub_mask;
} regs;
struct Output {
struct Pixel {
bool color_enable;
} main, sub;
} output;
struct {
uint x;
bool one;
bool two;
};
Window(PPU& self);
auto scanline() -> void;
auto run() -> void;
auto reset() -> void;
auto test(
bool& main, bool& sub,
bool one_enable, bool one_invert,
bool two_enable, bool two_invert,
uint8 mask, bool main_enable, bool sub_enable
) -> void;
auto serialize(serializer&) -> void;
PPU& self;
friend class PPU;
};