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

This commit is contained in:
Rangi 2020-07-21 19:46:12 -04:00
parent 3e554e1d52
commit 204bf74a7f
5 changed files with 10 additions and 9 deletions

View File

@ -5,7 +5,7 @@ os:
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
)

View File

@ -38,7 +38,7 @@ Double click on the text that says "**Skip**" next to each package to select the
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 @@ To install **rgbds**:
```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 @@ To install **rgbds**:
```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 @@ Alternatively, to install **rgbds** manually:
```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 @@ If `rgbds` is not available, you'll also need these:
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
```

View File

@ -13,14 +13,16 @@ WriteDMACodeToHRAM::
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
dec a
jr nz, .wait
ret
ENDL
DMARoutineEnd:

View File

@ -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).

View File

@ -195,4 +195,5 @@ SRAM $2
SRAM $3
"Saved Boxes 2"
HRAM
"OAM DMA"
"HRAM"