diff options
Diffstat (limited to 'ppu.h')
| -rw-r--r-- | ppu.h | 12 |
1 files changed, 6 insertions, 6 deletions
| @@ -17,11 +17,11 @@ struct ppu { | |||
| 17 | uint8_t last_read; | 17 | uint8_t last_read; |
| 18 | 18 | ||
| 19 | struct ppu_regs { | 19 | struct ppu_regs { |
| 20 | uint16_t v : 15; /* current vram address */ | 20 | uint16_t v : 15; /* current vram address */ |
| 21 | uint16_t t : 15; /* temporary vram address */ | 21 | uint16_t t : 15; /* temporary vram address */ |
| 22 | uint8_t x : 3; /* fine x scroll */ | 22 | uint16_t scroll_x : 9; /* x scroll position */ |
| 23 | uint8_t w : 1; /* first/second write toggle */ | 23 | uint16_t scroll_y : 9; /* y scroll position */ |
| 24 | uint8_t padding : 6; | 24 | uint8_t write_toggle : 1; /* first/second write toggle */ |
| 25 | } regs; | 25 | } regs; |
| 26 | 26 | ||
| 27 | struct ppu_ctrl { /* $2000 */ | 27 | struct ppu_ctrl { /* $2000 */ |
| @@ -31,7 +31,7 @@ struct ppu { | |||
| 31 | uint8_t bg_tile_sel : 1; | 31 | uint8_t bg_tile_sel : 1; |
| 32 | uint8_t sprite_tile_sel : 1; | 32 | uint8_t sprite_tile_sel : 1; |
| 33 | uint8_t inc_mode : 1; | 33 | uint8_t inc_mode : 1; |
| 34 | uint8_t nametable_sel : 2; | 34 | uint8_t nametable_base : 2; |
| 35 | } ctrl; | 35 | } ctrl; |
| 36 | struct ppu_mask { /* $2001 */ | 36 | struct ppu_mask { /* $2001 */ |
| 37 | uint8_t colour_emphasis : 3; | 37 | uint8_t colour_emphasis : 3; |
