summaryrefslogtreecommitdiff
path: root/src/main.c
blob: f4ddf1bfca27d5296c0807d13f46ef2801871f4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "apple.h"
#include "video/interface.h"
#include <ncurses.h>
#include <unistd.h>



int main() {

	
	AppleOn();

	DisplayInit();

	FILE *Log = fopen("log/log.raw", "w+");
	int Time = 0;
	
	while(1) {
		// Logging
		fprintf(Log, "%04x : %04x\n", Time, PC);
		fflush(Log);
		// Computing
		CallInstructionTable(GetMemory(PC), 0);
		// Display information
		PrintInfo();
		// Logging
		Time++;
	}

	DisplayClose();

	return 0;
}