From f2c68c7174a656a73e7b50d7aa0bea3ab83c3373 Mon Sep 17 00:00:00 2001 From: Nathaniel Walizer Date: Sun, 12 Jan 2025 12:56:01 -0800 Subject: [PATCH] Pack core structs to simplify state saves --- e6502.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e6502.h b/e6502.h index 98dc001..7a70657 100644 --- a/e6502.h +++ b/e6502.h @@ -12,14 +12,14 @@ typedef enum { e6502_Status_N = 0b10000000, } e6502_Status_Flag; -typedef enum { +typedef enum __attribute__ ((__packed__)) { e6502_Pin_NMI = 0b01, e6502_Pin_IRQ = 0b10, e6502_NMI_Serviced = 0b10000000 } e6502_Pin; -typedef struct { +typedef struct __attribute__ ((__packed__)) { uint16_t PC; uint8_t S; uint8_t A;