2023-12-24 18:46:21 +01:00
|
|
|
#include "screen.h"
|
2023-12-25 07:24:17 +01:00
|
|
|
#include "mem.h"
|
|
|
|
#include "vcpu.h"
|
2023-12-24 17:56:58 +01:00
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
2023-12-24 18:20:11 +01:00
|
|
|
|
2023-12-25 07:24:17 +01:00
|
|
|
// Initialize
|
|
|
|
MemInit();
|
2023-12-25 10:01:40 +01:00
|
|
|
MemLoadROM("../roms/logo_chip8.ch8");
|
2023-12-25 09:11:45 +01:00
|
|
|
|
2023-12-24 18:53:13 +01:00
|
|
|
ScreenInit(800,400);
|
2023-12-25 07:24:17 +01:00
|
|
|
VCPUInit();
|
2023-12-25 09:11:45 +01:00
|
|
|
// MemDump();
|
|
|
|
int i=0;
|
2023-12-24 19:59:31 +01:00
|
|
|
|
2023-12-24 18:46:21 +01:00
|
|
|
while (!WindowShouldClose()){
|
2023-12-25 09:11:45 +01:00
|
|
|
VCPUFetch();
|
|
|
|
VCPUDecode();
|
|
|
|
VCPUExecute();
|
2023-12-24 18:46:21 +01:00
|
|
|
ScreenUpdate();
|
|
|
|
}
|
|
|
|
|
2023-12-24 22:06:22 +01:00
|
|
|
ScreenClose();
|
2023-12-24 17:56:58 +01:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|