diff options
| author | Peter Fors <peter.fors@mindkiller.com> | 2025-04-28 18:27:17 +0200 |
|---|---|---|
| committer | Peter Fors <peter.fors@mindkiller.com> | 2025-04-28 18:27:17 +0200 |
| commit | c40f7421d8c1ccbe008dbd2191c6642625ae4b83 (patch) | |
| tree | 9779e0a5cff2adec44897dab43d3838e8e61d3fe /mknes.h | |
| parent | 8a32bcfac621dfcaa6af832228e56713a4af6156 (diff) | |
before ppu rearrangement and fix of scanline 261
Diffstat (limited to 'mknes.h')
| -rw-r--r-- | mknes.h | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -52,7 +52,6 @@ struct ppu_state { uint8_t sprite_zero_hit_possible; uint8_t sprite_count; - uint8_t palette[32]; // NOTE(peter): CACHELINE 2 start here! @@ -68,6 +67,15 @@ struct ppu_state { uint8_t frame_ready; } __attribute__((packed, aligned(64))); +struct apu_state { + uint32_t frame_cycle; + uint8_t mode; + uint8_t irq_inhibit; + uint8_t irq_pending; + uint8_t dmc_dma_enabled; + uint32_t dmc_sample_timer; +}; + struct cpu_state { uint32_t pc; // Program Counter uint8_t sp; // Stack Pointer @@ -104,6 +112,7 @@ struct nes_state { uint8_t input_latch[2]; // Latched inputs after strobe uint8_t input_bit[2]; // Current bit position being shifted out uint8_t input_strobe; // Control bit (0 or 1) + // struct apu_state apu; struct ppu_state ppu; struct mapper_entry mapper; |
