gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit cf90953de57f1adb4a8a65bcb7ed3bd313e92496 parent 17e2591bbd2250104bfe7cbd42b2f10c98b54895 Author: Toxa <untoxa@mail.ru> Date: Wed, 1 Mar 2023 20:46:50 +0300 GB: remove legacy MBC register definitions Diffstat:
6 files changed, 6 insertions(+), 15 deletions(-)
diff --git a/gbdk-lib/libc/targets/sm83/___sdcc_bcall.s b/gbdk-lib/libc/targets/sm83/___sdcc_bcall.s @@ -17,7 +17,7 @@ banked_call:: ; Performs a long call. inc hl ; Yes this should be here push hl ; Push the real return address ldh (__current_bank), a - ld (.MBC_ROM_PAGE), a ; Perform the switch + ld (rROMB0), a ; Perform the switch ld l, e ld h, d rst 0x20 @@ -25,6 +25,6 @@ banked_ret:: pop bc ; Pop return address pop af ; Pop the old bank ldh (__current_bank), a - ld (.MBC_ROM_PAGE), a + ld (rROMB0), a push bc ret diff --git a/gbdk-lib/libc/targets/sm83/___sdcc_bcall_ehl.s b/gbdk-lib/libc/targets/sm83/___sdcc_bcall_ehl.s @@ -7,7 +7,7 @@ ___sdcc_bcall_ehl:: ; Performs a long call. push af ; Push the current bank onto the stack ld a, e ldh (__current_bank), a - ld (.MBC_ROM_PAGE), a ; Perform the switch + ld (rROMB0), a ; Perform the switch rst 0x20 push hl ldhl sp, #3 @@ -15,7 +15,7 @@ ___sdcc_bcall_ehl:: ; Performs a long call. ld l, a ld a, h ldh (__current_bank), a - ld (.MBC_ROM_PAGE), a + ld (rROMB0), a ld a, l pop hl add sp, #2 diff --git a/gbdk-lib/libc/targets/sm83/ap/global.s b/gbdk-lib/libc/targets/sm83/ap/global.s @@ -14,9 +14,6 @@ ;; MBC Equates - .MBC1_ROM_PAGE = 0x2000 ; Address to write to for MBC1 switching - .MBC_ROM_PAGE = 0x2000 ; Default platform MBC rom switching address - rRAMG = 0x0000 ; $0000->$1fff rROMB0 = 0x2000 ; $2000->$2fff rROMB1 = 0x3000 ; $3000->$3fff - If more than 256 ROM banks are present. diff --git a/gbdk-lib/libc/targets/sm83/duck/global.s b/gbdk-lib/libc/targets/sm83/duck/global.s @@ -14,9 +14,6 @@ ;; MBC Equates - .MBC1_ROM_PAGE = 0x2000 ; Address to write to for MBC1 switching - .MBC_ROM_PAGE = 0x0001 ; Default platform MBC rom switching address - rRAMG = 0x0000 ; $0000->$1fff rROMB0 = 0x0001 ; $2000->$2fff rROMB1 = 0x3000 ; $3000->$3fff - If more than 256 ROM banks are present. diff --git a/gbdk-lib/libc/targets/sm83/far_ptr.s b/gbdk-lib/libc/targets/sm83/far_ptr.s @@ -43,12 +43,12 @@ ___call__banked:: ld L, A ld A, (#___call_banked_bank) ldh (#__current_bank), A - ld (.MBC_ROM_PAGE),A + ld (rROMB0),A jp (HL) 1$: pop AF ldh (#__current_bank), A - ld (.MBC1_ROM_PAGE), A + ld (rROMB0), A ret _to_far_ptr:: diff --git a/gbdk-lib/libc/targets/sm83/gb/global.s b/gbdk-lib/libc/targets/sm83/gb/global.s @@ -14,9 +14,6 @@ ;; MBC Equates - .MBC1_ROM_PAGE = 0x2000 ; Address to write to for MBC1 switching - .MBC_ROM_PAGE = 0x2000 ; Default platform MBC rom switching address - rRAMG = 0x0000 ; $0000->$1fff rROMB0 = 0x2000 ; $2000->$2fff rROMB1 = 0x3000 ; $3000->$3fff - If more than 256 ROM banks are present.
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.