mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-11-12 00:04:48 +13:00
Merge pull request #282 from Rangi42/master
Use LOAD/ENDL for OAM DMA code in HRAM (requires rgbds 0.4.1)
This commit is contained in:
commit
ba00264d8a
|
|
@ -5,7 +5,7 @@ os:
|
||||||
install:
|
install:
|
||||||
- |-
|
- |-
|
||||||
( cd
|
( 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
|
sudo make -C rgbds install
|
||||||
rm -rf rgbds
|
rm -rf rgbds
|
||||||
)
|
)
|
||||||
|
|
|
||||||
10
INSTALL.md
10
INSTALL.md
|
|
@ -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**.
|
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.
|
Now open the **Cygwin terminal** and enter the following commands.
|
||||||
|
|
||||||
|
|
@ -86,7 +86,7 @@ To install **rgbds**:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo apt-get install pkg-config flex bison libpng-dev
|
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
|
sudo make -C rgbds install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -102,7 +102,7 @@ To install **rgbds**:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo zypper install pkg-config flex bison libpng16-devel
|
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
|
sudo make -C rgbds install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -120,7 +120,7 @@ Alternatively, to install **rgbds** manually:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo pacman -S pkg-config flex bison libpng
|
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
|
sudo make -C rgbds install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -157,7 +157,7 @@ If `rgbds` is not available, you'll also need these:
|
||||||
To install **rgbds**:
|
To install **rgbds**:
|
||||||
|
|
||||||
```bash
|
```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
|
sudo make -C rgbds install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,14 +13,16 @@ WriteDMACodeToHRAM::
|
||||||
ret
|
ret
|
||||||
|
|
||||||
DMARoutine:
|
DMARoutine:
|
||||||
|
LOAD "OAM DMA", HRAM
|
||||||
|
hDMARoutine::
|
||||||
; initiate DMA
|
; initiate DMA
|
||||||
ld a, HIGH(wOAMBuffer)
|
ld a, HIGH(wOAMBuffer)
|
||||||
ldh [rDMA], a
|
ldh [rDMA], a
|
||||||
|
|
||||||
; wait for DMA to finish
|
; wait for DMA to finish
|
||||||
ld a, $28
|
ld a, $28
|
||||||
.wait
|
.wait
|
||||||
dec a
|
dec a
|
||||||
jr nz, .wait
|
jr nz, .wait
|
||||||
ret
|
ret
|
||||||
|
ENDL
|
||||||
DMARoutineEnd:
|
DMARoutineEnd:
|
||||||
|
|
|
||||||
2
hram.asm
2
hram.asm
|
|
@ -1,7 +1,5 @@
|
||||||
SECTION "HRAM", HRAM
|
SECTION "HRAM", HRAM
|
||||||
|
|
||||||
hDMARoutine:: ds 10
|
|
||||||
|
|
||||||
; Initialized to 16.
|
; Initialized to 16.
|
||||||
; Decremented each input iteration if the player
|
; Decremented each input iteration if the player
|
||||||
; presses the reset sequence (A+B+SEL+START).
|
; presses the reset sequence (A+B+SEL+START).
|
||||||
|
|
|
||||||
|
|
@ -195,4 +195,5 @@ SRAM $2
|
||||||
SRAM $3
|
SRAM $3
|
||||||
"Saved Boxes 2"
|
"Saved Boxes 2"
|
||||||
HRAM
|
HRAM
|
||||||
|
"OAM DMA"
|
||||||
"HRAM"
|
"HRAM"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue