diff options
author | vin <git@vineetk.net> | 2024-09-01 19:44:40 -0400 |
---|---|---|
committer | vin <git@vineetk.net> | 2024-09-01 19:44:40 -0400 |
commit | e14776a4739f525ac2c5531fca94142454683563 (patch) | |
tree | 8481e175e6308170006c79068dea7ad604fd3d42 /ppu.h | |
parent | 2084552c536a8299a3578c8b9b687cff98e6d9a3 (diff) |
Diffstat (limited to 'ppu.h')
-rw-r--r-- | ppu.h | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -17,11 +17,11 @@ struct ppu { uint8_t last_read; struct ppu_regs { - uint16_t v : 15; /* current vram address */ - uint16_t t : 15; /* temporary vram address */ - uint8_t x : 3; /* fine x scroll */ - uint8_t w : 1; /* first/second write toggle */ - uint8_t padding : 6; + uint16_t v : 15; /* current vram address */ + uint16_t t : 15; /* temporary vram address */ + uint16_t scroll_x : 9; /* x scroll position */ + uint16_t scroll_y : 9; /* y scroll position */ + uint8_t write_toggle : 1; /* first/second write toggle */ } regs; struct ppu_ctrl { /* $2000 */ @@ -31,7 +31,7 @@ struct ppu { uint8_t bg_tile_sel : 1; uint8_t sprite_tile_sel : 1; uint8_t inc_mode : 1; - uint8_t nametable_sel : 2; + uint8_t nametable_base : 2; } ctrl; struct ppu_mask { /* $2001 */ uint8_t colour_emphasis : 3; |