Browse Source

Pack core structs to simplify state saves

master
Nathaniel Walizer 1 year ago
parent
commit
f2c68c7174
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      e6502.h

+ 2
- 2
e6502.h View File

@@ -12,14 +12,14 @@ typedef enum {
e6502_Status_N = 0b10000000, e6502_Status_N = 0b10000000,
} e6502_Status_Flag; } e6502_Status_Flag;


typedef enum {
typedef enum __attribute__ ((__packed__)) {
e6502_Pin_NMI = 0b01, e6502_Pin_NMI = 0b01,
e6502_Pin_IRQ = 0b10, e6502_Pin_IRQ = 0b10,


e6502_NMI_Serviced = 0b10000000 e6502_NMI_Serviced = 0b10000000
} e6502_Pin; } e6502_Pin;


typedef struct {
typedef struct __attribute__ ((__packed__)) {
uint16_t PC; uint16_t PC;
uint8_t S; uint8_t S;
uint8_t A; uint8_t A;


Loading…
Cancel
Save