summaryrefslogtreecommitdiff
path: root/mknes.h
diff options
context:
space:
mode:
authorPeter Fors <peter.fors@mindkiller.com>2025-04-28 18:27:17 +0200
committerPeter Fors <peter.fors@mindkiller.com>2025-04-28 18:27:17 +0200
commitc40f7421d8c1ccbe008dbd2191c6642625ae4b83 (patch)
tree9779e0a5cff2adec44897dab43d3838e8e61d3fe /mknes.h
parent8a32bcfac621dfcaa6af832228e56713a4af6156 (diff)
before ppu rearrangement and fix of scanline 261
Diffstat (limited to 'mknes.h')
-rw-r--r--mknes.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/mknes.h b/mknes.h
index f8e4be7..fb1228b 100644
--- a/mknes.h
+++ b/mknes.h
@@ -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;