diff options
author | alekseiplusplus <alekseijeaves@protonmail.com> | 2023-12-07 17:34:18 +1100 |
---|---|---|
committer | alekseiplusplus <alekseijeaves@protonmail.com> | 2023-12-07 17:34:18 +1100 |
commit | f8df4908fe6986e691ea96b4b07ffbff349ccce0 (patch) | |
tree | a868c23e64fb41bd1e25d3e4f34d738ebd0c549a /src/main.c | |
parent | 68cdad3be01539e583627e1c8929f182255541be (diff) |
changed shift ins.s and now log CPU state
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -2,12 +2,11 @@ #include "video/interface.h" #include <ncurses.h> #include <unistd.h> - +#include "cpu/6502.h" int main() { - AppleOn(); DisplayInit(); @@ -16,11 +15,21 @@ int main() { int Time = 0; while(1) { - // Logging - fprintf(Log, "%04x : %04x\n", Time, PC); - fflush(Log); // Computing CallInstructionTable(); + // Logging + fprintf(Log, + "%04x : %04x : %02x : %02x : %02x : %c%c_%c%c%c%c%c : %02x\n", + Time, PC-idata.length, acc, X, Y, + getFlag(flag_N) ? 'N':'.' , + getFlag(flag_V) ? 'V':'.' , + getFlag(flag_B) ? 'B':'.' , + getFlag(flag_D) ? 'D':'.' , + getFlag(flag_I) ? 'I':'.' , + getFlag(flag_Z) ? 'Z':'.' , + getFlag(flag_C) ? 'C':'.' , + S); + fflush(Log); // Display information PrintInfo(); // Logging |