diff options
| author | LLLL Colonq <llll@colonq> | 2026-07-11 00:34:23 -0400 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2026-07-11 00:34:23 -0400 |
| commit | ca8daa96caed9d53db95336bad917d2e03e7b00f (patch) | |
| tree | 39c7ec19c9beba0932b3240d5033e2fbfd4e2f6c /6502/src/test.c | |
| parent | b6f00172b4e7045a14cebba0a7d4011528a28741 (diff) | |
6502: All tests pass!
Diffstat (limited to '6502/src/test.c')
| -rw-r--r-- | 6502/src/test.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/6502/src/test.c b/6502/src/test.c index 1497df6..694108e 100644 --- a/6502/src/test.c +++ b/6502/src/test.c @@ -22,6 +22,7 @@ int emu_summary(lua_State *l) { lua_pushinteger(l, e->regs[L6502_REG_A]); lua_setfield(l, -2, "a"); lua_pushinteger(l, e->regs[L6502_REG_X]); lua_setfield(l, -2, "x"); lua_pushinteger(l, e->regs[L6502_REG_Y]); lua_setfield(l, -2, "y"); + lua_pushinteger(l, e->regs[L6502_REG_FLAGS]); lua_setfield(l, -2, "flags"); lua_setfield(l, -2, "regs"); lua_newtable(l); lua_pushinteger(l, l6502_flag_get(e, L6502_FLAG_CARRY)); lua_setfield(l, -2, "carry"); @@ -107,7 +108,8 @@ int emu_write(lua_State *l) { int emu_emulate(lua_State *l); int emu_emulate(lua_State *l) { l6502_emu *e = get_emu(l); - l6502_emulate(e); + const char *ins = l6502_emulate(e); + lua_pushstring(l, ins); return 1; } |
