gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 7a411e64cc2d4940dc04906f73a9ac3c68adbb41 parent 8b7b3ad4dd9ea4de973fb3b9510f661a6bbbb970 Author: Toxa <untoxa@mail.ru> Date: Tue, 11 Jan 2022 15:58:09 +0300 SMS/GG: fix RNG Diffstat:
| M | gbdk-lib/libc/asm/z80/rand.s | 15 | +++++++++------ |
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/gbdk-lib/libc/asm/z80/rand.s b/gbdk-lib/libc/asm/z80/rand.s @@ -10,9 +10,10 @@ _rand:: _randw:: - ld HL, (.randval) - ex DE, HL - ld L, E + LD HL, (.randval) + EX DE, HL + LD L, E + LD A, D SLA L ; * 16 RLA @@ -38,11 +39,13 @@ _randw:: LD A, H ; randhi*17 ADC A, #0x5c LD H, A - ld (.randval), HL + LD (.randval), HL + LD H, L + LD L, A RET _initrand:: ; Non banked .initrand:: - ld (.randval), HL - ret + LD (.randval), HL + RET
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.