src/main.c (view raw)
1#include "arm.h"
2#include "gba.h"
3
4#include <sys/stat.h>
5#include <fcntl.h>
6
7int main(int argc, char** argv) {
8 struct GBA gba;
9 GBAInit(&gba);
10 int fd = open("test.rom", O_RDONLY);
11 GBALoadROM(&gba, fd);
12 gba.cpu.gprs[ARM_PC] = 0x08000004;
13 ARMStep(&gba.cpu);
14 ARMStep(&gba.cpu);
15 GBADeinit(&gba);
16
17 return 0;
18}