From 5eeb71080399eceacb4503ffbc887a9e9d1e76f9 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sat, 7 Feb 2015 15:51:53 -0800 Subject: Added working RAM barebones. --- Makefile | 9 +++++++-- wram.asm | 11 +++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100755 wram.asm 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 -- cgit v1.2.3