ref: 164e1b89afc1773a14598c377c8c8d0bfa01a1a1
parent: bfc6612cbf0460955deca28e9ad92d0ff8856668
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Fri Apr 17 07:02:29 EDT 2020
Rename pokecrystal.link to layout.link This is independent of the project name, and clearly applies to pokecrystal11, pokecrystal-au, etc.
--- a/FAQ.md
+++ b/FAQ.md
@@ -58,7 +58,7 @@
If you have not changed any of the asm, make sure you have the latest version of pokecrystal and the correct version of rgbds (see [INSTALL.md](INSTALL.md)).
-If you added or changed any code, it has to fit in the **memory banks**. The 2MB ROM is divided into 128 banks of 4KB ($4000 bytes) each, numbered $00 to $7F. The linkerscript [pokecrystal.link](pokecrystal.link) lists which `SECTION`s go in which banks. Try moving some code into a new section.
+If you added or changed any code, it has to fit in the **memory banks**. The 2MB ROM is divided into 128 banks of 4KB ($4000 bytes) each, numbered $00 to $7F. The linkerscript [layout.link](layout.link) lists which `SECTION`s go in which banks. Try moving some code into a new section.
### "Invalid file or object file version"
--- a/Makefile
+++ b/Makefile
@@ -95,16 +95,16 @@
endif
-pokecrystal.gbc: $(crystal_obj) pokecrystal.link
- $(RGBLINK) -n pokecrystal.sym -m pokecrystal.map -l pokecrystal.link -p 0 -o $@ $(crystal_obj)
+pokecrystal.gbc: $(crystal_obj) layout.link
+ $(RGBLINK) -n pokecrystal.sym -m pokecrystal.map -l layout.link -p 0 -o $@ $(crystal_obj)
$(RGBFIX) -Cjv -t PM_CRYSTAL -i BYTE -k 01 -l 0x33 -m 0x10 -r 3 -p 0 $@
-pokecrystal11.gbc: $(crystal11_obj) pokecrystal.link
- $(RGBLINK) -n pokecrystal11.sym -m pokecrystal11.map -l pokecrystal.link -p 0 -o $@ $(crystal11_obj)
+pokecrystal11.gbc: $(crystal11_obj) layout.link
+ $(RGBLINK) -n pokecrystal11.sym -m pokecrystal11.map -l layout.link -p 0 -o $@ $(crystal11_obj)
$(RGBFIX) -Cjv -t PM_CRYSTAL -i BYTE -n 1 -k 01 -l 0x33 -m 0x10 -r 3 -p 0 $@
-pokecrystal-au.gbc: $(crystal_au_obj) pokecrystal.link
- $(RGBLINK) -n pokecrystal-au.sym -m pokecrystal-au.map -l pokecrystal.link -p 0 -o $@ $(crystal_au_obj)
+pokecrystal-au.gbc: $(crystal_au_obj) layout.link
+ $(RGBLINK) -n pokecrystal-au.sym -m pokecrystal-au.map -l layout.link -p 0 -o $@ $(crystal_au_obj)
$(RGBFIX) -Cjv -t PM_CRYSTAL -i BYTU -k 01 -l 0x33 -m 0x10 -r 3 -p 0 $@
--- a/docs/design_flaws.md
+++ b/docs/design_flaws.md
@@ -85,7 +85,7 @@
```asm
; PokemonPicPointers and UnownPicPointers are assumed to start at the same
-; address, but in different banks. This is enforced in pokecrystal.link.
+; address, but in different banks. This is enforced in layout.link.
SECTION "Pic Pointers", ROMX
@@ -98,7 +98,7 @@
INCLUDE "data/pokemon/unown_pic_pointers.asm"
```
-In [pokecrystal.link](https://github.com/pret/pokecrystal/blob/master/pokecrystal.link):
+In [layout.link](https://github.com/pret/pokecrystal/blob/master/layout.link):
```
ROMX $48
@@ -113,7 +113,7 @@
**Fix:**
-Don't enforce `org $4000` in [pokecrystal.link](https://github.com/pret/pokecrystal/blob/master/pokecrystal.link).
+Don't enforce `org $4000` in [layout.link](https://github.com/pret/pokecrystal/blob/master/layout.link).
Edit `GetFrontpicPointer`:
--- a/gfx/pics.asm
+++ b/gfx/pics.asm
@@ -2,7 +2,7 @@
; PokemonPicPointers and UnownPicPointers are assumed to start at the same
-; address, but in different banks. This is enforced in pokecrystal.link.
+; address, but in different banks. This is enforced in layout.link.
SECTION "Pic Pointers", ROMX
--- /dev/null
+++ b/layout.link
@@ -1,0 +1,367 @@
+ROM0
+ org $0000
+ "NULL"
+ org $0000
+ "rst0"
+ org $0008
+ "rst8"
+ org $0010
+ "rst10"
+ org $0018
+ "rst18"
+ org $0020
+ "rst20"
+ org $0028
+ "rst28"
+ org $0038
+ "rst38"
+ org $0040
+ "vblank"
+ org $0048
+ "lcd"
+ org $0050
+ "timer"
+ org $0058
+ "serial"
+ org $0060
+ "joypad"
+ org $0100
+ "Header"
+ org $0150
+ "Home"
+ROMX $01
+ "bank1"
+ROMX $02
+ "bank2"
+ROMX $03
+ "bank3"
+ROMX $04
+ "bank4"
+ROMX $05
+ "bank5"
+ROMX $06
+ "Tileset Data 1"
+ROMX $07
+ "Roofs"
+ "Tileset Data 2"
+ "Extra Songs 1"
+ROMX $08
+ "Clock Reset"
+ "Tileset Data 3"
+ "Egg Moves"
+ROMX $09
+ "bank9"
+ROMX $0a
+ "bankA"
+ROMX $0b
+ "bankB"
+ROMX $0c
+ "Tileset Data 4"
+ROMX $0d
+ "Effect Commands"
+ROMX $0e
+ "Enemy Trainers"
+ROMX $0f
+ "Battle Core"
+ROMX $10
+ "bank10"
+ "Evolutions and Attacks"
+ROMX $11
+ "bank11"
+ROMX $12
+ "Crystal Features 1"
+ROMX $13
+ "bank13"
+ROMX $14
+ "bank14"
+ROMX $15
+ "Map Scripts 1"
+ROMX $16
+ "Map Scripts 2"
+ROMX $17
+ "Map Scripts 3"
+ROMX $18
+ "Map Scripts 4"
+ROMX $19
+ "Crystal Phone Text"
+ROMX $1a
+ "Map Scripts 5"
+ROMX $1b
+ "Map Scripts 6"
+ROMX $1c
+ "Map Scripts 7"
+ROMX $1d
+ "Map Scripts 8"
+ROMX $1e
+ "Map Scripts 9"
+ROMX $1f
+ "Map Scripts 10"
+ROMX $20
+ "bank20"
+ROMX $21
+ "bank21"
+ROMX $22
+ "Crystal Features 2"
+ROMX $23
+ "bank23"
+ROMX $24
+ "bank24"
+ROMX $25
+ "Maps"
+ "Events"
+ROMX $26
+ "Map Scripts 11"
+ROMX $27
+ "Map Scripts 12"
+ROMX $28
+ "Phone Scripts 1"
+ROMX $29
+ "Phone Text"
+ROMX $2a
+ "Map Blocks 1"
+ROMX $2b
+ "Map Blocks 2"
+ROMX $2c
+ "Map Blocks 3"
+ROMX $2d
+ "Tileset Data 5"
+ROMX $2e
+ "bank2E"
+ROMX $2f
+ "Phone Scripts 2"
+ROMX $30
+ "Sprites 1"
+ROMX $31
+ "Sprites 2"
+ROMX $32
+ "bank32"
+ROMX $33
+ "Move Animations"
+ "Extra Songs 2"
+ROMX $34
+ "Pic Animations 1"
+ROMX $35
+ "Pic Animations 2"
+ROMX $36
+ "Font Inversed"
+ "Pic Animations 3"
+ROMX $37
+ "Tileset Data 6"
+ROMX $38
+ "bank38"
+ROMX $39
+ "bank39"
+ROMX $3a
+ "Audio"
+ "Songs 1"
+ROMX $3b
+ "Songs 2"
+ROMX $3c
+ "Songs 3"
+ "Sound Effects"
+ "Cries"
+ROMX $3d
+ "Songs 4"
+ROMX $3e
+ "bank3E"
+ROMX $3f
+ "bank3F"
+ROMX $40
+ "mobile40"
+ROMX $41
+ "bank41"
+ROMX $42
+ "mobile42"
+ "Intro Logo"
+ "Credits"
+ROMX $43
+ "Title"
+ROMX $44
+ "Mobile Adapter SDK"
+ROMX $45
+ "mobile45"
+ROMX $46
+ "mobile46"
+ROMX $47
+ "Battle Tower"
+ROMX $48
+ org $4000
+ "Pic Pointers"
+ "Pics 1"
+ROMX $49
+ org $4000
+ "Unown Pic Pointers"
+ "Pics 2"
+ROMX $4a
+ "Trainer Pic Pointers"
+ "Pics 3"
+ROMX $4b
+ "Pics 4"
+ROMX $4c
+ "Pics 5"
+ROMX $4d
+ "Pics 6"
+ROMX $4e
+ "Pics 7"
+ROMX $4f
+ "Pics 8"
+ROMX $50
+ "Pics 9"
+ROMX $51
+ "Pics 10"
+ROMX $52
+ "Pics 11"
+ROMX $53
+ "Pics 12"
+ROMX $54
+ "Pics 13"
+ROMX $55
+ "Pics 14"
+ROMX $56
+ "Pics 15"
+ROMX $57
+ "Pics 16"
+ROMX $58
+ "Pics 17"
+ROMX $59
+ "Pics 18"
+ROMX $5a
+ "Pics 19"
+ROMX $5b
+ "bank5B"
+ "Pics 20"
+ROMX $5c
+ "mobile5C"
+ "Pics 21"
+ROMX $5d
+ "Crystal Phone Text 2"
+ "Pics 22"
+ROMX $5e
+ "UpdateBattleHUDs"
+ "Songs 5"
+ "Crystal Sound Effects"
+ "mobile5E"
+ "Pics 23"
+ROMX $5f
+ "mobile5F"
+ "Pics 24"
+ROMX $60
+ "Map Scripts 13"
+ "Pokedex Entries 001-064"
+ROMX $61
+ "Map Scripts 14"
+ROMX $62
+ "Map Scripts 15"
+ROMX $63
+ "Map Scripts 16"
+ROMX $64
+ "Map Scripts 17"
+ROMX $65
+ "Map Scripts 18"
+ROMX $66
+ "Map Scripts 19"
+ROMX $67
+ "Map Scripts 20"
+ROMX $68
+ "Map Scripts 21"
+ROMX $69
+ "Map Scripts 22"
+ROMX $6a
+ "Map Scripts 23"
+ROMX $6b
+ "Map Scripts 24"
+ROMX $6c
+ "Phone Text 2"
+ "Map Scripts 25"
+ROMX $6d
+ "Special Phone Text"
+ROMX $6e
+ "Pokedex Entries 065-128"
+ROMX $6f
+ "Text 1"
+ROMX $70
+ "Text 2"
+ROMX $71
+ "Text 3"
+ROMX $72
+ "Miscellaneous Text"
+ROMX $73
+ "Pokedex Entries 129-192"
+ROMX $74
+ "Pokedex Entries 193-251"
+ROMX $77
+ "bank77"
+ "Tileset Data 7"
+ "bank77_2"
+ROMX $78
+ "Tileset Data 8"
+ROMX $7b
+ "Battle Tower Text"
+ROMX $7c
+ "Battle Tower Trainer Data"
+ROMX $7d
+ "Mobile News Data"
+ROMX $7e
+ "Crystal Events"
+ROMX $7f
+ org $7de0
+ "Mobile Stadium 2"
+WRAM0
+ "Stack"
+ "Audio RAM"
+ "WRAM"
+ "wSpriteAnims"
+ align 8
+ "Sprites"
+ "Tilemap"
+ "Miscellaneous"
+ "Overworld Map"
+ "Video"
+WRAMX 1
+ "WRAM 1"
+ "Enemy Party"
+ "Party"
+WRAMX 2
+ "Pic Animations"
+WRAMX 3
+ "Battle Tower RAM"
+WRAMX 5
+ align 8
+ "GBC Video"
+ org $d300
+ "Battle Animations"
+ org $d800
+ "Mobile RAM"
+WRAMX 6
+ "Scratch RAM"
+WRAMX 7
+ "Stack RAM"
+VRAM $00
+ "VRAM0"
+VRAM $01
+ "VRAM1"
+SRAM $00
+ "Scratch"
+ org $a600
+ "SRAM Bank 0"
+ org $b200
+ "Backup Save"
+SRAM $01
+ "Save"
+ "Active Box"
+ "Link Battle Data"
+ "SRAM Hall of Fame"
+ "SRAM Crystal Data"
+ "SRAM Battle Tower"
+SRAM $02
+ "Boxes 1-7"
+SRAM $03
+ "Boxes 8-14"
+SRAM $04
+ "SRAM Mobile 1"
+SRAM $05
+ "SRAM Mobile 2"
+SRAM $06
+ "SRAM Mobile 3"
+HRAM
+ "HRAM"
--- a/pokecrystal.link
+++ /dev/null
@@ -1,367 +1,0 @@
-ROM0
- org $0000
- "NULL"
- org $0000
- "rst0"
- org $0008
- "rst8"
- org $0010
- "rst10"
- org $0018
- "rst18"
- org $0020
- "rst20"
- org $0028
- "rst28"
- org $0038
- "rst38"
- org $0040
- "vblank"
- org $0048
- "lcd"
- org $0050
- "timer"
- org $0058
- "serial"
- org $0060
- "joypad"
- org $0100
- "Header"
- org $0150
- "Home"
-ROMX $01
- "bank1"
-ROMX $02
- "bank2"
-ROMX $03
- "bank3"
-ROMX $04
- "bank4"
-ROMX $05
- "bank5"
-ROMX $06
- "Tileset Data 1"
-ROMX $07
- "Roofs"
- "Tileset Data 2"
- "Extra Songs 1"
-ROMX $08
- "Clock Reset"
- "Tileset Data 3"
- "Egg Moves"
-ROMX $09
- "bank9"
-ROMX $0a
- "bankA"
-ROMX $0b
- "bankB"
-ROMX $0c
- "Tileset Data 4"
-ROMX $0d
- "Effect Commands"
-ROMX $0e
- "Enemy Trainers"
-ROMX $0f
- "Battle Core"
-ROMX $10
- "bank10"
- "Evolutions and Attacks"
-ROMX $11
- "bank11"
-ROMX $12
- "Crystal Features 1"
-ROMX $13
- "bank13"
-ROMX $14
- "bank14"
-ROMX $15
- "Map Scripts 1"
-ROMX $16
- "Map Scripts 2"
-ROMX $17
- "Map Scripts 3"
-ROMX $18
- "Map Scripts 4"
-ROMX $19
- "Crystal Phone Text"
-ROMX $1a
- "Map Scripts 5"
-ROMX $1b
- "Map Scripts 6"
-ROMX $1c
- "Map Scripts 7"
-ROMX $1d
- "Map Scripts 8"
-ROMX $1e
- "Map Scripts 9"
-ROMX $1f
- "Map Scripts 10"
-ROMX $20
- "bank20"
-ROMX $21
- "bank21"
-ROMX $22
- "Crystal Features 2"
-ROMX $23
- "bank23"
-ROMX $24
- "bank24"
-ROMX $25
- "Maps"
- "Events"
-ROMX $26
- "Map Scripts 11"
-ROMX $27
- "Map Scripts 12"
-ROMX $28
- "Phone Scripts 1"
-ROMX $29
- "Phone Text"
-ROMX $2a
- "Map Blocks 1"
-ROMX $2b
- "Map Blocks 2"
-ROMX $2c
- "Map Blocks 3"
-ROMX $2d
- "Tileset Data 5"
-ROMX $2e
- "bank2E"
-ROMX $2f
- "Phone Scripts 2"
-ROMX $30
- "Sprites 1"
-ROMX $31
- "Sprites 2"
-ROMX $32
- "bank32"
-ROMX $33
- "Move Animations"
- "Extra Songs 2"
-ROMX $34
- "Pic Animations 1"
-ROMX $35
- "Pic Animations 2"
-ROMX $36
- "Font Inversed"
- "Pic Animations 3"
-ROMX $37
- "Tileset Data 6"
-ROMX $38
- "bank38"
-ROMX $39
- "bank39"
-ROMX $3a
- "Audio"
- "Songs 1"
-ROMX $3b
- "Songs 2"
-ROMX $3c
- "Songs 3"
- "Sound Effects"
- "Cries"
-ROMX $3d
- "Songs 4"
-ROMX $3e
- "bank3E"
-ROMX $3f
- "bank3F"
-ROMX $40
- "mobile40"
-ROMX $41
- "bank41"
-ROMX $42
- "mobile42"
- "Intro Logo"
- "Credits"
-ROMX $43
- "Title"
-ROMX $44
- "Mobile Adapter SDK"
-ROMX $45
- "mobile45"
-ROMX $46
- "mobile46"
-ROMX $47
- "Battle Tower"
-ROMX $48
- org $4000
- "Pic Pointers"
- "Pics 1"
-ROMX $49
- org $4000
- "Unown Pic Pointers"
- "Pics 2"
-ROMX $4a
- "Trainer Pic Pointers"
- "Pics 3"
-ROMX $4b
- "Pics 4"
-ROMX $4c
- "Pics 5"
-ROMX $4d
- "Pics 6"
-ROMX $4e
- "Pics 7"
-ROMX $4f
- "Pics 8"
-ROMX $50
- "Pics 9"
-ROMX $51
- "Pics 10"
-ROMX $52
- "Pics 11"
-ROMX $53
- "Pics 12"
-ROMX $54
- "Pics 13"
-ROMX $55
- "Pics 14"
-ROMX $56
- "Pics 15"
-ROMX $57
- "Pics 16"
-ROMX $58
- "Pics 17"
-ROMX $59
- "Pics 18"
-ROMX $5a
- "Pics 19"
-ROMX $5b
- "bank5B"
- "Pics 20"
-ROMX $5c
- "mobile5C"
- "Pics 21"
-ROMX $5d
- "Crystal Phone Text 2"
- "Pics 22"
-ROMX $5e
- "UpdateBattleHUDs"
- "Songs 5"
- "Crystal Sound Effects"
- "mobile5E"
- "Pics 23"
-ROMX $5f
- "mobile5F"
- "Pics 24"
-ROMX $60
- "Map Scripts 13"
- "Pokedex Entries 001-064"
-ROMX $61
- "Map Scripts 14"
-ROMX $62
- "Map Scripts 15"
-ROMX $63
- "Map Scripts 16"
-ROMX $64
- "Map Scripts 17"
-ROMX $65
- "Map Scripts 18"
-ROMX $66
- "Map Scripts 19"
-ROMX $67
- "Map Scripts 20"
-ROMX $68
- "Map Scripts 21"
-ROMX $69
- "Map Scripts 22"
-ROMX $6a
- "Map Scripts 23"
-ROMX $6b
- "Map Scripts 24"
-ROMX $6c
- "Phone Text 2"
- "Map Scripts 25"
-ROMX $6d
- "Special Phone Text"
-ROMX $6e
- "Pokedex Entries 065-128"
-ROMX $6f
- "Text 1"
-ROMX $70
- "Text 2"
-ROMX $71
- "Text 3"
-ROMX $72
- "Miscellaneous Text"
-ROMX $73
- "Pokedex Entries 129-192"
-ROMX $74
- "Pokedex Entries 193-251"
-ROMX $77
- "bank77"
- "Tileset Data 7"
- "bank77_2"
-ROMX $78
- "Tileset Data 8"
-ROMX $7b
- "Battle Tower Text"
-ROMX $7c
- "Battle Tower Trainer Data"
-ROMX $7d
- "Mobile News Data"
-ROMX $7e
- "Crystal Events"
-ROMX $7f
- org $7de0
- "Mobile Stadium 2"
-WRAM0
- "Stack"
- "Audio RAM"
- "WRAM"
- "wSpriteAnims"
- align 8
- "Sprites"
- "Tilemap"
- "Miscellaneous"
- "Overworld Map"
- "Video"
-WRAMX 1
- "WRAM 1"
- "Enemy Party"
- "Party"
-WRAMX 2
- "Pic Animations"
-WRAMX 3
- "Battle Tower RAM"
-WRAMX 5
- align 8
- "GBC Video"
- org $d300
- "Battle Animations"
- org $d800
- "Mobile RAM"
-WRAMX 6
- "Scratch RAM"
-WRAMX 7
- "Stack RAM"
-VRAM $00
- "VRAM0"
-VRAM $01
- "VRAM1"
-SRAM $00
- "Scratch"
- org $a600
- "SRAM Bank 0"
- org $b200
- "Backup Save"
-SRAM $01
- "Save"
- "Active Box"
- "Link Battle Data"
- "SRAM Hall of Fame"
- "SRAM Crystal Data"
- "SRAM Battle Tower"
-SRAM $02
- "Boxes 1-7"
-SRAM $03
- "Boxes 8-14"
-SRAM $04
- "SRAM Mobile 1"
-SRAM $05
- "SRAM Mobile 2"
-SRAM $06
- "SRAM Mobile 3"
-HRAM
- "HRAM"