shithub: pokered

Download patch

ref: ba00264d8a640ccf5fb8fea55c1a9114122dd404
parent: 3e554e1d5206f0ede60f7e99e68637b7f13bc683
parent: 204bf74a7f7330e4993138629dffc6304ce1f183
author: Rangi <35663410+Rangi42@users.noreply.github.com>
date: Wed Jul 22 05:11:18 EDT 2020

Merge pull request #282 from Rangi42/master

Use LOAD/ENDL for OAM DMA code in HRAM (requires rgbds 0.4.1)

--- a/.travis.yml
+++ b/.travis.yml
@@ -5,7 +5,7 @@
 install:
   - |-
     ( cd
-        git clone -b v0.4.0 --depth=1 https://github.com/rednex/rgbds
+        git clone -b v0.4.1 --depth=1 https://github.com/rednex/rgbds
         sudo make -C rgbds install
         rm -rf rgbds
     )
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -38,7 +38,7 @@
 
 Then download [**rgbds**](https://github.com/rednex/rgbds/releases/): the latest **win64.zip** or **win32.zip** release. Extract it and put all the `exe` and `dll` files individually in **C:\cygwin64\usr\local\bin**.
 
-**Note: If you already have an older rgbds, you will need to update to 0.4.0.** Ignore this if you have never installed rgbds before. If a version newer than 0.4.0 does not work, try downloading 0.4.0.
+**Note: If you already have an older rgbds, you will need to update to 0.4.1.** Ignore this if you have never installed rgbds before. If a version newer than 0.4.1 does not work, try downloading 0.4.1.
 
 Now open the **Cygwin terminal** and enter the following commands.
 
@@ -86,7 +86,7 @@
 
 ```bash
 sudo apt-get install pkg-config flex bison libpng-dev
-git clone -b v0.4.0 --depth=1 https://github.com/rednex/rgbds
+git clone -b v0.4.1 --depth=1 https://github.com/rednex/rgbds
 sudo make -C rgbds install
 ```
 
@@ -102,7 +102,7 @@
 
 ```bash
 sudo zypper install pkg-config flex bison libpng16-devel
-git clone -b v0.4.0 --depth=1 https://github.com/rednex/rgbds
+git clone -b v0.4.1 --depth=1 https://github.com/rednex/rgbds
 sudo make -C rgbds install
 ```
 
@@ -120,7 +120,7 @@
 
 ```bash
 sudo pacman -S pkg-config flex bison libpng
-git clone -b v0.4.0 --depth=1 https://github.com/rednex/rgbds
+git clone -b v0.4.1 --depth=1 https://github.com/rednex/rgbds
 sudo make -C rgbds install
 ```
 
@@ -157,7 +157,7 @@
 To install **rgbds**:
 
 ```bash
-git clone -b v0.4.0 --depth=1 https://github.com/rednex/rgbds
+git clone -b v0.4.1 --depth=1 https://github.com/rednex/rgbds
 sudo make -C rgbds install
 ```
 
--- a/engine/gfx/oam_dma.asm
+++ b/engine/gfx/oam_dma.asm
@@ -13,10 +13,11 @@
 	ret
 
 DMARoutine:
+LOAD "OAM DMA", HRAM
+hDMARoutine::
 	; initiate DMA
 	ld a, HIGH(wOAMBuffer)
 	ldh [rDMA], a
-
 	; wait for DMA to finish
 	ld a, $28
 .wait
@@ -23,4 +24,5 @@
 	dec a
 	jr nz, .wait
 	ret
+ENDL
 DMARoutineEnd:
--- a/hram.asm
+++ b/hram.asm
@@ -1,7 +1,5 @@
 SECTION "HRAM", HRAM
 
-hDMARoutine:: ds 10
-
 ; Initialized to 16.
 ; Decremented each input iteration if the player
 ; presses the reset sequence (A+B+SEL+START).
--- a/layout.link
+++ b/layout.link
@@ -195,4 +195,5 @@
 SRAM $3
 	"Saved Boxes 2"
 HRAM
+	"OAM DMA"
 	"HRAM"