diff options
author | Háčky <hatschky@gmail.com> | 2014-11-27 07:15:45 +0000 |
---|---|---|
committer | Háčky <hatschky@gmail.com> | 2014-11-27 07:15:45 +0000 |
commit | 319ed6d0e0266f5f6174a5acd929914db8cfae1d (patch) | |
tree | 76408d9cadcbed1e702efa8c44f4cf5e364b0a4d /eonticket | |
parent | 17853b802692237d98f96d1a80caf2019f71753e (diff) |
Diffstat (limited to 'eonticket')
-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 | 44 | ||||
-rw-r--r-- | eonticket/Makefile | 49 | ||||
-rw-r--r-- | eonticket/eonticket-de.asm | 3 | ||||
-rw-r--r-- | eonticket/eonticket-en.asm | 3 | ||||
-rw-r--r-- | eonticket/eonticket.asm | 84 | ||||
-rw-r--r-- | eonticket/eonticket.md5 | 1 | ||||
-rw-r--r-- | eonticket/prologue.asm | 15 |
9 files changed, 106 insertions, 99 deletions
diff --git a/eonticket/00-C000-de.asm b/eonticket/00-C000-de.asm deleted file mode 100644 index 14f3edc..0000000 --- a/eonticket/00-C000-de.asm +++ /dev/null @@ -1,3 +0,0 @@ -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 deleted file mode 100644 index 75049cf..0000000 --- a/eonticket/00-C000-en.asm +++ /dev/null @@ -1,3 +0,0 @@ -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 5251364..32a66bf 100644 --- a/eonticket/00-C000.asm +++ b/eonticket/00-C000.asm @@ -1,3 +1,4 @@ +INCLUDE "../macros.asm" SECTION "eonticket",ROM0[$100] jp Start db $00 @@ -8,25 +9,10 @@ TicketPalette: ; 1604 INCLUDE "ticket.pal" Prologue: - db "GameFreak inc." - db 0,0,0,0,0,0 - dd 0 - Text "e reader" ; no string terminator - db 0,0,0,0,$01,$55 - db 0,0,0,0 - db REGION - db 0 - db "GameFreak inc." - db 0,0 + INCBIN "prologue-{REGION_NAME}.bin" DataPacket: ; 164a - Insert_Header REGION - db MULTIPLE_DATA - IF REGION == REGION_DE - INCBIN "eonticket-de.bin" - ELSE - INCBIN "eonticket-en.bin" - ENDC + INCBIN "eonticket-{REGION_NAME}.mev" db 0,0,0 ; padding INCLUDE "../common/mem_struct.asm" @@ -59,7 +45,7 @@ TicketDelivered: ; 1a2f ; this function is subtly different than the one ; on the Battle e cards, for no apparent reason TransferData: - LD_IND_HL $1ca2 + LD_IND_HL SomeVar1 push de ld hl, $bbbb LD_IND_HL Space_1 @@ -73,9 +59,9 @@ TransferData: ld b, $01 call WordShiftRight - LD_IND_HL $1ca7 + LD_IND_HL SomeVar2 .asm_1aa1 - LD_HL_IND $1ca7 + LD_HL_IND SomeVar2 ld a, l or h ret z @@ -90,12 +76,12 @@ TransferData: jr nc, .asm_1ad9 push de - LD_HL_IND $1ca2 + LD_HL_IND SomeVar1 ld c, [hl] inc hl ld b, [hl] inc hl - LD_IND_HL $1ca2 + LD_IND_HL SomeVar1 ld l, e ld h, $00 add hl, hl @@ -105,9 +91,9 @@ TransferData: inc hl ld [hl], b pop de - LD_HL_IND $1ca7 + LD_HL_IND SomeVar2 dec hl - LD_IND_HL $1ca7 + LD_IND_HL SomeVar2 ld a, l or h jr z, .asm_1ad9 @@ -181,8 +167,8 @@ INCLUDE "../common/wrap_up.asm" INCLUDE "../common/word_shift_right.asm" -EmulatorRAM: ; 1CA2 - ds 2 -RegionHandlePtr: ds 1 ; 1CA4 -SpriteHandlePtr: ds 2 ; 1CA5 -SomeVar1: ds 2 ; 1CA7
\ No newline at end of file +SomeVar1: ; 1CA2 + db $FF,0 ; mark EOF +RegionHandlePtr: db 0 ; 1CA4 +SpriteHandlePtr: db 0,0 ; 1CA5 +SomeVar2: db 0,0 ; 1CA7
\ No newline at end of file diff --git a/eonticket/Makefile b/eonticket/Makefile index 4644780..6492326 100644 --- a/eonticket/Makefile +++ b/eonticket/Makefile @@ -1,31 +1,36 @@ -all: 00-C000-de.z80 00-C000-en.z80 +all: 00-C000-DE.z80 00-C000-EN.z80 verify +verify: + md5sum --check eonticket.md5 eonticket-%.tx: eonticket.asm - python ../scripts/charmap.py $< $@ -%.tx: %.asm - python ../scripts/charmap.py $< $@ - -00-C000-%.o: 00-C000-%.asm 00-C000.tx eonticket-%.bin - rgbasm -o $@ $< -eonticket-%.o: eonticket-%.asm eonticket-%.tx + python ../scripts/regionalize.py $< $@ $* $* +eonticket-%.o: eonticket-%.tx rgbasm -o $@ $< +eonticket-%.gbc: eonticket-%.o + rgblink -o $@ $< +eonticket-%.bin: eonticket-%.gbc + python ../scripts/stripgbc.py $< $@ +eonticket-%.mev: eonticket-%.bin + python ../scripts/checksum.py $< $@ -%.gbc: %.o +prologue-%.tx: prologue.asm + python ../scripts/regionalize.py $< $@ $* $* +prologue-%.o: prologue-%.tx + rgbasm -o $@ $< +prologue-%.gbc: prologue-%.o rgblink -o $@ $< +prologue-%.bin: prologue-%.gbc + python ../scripts/stripgbc.py $< $@ -# hack to use RGBDS for something other than its intended purpose -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-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 - python ../scripts/scriptchecksum.py $< $@ +00-C000-%.tx: 00-C000.asm eonticket-%.mev prologue-%.bin + python ../scripts/ereadertext.py $< $@ $* +00-C000-%.o: 00-C000-%.tx + rgbasm -o $@ $< +00-C000-%.gbc: 00-C000-%.o + rgblink -o $@ $< +00-C000-%.z80: 00-C000-%.gbc + python ../scripts/stripgbc.py $< $@ clean: - rm -f *.tx *.o *.gbc *.z80 *.bin
\ No newline at end of file + rm -f *.tx *.o *.gbc *.z80 *.bin *.mev
\ No newline at end of file diff --git a/eonticket/eonticket-de.asm b/eonticket/eonticket-de.asm deleted file mode 100644 index 0599e6c..0000000 --- a/eonticket/eonticket-de.asm +++ /dev/null @@ -1,3 +0,0 @@ -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 deleted file mode 100644 index a2ffc9f..0000000 --- a/eonticket/eonticket-en.asm +++ /dev/null @@ -1,3 +0,0 @@ -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 5f4dafb..98f4e94 100644 --- a/eonticket/eonticket.asm +++ b/eonticket/eonticket.asm @@ -1,32 +1,39 @@ +INCLUDE "../macros.asm" INCLUDE "../constants/items.asm" INCLUDE "../constants/scriptcommands.asm" -ScriptBaseAddress EQU ($100 - $1E) -SECTION "packet",ROM0[$100] + Mystery_Event + db CHECKSUM_CRC + dd 0 ; checksum placeholder + GBAPTR DataStart + GBAPTR DataEnd +DataStart: db IN_GAME_SCRIPT db 8,1 ; Petalburg Gym db 1 ; Norman - GBAPTR ScriptBaseAddress, NormanScriptStart - GBAPTR ScriptBaseAddress, NormanScriptEnd + GBAPTR NormanScriptStart + GBAPTR NormanScriptEnd db MIX_RECORDS_ITEM db 1 ; ??? IF REGION == REGION_DE - db 5 ; distribution limit + db 5 ; distribution limit from German debug ROM ELSE - db 30 ; distribution limit for English release + db 30 ; distribution limit from English release ENDC dw EON_TICKET - db INSTANT_SCRIPT - GBAPTR ScriptBaseAddress, PreloadScriptStart + db PRELOAD_SCRIPT + GBAPTR PreloadScriptStart + + + db END_OF_CHUNKS - db VARIABLE_LENGTH GoSeeYourFather: Text_DE "Lauf und besuche deinen Vater in der\n" Text_DE "ARENA von BLÜTENBURG CITY.@" @@ -34,17 +41,18 @@ GoSeeYourFather: Text_EN "Go see your father at the GYM in\n" Text_EN "PETALBURG.@" + NormanScriptStart: setvirtualaddress NormanScriptStart checkitem EON_TICKET, 1 compare LASTRESULT, 1 - virtualgotoif 1, KillScript + virtualgotoif 1, .delete_script checkpcitem EON_TICKET, 1 compare LASTRESULT, 1 - virtualgotoif 1, KillScript + virtualgotoif 1, .delete_script checkflag $00CE - virtualgotoif 1, KillScript + virtualgotoif 1, .delete_script lock faceplayer @@ -64,7 +72,7 @@ NormanScriptStart: waitmsg waitkeypress release -KillScript: +.delete_script killscript NoRoomToGive: @@ -75,76 +83,80 @@ NoRoomToGive: end GoodToSeeYou: - 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_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_DE "VATER: \v1! Schön, dich zu sehen!\n" + Text_DE "Hier ist ein Brief für dich, \v1.@" +AppearsToBeAFerryTicket: 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_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_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.@" +KeyItemsPocketIsFull: 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.@" + 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.@" + ; whoever wrote the English text obviously wasn’t ; familiar with R/S’s character set… NormanScriptEnd: + PreloadScriptStart: setvirtualaddress PreloadScriptStart checkitem EON_TICKET, 1 compare LASTRESULT, 1 - virtualgotoif 1, Ineligible + virtualgotoif 1, .ineligible checkpcitem EON_TICKET, 1 compare LASTRESULT, 1 - virtualgotoif 1, Ineligible + virtualgotoif 1, .ineligible checkflag $00CE - virtualgotoif 1, Ineligible + virtualgotoif 1, .ineligible checkitemroom EON_TICKET, 1 compare LASTRESULT, 0 - virtualgotoif 1, NoRoomForEvent + virtualgotoif 1, .no_room virtualloadpointer GoSeeYourFather setbyte 2 end -Ineligible: +.ineligible virtualloadpointer MayBeplayedOnlyOnce setbyte 3 end -NoRoomForEvent: +.no_room virtualloadpointer BagsKeyItemsPocketFull setbyte 3 end MayBeplayedOnlyOnce: - 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.@" + Text_DE "Dieses GESCHEHEN kann nur einmal\n" + Text_DE "gespielt werden.@" + BagsKeyItemsPocketFull: + Text_EN "Your BAG’s KEY ITEMS POCKET is full.@" + Text_DE "Deine BASIS-TASCHE ist voll.@" - Text_EN "Your BAG’s KEY ITEMS POCKET is full.@"
\ No newline at end of file +DataEnd: + EOF
\ No newline at end of file diff --git a/eonticket/eonticket.md5 b/eonticket/eonticket.md5 new file mode 100644 index 0000000..cb426e5 --- /dev/null +++ b/eonticket/eonticket.md5 @@ -0,0 +1 @@ +901180e44767e19e5dc9d5df881fe123 00-C000-EN.z80 diff --git a/eonticket/prologue.asm b/eonticket/prologue.asm new file mode 100644 index 0000000..0db33e1 --- /dev/null +++ b/eonticket/prologue.asm @@ -0,0 +1,15 @@ +INCLUDE "../macros.asm" +SECTION "prologue", ROM0[$100] + + db "GameFreak inc." + db 0,0,0,0,0,0 + dd 0 + Text "e reader" ; no string terminator + db 0,0,0,0,$01,$55 + db 0,0,0,0 + db REGION + db 0 + db "GameFreak inc." + db 0,0 + + EOF
\ No newline at end of file |