-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed MBC1+ROM larger bigger than 1MB
- Loading branch information
1 parent
04c3900
commit 17b4ad5
Showing
11 changed files
with
203 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
; ------------------------------------------------------------------------------ | ||
; Super Game Boy border injector for Zelda Link's Awakening (non-DX) | ||
; by Marc Robledo 2024 | ||
; | ||
; More info at https://github.com/marcrobledo/super-game-boy-border-injector | ||
; ------------------------------------------------------------------------------ | ||
|
||
|
||
|
||
; GAME BOOT OFFSET | ||
; ---------------- | ||
; Put here the game's boot jp offset found in in $0101. | ||
; Usually $0150, but could be different depending on game. | ||
DEF GAME_BOOT_OFFSET EQU $0150 | ||
|
||
|
||
|
||
; BANK 0 ROM FREE SPACE | ||
; --------------------- | ||
; 16 bytes in bank 0 are needed for the game's boot hook subroutine. | ||
; Hopefully, there should be enough space at the end of bank 0 or in the | ||
; interruption or rst vector ($0000-$00ff). | ||
; In the worst scenario, you will need to carefully move some code/data to | ||
; other banks. | ||
DEF BANK0_FREE_SPACE EQU $0005 | ||
|
||
|
||
|
||
; MBC type | ||
; -------- | ||
; (see more here: https://gbdev.io/pandocs/MBCs.html) | ||
; MBC needs to be here specified in these special cases: | ||
; - MBC1 + expanded ROM to 1Mb or bigger (Zelda Link's Awakening [non-DX]) | ||
; - (to-do!) MBC5 + expanded ROM to 8Mb | ||
; other cases will just ignore this value | ||
; keep in mind that, in these special cases, the hook subroutine will grow | ||
; from 16 bytes to 25 bytes! | ||
DEF MBC EQU 1 | ||
|
||
|
||
|
||
; NEW CODE LOCATION | ||
; ----------------- | ||
; We need an empty bank to store all new code plus border data, which will be | ||
; quite big. | ||
; If the game has no empty bank, just use a bank higher than the original | ||
; game's bank number, RGBDS will expand the ROM and fix the header. | ||
; Safe bank numbers, depending on original game's ROM size: | ||
; - 32kb --> impossible to do it without changing MBC | ||
; - 64kb --> bank $04 | ||
; - 128kb --> bank $08 | ||
; - 256kb --> bank $10 | ||
; - 512kb --> bank $21 (bank $20 needs more code to be accessed in MBC1) | ||
; - 1024kb --> bank $41 (bank $40 needs more code to be accessed in MBC1) | ||
DEF SGB_CODE_BANK EQU $21 | ||
|
||
|
||
|
||
; CUSTOM GB PALETTE | ||
; ----------------- | ||
; set CUSTOM_GB_PALETTE_ENABLED to 1 if you want a custom GB palette for the | ||
; entire game screen | ||
; colors are RGB15 which means RGB components can go from 0 up to 31 | ||
; warning: even if set to 0, do not delete BUILD_CUSTOM_GB_PALETTE macro! | ||
DEF CUSTOM_GB_PALETTE_ENABLED EQU 1 | ||
MACRO BUILD_CUSTOM_GB_PALETTE | ||
RGB 27, 30, 25 ;color 0 (light) | ||
RGB 17, 23, 14 ;color 1 | ||
RGB 6, 13, 10 ;color 2 | ||
RGB 1, 3, 4 ;color 3 (dark) | ||
ENDM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters