More i8080 + NEC changes (#18)

* More i8080 changes

* Fix compilation

* More foundational i8080 work

* Switch to __builtin_parity for parity flag setting

Fix some incorrectly implemented instructions
This commit is contained in:
Cacodemon345
2022-09-10 14:50:50 +06:00
committed by GitHub
parent 176278bca0
commit fc2fac4c73
4 changed files with 173 additions and 31 deletions

View File

@@ -37,4 +37,13 @@ typedef struct i8080
struct { uint8_t h, l; };
};
uint16_t pc, sp;
} i8080;
uint16_t oldpc, ei;
uint32_t pmembase, dmembase; /* Base from where i8080 starts. */
uint8_t emulated; /* 0 = not emulated, use separate registers, 1 = emulated, use x86 registers. */
} i8080;
#define C_FLAG_I8080 (1 << 0)
#define P_FLAG_I8080 (1 << 2)
#define AC_FLAG_I8080 (1 << 4)
#define Z_FLAG_I8080 (1 << 6)
#define S_FLAG_I8080 (1 << 7)