diff options
author | ElectroDeoxys <ElectroDeoxys@gmail.com> | 2021-09-09 08:51:12 +0100 |
---|---|---|
committer | ElectroDeoxys <ElectroDeoxys@gmail.com> | 2021-09-09 08:51:12 +0100 |
commit | 32b02147925566bac93bf71b002860335583574c (patch) | |
tree | d9cf016338d08022f0c0db358b356ddfb18b0e16 /src/home/dma.asm | |
parent | e4bce9b7ee5e89f8edfd921de2379f0fa06af206 (diff) |
Split home bank
Diffstat (limited to 'src/home/dma.asm')
-rw-r--r-- | src/home/dma.asm | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/home/dma.asm b/src/home/dma.asm new file mode 100644 index 0000000..740b739 --- /dev/null +++ b/src/home/dma.asm @@ -0,0 +1,22 @@ +; copy DMA to hDMAFunction +CopyDMAFunction: ; 0593 (0:0593) + ld c, LOW(hDMAFunction) + ld b, JumpToFunctionInTable - DMA + ld hl, DMA +.loop + ld a, [hli] + ld [$ff00+c], a + inc c + dec b + jr nz, .loop + ret + +; CopyDMAFunction copies this function to hDMAFunction ($ff83) +DMA: ; 05a1 (0:05a1) + ld a, HIGH(wOAM) + ldh [rDMA], a + ld a, $28 +.wait + dec a + jr nz, .wait + ret |