ref: 40b8729cd5967f21ed324d8e3353322f89fdfcf3
parent: 1c308e418be00dcce7097b75314c5a6397efb320
parent: 4b13a726999771ada65311583fc8fbd1d718f902
author: Sanky <gsanky@gmail.com>
date: Mon Mar 5 03:27:18 EST 2012
Merge hg-commit-id: d3bdced550f6
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,3 @@
-#gawk sort order
-export LC_CTYPE=C
-
.SUFFIXES: .asm .tx .o .gbc
TEXTFILES = text/oakspeech.tx text/pokedex.tx text/mapRedsHouse1F.tx \
@@ -18,7 +15,7 @@
${CC} -o $@ $>
.asm.tx:
- awk -f textpre.awk < $< > $@
+ python textpre.py < $< > $@
pokered.gbc: pokered.o
rgblink -o $@ $<
--- a/README
+++ b/README
@@ -14,3 +14,5 @@
Then run "make" in your shell.
This will output a file named "pokered.gbc".
+
+nucleus.kafuka.org #skeetendo
--- a/main.asm
+++ b/main.asm
@@ -3329,7 +3329,7 @@
jr z,.loop\@
bit 7,b
jr nz,.loop\@
- ld [hl],$f0 ; currency symbol
+ ld [hl],"¥"
inc hl
.loop\@
ld a,[de]
@@ -3368,7 +3368,7 @@
; if bit 7 is set, then no numbers have been printed yet
bit 5,b ; print the currency symbol?
jr z,.skipCurrencySymbol\@
- ld [hl],$f0 ; currency symbol
+ ld [hl],"¥"
inc hl
res 5,b
.skipCurrencySymbol\@
@@ -5258,66 +5258,25 @@
UnnamedText_24db: ; 0x24db
TX_FAR _UnnamedText_24db
- db $50
+ db "@"
; 0x24db + 5 bytes
UnnamedText_24e0: ; 0x24e0
TX_FAR _UnnamedText_24e0
- db $50
+ db "@"
; 0x24e0 + 5 bytes
-VictoryRoad3Text10:
-VictoryRoad3Text9:
-VictoryRoad3Text8:
-VictoryRoad3Text7:
-VictoryRoad2Text13:
-VictoryRoad2Text12:
-VictoryRoad2Text11:
-SeafoamIslands1Text2:
-SeafoamIslands1Text1:
-SeafoamIslands5Text2:
-SeafoamIslands5Text1:
-SeafoamIslands4Text6:
-SeafoamIslands4Text5:
-SeafoamIslands4Text4:
-SeafoamIslands4Text3:
-SeafoamIslands4Text2:
-SeafoamIslands4Text1:
-SeafoamIslands3Text2:
-SeafoamIslands3Text1:
-SeafoamIslands2Text2:
-SeafoamIslands2Text1:
-FuchsiaHouse2Text3:
-VictoryRoad1Text7:
-VictoryRoad1Text6:
-VictoryRoad1Text5: ; 0x24e5
- TX_FAR _VictoryRoad1Text5
- db $50
+BoulderText: ; 0x24e5
+ TX_FAR _BoulderText
+ db "@"
-SaffronCityText19:
-CinnabarIslandText4:
-FuchsiaCityText14:
-VermilionCityText9:
-LavenderTownText6:
-CeruleanCityText14:
-PewterCityText8:
-ViridianCityText11: ; 0x24ea
- TX_FAR _ViridianCityText11
- db $50
+MartSignText: ; 0x24ea
+ TX_FAR _MartSignText
+ db "@"
-PewterCityText9:
-CeruleanCityText15:
-LavenderTownText7:
-VermilionCityText10:
-CeladonCityText12:
-FuchsiaCityText15:
-CinnabarIslandText5:
-SaffronCityText23:
-Route4Text4:
-Route10Text8:
-ViridianCityText12: ; 0x24ef
- TX_FAR _ViridianCityText12
- db $50
+PokeCenterSignText: ; 0x24ef
+ TX_FAR _PokeCenterSignText
+ db "@"
Route2Text1:
Route4Text3:
@@ -6175,7 +6134,7 @@
ret
InitialQuantityText: ; 2E30
- db $f1,"01@"
+ db "×01@"
SpacesBetweenQuantityAndPriceText: ; 2E34
db " @"
@@ -6340,7 +6299,7 @@
push hl
ld bc,20 + 8 ; 1 row down and 8 columns right
add hl,bc
- ld a,$f1
+ ld a,"×"
ldi [hl],a
ld a,[$d11e]
push af
@@ -21261,7 +21220,7 @@
db $9 ; signs
db $f, $1b, $a ; CeladonCityText10
db $f, $13, $b ; CeladonCityText11
- db $9, $2a, $c ; CeladonCityText12
+ db $9, $2a, $c ; PokeCenterSignText
db $1d, $d, $d ; CeladonCityText13
db $9, $15, $e ; CeladonCityText14
db $d, $c, $f ; CeladonCityText15
@@ -21395,8 +21354,8 @@
db $11, $11, $8 ; ViridianCityText8
db $1, $13, $9 ; ViridianCityText9
db $1d, $15, $a ; ViridianCityText10
- db $13, $1e, $b ; ViridianCityText11
- db $19, $18, $c ; ViridianCityText12
+ db $13, $1e, $b ; MartSignText
+ db $19, $18, $c ; PokeCenterSignText
db $7, $1b, $d ; ViridianCityText13
db $7 ; people
@@ -21462,8 +21421,8 @@
db $7 ; signs
db $1d, $13, $6 ; PewterCityText6
db $13, $21, $7 ; PewterCityText7
- db $11, $18, $8 ; PewterCityText8
- db $19, $e, $9 ; PewterCityText9
+ db $11, $18, $8 ; MartSignText
+ db $19, $e, $9 ; PokeCenterSignText
db $9, $f, $a ; PewterCityText10
db $11, $b, $b ; PewterCityText11
db $17, $19, $c ; PewterCityText12
@@ -21545,8 +21504,8 @@
db $6 ; signs
db $13, $17, $c ; CeruleanCityText12
db $1d, $11, $d ; CeruleanCityText13
- db $19, $1a, $e ; CeruleanCityText14
- db $11, $14, $f ; CeruleanCityText15
+ db $19, $1a, $e ; MartSignText
+ db $11, $14, $f ; PokeCenterSignText
db $19, $b, $10 ; CeruleanCityText16
db $15, $1b, $11 ; CeruleanCityText17
@@ -21621,8 +21580,8 @@
db $7 ; signs
db $3, $1b, $7 ; VermilionCityText7
db $d, $25, $8 ; VermilionCityText8
- db $d, $18, $9 ; VermilionCityText9
- db $3, $c, $a ; VermilionCityText10
+ db $d, $18, $9 ; MartSignText
+ db $3, $c, $a ; PokeCenterSignText
db $d, $7, $b ; VermilionCityText11
db $13, $7, $c ; VermilionCityText12
db $f, $1d, $d ; VermilionCityText13
@@ -21700,8 +21659,8 @@
db $17, $f, $b ; FuchsiaCityText11
db $f, $19, $c ; FuchsiaCityText12
db $5, $11, $d ; FuchsiaCityText13
- db $d, $6, $e ; FuchsiaCityText14
- db $1b, $14, $f ; FuchsiaCityText15
+ db $d, $6, $e ; MartSignText
+ db $1b, $14, $f ; PokeCenterSignText
db $1d, $1b, $10 ; FuchsiaCityText16
db $f, $15, $11 ; FuchsiaCityText17
db $1d, $5, $12 ; FuchsiaCityText18
@@ -21983,7 +21942,7 @@
INCBIN "baserom.gbc",$1900b,$d9
ViridianCityTexts: ; 0x190e4
- dw ViridianCityText1, ViridianCityText2, ViridianCityText3, ViridianCityText4, ViridianCityText5, ViridianCityText6, ViridianCityText7, ViridianCityText8, ViridianCityText9, ViridianCityText10, ViridianCityText11, ViridianCityText12, ViridianCityText13, ViridianCityText14, ViridianCityText15
+ dw ViridianCityText1, ViridianCityText2, ViridianCityText3, ViridianCityText4, ViridianCityText5, ViridianCityText6, ViridianCityText7, ViridianCityText8, ViridianCityText9, ViridianCityText10, MartSignText, PokeCenterSignText, ViridianCityText13, ViridianCityText14, ViridianCityText15
ViridianCityText1: ; 0x19102
TX_FAR _ViridianCityText1
@@ -22214,7 +22173,7 @@
INCBIN "baserom.gbc",$1925e,$12d
PewterCityTexts: ; 0x1938b
- dw PewterCityText1, PewterCityText2, PewterCityText3, PewterCityText4, PewterCityText5, PewterCityText6, PewterCityText7, PewterCityText8, PewterCityText9, PewterCityText10, PewterCityText11, PewterCityText12, PewterCityText13, PewterCityText14
+ dw PewterCityText1, PewterCityText2, PewterCityText3, PewterCityText4, PewterCityText5, PewterCityText6, PewterCityText7, MartSignText, PokeCenterSignText, PewterCityText10, PewterCityText11, PewterCityText12, PewterCityText13, PewterCityText14
PewterCityText1: ; 0x193a7
TX_FAR _PewterCityText1
@@ -22547,7 +22506,7 @@
; 0x1962d
CeruleanCityTexts: ; 0x1962d
- dw CeruleanCityText1, CeruleanCityText2, CeruleanCityText3, CeruleanCityText4, CeruleanCityText5, CeruleanCityText6, CeruleanCityText7, CeruleanCityText8, CeruleanCityText9, CeruleanCityText10, CeruleanCityText11, CeruleanCityText12, CeruleanCityText13, CeruleanCityText14, CeruleanCityText15, CeruleanCityText16, CeruleanCityText17
+ dw CeruleanCityText1, CeruleanCityText2, CeruleanCityText3, CeruleanCityText4, CeruleanCityText5, CeruleanCityText6, CeruleanCityText7, CeruleanCityText8, CeruleanCityText9, CeruleanCityText10, CeruleanCityText11, CeruleanCityText12, CeruleanCityText13, MartSignText, PokeCenterSignText, CeruleanCityText16, CeruleanCityText17
CeruleanCityText1: ; 0x1964f
db $08 ; asm
@@ -22846,7 +22805,7 @@
; 0x1986f
VermilionCityTexts: ; 0x1986f
- dw VermilionCityText1, VermilionCityText2, VermilionCityText3, VermilionCityText4, VermilionCityText5, VermilionCityText6, VermilionCityText7, VermilionCityText8, VermilionCityText9, VermilionCityText10, VermilionCityText11, VermilionCityText12, VermilionCityText13
+ dw VermilionCityText1, VermilionCityText2, VermilionCityText3, VermilionCityText4, VermilionCityText5, VermilionCityText6, VermilionCityText7, VermilionCityText8, MartSignText, PokeCenterSignText, VermilionCityText11, VermilionCityText12, VermilionCityText13
VermilionCityText1: ; 0x19889
TX_FAR _VermilionCityText1
@@ -22994,7 +22953,7 @@
; 0x19966
CeladonCityTexts: ; 0x19966
- dw CeladonCityText1, CeladonCityText2, CeladonCityText3, CeladonCityText4, CeladonCityText5, CeladonCityText6, CeladonCityText7, CeladonCityText8, CeladonCityText9, CeladonCityText10, CeladonCityText11, CeladonCityText12, CeladonCityText13, CeladonCityText14, CeladonCityText15, CeladonCityText16, CeladonCityText17, CeladonCityText18
+ dw CeladonCityText1, CeladonCityText2, CeladonCityText3, CeladonCityText4, CeladonCityText5, CeladonCityText6, CeladonCityText7, CeladonCityText8, CeladonCityText9, CeladonCityText10, CeladonCityText11, PokeCenterSignText, CeladonCityText13, CeladonCityText14, CeladonCityText15, CeladonCityText16, CeladonCityText17, CeladonCityText18
CeladonCityText1: ; 0x1998a
TX_FAR _CeladonCityText1
@@ -23113,7 +23072,7 @@
; 0x19a2e
FuchsiaCityTexts: ; 0x19a2e
- dw FuchsiaCityText1, FuchsiaCityText2, FuchsiaCityText3, FuchsiaCityText4, FuchsiaCityText5, FuchsiaCityText6, FuchsiaCityText7, FuchsiaCityText8, FuchsiaCityText9, FuchsiaCityText10, FuchsiaCityText11, FuchsiaCityText12, FuchsiaCityText13, FuchsiaCityText14, FuchsiaCityText15, FuchsiaCityText16, FuchsiaCityText17, FuchsiaCityText18, FuchsiaCityText19, FuchsiaCityText20, FuchsiaCityText21, FuchsiaCityText22, FuchsiaCityText23, FuchsiaCityText24
+ dw FuchsiaCityText1, FuchsiaCityText2, FuchsiaCityText3, FuchsiaCityText4, FuchsiaCityText5, FuchsiaCityText6, FuchsiaCityText7, FuchsiaCityText8, FuchsiaCityText9, FuchsiaCityText10, FuchsiaCityText11, FuchsiaCityText12, FuchsiaCityText13, MartSignText, PokeCenterSignText, FuchsiaCityText16, FuchsiaCityText17, FuchsiaCityText18, FuchsiaCityText19, FuchsiaCityText20, FuchsiaCityText21, FuchsiaCityText22, FuchsiaCityText23, FuchsiaCityText24
FuchsiaCityText1: ; 0x19a5e
TX_FAR _FuchsiaCityText1
@@ -24178,8 +24137,8 @@
db $5 ; signs
db $5, $9, $3 ; CinnabarIslandText3
- db $b, $10, $4 ; CinnabarIslandText4
- db $b, $c, $5 ; CinnabarIslandText5
+ db $b, $10, $4 ; MartSignText
+ db $b, $c, $5 ; PokeCenterSignText
db $b, $9, $6 ; CinnabarIslandText6
db $3, $d, $7 ; CinnabarIslandText7
@@ -24534,7 +24493,7 @@
; 0x1ca81
CinnabarIslandTexts: ; 0x1ca81
- dw CinnabarIslandText1, CinnabarIslandText2, CinnabarIslandText3, CinnabarIslandText4, CinnabarIslandText5, CinnabarIslandText6, CinnabarIslandText7, CinnabarIslandText8
+ dw CinnabarIslandText1, CinnabarIslandText2, CinnabarIslandText3, MartSignText, PokeCenterSignText, CinnabarIslandText6, CinnabarIslandText7, CinnabarIslandText8
CinnabarIslandText8: ; 0x1ca91
TX_FAR _CinnabarIslandText8
@@ -43097,8 +43056,8 @@
db $6 ; signs
db $9, $b, $4 ; LavenderTownText4
db $3, $9, $5 ; LavenderTownText5
- db $d, $10, $6 ; LavenderTownText6
- db $5, $4, $7 ; LavenderTownText7
+ db $d, $10, $6 ; MartSignText
+ db $5, $4, $7 ; PokeCenterSignText
db $9, $5, $8 ; LavenderTownText8
db $7, $11, $9 ; LavenderTownText9
@@ -43129,7 +43088,7 @@
; 0x4410e
LavenderTownTexts: ; 0x4410e
- dw LavenderTownText1, LavenderTownText2, LavenderTownText3, LavenderTownText4, LavenderTownText5, LavenderTownText6, LavenderTownText7, LavenderTownText8, LavenderTownText9
+ dw LavenderTownText1, LavenderTownText2, LavenderTownText3, LavenderTownText4, LavenderTownText5, MartSignText, PokeCenterSignText, LavenderTownText8, LavenderTownText9
LavenderTownText1: ; 0x44120
db $08 ; asm
@@ -43752,7 +43711,7 @@
INCBIN "baserom.gbc",$44846,$5
SeafoamIslands1Texts: ; 0x4484b
- dw SeafoamIslands1Text1, SeafoamIslands1Text2
+ dw BoulderText, BoulderText
SeafoamIslands1Object: ; 0x4484f (size=72)
db $7d ; border tile
@@ -43847,7 +43806,7 @@
INCBIN "baserom.gbc",$44996,$8e
VictoryRoad3Texts: ; 0x44a24
- dw VictoryRoad3Text1, VictoryRoad3Text2, VictoryRoad3Text3, VictoryRoad3Text4, VictoryRoad3Text5, VictoryRoad3Text6, VictoryRoad3Text7, VictoryRoad3Text8, VictoryRoad3Text9, VictoryRoad3Text10
+ dw VictoryRoad3Text1, VictoryRoad3Text2, VictoryRoad3Text3, VictoryRoad3Text4, VictoryRoad3Text5, VictoryRoad3Text6, BoulderText, BoulderText, BoulderText, BoulderText
VictoryRoad3TrainerHeaders:
VictoryRoad3TrainerHeader0: ; 0x44a38
@@ -45616,7 +45575,7 @@
INCBIN "baserom.gbc",$4636d,$5
SeafoamIslands2Texts: ; 0x46372
- dw SeafoamIslands2Text1, SeafoamIslands2Text2
+ dw BoulderText, BoulderText
SeafoamIslands2Object: ; 0x46376 (size=72)
db $7d ; border tile
@@ -45701,7 +45660,7 @@
INCBIN "baserom.gbc",$464a9,$5
SeafoamIslands3Texts: ; 0x464ae
- dw SeafoamIslands3Text1, SeafoamIslands3Text2
+ dw BoulderText, BoulderText
SeafoamIslands3Object: ; 0x464b2 (size=72)
db $7d ; border tile
@@ -45845,7 +45804,7 @@
; 0x4669a
SeafoamIslands4Texts: ; 0x4669a
- dw SeafoamIslands4Text1, SeafoamIslands4Text2, SeafoamIslands4Text3, SeafoamIslands4Text4, SeafoamIslands4Text5, SeafoamIslands4Text6
+ dw BoulderText, BoulderText, BoulderText, BoulderText, BoulderText, BoulderText
SeafoamIslands4Object: ; 0x466a6 (size=96)
db $7d ; border tile
@@ -45948,7 +45907,7 @@
INCBIN "baserom.gbc",$46816,$66
SeafoamIslands5Texts: ; 0x4687c
- dw SeafoamIslands5Text1, SeafoamIslands5Text2, SeafoamIslands5Text3, SeafoamIslands5Text4, SeafoamIslands5Text5
+ dw BoulderText, BoulderText, SeafoamIslands5Text3, SeafoamIslands5Text4, SeafoamIslands5Text5
SeafoamIslands5TrainerHeaders:
SeafoamIslands5TrainerHeader0: ; 0x46886
@@ -50336,11 +50295,11 @@
db $5, $11, $10 ; SaffronCityText16
db $5, $1b, $11 ; SaffronCityText17
db $5, $23, $12 ; SaffronCityText18
- db $b, $1a, $13 ; SaffronCityText19
+ db $b, $1a, $13 ; MartSignText
db $13, $27, $14 ; SaffronCityText20
db $15, $5, $15 ; SaffronCityText21
db $15, $f, $16 ; SaffronCityText22
- db $1d, $a, $17 ; SaffronCityText23
+ db $1d, $a, $17 ; PokeCenterSignText
db $1d, $1b, $18 ; SaffronCityText24
db $13, $1, $19 ; SaffronCityText25
@@ -50379,7 +50338,7 @@
; 0x50c03
SaffronCityTexts: ; 0x50c03
- dw SaffronCityText1, SaffronCityText2, SaffronCityText3, SaffronCityText4, SaffronCityText5, SaffronCityText6, SaffronCityText7, SaffronCityText8, SaffronCityText9, SaffronCityText10, SaffronCityText11, SaffronCityText12, SaffronCityText13, SaffronCityText14, SaffronCityText15, SaffronCityText16, SaffronCityText17, SaffronCityText18, SaffronCityText19, SaffronCityText20, SaffronCityText21, SaffronCityText22, SaffronCityText23, SaffronCityText24, SaffronCityText25
+ dw SaffronCityText1, SaffronCityText2, SaffronCityText3, SaffronCityText4, SaffronCityText5, SaffronCityText6, SaffronCityText7, SaffronCityText8, SaffronCityText9, SaffronCityText10, SaffronCityText11, SaffronCityText12, SaffronCityText13, SaffronCityText14, SaffronCityText15, SaffronCityText16, SaffronCityText17, SaffronCityText18, MartSignText, SaffronCityText20, SaffronCityText21, SaffronCityText22, PokeCenterSignText, SaffronCityText24, SaffronCityText25
SaffronCityText1: ; 0x50c35
TX_FAR _SaffronCityText1
@@ -51787,7 +51746,7 @@
INCBIN "baserom.gbc",$517c4,$57
VictoryRoad2Texts: ; 0x5181b
- dw VictoryRoad2Text1, VictoryRoad2Text2, VictoryRoad2Text3, VictoryRoad2Text4, VictoryRoad2Text5, VictoryRoad2Text6, VictoryRoad2Text7, VictoryRoad2Text8, VictoryRoad2Text9, VictoryRoad2Text10, VictoryRoad2Text11, VictoryRoad2Text12, VictoryRoad2Text13
+ dw VictoryRoad2Text1, VictoryRoad2Text2, VictoryRoad2Text3, VictoryRoad2Text4, VictoryRoad2Text5, VictoryRoad2Text6, VictoryRoad2Text7, VictoryRoad2Text8, VictoryRoad2Text9, VictoryRoad2Text10, BoulderText, BoulderText, BoulderText
VictoryRoad2TrainerHeaders:
VictoryRoad2TrainerHeader0: ; 0x51835
@@ -53404,7 +53363,7 @@
db $5, $18, $7, MT_MOON_2
db $3 ; signs
- db $5, $c, $4 ; Route4Text4
+ db $5, $c, $4 ; PokeCenterSignText
db $7, $11, $5 ; Route4Text5
db $7, $1b, $6 ; Route4Text6
@@ -54092,7 +54051,7 @@
INCBIN "baserom.gbc",$5566b,$6
Route4Texts: ; 0x55671
- dw Route4Text1, Route4Text2, Route4Text3, Route4Text4, Route4Text5, Route4Text6
+ dw Route4Text1, Route4Text2, Route4Text3, PokeCenterSignText, Route4Text5, Route4Text6
Route4TrainerHeaders:
Route4TrainerHeader0: ; 0x5567d
@@ -56921,7 +56880,7 @@
db $4 ; signs
db $13, $7, $7 ; Route10Text7
- db $13, $c, $8 ; Route10Text8
+ db $13, $c, $8 ; PokeCenterSignText
db $37, $9, $9 ; Route10Text9
db $29, $5, $a ; Route10Text10
@@ -57847,7 +57806,7 @@
INCBIN "baserom.gbc",$59349,$6
Route10Texts: ; 0x5934f
- dw Route10Text1, Route10Text2, Route10Text3, Route10Text4, Route10Text5, Route10Text6, Route10Text7, Route10Text8, Route10Text9, Route10Text10
+ dw Route10Text1, Route10Text2, Route10Text3, Route10Text4, Route10Text5, Route10Text6, Route10Text7, PokeCenterSignText, Route10Text9, Route10Text10
Route10TrainerHeaders:
Route10TrainerHeader0: ; 0x59363
@@ -63292,7 +63251,7 @@
INCBIN "baserom.gbc",$5da27,$38
VictoryRoad1Texts: ; 0x5da5f
- dw VictoryRoad1Text1, VictoryRoad1Text2, VictoryRoad1Text3, VictoryRoad1Text4, VictoryRoad1Text5, VictoryRoad1Text6, VictoryRoad1Text7
+ dw VictoryRoad1Text1, VictoryRoad1Text2, VictoryRoad1Text3, VictoryRoad1Text4, BoulderText, BoulderText, BoulderText
VictoryRoad1TrainerHeaders:
VictoryRoad1TrainerHeader0: ; 0x5da6d
@@ -68774,9 +68733,9 @@
db "SODA POP",$4E
db "LEMONADE",$4E
db "CANCEL@"
- db $F0,"200",$4E
- db $F0,"300",$4E
- db $F0,"350",$4E,"@"
+ db "¥200",$4E
+ db "¥300",$4E
+ db "¥350",$4E,"@"
UnnamedText_74fd3: ; 0x74fd3
TX_FAR _UnnamedText_74fd3
@@ -68928,7 +68887,7 @@
; 0x750b8
FuchsiaHouse2Texts: ; 0x750b8
- dw FuchsiaHouse2Text1, FuchsiaHouse2Text2, FuchsiaHouse2Text3, FuchsiaHouse2Text4, FuchsiaHouse2Text5
+ dw FuchsiaHouse2Text1, FuchsiaHouse2Text2, BoulderText, FuchsiaHouse2Text4, FuchsiaHouse2Text5
FuchsiaHouse2Text1: ; 0x750c2
db $08 ; asm
@@ -72769,47 +72728,16 @@
db "somewhere!", $57
; 0x80096 + 27 bytes
-_VictoryRoad3Text10:
-_VictoryRoad3Text9:
-_VictoryRoad3Text8:
-_VictoryRoad3Text7:
-_VictoryRoad2Text13:
-_VictoryRoad2Text12:
-_VictoryRoad2Text11:
-_SeafoamIslands1Text2:
-_SeafoamIslands1Text1:
-_SeafoamIslands5Text2:
-_SeafoamIslands5Text1:
-_SeafoamIslands4Text6:
-_SeafoamIslands4Text5:
-_SeafoamIslands4Text4:
-_SeafoamIslands4Text3:
-_SeafoamIslands4Text2:
-_SeafoamIslands4Text1:
-_SeafoamIslands3Text2:
-_SeafoamIslands3Text1:
-_SeafoamIslands2Text2:
-_SeafoamIslands2Text1:
-_FuchsiaHouse2Text3:
-_VictoryRoad1Text7:
-_VictoryRoad1Text6:
-_VictoryRoad1Text5: ; 0x800b1
+_BoulderText: ; 0x800b1
db $0, "This requires", $4f
db "STRENGTH to move!", $57
-_SaffronCityText19:
-_CinnabarIslandText4:
-_FuchsiaCityText14:
-_VermilionCityText9:
-_LavenderTownText6:
-_CeruleanCityText14:
-_PewterCityText8:
-_ViridianCityText11: ; 0x800d2
+_MartSignText: ; 0x800d2
db $0, "All your item", $4f
db "needs fulfilled!", $55
db "#MON MART", $57
-_ViridianCityText12: ; 0x800fc
+_PokeCenterSignText: ; 0x800fc
db $0, "Heal Your #MON!", $4f
db "#MON CENTER", $57
@@ -76582,7 +76510,7 @@
; 0x896c7 + 22 bytes = 0x896dd
_UnnamedText_3c6e4: ; 0x896dd
- db $0, $52, " got ", $f0, "@"
+ db $0, $52, " got ¥@"
;XXX $2
db $2, $79, $d0, $c3
db $0, $4f
@@ -77036,7 +76964,7 @@
; $2, pointer, byte
_UnnamedText_1386b: ; 0x89d80
db $0, $52, " picked up", $4f
- db $f0, "@"
+ db "¥@"
db $2, $e5, $cc, $c3
db $0, "!", $58
@@ -77498,7 +77426,7 @@
db "just for you!", $51
db "I'll let you have", $4f
db "a swell MAGIKARP", $55
- db "for just ", $f0, "500!", $55
+ db "for just ¥500!", $55
db "What do you say?", $57
; 0x8a976 + 118 bytes
@@ -77605,7 +77533,7 @@
; 0x8ac67 + 22 bytes
_UnnamedText_56428: ; 0x8ac7d
- db $0, "You owe me ", $f0, "@"
+ db $0, "You owe me ¥@"
; 0x8ac7d + 14 bytes
;XXX
@@ -77674,7 +77602,7 @@
_UnnamedText_56454: ; 0x8c0ad
db $0, "Hey, you don't", $4f
- db "have enough ", $f0, "!", $57
+ db "have enough ¥!", $57
; 0x8c0ad + 30 bytes
_UndergroundTunnelEntranceRoute6Text1: ; 0x8c0cb
@@ -77735,7 +77663,7 @@
_RockTunnelPokecenterText3: ; 0x8c316
db $0, "I sold a useless", $4f
- db "NUGGET for ", $f0, "5000!", $57
+ db "NUGGET for ¥5000!", $57
_UnnamedText_44588: ; 0x8c33a
db $0, "This tunnel goes", $4f
@@ -82289,7 +82217,7 @@
; 0x9652c + 13 bytes
_UnnamedText_5c21f: ; 0x96539
- db $0, "It's ", $f0, "50 for a", $4f
+ db $0, "It's ¥50 for a", $4f
db "child's ticket.", $51
db "Would you like to", $4f
db "come in?", $57
@@ -82296,7 +82224,7 @@
; 0x96539 + 57 bytes
_UnnamedText_5c224: ; 0x96572
- db $0, "Right, ", $f0, "50!", $4f
+ db $0, "Right, ¥50!", $4f
db "Thank you!", $57
; 0x96572 + 24 bytes
@@ -82597,7 +82525,7 @@
db "this really weird", $55
db "fish #MON!", $51
db "It's totally weak", $4f
- db "and it cost ", $f0, "500!", $57
+ db "and it cost ¥500!", $57
; 0x985ac + 96 bytes
_UnnamedText_74cd5: ; 0x9860c
@@ -83466,7 +83394,7 @@
db "in the mountains.", $51
db "I thought it was", $4f
db "useless, but it", $55
- db "sold for ", $f0, "5000!", $57
+ db "sold for ¥5000!", $57
; 0x9a1e3 + 85 bytes
_LavenderHouse2Text1: ; 0x9a238
@@ -84535,7 +84463,7 @@
db "GAME CORNER!", $51
db "Do you need some", $4f
db "game coins?", $51
- db "It's ", $f0, "1000 for 50", $4f
+ db "It's ¥1000 for 50", $4f
db "coins. Would you", $55
db "like some?", $57
; 0x9d91a + 106 bytes
@@ -84954,7 +84882,7 @@
db "SAFARI ZONE!", $57
UnnamedText_9e6e4: ; 0x9e6e4
- db $0, "For just ", $f0, "500,", $4f
+ db $0, "For just ¥500,", $4f
db "you can catch all", $55
db "the #MON you", $55
db "want in the park!", $51
@@ -84963,7 +84891,7 @@
; 0x9e747
UnnamedText_9e747: ; 0x9e747
- db $0, "That'll be ", $f0, "500", $4f
+ db $0, "That'll be ¥500", $4f
db "please!", $51
db "We only use a", $4f
db "special # BALL", $55
@@ -86291,7 +86219,7 @@
TX_RAM $cf4b
db $0, "?", $4f
db "That will be", $55
- db $f0, "@"
+ db "¥@"
db $2, $9f, $ff, $c3
db $0, ". OK?", $57
; 0xa2639
@@ -86318,7 +86246,7 @@
_PokemartTellSellPrice: ; 0xa26ae
db $0, "I can pay you", $4f
- db $f0, "@"
+ db "¥@"
db $2, $9f, $ff, $c3 ; XXX
db $0, " for that.", $57
; 0xa26cf
--- a/textpre.awk
+++ /dev/null
@@ -1,311 +1,0 @@
-BEGIN {
-FS = "\""
-
-char["ガ"] = "$05"
-char["ギ"] = "$06"
-char["グ"] = "$07"
-char["ゲ"] = "$08"
-char["ゴ"] = "$09"
-char["ザ"] = "$0A"
-char["ジ"] = "$0B"
-char["ズ"] = "$0C"
-char["ゼ"] = "$0D"
-char["ゾ"] = "$0E"
-char["ダ"] = "$0F"
-char["ヂ"] = "$10"
-char["ヅ"] = "$11"
-char["デ"] = "$12"
-char["ド"] = "$13"
-char["バ"] = "$19"
-char["ビ"] = "$1A"
-char["ブ"] = "$1B"
-char["ボ"] = "$1C"
-char["が"] = "$26"
-char["ぎ"] = "$27"
-char["ぐ"] = "$28"
-char["げ"] = "$29"
-char["ご"] = "$2A"
-char["ざ"] = "$2B"
-char["じ"] = "$2C"
-char["ず"] = "$2D"
-char["ぜ"] = "$2E"
-char["ぞ"] = "$2F"
-char["だ"] = "$30"
-char["ぢ"] = "$31"
-char["づ"] = "$32"
-char["で"] = "$33"
-char["ど"] = "$34"
-char["ば"] = "$3A"
-char["び"] = "$3B"
-char["ぶ"] = "$3C"
-char["べ"] = "$3D"
-char["ぼ"] = "$3E"
-char["パ"] = "$40"
-char["ピ"] = "$41"
-char["プ"] = "$42"
-char["ポ"] = "$43"
-char["ぱ"] = "$44"
-char["ぴ"] = "$45"
-char["ぷ"] = "$46"
-char["ぺ"] = "$47"
-char["ぽ"] = "$48"
-char["ア"] = "$80"
-char["イ"] = "$81"
-char["ウ"] = "$82"
-char["エ"] = "$83"
-char["ォ"] = "$84"
-char["カ"] = "$85"
-char["キ"] = "$86"
-char["ク"] = "$87"
-char["ケ"] = "$88"
-char["コ"] = "$89"
-char["サ"] = "$8A"
-char["シ"] = "$8B"
-char["ス"] = "$8C"
-char["セ"] = "$8D"
-char["ソ"] = "$8E"
-char["タ"] = "$8F"
-char["チ"] = "$90"
-char["ツ"] = "$91"
-char["テ"] = "$92"
-char["ト"] = "$93"
-char["ナ"] = "$94"
-char["ニ"] = "$95"
-char["ヌ"] = "$96"
-char["ネ"] = "$97"
-char["ノ"] = "$98"
-char["ハ"] = "$99"
-char["ヒ"] = "$9A"
-char["フ"] = "$9B"
-char["ホ"] = "$9C"
-char["マ"] = "$9D"
-char["ミ"] = "$9E"
-char["ム"] = "$9F"
-char["メ"] = "$A0"
-char["モ"] = "$A1"
-char["ヤ"] = "$A2"
-char["ユ"] = "$A3"
-char["ヨ"] = "$A4"
-char["ラ"] = "$A5"
-char["ル"] = "$A6"
-char["レ"] = "$A7"
-char["ロ"] = "$A8"
-char["ワ"] = "$A9"
-char["ヲ"] = "$AA"
-char["ン"] = "$AB"
-char["ッ"] = "$AC"
-char["ャ"] = "$AD"
-char["ュ"] = "$AE"
-char["ョ"] = "$AF"
-char["ィ"] = "$B0"
-char["あ"] = "$B1"
-char["い"] = "$B2"
-char["う"] = "$B3"
-char["え"] = "$B4"
-char["お"] = "$B5"
-char["か"] = "$B6"
-char["き"] = "$B7"
-char["く"] = "$B8"
-char["け"] = "$B9"
-char["こ"] = "$BA"
-char["さ"] = "$BB"
-char["し"] = "$BC"
-char["す"] = "$BD"
-char["せ"] = "$BE"
-char["そ"] = "$BF"
-char["た"] = "$C0"
-char["ち"] = "$C1"
-char["つ"] = "$C2"
-char["て"] = "$C3"
-char["と"] = "$C4"
-char["な"] = "$C5"
-char["に"] = "$C6"
-char["ぬ"] = "$C7"
-char["ね"] = "$C8"
-char["の"] = "$C9"
-char["は"] = "$CA"
-char["ひ"] = "$CB"
-char["ふ"] = "$CC"
-char["へ"] = "$CD"
-char["ほ"] = "$CE"
-char["ま"] = "$CF"
-char["み"] = "$D0"
-char["む"] = "$D1"
-char["め"] = "$D2"
-char["も"] = "$D3"
-char["や"] = "$D4"
-char["ゆ"] = "$D5"
-char["よ"] = "$D6"
-char["ら"] = "$D7"
-char["り"] = "$D8"
-char["る"] = "$D9"
-char["れ"] = "$DA"
-char["ろ"] = "$DB"
-char["わ"] = "$DC"
-char["を"] = "$DD"
-char["ん"] = "$DE"
-char["っ"] = "$DF"
-char["ゃ"] = "$E0"
-char["ゅ"] = "$E1"
-char["ょ"] = "$E2"
-char["ー"] = "$E3"
-
-
-char["@"] = "$50"
-char["#"] = "$54"
-char["…"] = "$75"
-
-# textbox borders
-char["┌"] = "$79"
-char["─"] = "$7A"
-char["┐"] = "$7B"
-char["│"] = "$7C"
-char["└"] = "$7D"
-char["┘"] = "$7E"
-
-char["{"] = ""
-char["}"] = ""
-
-char["№"] = "$74"
-
-char[" "] = "$7F"
-char["A"] = "$80"
-char["B"] = "$81"
-char["C"] = "$82"
-char["D"] = "$83"
-char["E"] = "$84"
-char["F"] = "$85"
-char["G"] = "$86"
-char["H"] = "$87"
-char["I"] = "$88"
-char["J"] = "$89"
-char["K"] = "$8A"
-char["L"] = "$8B"
-char["M"] = "$8C"
-char["N"] = "$8D"
-char["O"] = "$8E"
-char["P"] = "$8F"
-char["Q"] = "$90"
-char["R"] = "$91"
-char["S"] = "$92"
-char["T"] = "$93"
-char["U"] = "$94"
-char["V"] = "$95"
-char["W"] = "$96"
-char["X"] = "$97"
-char["Y"] = "$98"
-char["Z"] = "$99"
-char["("] = "$9A"
-char[")"] = "$9B"
-char[":"] = "$9C"
-char[";"] = "$9D"
-char["["] = "$9E"
-char["]"] = "$9F"
-char["a"] = "$A0"
-char["b"] = "$A1"
-char["c"] = "$A2"
-char["d"] = "$A3"
-char["e"] = "$A4"
-char["f"] = "$A5"
-char["g"] = "$A6"
-char["h"] = "$A7"
-char["i"] = "$A8"
-char["j"] = "$A9"
-char["k"] = "$AA"
-char["l"] = "$AB"
-char["m"] = "$AC"
-char["n"] = "$AD"
-char["o"] = "$AE"
-char["p"] = "$AF"
-char["q"] = "$B0"
-char["r"] = "$B1"
-char["s"] = "$B2"
-char["t"] = "$B3"
-char["u"] = "$B4"
-char["v"] = "$B5"
-char["w"] = "$B6"
-char["x"] = "$B7"
-char["y"] = "$B8"
-char["z"] = "$B9"
-char["é"] = "$BA"
-char["'d"] = "$BB"
-char["'l"] = "$BC"
-char["'s"] = "$BD"
-char["'t"] = "$BE"
-char["'v"] = "$BF"
-char["'"] = "$E0"
-char["-"] = "$E3"
-char["'r"] = "$E4"
-char["'m"] = "$E5"
-char["?"] = "$E6"
-char["!"] = "$E7"
-char["."] = "$E8"
-char["♂"] = "$EF"
-char["¥"] = "$F0"
-char["/"] = "$F3"
-char[","] = "$F4"
-char["♀"] = "$F5"
-char["0"] = "$F6"
-char["1"] = "$F7"
-char["2"] = "$F8"
-char["3"] = "$F9"
-char["4"] = "$FA"
-char["5"] = "$FB"
-char["6"] = "$FC"
-char["7"] = "$FD"
-char["8"] = "$FE"
-char["9"] = "$FF"
-}
-
-# skip lines that actually do use ASCII in quotes
-tolower($1) ~ /section/ ||
-tolower($1) ~ /include/ ||
-tolower($1) ~ /incbin/
-
-!(tolower($1) ~ /section/ || tolower($1) ~ /include/ || tolower($1) ~ /incbin/) {
-i = 1
-ORS = ""
-
-while (i <= NF) {
-if (i % 2 == 1)
- print $(i)
-else {
- f = $(i)
- while (f != "") {
- c = substr(f,1,1)
- f = substr(f,2,length(f) - 1)
- if (c > "𐀀") { # U+10000
- c = c substr(f,1,3)
- f = substr(f,4,length(f) - 3)
- } else if (c > "ࠀ") { # U+0800
- c = c substr(f,1,2)
- f = substr(f,3,length(f) - 2)
- } else if (c > "") { # U+0080
- c = c substr(f,1,1)
- f = substr(f,2,length(f) - 1)
- }
-
- if (c == "'") {
- if (substr(f,1,1) == "m" ||
- substr(f,1,1) == "r" ||
- substr(f,1,1) == "t" ||
- substr(f,1,1) == "s" ||
- substr(f,1,1) == "v" ||
- substr(f,1,1) == "d" ||
- substr(f,1,1) == "l") {
- c = c substr(f,1,1)
- f = substr(f,2,length(f) - 1)
- }
- }
-
- print char[c]
- if (length(f))
- print ", "
- }
-}
-
-i = i + 1
-}
-print "\n"
-ORS = "\n"
-}
--- /dev/null
+++ b/textpre.py
@@ -1,0 +1,334 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+import sys
+
+chars = {
+"ガ": 0x05,
+"ギ": 0x06,
+"グ": 0x07,
+"ゲ": 0x08,
+"ゴ": 0x09,
+"ザ": 0x0A,
+"ジ": 0x0B,
+"ズ": 0x0C,
+"ゼ": 0x0D,
+"ゾ": 0x0E,
+"ダ": 0x0F,
+"ヂ": 0x10,
+"ヅ": 0x11,
+"デ": 0x12,
+"ド": 0x13,
+"バ": 0x19,
+"ビ": 0x1A,
+"ブ": 0x1B,
+"ボ": 0x1C,
+"が": 0x26,
+"ぎ": 0x27,
+"ぐ": 0x28,
+"げ": 0x29,
+"ご": 0x2A,
+"ざ": 0x2B,
+"じ": 0x2C,
+"ず": 0x2D,
+"ぜ": 0x2E,
+"ぞ": 0x2F,
+"だ": 0x30,
+"ぢ": 0x31,
+"づ": 0x32,
+"で": 0x33,
+"ど": 0x34,
+"ば": 0x3A,
+"び": 0x3B,
+"ぶ": 0x3C,
+"べ": 0x3D,
+"ぼ": 0x3E,
+"パ": 0x40,
+"ピ": 0x41,
+"プ": 0x42,
+"ポ": 0x43,
+"ぱ": 0x44,
+"ぴ": 0x45,
+"ぷ": 0x46,
+"ぺ": 0x47,
+"ぽ": 0x48,
+"ア": 0x80,
+"イ": 0x81,
+"ウ": 0x82,
+"エ": 0x83,
+"ォ": 0x84,
+"カ": 0x85,
+"キ": 0x86,
+"ク": 0x87,
+"ケ": 0x88,
+"コ": 0x89,
+"サ": 0x8A,
+"シ": 0x8B,
+"ス": 0x8C,
+"セ": 0x8D,
+"ソ": 0x8E,
+"タ": 0x8F,
+"チ": 0x90,
+"ツ": 0x91,
+"テ": 0x92,
+"ト": 0x93,
+"ナ": 0x94,
+"ニ": 0x95,
+"ヌ": 0x96,
+"ネ": 0x97,
+"ノ": 0x98,
+"ハ": 0x99,
+"ヒ": 0x9A,
+"フ": 0x9B,
+"ホ": 0x9C,
+"マ": 0x9D,
+"ミ": 0x9E,
+"ム": 0x9F,
+"メ": 0xA0,
+"モ": 0xA1,
+"ヤ": 0xA2,
+"ユ": 0xA3,
+"ヨ": 0xA4,
+"ラ": 0xA5,
+"ル": 0xA6,
+"レ": 0xA7,
+"ロ": 0xA8,
+"ワ": 0xA9,
+"ヲ": 0xAA,
+"ン": 0xAB,
+"ッ": 0xAC,
+"ャ": 0xAD,
+"ュ": 0xAE,
+"ョ": 0xAF,
+"ィ": 0xB0,
+"あ": 0xB1,
+"い": 0xB2,
+"う": 0xB3,
+"え": 0xB4,
+"お": 0xB5,
+"か": 0xB6,
+"き": 0xB7,
+"く": 0xB8,
+"け": 0xB9,
+"こ": 0xBA,
+"さ": 0xBB,
+"し": 0xBC,
+"す": 0xBD,
+"せ": 0xBE,
+"そ": 0xBF,
+"た": 0xC0,
+"ち": 0xC1,
+"つ": 0xC2,
+"て": 0xC3,
+"と": 0xC4,
+"な": 0xC5,
+"に": 0xC6,
+"ぬ": 0xC7,
+"ね": 0xC8,
+"の": 0xC9,
+"は": 0xCA,
+"ひ": 0xCB,
+"ふ": 0xCC,
+"へ": 0xCD,
+"ほ": 0xCE,
+"ま": 0xCF,
+"み": 0xD0,
+"む": 0xD1,
+"め": 0xD2,
+"も": 0xD3,
+"や": 0xD4,
+"ゆ": 0xD5,
+"よ": 0xD6,
+"ら": 0xD7,
+"り": 0xD8,
+"る": 0xD9,
+"れ": 0xDA,
+"ろ": 0xDB,
+"わ": 0xDC,
+"を": 0xDD,
+"ん": 0xDE,
+"っ": 0xDF,
+"ゃ": 0xE0,
+"ゅ": 0xE1,
+"ょ": 0xE2,
+"ー": 0xE3,
+
+
+"@": 0x50,
+"#": 0x54,
+"…": 0x75,
+
+"┌": 0x79,
+"─": 0x7A,
+"┐": 0x7B,
+"│": 0x7C,
+"└": 0x7D,
+"┘": 0x7E,
+
+"№": 0x74,
+
+" ": 0x7F,
+"A": 0x80,
+"B": 0x81,
+"C": 0x82,
+"D": 0x83,
+"E": 0x84,
+"F": 0x85,
+"G": 0x86,
+"H": 0x87,
+"I": 0x88,
+"J": 0x89,
+"K": 0x8A,
+"L": 0x8B,
+"M": 0x8C,
+"N": 0x8D,
+"O": 0x8E,
+"P": 0x8F,
+"Q": 0x90,
+"R": 0x91,
+"S": 0x92,
+"T": 0x93,
+"U": 0x94,
+"V": 0x95,
+"W": 0x96,
+"X": 0x97,
+"Y": 0x98,
+"Z": 0x99,
+"(": 0x9A,
+")": 0x9B,
+":": 0x9C,
+";": 0x9D,
+"[": 0x9E,
+"]": 0x9F,
+"a": 0xA0,
+"b": 0xA1,
+"c": 0xA2,
+"d": 0xA3,
+"e": 0xA4,
+"f": 0xA5,
+"g": 0xA6,
+"h": 0xA7,
+"i": 0xA8,
+"j": 0xA9,
+"k": 0xAA,
+"l": 0xAB,
+"m": 0xAC,
+"n": 0xAD,
+"o": 0xAE,
+"p": 0xAF,
+"q": 0xB0,
+"r": 0xB1,
+"s": 0xB2,
+"t": 0xB3,
+"u": 0xB4,
+"v": 0xB5,
+"w": 0xB6,
+"x": 0xB7,
+"y": 0xB8,
+"z": 0xB9,
+"é": 0xBA,
+"'d": 0xBB,
+"'l": 0xBC,
+"'s": 0xBD,
+"'t": 0xBE,
+"'v": 0xBF,
+"'": 0xE0,
+"-": 0xE3,
+"'r": 0xE4,
+"'m": 0xE5,
+"?": 0xE6,
+"!": 0xE7,
+".": 0xE8,
+"♂": 0xEF,
+"¥": 0xF0,
+"×": 0xF1,
+"/": 0xF3,
+",": 0xF4,
+"♀": 0xF5,
+"0": 0xF6,
+"1": 0xF7,
+"2": 0xF8,
+"3": 0xF9,
+"4": 0xFA,
+"5": 0xFB,
+"6": 0xFC,
+"7": 0xFD,
+"8": 0xFE,
+"9": 0xFF
+
+}
+
+for l in sys.stdin:
+
+ # strip comments
+ line = l.partition(";")
+ i = 0
+ asm = ""
+ while i < len(line) and l[0] != ";":
+ asm = asm + line[i]
+ i = i + 1
+
+ # skip asm with no quotes
+ if "\"" not in asm:
+ sys.stdout.write(l)
+ continue
+
+ # split by quotes
+ asms = asm.split("\"")
+
+ # skip asm that actually does use ASCII in quotes
+ lowasm = asms[0].lower()
+ if "section" in lowasm \
+ or "include" in lowasm \
+ or "incbin" in lowasm:
+ sys.stdout.write(l)
+ continue
+
+ even = False
+ i = 0
+ for token in asms:
+ i = i + 1
+ if even:
+ # token is a string to convert to byte values
+
+ while len(token):
+ # read a single UTF-8 codepoint
+ char = token[0]
+ if ord(char) >= 0xFC:
+ char = char + token[1:6]
+ token = token[6:]
+ elif ord(char) >= 0xF8:
+ char = char + token[1:5]
+ token = token[5:]
+ elif ord(char) >= 0xF0:
+ char = char + token[1:4]
+ token = token[4:]
+ elif ord(char) >= 0xE0:
+ char = char + token[1:3]
+ token = token[3:]
+ elif ord(char) >= 0xC0:
+ char = char + token[1:2]
+ token = token[2:]
+ else:
+ token = token[1:]
+
+ # certain apostrophe-letter pairs are only a single byte
+ if char == "'" and \
+ (token[0] == "d" or \
+ token[0] == "l" or \
+ token[0] == "m" or \
+ token[0] == "r" or \
+ token[0] == "s" or \
+ token[0] == "t" or \
+ token[0] == "v"):
+ char = char + token[0]
+ token = token[1:]
+
+ sys.stdout.write("${0:02X}".format(chars[char]))
+
+ if len(token):
+ sys.stdout.write(", ")
+
+ else:
+ sys.stdout.write(token)
+ even = not even