Fix section linking

Create linker script and float all sections
This commit is contained in:
PikalaxALT
2017-06-17 19:14:55 -04:00
committed by PikalaxALT
parent e1c2876ff6
commit 0e470bc785
72 changed files with 827 additions and 329 deletions

View File

@@ -50,11 +50,11 @@ tools:
rgbasm -o $@ $< rgbasm -o $@ $<
pokecrystal11.gbc: $(crystal11_obj) pokecrystal11.gbc: $(crystal11_obj)
rgblink -n pokecrystal11.sym -m pokecrystal11.map -o $@ $^ rgblink -n pokecrystal11.sym -m pokecrystal11.map -l pokecrystal.ld -o $@ $^
rgbfix -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -n 1 -p 0 -r 3 -t PM_CRYSTAL $@ rgbfix -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -n 1 -p 0 -r 3 -t PM_CRYSTAL $@
pokecrystal.gbc: $(crystal_obj) pokecrystal.gbc: $(crystal_obj)
rgblink -n pokecrystal.sym -m pokecrystal.map -o $@ $^ rgblink -n pokecrystal.sym -m pokecrystal.map -l pokecrystal.ld -o $@ $^
rgbfix -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -p 0 -r 3 -t PM_CRYSTAL $@ rgbfix -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -p 0 -r 3 -t PM_CRYSTAL $@

View File

@@ -1,7 +1,7 @@
INCLUDE "includes.asm" INCLUDE "includes.asm"
SECTION "Audio", ROMX, BANK[AUDIO] SECTION "Audio", ROMX
INCLUDE "audio/engine.asm" INCLUDE "audio/engine.asm"
@@ -21,7 +21,7 @@ INCLUDE "audio/sfx_pointers.asm"
SECTION "Songs 1", ROMX, BANK[SONGS_1] SECTION "Songs 1", ROMX
INCLUDE "audio/music/route36.asm" INCLUDE "audio/music/route36.asm"
INCLUDE "audio/music/rivalbattle.asm" INCLUDE "audio/music/rivalbattle.asm"
@@ -40,7 +40,7 @@ INCLUDE "audio/music/lookpokemaniac.asm"
INCLUDE "audio/music/trainervictory.asm" INCLUDE "audio/music/trainervictory.asm"
SECTION "Songs 2", ROMX, BANK[SONGS_2] SECTION "Songs 2", ROMX
INCLUDE "audio/music/route1.asm" INCLUDE "audio/music/route1.asm"
INCLUDE "audio/music/route3.asm" INCLUDE "audio/music/route3.asm"
@@ -76,7 +76,7 @@ INCLUDE "audio/music/contestresults.asm"
INCLUDE "audio/music/route30.asm" INCLUDE "audio/music/route30.asm"
SECTION "Songs 3", ROMX, BANK[SONGS_3] SECTION "Songs 3", ROMX
INCLUDE "audio/music/violetcity.asm" INCLUDE "audio/music/violetcity.asm"
INCLUDE "audio/music/route29.asm" INCLUDE "audio/music/route29.asm"
@@ -86,7 +86,7 @@ INCLUDE "audio/music/evolution.asm"
INCLUDE "audio/music/printer.asm" INCLUDE "audio/music/printer.asm"
SECTION "Songs 4", ROMX, BANK[SONGS_4] SECTION "Songs 4", ROMX
INCLUDE "audio/music/viridiancity.asm" INCLUDE "audio/music/viridiancity.asm"
INCLUDE "audio/music/celadoncity.asm" INCLUDE "audio/music/celadoncity.asm"
@@ -127,7 +127,7 @@ INCLUDE "audio/music/pokeflutechannel.asm"
INCLUDE "audio/music/bugcatchingcontest.asm" INCLUDE "audio/music/bugcatchingcontest.asm"
SECTION "Songs 5", ROMX, BANK[SONGS_5] SECTION "Songs 5", ROMX
INCLUDE "audio/music/mobileadaptermenu.asm" INCLUDE "audio/music/mobileadaptermenu.asm"
INCLUDE "audio/music/buenaspassword.asm" INCLUDE "audio/music/buenaspassword.asm"
@@ -140,31 +140,31 @@ INCLUDE "audio/music/mobilecenter.asm"
SECTION "Extra Songs 1", ROMX, BANK[EXTRA_SONGS_1] SECTION "Extra Songs 1", ROMX
INCLUDE "audio/music/credits.asm" INCLUDE "audio/music/credits.asm"
INCLUDE "audio/music/clair.asm" INCLUDE "audio/music/clair.asm"
INCLUDE "audio/music/mobileadapter.asm" INCLUDE "audio/music/mobileadapter.asm"
SECTION "Extra Songs 2", ROMX, BANK[EXTRA_SONGS_2] SECTION "Extra Songs 2", ROMX
INCLUDE "audio/music/postcredits.asm" INCLUDE "audio/music/postcredits.asm"
SECTION "Sound Effects", ROMX, BANK[SOUND_EFFECTS] SECTION "Sound Effects", ROMX
INCLUDE "audio/sfx.asm" INCLUDE "audio/sfx.asm"
SECTION "Crystal Sound Effects", ROMX, BANK[CRYSTAL_SOUND_EFFECTS] SECTION "Crystal Sound Effects", ROMX
INCLUDE "audio/sfx_crystal.asm" INCLUDE "audio/sfx_crystal.asm"
SECTION "Cries", ROMX, BANK[CRIES] SECTION "Cries", ROMX
CryHeaders:: INCLUDE "audio/cry_headers.asm" CryHeaders:: INCLUDE "audio/cry_headers.asm"

View File

@@ -229,7 +229,7 @@ UpdateChannels: ; e8125
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp hl
.ChannelFnPtrs: .ChannelFnPtrs:
dw .Channel1 dw .Channel1
@@ -1389,7 +1389,7 @@ ParseMusicCommand: ; e870f
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp hl
; e8720 ; e8720

View File

@@ -211,7 +211,7 @@ AI_TryItem: ; 38105
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp hl
.callback .callback
pop de pop de
pop hl pop hl

View File

@@ -11,7 +11,7 @@ AI_Redundant: ; 2c41a
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp hl
.Moves: ; 2c42c .Moves: ; 2c42c
dbw EFFECT_DREAM_EATER, .DreamEater dbw EFFECT_DREAM_EATER, .DreamEater

View File

@@ -347,7 +347,7 @@ RunBattleAnimCommand: ; cc25f
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp hl
; cc2a4 ; cc2a4

View File

@@ -75,7 +75,7 @@ DoBattleBGEffectFunction: ; c804a (32:404a)
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp hl
BattleBGEffects: ; c805a (32:405a) BattleBGEffects: ; c805a (32:405a)
dw BattleBGEffect_End dw BattleBGEffect_End
@@ -161,7 +161,7 @@ BattleBGEffects_AnonJumptable: ; c80d7 (32:40d7)
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp hl
BattleBGEffects_IncrementJumptable: ; c80e5 (32:40e5) BattleBGEffects_IncrementJumptable: ; c80e5 (32:40e5)
ld hl, BG_EFFECT_STRUCT_JT_INDEX ld hl, BG_EFFECT_STRUCT_JT_INDEX
@@ -2059,7 +2059,7 @@ BattleBGEffect_1c: ; c8b00 (32:4b00)
.cgb .cgb
ld de, .Jumptable ld de, .Jumptable
call BatttleBGEffects_GetNamedJumptablePointer call BatttleBGEffects_GetNamedJumptablePointer
jp [hl] jp hl
.Jumptable: .Jumptable:
dw .cgb_zero dw .cgb_zero
@@ -2421,7 +2421,7 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
ld de, .Jumptable_DMG ld de, .Jumptable_DMG
call BatttleBGEffects_GetNamedJumptablePointer call BatttleBGEffects_GetNamedJumptablePointer
pop de pop de
jp [hl] jp hl
.Jumptable_DMG: .Jumptable_DMG:
dw .zero_dmg dw .zero_dmg
@@ -2484,7 +2484,7 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
ld de, .Jumptable_CGB ld de, .Jumptable_CGB
call BatttleBGEffects_GetNamedJumptablePointer call BatttleBGEffects_GetNamedJumptablePointer
pop de pop de
jp [hl] jp hl
.Jumptable_CGB: ; c8ddd (32:4ddd) .Jumptable_CGB: ; c8ddd (32:4ddd)
dw .zero_cgb dw .zero_cgb

View File

@@ -4331,7 +4331,7 @@ SpikesDamage: ; 3dc23
jp WaitBGMap jp WaitBGMap
.hl .hl
jp [hl] jp hl
; 3dc5b ; 3dc5b
PursuitSwitch: ; 3dc5b PursuitSwitch: ; 3dc5b

View File

@@ -113,7 +113,7 @@ DoMove: ; 3402c
jr .ReadMoveEffectCommand jr .ReadMoveEffectCommand
.DoMoveEffectCommand: .DoMoveEffectCommand:
jp [hl] jp hl
; 34084 ; 34084

View File

@@ -9,7 +9,7 @@ DoBattleAnimFrame: ; ccfbe
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp hl
; ccfce ; ccfce
.Jumptable: .Jumptable:
@@ -4085,7 +4085,7 @@ BattleAnim_AnonJumptable: ; ce71e (33:671e)
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp hl
BattleAnim_IncAnonJumptableIndex: ; ce72c (33:672c) BattleAnim_IncAnonJumptableIndex: ; ce72c (33:672c)
ld hl, BATTLEANIMSTRUCT_ANON_JT_INDEX ld hl, BATTLEANIMSTRUCT_ANON_JT_INDEX

View File

@@ -1,7 +1,7 @@
INCLUDE "includes.asm" INCLUDE "includes.asm"
SECTION "Egg Moves", ROMX, BANK[EGG_MOVES] SECTION "Egg Moves", ROMX
; All instances of Charm, Steel Wing, Sweet Scent, and Lovely Kiss were ; All instances of Charm, Steel Wing, Sweet Scent, and Lovely Kiss were
; removed from egg move lists in Crystal, because they are also TMs. ; removed from egg move lists in Crystal, because they are also TMs.

View File

@@ -1,7 +1,7 @@
INCLUDE "includes.asm" INCLUDE "includes.asm"
SECTION "Evolutions and Attacks", ROMX, BANK[EVOS_ATTACKS] SECTION "Evolutions and Attacks", ROMX
INCLUDE "data/evos_attacks_pointers.asm" INCLUDE "data/evos_attacks_pointers.asm"

View File

@@ -1,25 +1,25 @@
INCLUDE "includes.asm" INCLUDE "includes.asm"
SECTION "Pokedex Entries 001-064", ROMX, BANK[POKEDEX_ENTRIES_1] SECTION "Pokedex Entries 001-064", ROMX
PokedexEntries1:: PokedexEntries1::
INCLUDE "data/pokedex/entries_1.asm" INCLUDE "data/pokedex/entries_1.asm"
SECTION "Pokedex Entries 065-128", ROMX, BANK[POKEDEX_ENTRIES_2] SECTION "Pokedex Entries 065-128", ROMX
PokedexEntries2:: PokedexEntries2::
INCLUDE "data/pokedex/entries_2.asm" INCLUDE "data/pokedex/entries_2.asm"
SECTION "Pokedex Entries 129-192", ROMX, BANK[POKEDEX_ENTRIES_3] SECTION "Pokedex Entries 129-192", ROMX
PokedexEntries3:: PokedexEntries3::
INCLUDE "data/pokedex/entries_3.asm" INCLUDE "data/pokedex/entries_3.asm"
SECTION "Pokedex Entries 193-251", ROMX, BANK[POKEDEX_ENTRIES_4] SECTION "Pokedex Entries 193-251", ROMX
PokedexEntries4:: PokedexEntries4::
INCLUDE "data/pokedex/entries_4.asm" INCLUDE "data/pokedex/entries_4.asm"

View File

@@ -39,7 +39,7 @@ _DepositPKMN: ; e2391 (38:6391)
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
ld hl, .Jumptable ld hl, .Jumptable
call BillsPC_Jumptable call BillsPC_Jumptable
jp [hl] jp hl
.Jumptable: ; e23df (38:63df) .Jumptable: ; e23df (38:63df)
@@ -147,7 +147,7 @@ _DepositPKMN: ; e2391 (38:6391)
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp hl
BillsPCDepositJumptable: ; e24a1 (38:64a1) BillsPCDepositJumptable: ; e24a1 (38:64a1)
@@ -306,7 +306,7 @@ _WithdrawPKMN: ; e2583 (38:6583)
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
ld hl, .Jumptable ld hl, .Jumptable
call BillsPC_Jumptable call BillsPC_Jumptable
jp [hl] jp hl
.Jumptable: ; e25d2 (38:65d2) .Jumptable: ; e25d2 (38:65d2)
@@ -415,7 +415,7 @@ BillsPC_Withdraw: ; e2675 (38:6675)
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp hl
.dw ; e2699 (38:6699) #mark .dw ; e2699 (38:6699) #mark
dw .withdraw ; Withdraw dw .withdraw ; Withdraw
@@ -556,7 +556,7 @@ _MovePKMNWithoutMail: ; e2759
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
ld hl, .Jumptable ld hl, .Jumptable
call BillsPC_Jumptable call BillsPC_Jumptable
jp [hl] jp hl
; e27ac ; e27ac
.Jumptable: ; e27ac .Jumptable: ; e27ac
@@ -678,7 +678,7 @@ _MovePKMNWithoutMail: ; e2759
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp hl
; e2881 ; e2881
.Jumptable2: ; e2881 .Jumptable2: ; e2881
@@ -2014,7 +2014,7 @@ MovePKMNWitoutMail_InsertMon: ; e31e7
ld l, a ld l, a
ld de, .dw_return ld de, .dw_return
push de push de
jp [hl] jp hl
; e322a ; e322a
.dw_return ; e322a .dw_return ; e322a

View File

@@ -76,7 +76,7 @@ _CardFlip: ; e00ee (38:40ee)
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp hl
; e01a0 (38:41a0) ; e01a0 (38:41a0)
.Jumptable: ; e01a0 .Jumptable: ; e01a0
@@ -652,7 +652,7 @@ CardFlip_BlankDiscardedCardSlot: ; e0534
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp hl
; e0553 ; e0553
.Jumptable: ; e0553 .Jumptable: ; e0553
@@ -829,7 +829,7 @@ CardFlip_CheckWinCondition: ; e0637
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp hl
; e0643 ; e0643
.Jumptable: ; e0643 .Jumptable: ; e0643

View File

@@ -1,6 +1,6 @@
INCLUDE "includes.asm" INCLUDE "includes.asm"
SECTION "Credits", ROMX, BANK[CREDITS] SECTION "Credits", ROMX
const_def const_def
const SATOSHI_TAJIRI const SATOSHI_TAJIRI
@@ -263,7 +263,7 @@ Credits_Jumptable: ; 109926
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp hl
; 109937 ; 109937

View File

@@ -125,7 +125,7 @@ PlaceGameFreakPresents: ; e4670
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp hl
; e467f ; e467f
.dw ; e467f .dw ; e467f
@@ -222,7 +222,7 @@ GameFreakLogoJumper: ; e46ed (39:46ed)
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp hl
GameFreakLogoScenes: ; e46fd (39:46fd) GameFreakLogoScenes: ; e46fd (39:46fd)
dw GameFreakLogoScene1 dw GameFreakLogoScene1
@@ -438,7 +438,7 @@ IntroSceneJumper: ; e490f
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp hl
; e491e ; e491e
IntroScenes: ; e491e (39:491e) IntroScenes: ; e491e (39:491e)

View File

@@ -305,7 +305,7 @@ Function81a74: ; 81a74
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp hl
.asm_81a9a .asm_81a9a
call Function81eca call Function81eca
@@ -611,7 +611,7 @@ Function81cc2: ; 81cc2
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp hl
.asm_81cdf .asm_81cdf
ld a, $4 ld a, $4
@@ -1353,7 +1353,7 @@ Function822f0: ; 822f0
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp hl
; 82301 ; 82301
.dw ; 82301 .dw ; 82301

View File

@@ -1,6 +1,6 @@
INCLUDE "includes.asm" INCLUDE "includes.asm"
SECTION "Events", ROMX, BANK[EVENTS] SECTION "Events", ROMX
OverworldLoop:: ; 966b0 OverworldLoop:: ; 966b0
xor a xor a
@@ -609,7 +609,7 @@ TryObjectEvent: ; 969b5
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp hl
.nope_bugged .nope_bugged
; pop bc ; pop bc

View File

@@ -1064,7 +1064,7 @@ StartTitleScreen: ; 6219
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp hl
; 626a ; 626a
.dw .dw
@@ -1117,7 +1117,7 @@ TitleScreenScene: ; 62a3
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp hl
; 62af ; 62af
.scenes .scenes

Some files were not shown because too many files have changed in this diff Show More