diff options
author | Háčky <hatschky@gmail.com> | 2014-11-22 05:11:37 +0000 |
---|---|---|
committer | Háčky <hatschky@gmail.com> | 2014-11-22 05:11:37 +0000 |
commit | 17853b802692237d98f96d1a80caf2019f71753e (patch) | |
tree | 33f46a489cd33e855656ee87260ef370b7d3ad43 | |
parent | b9edbfa98b685e5d9fcf62de2abe23f0d9dde6e9 (diff) |
Add German Eon Ticket script from debug version
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | eonticket/00-C000-de.asm | 3 | ||||
-rw-r--r-- | eonticket/00-C000-en.asm | 3 | ||||
-rw-r--r-- | eonticket/00-C000.asm | 13 | ||||
-rw-r--r-- | eonticket/Makefile | 19 | ||||
-rw-r--r-- | eonticket/eonticket-de.asm | 3 | ||||
-rw-r--r-- | eonticket/eonticket-en.asm | 3 | ||||
-rw-r--r-- | eonticket/eonticket.asm | 66 | ||||
-rw-r--r-- | macros.asm | 4 | ||||
-rw-r--r-- | scripts/charmap.py | 10 |
10 files changed, 92 insertions, 34 deletions
@@ -3,4 +3,4 @@ Pokémon Card e This is a disassembly of the e-Reader cards released for Pokémon Ruby and Sapphire. Currently, it includes the English release of the Pokémon Battle e series, and the Eon Ticket. -RGBDS is needed to compile the Z80 binary for each card. To build a working e-Reader card, you will need to compress the binary with nevpk and add the card metadata with nedcenc—both tools are from the nedclib package, which is unfortunately Windows-only.
\ No newline at end of file +RGBDS is needed to compile the Z80 binary for each card. To build a working e-Reader card, you will need to compress the binary and add the card metadata using nedcmake from the nedclib package, which is unfortunately Windows-only.
\ No newline at end of file diff --git a/eonticket/00-C000-de.asm b/eonticket/00-C000-de.asm new file mode 100644 index 0000000..14f3edc --- /dev/null +++ b/eonticket/00-C000-de.asm @@ -0,0 +1,3 @@ +INCLUDE "../macros.asm" +REGION EQU REGION_DE +INCLUDE "00-C000.tx"
\ No newline at end of file diff --git a/eonticket/00-C000-en.asm b/eonticket/00-C000-en.asm new file mode 100644 index 0000000..75049cf --- /dev/null +++ b/eonticket/00-C000-en.asm @@ -0,0 +1,3 @@ +INCLUDE "../macros.asm" +REGION EQU REGION_EN +INCLUDE "00-C000.tx"
\ No newline at end of file diff --git a/eonticket/00-C000.asm b/eonticket/00-C000.asm index c90b15d..5251364 100644 --- a/eonticket/00-C000.asm +++ b/eonticket/00-C000.asm @@ -1,5 +1,3 @@ -INCLUDE "../macros.asm" - SECTION "eonticket",ROM0[$100] jp Start db $00 @@ -16,15 +14,19 @@ Prologue: Text "e reader" ; no string terminator db 0,0,0,0,$01,$55 db 0,0,0,0 - db REGION_EN + db REGION db 0 db "GameFreak inc." db 0,0 DataPacket: ; 164a - Insert_Header REGION_EN + Insert_Header REGION db MULTIPLE_DATA - INCBIN "eonticket.bin" + IF REGION == REGION_DE + INCBIN "eonticket-de.bin" + ELSE + INCBIN "eonticket-en.bin" + ENDC db 0,0,0 ; padding INCLUDE "../common/mem_struct.asm" @@ -142,7 +144,6 @@ Start: ; 1ae2 API $0C6 DrawText RegionHandlePtr, Instructions1, 8, 4 - API $08D INCLUDE "../common/wait_for_link.asm" diff --git a/eonticket/Makefile b/eonticket/Makefile index 86be2c4..4644780 100644 --- a/eonticket/Makefile +++ b/eonticket/Makefile @@ -1,23 +1,30 @@ -all: 00-C000.z80 +all: 00-C000-de.z80 00-C000-en.z80 + +eonticket-%.tx: eonticket.asm + python ../scripts/charmap.py $< $@ %.tx: %.asm python ../scripts/charmap.py $< $@ -00-C000.o: 00-C000.tx eonticket.bin +00-C000-%.o: 00-C000-%.asm 00-C000.tx eonticket-%.bin rgbasm -o $@ $< -eonticket.o: eonticket.tx +eonticket-%.o: eonticket-%.asm eonticket-%.tx rgbasm -o $@ $< %.gbc: %.o rgblink -o $@ $< # hack to use RGBDS for something other than its intended purpose -00-C000.z80: 00-C000.gbc +00-C000-de.z80: 00-C000-de.gbc + dd if=$< of=$@ bs=1 skip=256 count=7134 +00-C000-en.z80: 00-C000-en.gbc dd if=$< of=$@ bs=1 skip=256 count=7074 # cmp -b ../z80/$@ $@ -eonticket.z80: eonticket.gbc +eonticket-de.z80: eonticket-de.gbc + dd if=$< of=$@ bs=1 skip=256 count=691 +eonticket-en.z80: eonticket-en.gbc dd if=$< of=$@ bs=1 skip=256 count=631 -eonticket.bin: eonticket.z80 +eonticket-%.bin: eonticket-%.z80 python ../scripts/scriptchecksum.py $< $@ clean: diff --git a/eonticket/eonticket-de.asm b/eonticket/eonticket-de.asm new file mode 100644 index 0000000..0599e6c --- /dev/null +++ b/eonticket/eonticket-de.asm @@ -0,0 +1,3 @@ +INCLUDE "../macros.asm" +REGION EQU REGION_DE +INCLUDE "eonticket-de.tx"
\ No newline at end of file diff --git a/eonticket/eonticket-en.asm b/eonticket/eonticket-en.asm new file mode 100644 index 0000000..a2ffc9f --- /dev/null +++ b/eonticket/eonticket-en.asm @@ -0,0 +1,3 @@ +INCLUDE "../macros.asm" +REGION EQU REGION_EN +INCLUDE "eonticket-en.tx"
\ No newline at end of file diff --git a/eonticket/eonticket.asm b/eonticket/eonticket.asm index 152e9de..5f4dafb 100644 --- a/eonticket/eonticket.asm +++ b/eonticket/eonticket.asm @@ -1,4 +1,3 @@ -INCLUDE "../macros.asm" INCLUDE "../constants/items.asm" INCLUDE "../constants/scriptcommands.asm" ScriptBaseAddress EQU ($100 - $1E) @@ -15,7 +14,11 @@ SECTION "packet",ROM0[$100] db MIX_RECORDS_ITEM db 1 ; ??? - db 30 ; distribution limit +IF REGION == REGION_DE + db 5 ; distribution limit +ELSE + db 30 ; distribution limit for English release +ENDC dw EON_TICKET @@ -25,8 +28,11 @@ SECTION "packet",ROM0[$100] db VARIABLE_LENGTH GoSeeYourFather: - Text "Go see your father at the GYM in\n" - Text "PETALBURG.@" + Text_DE "Lauf und besuche deinen Vater in der\n" + Text_DE "ARENA von BLÜTENBURG CITY.@" + + Text_EN "Go see your father at the GYM in\n" + Text_EN "PETALBURG.@" NormanScriptStart: setvirtualaddress NormanScriptStart @@ -68,23 +74,38 @@ NoRoomToGive: release end -; whoever wrote this text obviously wasn’t -; familiar with R/S’s character set… GoodToSeeYou: - Text "DAD“\v1! Good to see you!\n" - Text "There’s a letter here for you,\v1.@" + Text_DE "VATER: \v1! Schön, dich zu sehen!\n" + Text_DE "Hier ist ein Brief für dich, \v1.@" + + Text_EN "DAD“\v1! Good to see you!\n" + Text_EN "There’s a letter here for you,\v1.@" + AppearsToBeAFerryTicket: - Text "DAD“It appears to be a ferry TICKET.\n" - Text "but I’ve never seen one like it before.\l" - Text "You should visit LILYCOVE and ask\n" - Text "about it there.@" + Text_DE "VATER: Ich bin mir nicht sicher, es\n" + Text_DE "könnte ein TICKET für eine Fähre sein.\p" + Text_DE "Du solltest nach SEEGRASULB CITY gehen\n" + Text_DE "und dich dort genauer erkundigen.@" + + Text_EN "DAD“It appears to be a ferry TICKET.\n" + Text_EN "but I’ve never seen one like it before.\l" + Text_EN "You should visit LILYCOVE and ask\n" + Text_EN "about it there.@" + KeyItemsPocketIsFull: - Text "DAD“\v1’ the KEY ITEMS POCKET in\n" - Text "your BAG is full.\p" - Text "Move some key items for safekeeping\n" - Text "in your PC’ then come see me.@" -NormanScriptEnd: + Text_DE "VATER: \v1, die BASIS-TASCHE\n" + Text_DE "deines BEUTELS ist voll.\p" + Text_DE "Lagere einige deiner Basis-Items in\n" + Text_DE "deinem PC und komm dann wieder.@" + Text_EN "DAD“\v1’ the KEY ITEMS POCKET in\n" + Text_EN "your BAG is full.\p" + Text_EN "Move some key items for safekeeping\n" + Text_EN "in your PC’ then come see me.@" + +; whoever wrote the English text obviously wasn’t +; familiar with R/S’s character set… +NormanScriptEnd: PreloadScriptStart: setvirtualaddress PreloadScriptStart @@ -116,9 +137,14 @@ NoRoomForEvent: setbyte 3 end -; …or with the English language. MayBeplayedOnlyOnce: - Text "This EVENT may beplayed only once.@" + Text_DE "Dieses GESCHEHEN kann nur einmal\n" + Text_DE "gespielt werden.@" + +; …or with the English language. + Text_EN "This EVENT may beplayed only once.@" BagsKeyItemsPocketFull: - Text "Your BAG’s KEY ITEMS POCKET is full.@"
\ No newline at end of file + Text_DE "Deine BASIS-TASCHE ist voll.@" + + Text_EN "Your BAG’s KEY ITEMS POCKET is full.@"
\ No newline at end of file @@ -83,6 +83,10 @@ Insert_Header: MACRO REGION_JP EQU $01 REGION_EN EQU $02 +REGION_FR EQU $03 ; ? +REGION_IT EQU $04 ; ? +REGION_DE EQU $05 ; ! +REGION_ES EQU $07 ; ¿? ; types of card data VARIABLE_LENGTH EQU $02 diff --git a/scripts/charmap.py b/scripts/charmap.py index 7a2f224..cdf3d0a 100644 --- a/scripts/charmap.py +++ b/scripts/charmap.py @@ -416,6 +416,10 @@ chars = { ':': '\xF0', } +region = "" +if sys.argv[2][-6] == '-': + region = sys.argv[2][-5:-3].upper() + out = open(sys.argv[2], 'w') with open(sys.argv[1], 'r') as f: for asm in f: @@ -429,7 +433,11 @@ with open(sys.argv[1], 'r') as f: asms[0] = asms[0].replace("Text", "db") elif asms[0].strip() == "Tag_Text": pad_length = 45 - elif asms[0].find("OT_Name") == -1 and asms[0].find("Nickname") == -1 and asms[0].find("Insert_Prologue") == -1 and asms[0].find("Berry") == -1 and asms[0].find("Tag_Text") == -1: + elif asms[0].strip() == ("Text_" + region): + asms[0] = asms[0].replace("Text_" + region, "db") + elif asms[0].find("Text_") != -1: + asms[0] = ";" + elif asms[0].find("OT_Name") == -1 and asms[0].find("Nickname") == -1 and asms[0].find("Insert_Prologue") == -1 and asms[0].find("Berry") == -1: print_macro = False if print_macro: |