mirror of https://github.com/mgba-emu/mgba.git
Mini-test
This commit is contained in:
parent
9575e7f0d2
commit
68f2eed84d
10
src/main.c
10
src/main.c
|
@ -1,9 +1,17 @@
|
||||||
|
#include "arm.h"
|
||||||
#include "gba.h"
|
#include "gba.h"
|
||||||
|
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
struct GBA gba;
|
struct GBA gba;
|
||||||
GBAInit(&gba);
|
GBAInit(&gba);
|
||||||
|
int fd = open("test.rom", O_RDONLY);
|
||||||
|
GBALoadROM(&gba, fd);
|
||||||
|
gba.cpu.gprs[ARM_PC] = 0x08000004;
|
||||||
|
ARMStep(&gba.cpu);
|
||||||
GBADeinit(&gba);
|
GBADeinit(&gba);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue