diff --git a/Makefile b/Makefile index 46b7b6c..ed299bb 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,6 @@ APP_DIR=$(SRC_DIR)apps CC=gcc SHELL=/bin/bash -CCFLAGS = -Wall -Werror CCFLAGS += -std=c11 -D_POSIX_C_SOURCE=200809L CCFLAGS += -I$(SRC_DIR) diff --git a/bootrom.gb b/bootrom.gb new file mode 100644 index 0000000..afa0ee4 Binary files /dev/null and b/bootrom.gb differ diff --git a/gbdb_boot_test b/gbdb_boot_test index fd54db0..6bf25cd 100644 --- a/gbdb_boot_test +++ b/gbdb_boot_test @@ -147,7 +147,7 @@ step; step assert $pc == 0x42 assert $a == 0x19 -step; +step assert $pc == 0x45 step @@ -159,6 +159,8 @@ assert $pc == 0x4a assert $c == 0x0c echo Test passed! +step 10000000 regs +stat -# exit \ No newline at end of file +exit diff --git a/harvest_moon.gb b/harvest_moon.gb new file mode 100644 index 0000000..57e7132 Binary files /dev/null and b/harvest_moon.gb differ diff --git a/src/apps/gbasm.c b/src/apps/gbasm.c index 1788d10..843ac5d 100644 --- a/src/apps/gbasm.c +++ b/src/apps/gbasm.c @@ -39,7 +39,9 @@ int main(int argc, char **argv) close(out_fd); } - out_fd = open(optarg, O_WRONLY | O_CREAT | O_TRUNC); + out_fd = open(optarg, + O_WRONLY | O_CREAT | O_TRUNC, + S_IRUSR | S_IWUSR); if (out_fd < 0) { fprintf(stderr, "failed to open output file %s\n", optarg); exit(1); diff --git a/src/apps/gbdb.c b/src/apps/gbdb.c index 95a8642..2d4be99 100644 --- a/src/apps/gbdb.c +++ b/src/apps/gbdb.c @@ -19,7 +19,7 @@ #include "common/tri.h" #define INPUT_MAX_LEN 512 -#define MAX_BREAKPTS 256 /* Should be plenty for anyone */ +#define MAX_BREAKPTS 4 /* Should be plenty for anyone */ #define MAX_RAM_LEN (1 << 20) /* Up to 8Mb Cartridge */ #define UNMAP_BOOTROM_ADDR 0xff50