summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/apple.c2
-rw-r--r--src/main.c2
-rw-r--r--src/video/ncurses.c29
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) {
diff --git a/src/main.c b/src/main.c
index 24ca710..39ddbcc 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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();
}