summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Huderle <huderlem@gmail.com>2015-02-07 15:51:53 -0800
committerMarcus Huderle <huderlem@gmail.com>2015-02-07 15:51:53 -0800
commit5eeb71080399eceacb4503ffbc887a9e9d1e76f9 (patch)
treecb179080c4cb1c49c0b2095afe736a5a04ee7a9c
parent2db402b2e5506fa2d9228fc8989db1f4a932ac1d (diff)
Added working RAM barebones.
-rwxr-xr-xMakefile9
-rwxr-xr-xwram.asm11
2 files changed, 18 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 7e68105..ec4b3fb 100755
--- a/Makefile
+++ b/Makefile
@@ -8,8 +8,8 @@ header_opts = -jsvc -k 01 -l 0x33 -m 0x1e -p 0 -r 02 -t "POKEPINBALLVPHE"
PYTHON := python
# Link objects together to build a rom.
-all: main.o
- rgblink -n pokepinball.sym -o $(outputrom) main.o
+all: main.o wram.o
+ rgblink -n pokepinball.sym -o $(outputrom) main.o wram.o
rgbfix $($header_opts) pokepinball.gbc
# Assemble source files into objects.
@@ -17,6 +17,11 @@ all: main.o
main.o: main.asm bin
rgbasm -h -o main.o main.asm
+# Assemble working RAM into objects.
+# Use rgbasm -h to use halts without nops.
+wram.o: wram.asm
+ rgbasm -h -o wram.o wram.asm
+
# Create .bin dumps from baserom.gbc by scanning main.asm for INCBIN.
bin:
$(PYTHON) util/generate_bin_dumps.py main.asm
diff --git a/wram.asm b/wram.asm
new file mode 100755
index 0000000..cad3535
--- /dev/null
+++ b/wram.asm
@@ -0,0 +1,11 @@
+
+SECTION "WRAM Bank 0", WRAM0
+
+wc000::
+ ds 4096
+
+SECTION "WRAM Bank 1", WRAMX, BANK[1]
+
+wOAMBuffer:: ; d000
+ ; buffer for OAM data. Copied to OAM by DMA
+ ds 4 * 40