summaryrefslogtreecommitdiff
path: root/mknes.h
diff options
context:
space:
mode:
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;