diff options
author | alekseiplusplus <alekseijeaves@protonmail.com> | 2023-11-30 15:14:01 +1100 |
---|---|---|
committer | alekseiplusplus <alekseijeaves@protonmail.com> | 2023-11-30 15:14:01 +1100 |
commit | 9341076be70d53aa78fae9d010c91bc93c5840b9 (patch) | |
tree | e56a141f67379b4545f9e1436cd10d9a9ebd4a1e | |
parent | d0f5e175f713a52d76d102780e0b899f3984c416 (diff) |
Something running now
-rw-r--r-- | src/apple.c | 2 | ||||
-rw-r--r-- | src/main.c | 2 | ||||
-rw-r--r-- | src/video/ncurses.c | 29 |
3 files changed, 14 insertions, 19 deletions
diff --git a/src/apple.c b/src/apple.c index fbb85f7..8a5e73b 100644 --- a/src/apple.c +++ b/src/apple.c @@ -39,7 +39,7 @@ void AppleOn() { Memory = calloc(MEMORY_SIZE, sizeof(byte)); //ROM = calloc(256, sizeof(byte)); InitInstructionTable(); - + PC = 0xFF00; // Load ROM (alternative) /*FILE *ROM_File = fopen ("rom.bin", "rb"); if (ROM_File == NULL) { @@ -12,7 +12,7 @@ int main() { while(1) { CallInstructionTable(GetMemory(PC), 0); PrintInfo(); - sleep(1); + sleep(3); } TerminalClose(); diff --git a/src/video/ncurses.c b/src/video/ncurses.c index 2827ff7..c3357c2 100644 --- a/src/video/ncurses.c +++ b/src/video/ncurses.c @@ -55,23 +55,18 @@ byte UserInput() void PrintInfo() { - move(2, 43); - printf("acc : %x", acc); - move(3, 43); - printf(" X : %x", X ); - move(4, 43); - printf(" Y : %x", Y ); - move(5, 43); - printf(" PC : %x", PC); - move(6, 43); - printf("Flags : %c%c_%c%c%c%c%c", - 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':'.' + mvprintw(2, 43, " acc : %x", acc); + mvprintw(3, 43, " X : %x", X ); + mvprintw(4, 43, " Y : %x", Y ); + mvprintw(5, 43, " PC : %x", PC); + mvprintw(6, 43, "Flags : %c%c_%c%c%c%c%c", + 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':'.' ); refresh(); } |