all repos — mgba @ 4bba75dd0a6b10aec42119000da9d31e1898f496

mGBA Game Boy Advance Emulator

src/main.c (view raw)

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