summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index 9e6a5ee..f8b5457 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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