ComSquare
PPURegisters.hpp
Go to the documentation of this file.
1 //
2 // Created by cbihan on 13/07/2021.
3 //
4 
5 #pragma once
6 
7 
8 namespace ComSquare::PPU
9 {
10  enum PpuRegisters {
12  inidisp = 0x00,
14  obsel = 0x01,
16  oamaddl = 0x02,
18  oamaddh = 0x03,
20  oamdata = 0x04,
22  bgmode = 0x05,
24  mosaic = 0x06,
26  bg1sc = 0x07,
28  bg2sc = 0x08,
30  bg3sc = 0x09,
32  bg4sc = 0x0A,
34  bg12nba = 0x0B,
36  bg34nba = 0x0C,
40  bg1hofs = 0x0D,
44  bg1vofs = 0x0E,
46  bg2hofs = 0x0F,
48  bg2vofs = 0x10,
50  bg3hofs = 0x11,
52  bg3vofs = 0x12,
54  bg4hofs = 0x13,
56  bg4vofs = 0x14,
58  vmain = 0x15,
60  vmaddl = 0x16,
62  vmaddh = 0x17,
64  vmdatal = 0x18,
66  vmdatah = 0x19,
68  m7sel = 0x1A,
70  m7a = 0x1B,
72  m7b = 0x1C,
74  m7c = 0x1D,
76  m7d = 0x1E,
78  m7x = 0x1F,
80  m7y = 0x20,
82  cgadd = 0x21,
84  cgdata = 0x22,
86  w12sel = 0x23,
88  w34sel = 0x24,
90  wobjsel = 0x25,
92  wh0 = 0x26,
94  wh1 = 0x27,
96  wh2 = 0x28,
98  wh3 = 0x29,
100  wbjlog = 0x2A,
102  wobjlog = 0x2B,
104  tm = 0x2C,
106  ts = 0x2D,
108  tmw = 0x2E,
110  tsw = 0x2F,
112  cgwsel = 0x30,
114  cgadsub = 0x31,
116  coldata = 0x32,
118  setini = 0x33,
120  mpyl = 0x34,
122  mpym = 0x35,
124  mpyh = 0x36,
126  slhv = 0x37,
128  oamdataread = 0x38,
130  vmdatalread = 0x39,
132  vmdatahread = 0x3A,
134  cgdataread = 0x3B,
136  ophct = 0x3C,
138  opvct = 0x3D,
140  stat77 = 0x3E,
142  stat78 = 0x3F
143  };
144 
145  struct Registers {
147  union {
148  struct {
150  uint8_t brightness: 4;
151  uint8_t _: 3;
153  uint8_t fblank: 1;
154  };
155  uint8_t raw = 0;
156  } _inidisp;
158  union {
159  struct {
161  uint8_t nameBaseSelect: 3;
163  uint8_t nameSelect: 2;
165  uint8_t objectSize: 3;
166  };
167  uint8_t raw = 0;
168  } _obsel;
170  union {
171  struct {
173  uint16_t oamAddress: 9;
174  uint16_t _: 6;
177  };
178  struct {
180  uint16_t oamaddl: 8;
182  uint16_t oamaddh: 8;
183  };
184  uint16_t raw = 0;
185  } _oamadd;
187  uint8_t _oamdata = 0;
189  union {
190  struct {
192  uint8_t bgMode: 3;
196  uint8_t characterSizeBg1: 1;
198  uint8_t characterSizeBg2: 1;
200  uint8_t characterSizeBg3: 1;
202  uint8_t characterSizeBg4: 1;
203  };
204  uint8_t raw = 0;
205  } _bgmode;
207  union {
208  struct {
210  uint8_t affectBg1: 1;
212  uint8_t affectBg2: 1;
214  uint8_t affectBg3: 1;
216  uint8_t affectBg4: 1;
218  uint8_t pixelSize: 4;
219  };
220  uint8_t raw = 0;
221  } _mosaic;
223  union {
224  struct {
230  uint8_t tilemapAddress: 6;
231  };
232  uint8_t raw = 0;
233  } _bgsc[4];
235  union {
236  struct {
238  uint8_t baseAddressBg1a3: 4;
240  uint8_t baseAddressBg2a4: 4;
241  };
242  uint8_t raw = 0;
243  } _bgnba[2];
245  union {
246  struct {
247  uint16_t offsetBg: 10;
248  uint16_t _ : 6;
249  };
250  uint16_t raw = 0;
251  } _bgofs[8];
254  union {
255  struct {
256  uint16_t offsetBg : 13;
257  uint16_t _ : 3;
258  };
259  uint16_t raw = 0;
260  } _m7ofs[2];
262  union {
263  struct {
264  uint8_t incrementAmount: 2;
265  uint8_t addressRemapping: 2;
266  uint8_t _ : 3;
267  uint8_t incrementMode: 1;
268  };
269  uint8_t raw = 0;
270  } _vmain;
272  uint8_t _incrementAmount = 1;
274  union {
275  struct {
276  uint16_t vmaddl: 8;
277  uint16_t vmaddh: 8;
278  };
279  uint16_t vmadd = 0;
280  } _vmadd;
282  union {
283  struct {
284  uint16_t vmdatal: 8;
285  uint16_t vmdatah: 8;
286  };
287  uint16_t vmdata = 0;
288  } _vmdata;
290  union {
291  struct {
293  uint8_t verticalMirroring: 1;
294  uint8_t _: 4;
295  uint8_t emptySpaceFill: 1;
296  uint8_t playingFieldSize: 1;
297  };
298  uint8_t raw = 0;
299  } _m7sel;
301  union {
302  struct {
303  uint16_t m7l: 8;
304  uint16_t m7h: 8;
305  };
306  uint16_t m7 = 0;
307  } _m7[4];
308  // <to work>
309 
311  union { // Not sure if it is done correctly
312  struct {
313  uint16_t _: 3;
314  uint16_t value: 13;
315  };
316  uint16_t raw = 0;
317  } _m7x;
319  union { // Not sure if it is done correctly
320  struct {
321  uint16_t _: 3;
322  uint16_t value: 13;
323  };
324  uint16_t raw = 0;
325  } _m7y;
327  uint8_t _cgadd = 0;
329  union {
330  struct {
331  uint16_t red: 5;
332  uint16_t green: 5;
333  uint16_t blue: 5;
334  uint16_t _: 1;
335  };
336  struct {
337  uint16_t cgdatal: 8;
338  uint16_t cgdatah: 8;
339  };
340  uint16_t raw = 0;
341  } _cgdata;
344  bool _isLowByte = false;
346  union {
347  struct {
356  };
357  uint8_t raw = 0;
358  } _wsel[3];
363  uint8_t _wh[4] = {0};
365  union {
366  struct {
367  uint8_t maskLogicBg4: 2;
368  uint8_t maskLogicBg3: 2;
369  uint8_t maskLogicBg2: 2;
370  uint8_t maskLogicBg1: 2;
371  };
372  uint8_t raw = 0;
373  } _wbglog;
375  union {
376  struct {
377  uint8_t maskLogicObj: 2;
378  uint8_t maskLogicColor: 2;
379  uint8_t _: 4;
380  };
381  uint8_t raw = 0;
382  } _wobjlog;
384  union {
385  struct {
391  uint8_t _: 3;
392  };
393  uint8_t raw = 0;
394  } _t[2];
396  union {
397  struct {
403  uint8_t _: 3;
404  };
405  uint8_t raw = 0;
406  } _tw[2];
408  union {
409  struct {
410  uint8_t directColorMode: 1;
411  uint8_t addSubscreen: 1;
412  uint8_t _: 2;
413  uint8_t preventColorMath: 2;
415  };
416  uint8_t raw = 0;
417  } _cgwsel;
419  union {
420  struct {
421  uint8_t enableColorMathBg1: 1;
422  uint8_t enableColorMathBg2: 1;
423  uint8_t enableColorMathBg3: 1;
424  uint8_t enableColorMathBg4: 1;
425  uint8_t enableColorMathObj: 1;
427  uint8_t halfColorMath: 1;
428  uint8_t addSubtractSelect: 1;
429  };
430  uint8_t raw = 0;
431  } _cgadsub;
433  union {
434  struct {
435  uint8_t colorIntensity: 5;
436  uint8_t red: 1;
437  uint8_t green: 1;
438  uint8_t blue: 1;
439  };
440  uint8_t raw = 0;
441  } _coldata;
443  union {
444  struct {
445  uint8_t screenInterlace: 1;
446  uint8_t objInterlace: 1;
447  uint8_t overscanMode: 1;
449  uint8_t _: 2;
450  uint8_t mode7ExtBg: 1;
451  uint8_t externalSync: 1;
452  };
453  uint8_t raw = 0;
454  } _setini;
455 
456  // <READ registers>
457 
459  union {
460  struct {
461  uint32_t mpyl: 8;
462  uint32_t mpym: 8;
463  uint32_t mpyh: 8;
464  uint32_t _: 8;
465  };
466  uint32_t mpy = 0;
467  } _mpy;
469  uint8_t _slhv = 0;
471  uint8_t _oamdataread = 0;
473  union {
474  struct {
475  uint16_t vmDataLRead: 8;
476  uint16_t vmDataHRead: 8;
477  };
478  uint16_t raw = 0;
479  } _vmdataread;
481  union {
482  struct {
483  uint16_t cgDataLRead: 8;
484  uint16_t cgDataHRead: 8;
485  };
486  uint16_t raw = 0;
487  } _cgdataread;
489  union {
490  struct {
491  uint16_t opct: 9;
492  uint16_t _: 7;
493  };
494  uint16_t raw = 0;
495  } _opct;
497  union {
498  struct {
499  uint8_t chipVersionNumber: 4;
500  uint8_t _: 1;
501  uint8_t modeSelect: 1;
502  uint8_t rangeOverFlag: 1;
503  uint8_t timeOverFlag: 1;
504  };
505  uint8_t raw = 0;
506  } _stat77;
508  union {
509  struct {
510  uint8_t chipVersionNumber: 4;
511  uint8_t mode: 1;
512  uint8_t _: 1;
513  uint8_t externalLatchFlag: 1;
514  uint8_t interlaceField: 1;
515  };
516  uint8_t raw = 0;
517  } _stat78;
518  };
519 }
ComSquare::PPU::tm
@ tm
TM (Main Screen Designation)
Definition: PPURegisters.hpp:104
ComSquare::PPU::bg3vofs
@ bg3vofs
BG3VOFS (BG3 Vertical Scroll)
Definition: PPURegisters.hpp:52
ComSquare::PPU::vmdatal
@ vmdatal
VMDATAL (VRAM Data Write low byte)
Definition: PPURegisters.hpp:64
ComSquare::PPU::Registers::mpy
uint32_t mpy
Definition: PPURegisters.hpp:466
ComSquare::PPU::Registers::enableWindowMaskingBg3
uint8_t enableWindowMaskingBg3
Definition: PPURegisters.hpp:400
ComSquare::PPU::Registers::objPriorityActivationBit
uint16_t objPriorityActivationBit
When Obj Priority activation bit is set, an Obj other than Sprite 0 may be given priority.
Definition: PPURegisters.hpp:176
ComSquare::PPU::Registers::verticalMirroring
uint8_t verticalMirroring
Definition: PPURegisters.hpp:293
ComSquare::PPU::bg3sc
@ bg3sc
BG3SC (BG3 Tilemap Address and Size)
Definition: PPURegisters.hpp:30
ComSquare::PPU::Registers::externalSync
uint8_t externalSync
Definition: PPURegisters.hpp:451
ComSquare::PPU::Registers::objInterlace
uint8_t objInterlace
Definition: PPURegisters.hpp:446
ComSquare::PPU::Registers::playingFieldSize
uint8_t playingFieldSize
Definition: PPURegisters.hpp:296
ComSquare::PPU::Registers::baseAddressBg2a4
uint8_t baseAddressBg2a4
The address let us know where to search for BG2/4 characters.
Definition: PPURegisters.hpp:240
ComSquare::PPU::Registers::_m7ofs
union ComSquare::PPU::Registers::@84 _m7ofs[2]
M7HOFS Register (Mode 7 BG Horizontal Scroll)
ComSquare::PPU::Registers::maskLogicColor
uint8_t maskLogicColor
Definition: PPURegisters.hpp:378
ComSquare::PPU::Registers::mpym
uint32_t mpym
Definition: PPURegisters.hpp:462
ComSquare::PPU::Registers::enableColorMathBg1
uint8_t enableColorMathBg1
Definition: PPURegisters.hpp:421
ComSquare::PPU::Registers::interlaceField
uint8_t interlaceField
Definition: PPURegisters.hpp:514
ComSquare::PPU::bg4vofs
@ bg4vofs
BG4VOFS (BG4 Vertical Scroll)
Definition: PPURegisters.hpp:56
ComSquare::PPU::mpyl
@ mpyl
MPYL (Multiplication Result low byte)
Definition: PPURegisters.hpp:120
ComSquare::PPU::Registers::_vmdataread
union ComSquare::PPU::Registers::@103 _vmdataread
VMDATALREAD/VMDATAHREAD - VRAM Data Read low/high byte.
ComSquare::PPU::Registers::_vmadd
union ComSquare::PPU::Registers::@86 _vmadd
VMADD Register (VRAM Address)
ComSquare::PPU::vmdatah
@ vmdatah
VMDATAH (VRAM Data Write high byte)
Definition: PPURegisters.hpp:66
ComSquare::PPU::Registers::mpyl
uint32_t mpyl
Definition: PPURegisters.hpp:461
ComSquare::PPU::PpuRegisters
PpuRegisters
Definition: PPURegisters.hpp:10
ComSquare::PPU::Registers::window1InversionForBg1Bg3Obj
uint8_t window1InversionForBg1Bg3Obj
Definition: PPURegisters.hpp:355
ComSquare::PPU::Registers::vmaddl
uint16_t vmaddl
Definition: PPURegisters.hpp:276
ComSquare::PPU::Registers::_stat77
union ComSquare::PPU::Registers::@106 _stat77
STAT77 - PPU Status Flag and Version.
ComSquare::PPU::Registers::externalLatchFlag
uint8_t externalLatchFlag
Definition: PPURegisters.hpp:513
ComSquare::PPU::Registers::value
uint16_t value
Definition: PPURegisters.hpp:314
ComSquare::PPU::Registers::_m7x
union ComSquare::PPU::Registers::@90 _m7x
M7X Register (Mode 7 Center X)
ComSquare::PPU::Registers::_tw
union ComSquare::PPU::Registers::@97 _tw[2]
TMW - TSW Registers (Window Mask Designation for the Main/Sub Screen)
ComSquare::PPU::setini
@ setini
SETINI (Screen Mode/Video Select)
Definition: PPURegisters.hpp:118
ComSquare::PPU::wobjlog
@ wobjlog
WOBJLOG (Window mask logic for OBJs and Color Window)
Definition: PPURegisters.hpp:102
ComSquare::PPU::Registers::_m7sel
union ComSquare::PPU::Registers::@88 _m7sel
TODO M7SEL Register (Mode 7 Settings)
ComSquare::PPU::cgdataread
@ cgdataread
CGDATAREAD (CGRAM Data read)
Definition: PPURegisters.hpp:134
ComSquare::PPU::bg1sc
@ bg1sc
BG1SC (BG1 Tilemap Address and Size)
Definition: PPURegisters.hpp:26
ComSquare::PPU::Registers::cgDataLRead
uint16_t cgDataLRead
Definition: PPURegisters.hpp:483
ComSquare::PPU::Registers::_wsel
union ComSquare::PPU::Registers::@93 _wsel[3]
W12SEL - W34SEL Registers (Window Mask Settings for BGs) and WOBJSEL Register (Window Mask Settings f...
ComSquare::PPU::Registers::mpyh
uint32_t mpyh
Definition: PPURegisters.hpp:463
ComSquare::PPU::Registers::enableColorMathBg4
uint8_t enableColorMathBg4
Definition: PPURegisters.hpp:424
ComSquare::PPU::Registers::affectBg2
uint8_t affectBg2
Apply mosaic to the BG2.
Definition: PPURegisters.hpp:212
ComSquare::PPU::Registers::_t
union ComSquare::PPU::Registers::@96 _t[2]
TM - TS Registers (Main & Sub Screen Designation)
ComSquare::PPU::Registers::_obsel
union ComSquare::PPU::Registers::@77 _obsel
OBSEL Register (Object Size and Character Address)
ComSquare::PPU::Registers::_wbglog
union ComSquare::PPU::Registers::@94 _wbglog
WBGLOG Register (Window mask logic for BGs)
ComSquare::PPU::vmdatalread
@ vmdatalread
VMDATALREAD (VRAM Data Read low byte)
Definition: PPURegisters.hpp:130
ComSquare::PPU::Registers::modeSelect
uint8_t modeSelect
Definition: PPURegisters.hpp:501
ComSquare::PPU::Registers::_cgdataread
union ComSquare::PPU::Registers::@104 _cgdataread
CGRAM Data read.
ComSquare::PPU::Registers::window2InversionForBg1Bg3Obj
uint8_t window2InversionForBg1Bg3Obj
Definition: PPURegisters.hpp:353
ComSquare::PPU::stat77
@ stat77
STAT77 (PPU Status Flag and Version)
Definition: PPURegisters.hpp:140
ComSquare::PPU::Registers::pixelSize
uint8_t pixelSize
Stores the pixel size (0 = 1x1, F = 16x16)
Definition: PPURegisters.hpp:218
ComSquare::PPU::bgmode
@ bgmode
BGMODE (BG Mode and Character Size)
Definition: PPURegisters.hpp:22
ComSquare::PPU::Registers::brightness
uint8_t brightness
Store the brightness value (F = max, 0 = off)
Definition: PPURegisters.hpp:150
ComSquare::PPU::Registers::red
uint16_t red
Definition: PPURegisters.hpp:331
ComSquare::PPU::Registers::nameBaseSelect
uint8_t nameBaseSelect
Stores the location of the first sprite table.
Definition: PPURegisters.hpp:161
ComSquare::PPU::Registers::enableWindowDisplayObj
uint8_t enableWindowDisplayObj
Definition: PPURegisters.hpp:390
ComSquare::PPU::Registers::_setini
union ComSquare::PPU::Registers::@101 _setini
SETINI Register (Screen Mode/Video Select)
ComSquare::PPU::Registers::characterSizeBg2
uint8_t characterSizeBg2
When The bit is set character size will 16x16 otherwise it is 8x8.
Definition: PPURegisters.hpp:198
ComSquare::PPU::Registers::enableWindow2ForBg2Bg4Color
uint8_t enableWindow2ForBg2Bg4Color
Definition: PPURegisters.hpp:348
ComSquare::PPU::Registers::_mosaic
union ComSquare::PPU::Registers::@80 _mosaic
MOSAIC Register (Screen Pixelation)
ComSquare::PPU::slhv
@ slhv
SLHV (Software Latch for H/V Counter)
Definition: PPURegisters.hpp:126
ComSquare::PPU::mpyh
@ mpyh
MPYH (Multiplication Result high byte)
Definition: PPURegisters.hpp:124
ComSquare::PPU::Registers::_cgwsel
union ComSquare::PPU::Registers::@98 _cgwsel
CGWSEL Register (Color Addition Select)
ComSquare::PPU::Registers::incrementAmount
uint8_t incrementAmount
Definition: PPURegisters.hpp:264
ComSquare::PPU::Registers::_isLowByte
bool _isLowByte
This bool is used for writing either the low byte of the data (first call) or the high byte of the da...
Definition: PPURegisters.hpp:344
ComSquare::PPU::Registers::_
uint16_t _
Definition: PPURegisters.hpp:174
ComSquare::PPU::w12sel
@ w12sel
W12SEL (Window Mask Settings for BG1 and BG2)
Definition: PPURegisters.hpp:86
ComSquare::PPU::Registers::enableColorMathObj
uint8_t enableColorMathObj
Definition: PPURegisters.hpp:425
ComSquare::PPU::Registers::_coldata
union ComSquare::PPU::Registers::@100 _coldata
COLDATA Register (Fixed Color Data)
ComSquare::PPU::Registers::maskLogicBg4
uint8_t maskLogicBg4
Definition: PPURegisters.hpp:367
ComSquare::PPU::Registers
Definition: PPURegisters.hpp:145
ComSquare::PPU::opvct
@ opvct
OPVCT (Vertical Scanline Location)
Definition: PPURegisters.hpp:138
ComSquare::PPU::cgadd
@ cgadd
CGADD (CGRAM Address)
Definition: PPURegisters.hpp:82
ComSquare::PPU::Registers::_bgmode
union ComSquare::PPU::Registers::@79 _bgmode
BGMODE Register (OAM Address and Obj Priority)
ComSquare::PPU::vmdatahread
@ vmdatahread
VMDATAHREAD (VRAM Data Read high byte)
Definition: PPURegisters.hpp:132
ComSquare::PPU::Registers::mode7ExtBg
uint8_t mode7ExtBg
Definition: PPURegisters.hpp:450
ComSquare::PPU::Registers::enableWindowMaskingBg2
uint8_t enableWindowMaskingBg2
Definition: PPURegisters.hpp:399
ComSquare::PPU::Registers::green
uint16_t green
Definition: PPURegisters.hpp:332
ComSquare::PPU
Definition: Background.cpp:11
ComSquare::PPU::m7x
@ m7x
M7X (Mode 7 Center X)
Definition: PPURegisters.hpp:78
ComSquare::PPU::bg3hofs
@ bg3hofs
BG3HOFS (BG3 Horizontal Scroll)
Definition: PPURegisters.hpp:50
ComSquare::PPU::Registers::enableWindowDisplayBg3
uint8_t enableWindowDisplayBg3
Definition: PPURegisters.hpp:388
ComSquare::PPU::Registers::_bgnba
union ComSquare::PPU::Registers::@82 _bgnba[2]
BGNBA Registers (BG1/2/3/4 Chr Address)
ComSquare::PPU::bg1hofs
@ bg1hofs
BG1HOFS (BG1 Horizontal Scroll)
Definition: PPURegisters.hpp:40
ComSquare::PPU::vmaddl
@ vmaddl
VMADDL (VRAM Address low byte)
Definition: PPURegisters.hpp:60
ComSquare::PPU::Registers::enableWindowMaskingObj
uint8_t enableWindowMaskingObj
Definition: PPURegisters.hpp:402
ComSquare::PPU::Registers::_wh
uint8_t _wh[4]
WH0 Register (Window 1 Left Position)
Definition: PPURegisters.hpp:363
ComSquare::PPU::Registers::addressRemapping
uint8_t addressRemapping
Definition: PPURegisters.hpp:265
ComSquare::PPU::Registers::_wobjlog
union ComSquare::PPU::Registers::@95 _wobjlog
WOBJLOG Register (Window mask logic for OBJs and Color Window)
ComSquare::PPU::Registers::_m7y
union ComSquare::PPU::Registers::@91 _m7y
M7Y Register (Mode 7 Center Y)
ComSquare::PPU::Registers::affectBg4
uint8_t affectBg4
Apply mosaic to the BG4.
Definition: PPURegisters.hpp:216
ComSquare::PPU::Registers::nameSelect
uint8_t nameSelect
Stores the offset of the second sprite table.
Definition: PPURegisters.hpp:163
ComSquare::PPU::Registers::blue
uint8_t blue
Definition: PPURegisters.hpp:438
ComSquare::PPU::Registers::affectBg3
uint8_t affectBg3
Apply mosaic to the BG3.
Definition: PPURegisters.hpp:214
ComSquare::PPU::Registers::_
uint8_t _
Definition: PPURegisters.hpp:151
ComSquare::PPU::Registers::maskLogicBg2
uint8_t maskLogicBg2
Definition: PPURegisters.hpp:369
ComSquare::PPU::Registers::vmdatal
uint16_t vmdatal
Definition: PPURegisters.hpp:284
ComSquare::PPU::ts
@ ts
TS (Subscreen Designation)
Definition: PPURegisters.hpp:106
ComSquare::PPU::wh3
@ wh3
WH3 (Window 2 Right Position)
Definition: PPURegisters.hpp:98
ComSquare::PPU::wh1
@ wh1
WH1 (Window 1 Right Position)
Definition: PPURegisters.hpp:94
ComSquare::PPU::m7d
@ m7d
M7D (Mode 7 Matrix D)
Definition: PPURegisters.hpp:76
ComSquare::PPU::vmaddh
@ vmaddh
VMADDH (VRAM Address high byte)
Definition: PPURegisters.hpp:62
ComSquare::PPU::w34sel
@ w34sel
W34SEL (Window Mask Settings for BG3 and BG4)
Definition: PPURegisters.hpp:88
ComSquare::PPU::bg34nba
@ bg34nba
BG34NBA (BG3 and 4 Chr Address)
Definition: PPURegisters.hpp:36
ComSquare::PPU::Registers::_slhv
uint8_t _slhv
SLHV - Software Latch for H/V Counter.
Definition: PPURegisters.hpp:469
ComSquare::PPU::Registers::enableColorMathBackdrop
uint8_t enableColorMathBackdrop
Definition: PPURegisters.hpp:426
ComSquare::PPU::coldata
@ coldata
COLDATA (Fixed Color Data)
Definition: PPURegisters.hpp:116
ComSquare::PPU::Registers::vmdata
uint16_t vmdata
Definition: PPURegisters.hpp:287
ComSquare::PPU::bg2hofs
@ bg2hofs
BG2HOFS (BG2 Horizontal Scroll)
Definition: PPURegisters.hpp:46
ComSquare::PPU::Registers::enableWindow1ForBg2Bg4Color
uint8_t enableWindow1ForBg2Bg4Color
Definition: PPURegisters.hpp:350
ComSquare::PPU::Registers::_bgofs
union ComSquare::PPU::Registers::@83 _bgofs[8]
BGXXOFS Register (BG1/2/3/4 Horizontal and Vertical Scrolls)
ComSquare::PPU::Registers::window2InversionForBg2Bg4Color
uint8_t window2InversionForBg2Bg4Color
Definition: PPURegisters.hpp:349
ComSquare::PPU::Registers::oamaddh
uint16_t oamaddh
Stores the data written on the OAMADDH register.
Definition: PPURegisters.hpp:182
ComSquare::PPU::cgdata
@ cgdata
CGDATA (CGRAM Data write)
Definition: PPURegisters.hpp:84
ComSquare::PPU::tsw
@ tsw
TSW (Window Mask Designation for the Subscreen)
Definition: PPURegisters.hpp:110
ComSquare::PPU::Registers::cgdatah
uint16_t cgdatah
Definition: PPURegisters.hpp:338
ComSquare::PPU::Registers::_stat78
union ComSquare::PPU::Registers::@107 _stat78
STAT78 - PPU Status Flag and Version.
ComSquare::PPU::Registers::raw
uint8_t raw
Definition: PPURegisters.hpp:155
ComSquare::PPU::Registers::horizontalMirroring
uint8_t horizontalMirroring
Definition: PPURegisters.hpp:292
ComSquare::PPU::Registers::colorIntensity
uint8_t colorIntensity
Definition: PPURegisters.hpp:435
ComSquare::PPU::Registers::addSubscreen
uint8_t addSubscreen
Definition: PPURegisters.hpp:411
ComSquare::PPU::Registers::tilemapAddress
uint8_t tilemapAddress
Address of the tilemap Address (0, 0)
Definition: PPURegisters.hpp:230
ComSquare::PPU::Registers::overscanMode
uint8_t overscanMode
Definition: PPURegisters.hpp:447
ComSquare::PPU::Registers::red
uint8_t red
Definition: PPURegisters.hpp:436
ComSquare::PPU::Registers::enableWindow2ForBg1Bg3Obj
uint8_t enableWindow2ForBg1Bg3Obj
Definition: PPURegisters.hpp:352
ComSquare::PPU::wbjlog
@ wbjlog
WBGLOG (Window mask logic for BGs)
Definition: PPURegisters.hpp:100
ComSquare::PPU::Registers::screenInterlace
uint8_t screenInterlace
Definition: PPURegisters.hpp:445
ComSquare::PPU::bg4hofs
@ bg4hofs
BG4HOFS (BG4 Horizontal Scroll)
Definition: PPURegisters.hpp:54
ComSquare::PPU::obsel
@ obsel
OBSEL Register (Object Size and Character Address)
Definition: PPURegisters.hpp:14
ComSquare::PPU::Registers::timeOverFlag
uint8_t timeOverFlag
Definition: PPURegisters.hpp:503
ComSquare::PPU::m7sel
@ m7sel
M7SEL (Mode 7 Settings)
Definition: PPURegisters.hpp:68
ComSquare::PPU::Registers::offsetBg
uint16_t offsetBg
Definition: PPURegisters.hpp:247
ComSquare::PPU::Registers::enableWindowDisplayBg1
uint8_t enableWindowDisplayBg1
Definition: PPURegisters.hpp:386
ComSquare::PPU::Registers::_vmdata
union ComSquare::PPU::Registers::@87 _vmdata
VMDATA Register (VRAM Data Write)
ComSquare::PPU::Registers::enableWindowMaskingBg1
uint8_t enableWindowMaskingBg1
Definition: PPURegisters.hpp:398
ComSquare::PPU::Registers::_oamdataread
uint8_t _oamdataread
OAMDATAREAD - Data for OAM read.
Definition: PPURegisters.hpp:471
ComSquare::PPU::m7y
@ m7y
M7Y (Mode 7 Center Y)
Definition: PPURegisters.hpp:80
ComSquare::PPU::Registers::enableWindow1ForBg1Bg3Obj
uint8_t enableWindow1ForBg1Bg3Obj
Definition: PPURegisters.hpp:354
ComSquare::PPU::inidisp
@ inidisp
INIDISP Register (F-blank and Brightness)
Definition: PPURegisters.hpp:12
ComSquare::PPU::Registers::directColorMode
uint8_t directColorMode
Definition: PPURegisters.hpp:410
ComSquare::PPU::Registers::preventColorMath
uint8_t preventColorMath
Definition: PPURegisters.hpp:413
ComSquare::PPU::Registers::vmdatah
uint16_t vmdatah
Definition: PPURegisters.hpp:285
ComSquare::PPU::Registers::oamAddress
uint16_t oamAddress
Stores the address to write with OAMDATA register.
Definition: PPURegisters.hpp:173
ComSquare::PPU::Registers::mode1Bg3PriorityBit
uint8_t mode1Bg3PriorityBit
When Mode 1 BG3 priority bit is set the BG3 is draw.
Definition: PPURegisters.hpp:194
ComSquare::PPU::Registers::enableColorMathBg3
uint8_t enableColorMathBg3
Definition: PPURegisters.hpp:423
ComSquare::PPU::Registers::rangeOverFlag
uint8_t rangeOverFlag
Definition: PPURegisters.hpp:502
ComSquare::PPU::Registers::enablePseudoHiresMode
uint8_t enablePseudoHiresMode
Definition: PPURegisters.hpp:448
ComSquare::PPU::bg1vofs
@ bg1vofs
BG1VOFS (BG1 Vertical Scroll)
Definition: PPURegisters.hpp:44
ComSquare::PPU::m7b
@ m7b
M7B (Mode 7 Matrix B) also used with $2134/6.
Definition: PPURegisters.hpp:72
ComSquare::PPU::Registers::vmDataLRead
uint16_t vmDataLRead
Definition: PPURegisters.hpp:475
ComSquare::PPU::Registers::affectBg1
uint8_t affectBg1
Apply mosaic to the BG1.
Definition: PPURegisters.hpp:210
ComSquare::PPU::Registers::enableWindowDisplayBg4
uint8_t enableWindowDisplayBg4
Definition: PPURegisters.hpp:389
ComSquare::PPU::Registers::cgdatal
uint16_t cgdatal
Definition: PPURegisters.hpp:337
ComSquare::PPU::Registers::clipColorToBlackBeforeMath
uint8_t clipColorToBlackBeforeMath
Definition: PPURegisters.hpp:414
ComSquare::PPU::Registers::_vmain
union ComSquare::PPU::Registers::@85 _vmain
VMAIN Register (Video Port Control)
ComSquare::PPU::Registers::opct
uint16_t opct
Definition: PPURegisters.hpp:491
ComSquare::PPU::bg2sc
@ bg2sc
BG2SC (BG2 Tilemap Address and Size)
Definition: PPURegisters.hpp:28
ComSquare::PPU::Registers::bgMode
uint8_t bgMode
Stores the current BG Mode (0 - 7)
Definition: PPURegisters.hpp:192
ComSquare::PPU::Registers::cgDataHRead
uint16_t cgDataHRead
Definition: PPURegisters.hpp:484
ComSquare::PPU::Registers::_cgadsub
union ComSquare::PPU::Registers::@99 _cgadsub
CGADSUB Register (Color Math designation)
ComSquare::PPU::Registers::incrementMode
uint8_t incrementMode
Definition: PPURegisters.hpp:267
ComSquare::PPU::cgwsel
@ cgwsel
CGWSEL (Color Addition Select)
Definition: PPURegisters.hpp:112
ComSquare::PPU::Registers::enableColorMathBg2
uint8_t enableColorMathBg2
Definition: PPURegisters.hpp:422
ComSquare::PPU::Registers::tilemapVerticalMirroring
uint8_t tilemapVerticalMirroring
When tilemap vertically mirroring bit is set the tilemap is mirrored vertically.
Definition: PPURegisters.hpp:228
ComSquare::PPU::mpym
@ mpym
MPYM (Multiplication Result middle byte)
Definition: PPURegisters.hpp:122
ComSquare::PPU::Registers::oamaddl
uint16_t oamaddl
Stores the data written on the OAMADDL register.
Definition: PPURegisters.hpp:180
ComSquare::PPU::cgadsub
@ cgadsub
CGADSUB (Color math designation)
Definition: PPURegisters.hpp:114
ComSquare::PPU::Registers::_bgsc
union ComSquare::PPU::Registers::@81 _bgsc[4]
BGSC Registers (BG Tilemap Address and Size)
ComSquare::PPU::Registers::enableWindowDisplayBg2
uint8_t enableWindowDisplayBg2
Definition: PPURegisters.hpp:387
ComSquare::PPU::Registers::window1InversionForBg2Bg4Color
uint8_t window1InversionForBg2Bg4Color
Definition: PPURegisters.hpp:351
ComSquare::PPU::Registers::characterSizeBg1
uint8_t characterSizeBg1
When The bit is set character size will 16x16 otherwise it is 8x8.
Definition: PPURegisters.hpp:196
ComSquare::PPU::Registers::green
uint8_t green
Definition: PPURegisters.hpp:437
ComSquare::PPU::Registers::addSubtractSelect
uint8_t addSubtractSelect
Definition: PPURegisters.hpp:428
ComSquare::PPU::wobjsel
@ wobjsel
WOBJSEL (Window Mask Settings for OBJ and Color Window)
Definition: PPURegisters.hpp:90
ComSquare::PPU::Registers::maskLogicObj
uint8_t maskLogicObj
Definition: PPURegisters.hpp:377
ComSquare::PPU::bg2vofs
@ bg2vofs
BG2VOFS (BG2 Vertical Scroll)
Definition: PPURegisters.hpp:48
ComSquare::PPU::Registers::blue
uint16_t blue
Definition: PPURegisters.hpp:333
ComSquare::PPU::ophct
@ ophct
OPHCT (Horizontal Scanline Location)
Definition: PPURegisters.hpp:136
ComSquare::PPU::oamdata
@ oamdata
OAMDATA (Data for OAM write)
Definition: PPURegisters.hpp:20
ComSquare::PPU::Registers::maskLogicBg3
uint8_t maskLogicBg3
Definition: PPURegisters.hpp:368
ComSquare::PPU::oamdataread
@ oamdataread
OAMDATAREAD (Data for OAM read)
Definition: PPURegisters.hpp:128
ComSquare::PPU::Registers::_
uint32_t _
Definition: PPURegisters.hpp:464
ComSquare::PPU::Registers::_opct
union ComSquare::PPU::Registers::@105 _opct
OPHCT/OPVCT - Horizontal/Vertical Scanline Location.
ComSquare::PPU::Registers::m7h
uint16_t m7h
Definition: PPURegisters.hpp:304
ComSquare::PPU::Registers::vmadd
uint16_t vmadd
Definition: PPURegisters.hpp:279
ComSquare::PPU::m7a
@ m7a
M7A (Mode 7 Matrix A) also used with $2134/6.
Definition: PPURegisters.hpp:70
ComSquare::PPU::Registers::_cgdata
union ComSquare::PPU::Registers::@92 _cgdata
CGDATA Register (CGRAM Data write)
ComSquare::PPU::mosaic
@ mosaic
MOSAIC (Screen Pixelation)
Definition: PPURegisters.hpp:24
ComSquare::PPU::m7c
@ m7c
M7C (Mode 7 Matrix C)
Definition: PPURegisters.hpp:74
ComSquare::PPU::Registers::_cgadd
uint8_t _cgadd
CGADD Register (CGRAM Address)
Definition: PPURegisters.hpp:327
ComSquare::PPU::Registers::m7
uint16_t m7
Definition: PPURegisters.hpp:306
ComSquare::PPU::Registers::mode
uint8_t mode
Definition: PPURegisters.hpp:511
ComSquare::PPU::Registers::_inidisp
union ComSquare::PPU::Registers::@76 _inidisp
INIDISP Register (F-blank and Brightness)
ComSquare::PPU::tmw
@ tmw
TMW (Window Mask Designation for the Main Screen)
Definition: PPURegisters.hpp:108
ComSquare::PPU::Registers::_mpy
union ComSquare::PPU::Registers::@102 _mpy
MPYL - MPYM - MPYH Registers (Multiplication Result)
ComSquare::PPU::Registers::_m7
union ComSquare::PPU::Registers::@89 _m7[4]
M7A M7B M7C M7C registers, M7A and M7B are also used with ($2134/6) (multiplactions registers)
ComSquare::PPU::Registers::_oamdata
uint8_t _oamdata
OAMDATA Register (Data for OAM write)
Definition: PPURegisters.hpp:187
ComSquare::PPU::Registers::fblank
uint8_t fblank
Store the FBlank status.
Definition: PPURegisters.hpp:153
ComSquare::PPU::Registers::halfColorMath
uint8_t halfColorMath
Definition: PPURegisters.hpp:427
ComSquare::PPU::Registers::enableWindowMaskingBg4
uint8_t enableWindowMaskingBg4
Definition: PPURegisters.hpp:401
ComSquare::PPU::Registers::characterSizeBg3
uint8_t characterSizeBg3
When The bit is set character size will 16x16 otherwise it is 8x8.
Definition: PPURegisters.hpp:200
ComSquare::PPU::bg4sc
@ bg4sc
BG4SC (BG4 Tilemap Address and Size)
Definition: PPURegisters.hpp:32
ComSquare::PPU::wh2
@ wh2
WH2 (Window 2 Left Position)
Definition: PPURegisters.hpp:96
ComSquare::PPU::Registers::chipVersionNumber
uint8_t chipVersionNumber
Definition: PPURegisters.hpp:499
ComSquare::PPU::Registers::maskLogicBg1
uint8_t maskLogicBg1
Definition: PPURegisters.hpp:370
ComSquare::PPU::Registers::tilemapHorizontalMirroring
uint8_t tilemapHorizontalMirroring
When tilemap horizontal mirroring bit is set the tilemap is mirrored horizontally.
Definition: PPURegisters.hpp:226
ComSquare::PPU::Registers::vmaddh
uint16_t vmaddh
Definition: PPURegisters.hpp:277
ComSquare::PPU::vmain
@ vmain
VMAIN (Video Port Control)
Definition: PPURegisters.hpp:58
ComSquare::PPU::Registers::objectSize
uint8_t objectSize
Stores the resolution preset of the sprites.
Definition: PPURegisters.hpp:165
ComSquare::PPU::wh0
@ wh0
WH0 (Window 1 Left Position)
Definition: PPURegisters.hpp:92
ComSquare::PPU::oamaddh
@ oamaddh
OAMADDH (OAM Address high bit and Obj Priority)
Definition: PPURegisters.hpp:18
ComSquare::PPU::bg12nba
@ bg12nba
BG12NBA (BG1 and 2 Chr Address)
Definition: PPURegisters.hpp:34
ComSquare::PPU::Registers::vmDataHRead
uint16_t vmDataHRead
Definition: PPURegisters.hpp:476
ComSquare::PPU::Registers::emptySpaceFill
uint8_t emptySpaceFill
Definition: PPURegisters.hpp:295
ComSquare::PPU::Registers::m7l
uint16_t m7l
Definition: PPURegisters.hpp:303
ComSquare::PPU::Registers::_incrementAmount
uint8_t _incrementAmount
Store the real value of the increment Amount (1, 32, 128) instead of 0,1 or 2.
Definition: PPURegisters.hpp:272
ComSquare::PPU::Registers::characterSizeBg4
uint8_t characterSizeBg4
When The bit is set character size will 16x16 otherwise it is 8x8.
Definition: PPURegisters.hpp:202
ComSquare::PPU::Registers::baseAddressBg1a3
uint8_t baseAddressBg1a3
The address let us know where to search for BG1/3 characters.
Definition: PPURegisters.hpp:238
ComSquare::PPU::oamaddl
@ oamaddl
OAMADDL (OAM Address low byte)
Definition: PPURegisters.hpp:16
ComSquare::PPU::stat78
@ stat78
STAT78 (PPU Status Flag and Version)
Definition: PPURegisters.hpp:142
ComSquare::PPU::Registers::_oamadd
union ComSquare::PPU::Registers::@78 _oamadd
OAMADD Register (OAM Address and Obj Priority)