all repos — mgba @ bda71cafc2410f7d2782c4f37e8043db451c1c04

mGBA Game Boy Advance Emulator

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}