Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/libsnes/bsnes/snes/alt/ppu-performance/mmio/mmio.hpp
2 views
1
public:
2
uint8 mmio_read(unsigned addr);
3
void mmio_write(unsigned addr, uint8 data);
4
5
private:
6
7
struct Regs {
8
//internal
9
uint8 ppu1_mdr;
10
uint8 ppu2_mdr;
11
12
uint16 vram_readbuffer;
13
uint8 oam_latchdata;
14
uint8 cgram_latchdata;
15
uint8 bgofs_latchdata;
16
uint8 mode7_latchdata;
17
18
bool counters_latched;
19
bool latch_hcounter;
20
bool latch_vcounter;
21
22
//$2100
23
bool display_disable;
24
unsigned display_brightness;
25
26
//$2102-$2103
27
uint16 oam_baseaddr;
28
uint16 oam_addr;
29
bool oam_priority;
30
31
//$2105
32
bool bg3_priority;
33
unsigned bgmode;
34
35
//$210d
36
uint16 mode7_hoffset;
37
38
//$210e
39
uint16 mode7_voffset;
40
41
//$2115
42
bool vram_incmode;
43
unsigned vram_mapping;
44
unsigned vram_incsize;
45
46
//$2116-$2117
47
uint16 vram_addr;
48
49
//$211a
50
unsigned mode7_repeat;
51
bool mode7_vflip;
52
bool mode7_hflip;
53
54
//$211b-$2120
55
uint16 m7a;
56
uint16 m7b;
57
uint16 m7c;
58
uint16 m7d;
59
uint16 m7x;
60
uint16 m7y;
61
62
//$2121
63
uint16 cgram_addr;
64
65
//$2126-$212a
66
unsigned window_one_left;
67
unsigned window_one_right;
68
unsigned window_two_left;
69
unsigned window_two_right;
70
71
//$2133
72
bool mode7_extbg;
73
bool pseudo_hires;
74
bool overscan;
75
bool interlace;
76
77
//$213c
78
uint16 hcounter;
79
80
//$213d
81
uint16 vcounter;
82
} regs;
83
84
uint16 get_vram_addr();
85
uint8 vram_read(unsigned addr);
86
void vram_write(unsigned addr, uint8 data);
87
88
uint8 oam_read(unsigned addr);
89
void oam_write(unsigned addr, uint8 data);
90
91
uint8 cgram_read(unsigned addr);
92
void cgram_write(unsigned addr, uint8 data);
93
94
void mmio_update_video_mode();
95
void mmio_reset();
96
97