shithub: pokecrystal

Download patch

ref: 5e104de3f5bdff54efd5ee562345236c0cdab5b5
parent: f76a093f44dcf6f5b733ba52bff481e03d0593f2
parent: 563ba141962d6f7881f7837b2fdcbd0541bc340f
author: mid-kid <esteve.varela@gmail.com>
date: Mon Nov 18 19:08:28 EST 2019

Merge pull request #661 from mid-kid/patch-1

Fixed a charmap warning with the new RGBDS

--- a/FAQ.md
+++ b/FAQ.md
@@ -38,11 +38,11 @@
 
 ### "ERROR: `UNION` already defined"
 
-Download [**rgbds 0.3.8**][rgbds]. Older versions will not work.
+Download [**rgbds 0.3.9**][rgbds] or newer. Older versions will not work.
 
 ### "Expression must be 8-bit"
 
-Download [**rgbds 0.3.8**][rgbds]. Older versions will not work.
+Download [**rgbds 0.3.9**][rgbds] or newer. Older versions will not work.
 
 ### "Segmentation fault" from `rgbgfx`
 
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -38,7 +38,7 @@
 
 Then download [**rgbds**](https://github.com/rednex/rgbds/releases/): the latest **win64.zip** or **win32.zip** release. Extract it and put all the `exe` and `dll` files individually in **C:\cygwin64\usr\local\bin**.
 
-**Note: If you already have an older rgbds, you will need to update to 0.3.8.** Ignore this if you have never installed rgbds before. If a version newer than 0.3.8 does not work, try downloading 0.3.8.
+**Note: If you already have an older rgbds, you will need to update to 0.3.9.** Ignore this if you have never installed rgbds before. If a version newer than 0.3.9 does not work, try downloading 0.3.9.
 
 Now open the **Cygwin terminal** and enter the following commands.
 
--- a/charmap.asm
+++ b/charmap.asm
@@ -416,3 +416,8 @@
 	charmap "7", $fd
 	charmap "8", $fe
 	charmap "9", $ff
+
+; ASCII charmap, for mobile functions
+pushc
+newcharmap ascii
+popc
--- a/mobile/mobile_40.asm
+++ b/mobile/mobile_40.asm
@@ -1683,17 +1683,14 @@
 	ld [wcd2b], a
 	ret
 
+pushc
+setcharmap ascii
 
-SECTION "tetsuji", ROMX
-
-	charmap " ", $20 ; revert to ascii
-
 Unknown_100b0a:
 	db "tetsuji", 0
 
+popc
 
-SECTION "bank40_2", ROMX
-
 Function100b12:
 	call Function100dd8
 	ret c
@@ -3617,11 +3614,9 @@
 	ld [wcd2b], a
 	ret
 
+pushc
+setcharmap ascii
 
-SECTION "ascii 10186f", ROMX
-
-	charmap " ", $20 ; revert to ascii
-
 Unknown_10186f:
 	db .end - @
 	db $19, $73, $09, $13, "trade_crystal"
@@ -3637,8 +3632,7 @@
 	db $19, $67, $10, $01, "limit_crystal"
 .end	db 0
 
-
-SECTION "bank40_3", ROMX
+popc
 
 Function1018a8:
 	ld hl, wccb5
--- a/mobile/mobile_45.asm
+++ b/mobile/mobile_45.asm
@@ -1,6 +1,7 @@
 SECTION "Mobile 45", ROMX
 
-	charmap " ", $20 ; revert to ascii
+pushc
+setcharmap ascii
 
 String_114000:
 	db "---", 0
@@ -124,6 +125,8 @@
 	db "BOUNDARY=", 0
 String_114232:
 	db "=?ISO-2022-JP?B?", 0
+
+popc
 
 Function114243::
 	ld a, SRAM_ENABLE
--- a/mobile/mobile_46.asm
+++ b/mobile/mobile_46.asm
@@ -1484,7 +1484,8 @@
 	and a
 	ret
 
-	charmap " ", $20 ; revert to ascii
+pushc
+setcharmap ascii
 
 ExchangeDownloadURL:
 	db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/exchange/index.txt", 0
@@ -1501,6 +1502,8 @@
 IndexDownloadURL:
 	db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/tamago/index.txt", 0
 
+popc
+
 Unreferenced_Function118d35:
 	ld hl, $d200
 	ld a, [wcd38]
@@ -2918,6 +2921,9 @@
 	jr nz, .asm_119699
 	ret
 
+pushc
+setcharmap ascii
+
 Unknown_1196b8:
 	db "Mon"
 	db "Tue"
@@ -2927,9 +2933,7 @@
 	db "Sat"
 	db "Sun"
 
-
-SECTION "Mobile 46 ASCII", ROMX
-; A hack to use ascii above.
+popc
 
 Function1196cd:
 	ld de, wc719
--- a/pokecrystal.link
+++ b/pokecrystal.link
@@ -167,10 +167,6 @@
 	"bank3F"
 ROMX $40
 	"mobile_40"
-	"tetsuji"
-	"bank40_2"
-	"ascii 10186f"
-	"bank40_3"
 ROMX $41
 	"bank41"
 ROMX $42
@@ -186,7 +182,6 @@
 	"Mobile Stadium"
 ROMX $46
 	"Mobile 46"
-	"Mobile 46 ASCII"
 ROMX $47
 	"Battle Tower"
 ROMX $48