mirror of
https://github.com/notblisy/RUBYSAPPHIREDLC.git
synced 2026-04-24 07:16:57 -05:00
Source code for Jirachi and Celebi tower fixes.
Celebis source code is actually significantly different and way better organized, so I uploaded this as well.
This commit is contained in:
parent
7ff3c12bae
commit
90ede960ea
174
SOURCE/Celebi No Tower Bug Em - Unlocked/00-C000.asm
Normal file
174
SOURCE/Celebi No Tower Bug Em - Unlocked/00-C000.asm
Normal file
|
|
@ -0,0 +1,174 @@
|
|||
INCLUDE "../macros.asm"
|
||||
SECTION "eonticket",ROM0[$100]
|
||||
jp Start
|
||||
db $00
|
||||
|
||||
TicketSprite: ; 104
|
||||
INCBIN "celebis.bin"
|
||||
TicketPalette: ; 1604
|
||||
INCBIN "celebispal.bin"
|
||||
|
||||
Prologue:
|
||||
INCBIN "prologue-{REGION_NAME}.bin"
|
||||
|
||||
DataPacket: ; 164a
|
||||
INCBIN "eonticket-{REGION_NAME}.mev"
|
||||
db 0,0,0 ; padding
|
||||
|
||||
INCLUDE "../common/mem_struct.asm"
|
||||
|
||||
SpriteData:
|
||||
dw TicketSprite,TicketPalette
|
||||
db $07,$07,$01,$01,$01,$01,$01 ; 64 x 64 size
|
||||
|
||||
Instructions1: ; 1921
|
||||
db "Link e-Reader to Pokémon Emerald\n"
|
||||
db "and use MYSTERY EVENTS by talking\n"
|
||||
db "to the MYSTERY GIFT MAN\n"
|
||||
db "Press the B Button to cancel.\0"
|
||||
|
||||
Instructions2: ; 199d
|
||||
db "Press the A Button on the Game Boy\n"
|
||||
db "Advance containing Pokémon Emerald\n"
|
||||
db "to begin sending the UNLOCKED\n"
|
||||
db "CELEBI EVENT.\0"
|
||||
|
||||
DeliveryInProcess: ; 1a0d
|
||||
db "UNLOCKED EVENT delivery in Progress\0"
|
||||
|
||||
TicketDelivered: ; 1a2f
|
||||
db "UNLOCKED CELEBI EVENT delivered!\n"
|
||||
db "\n"
|
||||
db "Press the A Button to resend.\n"
|
||||
db "Press the B Button to cancel.\0"
|
||||
|
||||
; this function is subtly different than the one
|
||||
; on the Battle e cards, for no apparent reason
|
||||
TransferData:
|
||||
LD_IND_HL SomeVar1
|
||||
push de
|
||||
ld hl, $bbbb
|
||||
LD_IND_HL Space_1
|
||||
EX_DE_HL
|
||||
LD_IND_HL Space_2
|
||||
API_0C7 Space_1
|
||||
|
||||
wait $01
|
||||
pop hl
|
||||
inc hl
|
||||
ld b, $01
|
||||
call WordShiftRight
|
||||
|
||||
LD_IND_HL SomeVar2
|
||||
.asm_1aa1
|
||||
LD_HL_IND SomeVar2
|
||||
ld a, l
|
||||
or h
|
||||
ret z
|
||||
|
||||
ld hl, $8888
|
||||
LD_IND_HL Space_1
|
||||
ld e, $01
|
||||
|
||||
.asm_1aaf
|
||||
ld a, e
|
||||
cp $08
|
||||
jr nc, .asm_1ad9
|
||||
|
||||
push de
|
||||
LD_HL_IND SomeVar1
|
||||
ld c, [hl]
|
||||
inc hl
|
||||
ld b, [hl]
|
||||
inc hl
|
||||
LD_IND_HL SomeVar1
|
||||
ld l, e
|
||||
ld h, $00
|
||||
add hl, hl
|
||||
ld de, Space_1
|
||||
add hl, de
|
||||
ld [hl], c
|
||||
inc hl
|
||||
ld [hl], b
|
||||
pop de
|
||||
LD_HL_IND SomeVar2
|
||||
dec hl
|
||||
LD_IND_HL SomeVar2
|
||||
ld a, l
|
||||
or h
|
||||
jr z, .asm_1ad9
|
||||
|
||||
inc e
|
||||
jr .asm_1aaf
|
||||
|
||||
.asm_1ad9
|
||||
API_0C7 Space_1
|
||||
wait $01
|
||||
jr .asm_1aa1
|
||||
|
||||
Start: ; 1ae2
|
||||
API_121
|
||||
|
||||
CreateCustomSprite SpriteHandlePtr, $80, SpriteData
|
||||
SetSpritePos SpriteHandlePtr, 120, 64
|
||||
SpriteHide SpriteHandlePtr
|
||||
|
||||
CreateRegion RegionHandlePtr, 30, 6, 0, 14, 0, 4
|
||||
|
||||
ld h, a
|
||||
ld l, $00
|
||||
SetTextSize
|
||||
|
||||
API_09B RegionHandlePtr, $0102
|
||||
SetTextColor RegionHandlePtr, 2, 0
|
||||
SetRegionColor RegionHandlePtr, 0
|
||||
SetBackgroundPalette 16, $0040, TicketPalette
|
||||
|
||||
FadeIn 16
|
||||
wait 16
|
||||
|
||||
API $0C6
|
||||
|
||||
DrawText RegionHandlePtr, Instructions1, 8, 4
|
||||
API $08D
|
||||
|
||||
INCLUDE "../common/wait_for_link.asm"
|
||||
|
||||
SpriteShow SpriteHandlePtr
|
||||
|
||||
DrawText RegionHandlePtr, Instructions2, 8, 4
|
||||
API $08D
|
||||
|
||||
ld a, b
|
||||
nop
|
||||
|
||||
UNKNOWN_VALUE EQU $0078
|
||||
INCLUDE "../common/wait_for_ready.asm"
|
||||
|
||||
DrawText RegionHandlePtr, DeliveryInProcess, 8, 4
|
||||
|
||||
DATA_TRANSFER_LENGTH EQU 6144
|
||||
INCLUDE "../common/transfer_data.asm"
|
||||
ld hl, $5fff
|
||||
LD_IND_HL Space_1
|
||||
API_0C7 Space_1
|
||||
|
||||
wait $80
|
||||
|
||||
SpriteHide SpriteHandlePtr
|
||||
|
||||
DrawText RegionHandlePtr, TicketDelivered, 8, 4
|
||||
|
||||
API $08D
|
||||
ld c, a
|
||||
nop
|
||||
|
||||
INCLUDE "../common/wrap_up.asm"
|
||||
|
||||
INCLUDE "../common/word_shift_right.asm"
|
||||
|
||||
SomeVar1: ; 1CA2
|
||||
db $FF,0 ; mark EOF
|
||||
RegionHandlePtr: db 0 ; 1CA4
|
||||
SpriteHandlePtr: db 0,0 ; 1CA5
|
||||
SomeVar2: db 0,0 ; 1CA7
|
||||
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/00-C000.raw
Normal file
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/00-C000.raw
Normal file
Binary file not shown.
Binary file not shown.
40
SOURCE/Celebi No Tower Bug Em - Unlocked/Makefile
Normal file
40
SOURCE/Celebi No Tower Bug Em - Unlocked/Makefile
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
all: 00-C000-EN.raw verify
|
||||
verify:
|
||||
md5sum --check eonticket.md5
|
||||
|
||||
|
||||
eonticket-%.tx: eonticket.asm
|
||||
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 $< $@
|
||||
|
||||
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 $< $@
|
||||
|
||||
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 $< $@
|
||||
00-C000-%.vpk: 00-C000-%.z80
|
||||
./nevpk -c -i $< -o $@
|
||||
00-C000-%.raw: 00-C000-%.vpk
|
||||
./nedcmake -i $< -o $@ -type 1 -region 1
|
||||
|
||||
clean:
|
||||
rm -f *.tx *.o *.gbc *.z80 *.bin *.mev *.vpk *.raw
|
||||
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/Spr_3r_251.img.bin
Normal file
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/Spr_3r_251.img.bin
Normal file
Binary file not shown.
|
|
@ -0,0 +1 @@
|
|||
_F9W˙ýk¸SO;č"$˙µîr'f€Y|Ö^ÍA
|
||||
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/arm-none-eabi-as.exe
Normal file
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/arm-none-eabi-as.exe
Normal file
Binary file not shown.
|
|
@ -0,0 +1,3 @@
|
|||
Start:
|
||||
PUSH {LR}
|
||||
PUSH {r0-r7}
|
||||
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/celebirng.arm
Normal file
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/celebirng.arm
Normal file
Binary file not shown.
152
SOURCE/Celebi No Tower Bug Em - Unlocked/celebirng.txt
Normal file
152
SOURCE/Celebi No Tower Bug Em - Unlocked/celebirng.txt
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
Start:
|
||||
PUSH {LR}
|
||||
PUSH {r0-r7}
|
||||
ColoRNGAlgo:
|
||||
ldr r2, gRNGValue
|
||||
ldr r1, [r2]
|
||||
ldr r0, TempCelebiLocation
|
||||
ldr r3, ColoMult
|
||||
ldr r4, ColoAdd
|
||||
mul r1, r3 @Colo RNG for IV1
|
||||
add r1, r4
|
||||
lsl r2, r1, #1 @bitshift and stores result into r0
|
||||
lsr r2, r2, #17
|
||||
mul r1, r3 @Colo RNG for IV2
|
||||
add r1, r4
|
||||
lsl r5, r1, #1
|
||||
lsr r5, r5, #17
|
||||
lsl r5, r5, #15
|
||||
ORR r2, r5
|
||||
str r2, [r0, #72] @combine and store IVs into Pokemon
|
||||
mul r1, r3 @Blank RNG for ability
|
||||
add r1, r4
|
||||
ldr r6, CelebiOTID
|
||||
SHINYLOCKSTART:
|
||||
mul r1, r3 @RNG for PID1
|
||||
add r1, r4
|
||||
lsr r2, r1, #16
|
||||
mul r1, r3 @RNG for PID2
|
||||
add r1, r4
|
||||
lsr r5, r1, #16
|
||||
EOR r6, r2
|
||||
EOR r6, r5
|
||||
cmp r6, #7
|
||||
bls SHINYLOCKSTART @comment this out to remove shinylock
|
||||
strh r2, [r0, #2] @Store PID in proper spot.
|
||||
strh r5, [r0, #0]
|
||||
MemoryCopyCelebi:
|
||||
ldr r1, gEnemyParty
|
||||
ldr r2, UnencryptedCopyLengthInfo
|
||||
SWI 11
|
||||
ldr r0, TempCelebiLocation
|
||||
ldr r5, SubstructureTable
|
||||
ldr r0, [r0]
|
||||
mov r1, #24
|
||||
mov r7, r0
|
||||
swi #06
|
||||
mov r0, r7
|
||||
cmp r0, #0
|
||||
bpl EndCorrectionMath
|
||||
add r1, #16
|
||||
cmp r1, #0
|
||||
bpl EndCorrectionMath
|
||||
add r1, #24
|
||||
EndCorrectionMath:
|
||||
add r5, r1
|
||||
ldrb r6, [r5]
|
||||
ldr r0, TempCelebiLocation
|
||||
mov r7, #3 @loop counter setup
|
||||
mov r4, #12
|
||||
mov r5, #3
|
||||
add r0, #32 @Substructure start location for TempCelebiLocation
|
||||
SubstructureCopyLoop:
|
||||
ldr r1, gEnemyParty @destination of substructures
|
||||
add r1, #32 @adding 32 to make substructure enemy ram celebi gEnemyParty
|
||||
ldr r2, SubstructureCopyLengthInfo
|
||||
mov r3, r6
|
||||
and r3, r5
|
||||
mul r3, r4
|
||||
add r1, r3
|
||||
swi #11
|
||||
lsr r6, #2
|
||||
sub r7, #1
|
||||
bpl SubstructureCopyLoop
|
||||
lsl r0, r0, #0
|
||||
FixCelebi:
|
||||
mov r4, pc
|
||||
add r4, #9
|
||||
mov lr, r4
|
||||
ldr r0, gEnemyParty
|
||||
ldr r3, CalculateBoxMonChecksum
|
||||
bx r3
|
||||
ldr r1, gEnemyParty
|
||||
strh r0, [r1, #28]
|
||||
mov r4, pc
|
||||
add r4, #9
|
||||
mov lr, r4
|
||||
mov r0, r1
|
||||
ldr r3, EncryptBoxMon
|
||||
bx r3
|
||||
mov r4, pc
|
||||
add r4, #9
|
||||
mov lr, r4
|
||||
ldr r0, gEnemyParty
|
||||
ldr r3, CalculateMonStats
|
||||
bx r3
|
||||
ldr r0, gEnemyParty
|
||||
ldr r1, TempCelebiLocation
|
||||
ldr r2, UnencryptedCopyLengthInfo
|
||||
add r2, #12
|
||||
swi #11
|
||||
pop {r0-r7, pc}
|
||||
CaptureCelebi:
|
||||
PUSH {LR}
|
||||
PUSH {r0-r7}
|
||||
ldr r0, TempCelebiLocation @Copy entire celebi over pre-battle
|
||||
ldr r1, gPlayerParty
|
||||
ldr r2, UnencryptedCopyLengthInfo
|
||||
add r2, #12
|
||||
mov r6, #100 @this section figures out party position
|
||||
ldr r3, gSpecialVar_0x800B @party size stored in special var, times 100
|
||||
ldrb r7, [r3] @add result to destination
|
||||
mul r7, r6
|
||||
add r1, r7
|
||||
swi #11
|
||||
ldr r0, gEnemyParty @this copies stuff to keep nickname
|
||||
ldr r1, gPlayerParty
|
||||
mov r2, #5
|
||||
add r1, r7
|
||||
add r0, #8
|
||||
add r1, #8
|
||||
swi #11
|
||||
pop {r0-r7, pc}
|
||||
.align
|
||||
gRNGValue:
|
||||
.long 0x03005d80
|
||||
ColoMult:
|
||||
.long 0x000343FD
|
||||
ColoAdd:
|
||||
.long 0x00269EC3
|
||||
TempCelebiLocation:
|
||||
.long 0x0203ABE0
|
||||
SubstructureTable:
|
||||
.long 0x0203AC30 @Change Later
|
||||
gPlayerParty:
|
||||
.long 0x020244ec
|
||||
gEnemyParty:
|
||||
.long 0x02024744
|
||||
UnencryptedCopyLengthInfo:
|
||||
.long 0x04000008
|
||||
SubstructureCopyLengthInfo:
|
||||
.long 0x04000003
|
||||
CalculateBoxMonChecksum:
|
||||
.long 0x08068c79
|
||||
EncryptBoxMon:
|
||||
.long 0x0806a229
|
||||
CalculateMonStats:
|
||||
.long 0x08068d0d
|
||||
CelebiOTID:
|
||||
.long 0x00007991
|
||||
gSpecialVar_0x800B:
|
||||
.long 0x020375ee @Player Party Size
|
||||
|
||||
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/celebis.bin
Normal file
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/celebis.bin
Normal file
Binary file not shown.
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/celebispal.bin
Normal file
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/celebispal.bin
Normal file
Binary file not shown.
213
SOURCE/Celebi No Tower Bug Em - Unlocked/eonticket.asm
Normal file
213
SOURCE/Celebi No Tower Bug Em - Unlocked/eonticket.asm
Normal file
|
|
@ -0,0 +1,213 @@
|
|||
INCLUDE "../macros.asm"
|
||||
INCLUDE "../constants/items.asm"
|
||||
INCLUDE "../constants/scriptcommandscelebinotowerUnlocked.asm"
|
||||
|
||||
Mystery_Event
|
||||
|
||||
db CHECKSUM_CRC
|
||||
dd 0 ; checksum placeholder
|
||||
GBAPTR DataStart
|
||||
GBAPTR DataEnd
|
||||
|
||||
DataStart:
|
||||
db IN_GAME_SCRIPT
|
||||
db 24,11 ; petalburg gym
|
||||
db 2 ; norman
|
||||
GBAPTR NormanScriptStart
|
||||
GBAPTR NormanScriptEnd
|
||||
|
||||
db PRELOAD_SCRIPT
|
||||
GBAPTR PreloadScriptStart
|
||||
|
||||
db END_OF_CHUNKS
|
||||
|
||||
PreloadScriptStart:
|
||||
setvirtualaddress PreloadScriptStart
|
||||
|
||||
callasm $0201C045
|
||||
|
||||
virtualloadpointer GoSeeYourFather
|
||||
|
||||
setbyte 2
|
||||
|
||||
dw $0000
|
||||
|
||||
end
|
||||
|
||||
WriteFlashMemory
|
||||
|
||||
CelebiScriptStart:
|
||||
setvirtualaddress CelebiScriptStart
|
||||
db $00
|
||||
dw $0000
|
||||
virtualmsgbox Poor
|
||||
waitmsg
|
||||
db $6E, $17, $8
|
||||
release
|
||||
|
||||
compare LASTRESULT, 0
|
||||
|
||||
virtualgotoif 1, Changemind
|
||||
|
||||
virtualgotoif 5, CelebiEvent
|
||||
|
||||
|
||||
db $00
|
||||
|
||||
TEMPCELEBI
|
||||
STRUCTURETABLECOMPRESSED
|
||||
LOADSTOREPARTYAMOUNT
|
||||
CelebiRNGAlgo2
|
||||
|
||||
|
||||
|
||||
|
||||
CelebiEvent:
|
||||
db $43
|
||||
|
||||
compare LASTRESULT, 5
|
||||
|
||||
virtualgotoif 2, NoRoom
|
||||
|
||||
copyvar $800B, $800D
|
||||
|
||||
setwildbattle $F4, $30, $00
|
||||
|
||||
callasm $0203AC5D ;Colo RNG
|
||||
|
||||
special $13F
|
||||
|
||||
sound $13
|
||||
|
||||
waitstate
|
||||
|
||||
playmoncry $FB, $0
|
||||
|
||||
virtualmsgbox Celebi
|
||||
|
||||
waitmsg
|
||||
|
||||
waitmoncry
|
||||
|
||||
waitkeypress
|
||||
|
||||
release
|
||||
|
||||
special $145
|
||||
|
||||
playsong $0166, $0
|
||||
|
||||
waitmoncry
|
||||
|
||||
waitstate
|
||||
|
||||
db $43
|
||||
|
||||
comparevar LASTRESULT, $800B
|
||||
|
||||
virtualgotoif 3, FlewAway
|
||||
|
||||
virtualgotoif 2, Catch
|
||||
|
||||
|
||||
|
||||
|
||||
Catch:
|
||||
callasm $0203AD19
|
||||
killscript
|
||||
|
||||
|
||||
|
||||
NoRoom:
|
||||
virtualmsgbox NoSpace
|
||||
waitmsg
|
||||
waitkeypress
|
||||
release
|
||||
end
|
||||
|
||||
Changemind:
|
||||
virtualmsgbox Change
|
||||
waitmsg
|
||||
waitkeypress
|
||||
release
|
||||
end
|
||||
|
||||
|
||||
NoRoomToGive:
|
||||
virtualloadpointer PartyFull
|
||||
setbyte 3
|
||||
killscript
|
||||
|
||||
FlewAway:
|
||||
db $97, $01
|
||||
db $97, $00
|
||||
virtualmsgbox Flew
|
||||
waitmsg
|
||||
waitkeypress
|
||||
release
|
||||
end
|
||||
|
||||
PartyFull:
|
||||
Text_EN "You need space in your party\n"
|
||||
Text_EN "to play this MYSTERY EVENT!@"
|
||||
Poor:
|
||||
Text_EN "A Pokemon is rustling around\n"
|
||||
Text_EN "in this tree.\p"
|
||||
Text_EN "Would you like to investigate?@"
|
||||
Change:
|
||||
Text_EN "Maybe another time.@"
|
||||
Flew:
|
||||
Text_EN "The CELEBI flew away!@"
|
||||
|
||||
NoSpace:
|
||||
Text_EN "You need space in your party\n"
|
||||
Text_EN "to capture CELEBI!@"
|
||||
|
||||
Celebi:
|
||||
Text_EN "CELEBI: Biyoo!@"
|
||||
|
||||
GoSeeYourFather:
|
||||
Text_EN "A bright flash was seen in\n"
|
||||
Text_EN "PETALBURG WOODS!\p"
|
||||
Text_EN "Ever since, a rare Pokemon has\n"
|
||||
Text_EN "been seen healing thin trees.@"
|
||||
|
||||
|
||||
|
||||
NormanScriptStart:
|
||||
|
||||
|
||||
writebytetoaddr $1E, $2024744
|
||||
writebytetoaddr $20, $2024745
|
||||
writebytetoaddr $01, $2024746
|
||||
writebytetoaddr $49, $2024747
|
||||
writebytetoaddr $01, $2024748
|
||||
writebytetoaddr $4B, $2024749
|
||||
writebytetoaddr $18, $202474A
|
||||
writebytetoaddr $47, $202474B
|
||||
writebytetoaddr $BC, $202474C
|
||||
writebytetoaddr $AB, $202474D
|
||||
writebytetoaddr $03, $202474E
|
||||
writebytetoaddr $02, $202474F
|
||||
writebytetoaddr $4D, $2024750
|
||||
writebytetoaddr $31, $2024751
|
||||
writebytetoaddr $15, $2024752
|
||||
writebytetoaddr $08, $2024753
|
||||
|
||||
callasm $02024745 ;readflash
|
||||
|
||||
goto $0203abbc
|
||||
|
||||
|
||||
NormanScriptEnd:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DataEnd:
|
||||
EOF
|
||||
|
||||
1
SOURCE/Celebi No Tower Bug Em - Unlocked/eonticket.md5
Normal file
1
SOURCE/Celebi No Tower Bug Em - Unlocked/eonticket.md5
Normal file
|
|
@ -0,0 +1 @@
|
|||
901180e44767e19e5dc9d5df881fe123 00-C000-EN.z80
|
||||
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/icon.4bpp
Normal file
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/icon.4bpp
Normal file
Binary file not shown.
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/nedclib.dll
Normal file
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/nedclib.dll
Normal file
Binary file not shown.
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/nedcmake
Normal file
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/nedcmake
Normal file
Binary file not shown.
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/nevpk
Normal file
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/nevpk
Normal file
Binary file not shown.
1
SOURCE/Celebi No Tower Bug Em - Unlocked/normal.gbapal
Normal file
1
SOURCE/Celebi No Tower Bug Em - Unlocked/normal.gbapal
Normal file
|
|
@ -0,0 +1 @@
|
|||
9.º5&¿BNW<4E>N‡-*!sB1d»qÏ)kÿc
|
||||
15
SOURCE/Celebi No Tower Bug Em - Unlocked/prologue.asm
Normal file
15
SOURCE/Celebi No Tower Bug Em - Unlocked/prologue.asm
Normal file
|
|
@ -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
|
||||
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/readflash.arm
Normal file
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/readflash.arm
Normal file
Binary file not shown.
11
SOURCE/Celebi No Tower Bug Em - Unlocked/readflash.txt
Normal file
11
SOURCE/Celebi No Tower Bug Em - Unlocked/readflash.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
Start:
|
||||
mov r0, #30
|
||||
ldr r1, gSaveDataBuffer
|
||||
ldr r3, ReadFlashSector
|
||||
bx r3
|
||||
.align
|
||||
gSaveDataBuffer:
|
||||
.long 0x0203abbc
|
||||
ReadFlashSector:
|
||||
.long 0x0815314d
|
||||
|
||||
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/rgbasm
Normal file
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/rgbasm
Normal file
Binary file not shown.
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/rgblink
Normal file
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/rgblink
Normal file
Binary file not shown.
1
SOURCE/Celebi No Tower Bug Em - Unlocked/shiny.gbapal
Normal file
1
SOURCE/Celebi No Tower Bug Em - Unlocked/shiny.gbapal
Normal file
|
|
@ -0,0 +1 @@
|
|||
9Wÿs¿s?c<>N»Aõ ÿwwM/É"E›lÖ^ÍAÆ
|
||||
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/storeunusedlocation.arm
Normal file
BIN
SOURCE/Celebi No Tower Bug Em - Unlocked/storeunusedlocation.arm
Normal file
Binary file not shown.
|
|
@ -0,0 +1,11 @@
|
|||
Start:
|
||||
mov r0, #30
|
||||
ldr r1, WRAMLocation
|
||||
ldr r2, TryWriteSector
|
||||
bx r2
|
||||
.align
|
||||
WRAMLocation:
|
||||
.long 0x0200005C
|
||||
TryWriteSector:
|
||||
.long 0x08152909
|
||||
|
||||
174
SOURCE/Celebi No Tower Bug Em/00-C000.asm
Normal file
174
SOURCE/Celebi No Tower Bug Em/00-C000.asm
Normal file
|
|
@ -0,0 +1,174 @@
|
|||
INCLUDE "../macros.asm"
|
||||
SECTION "eonticket",ROM0[$100]
|
||||
jp Start
|
||||
db $00
|
||||
|
||||
TicketSprite: ; 104
|
||||
INCBIN "Spr_3r_251.img.bin"
|
||||
TicketPalette: ; 1604
|
||||
INCBIN "Spr_3r_251.pal.bin"
|
||||
|
||||
Prologue:
|
||||
INCBIN "prologue-{REGION_NAME}.bin"
|
||||
|
||||
DataPacket: ; 164a
|
||||
INCBIN "eonticket-{REGION_NAME}.mev"
|
||||
db 0,0,0 ; padding
|
||||
|
||||
INCLUDE "../common/mem_struct.asm"
|
||||
|
||||
SpriteData:
|
||||
dw TicketSprite,TicketPalette
|
||||
db $07,$07,$01,$01,$01,$01,$01 ; 64 x 64 size
|
||||
|
||||
Instructions1: ; 1921
|
||||
db "Link e-Reader to Pokémon Emerald\n"
|
||||
db "and use MYSTERY EVENTS by talking\n"
|
||||
db "to the MYSTERY GIFT MAN\n"
|
||||
db "Press the B Button to cancel.\0"
|
||||
|
||||
Instructions2: ; 199d
|
||||
db "Press the A Button on the Game Boy\n"
|
||||
db "Advance containing Pokémon Emerald\n"
|
||||
db "to begin sending the UNLOCKED\n"
|
||||
db "CELEBI EVENT.\0"
|
||||
|
||||
DeliveryInProcess: ; 1a0d
|
||||
db "UNLOCKED EVENT delivery in Progress\0"
|
||||
|
||||
TicketDelivered: ; 1a2f
|
||||
db "UNLOCKED CELEBI EVENT delivered!\n"
|
||||
db "\n"
|
||||
db "Press the A Button to resend.\n"
|
||||
db "Press the B Button to cancel.\0"
|
||||
|
||||
; this function is subtly different than the one
|
||||
; on the Battle e cards, for no apparent reason
|
||||
TransferData:
|
||||
LD_IND_HL SomeVar1
|
||||
push de
|
||||
ld hl, $bbbb
|
||||
LD_IND_HL Space_1
|
||||
EX_DE_HL
|
||||
LD_IND_HL Space_2
|
||||
API_0C7 Space_1
|
||||
|
||||
wait $01
|
||||
pop hl
|
||||
inc hl
|
||||
ld b, $01
|
||||
call WordShiftRight
|
||||
|
||||
LD_IND_HL SomeVar2
|
||||
.asm_1aa1
|
||||
LD_HL_IND SomeVar2
|
||||
ld a, l
|
||||
or h
|
||||
ret z
|
||||
|
||||
ld hl, $8888
|
||||
LD_IND_HL Space_1
|
||||
ld e, $01
|
||||
|
||||
.asm_1aaf
|
||||
ld a, e
|
||||
cp $08
|
||||
jr nc, .asm_1ad9
|
||||
|
||||
push de
|
||||
LD_HL_IND SomeVar1
|
||||
ld c, [hl]
|
||||
inc hl
|
||||
ld b, [hl]
|
||||
inc hl
|
||||
LD_IND_HL SomeVar1
|
||||
ld l, e
|
||||
ld h, $00
|
||||
add hl, hl
|
||||
ld de, Space_1
|
||||
add hl, de
|
||||
ld [hl], c
|
||||
inc hl
|
||||
ld [hl], b
|
||||
pop de
|
||||
LD_HL_IND SomeVar2
|
||||
dec hl
|
||||
LD_IND_HL SomeVar2
|
||||
ld a, l
|
||||
or h
|
||||
jr z, .asm_1ad9
|
||||
|
||||
inc e
|
||||
jr .asm_1aaf
|
||||
|
||||
.asm_1ad9
|
||||
API_0C7 Space_1
|
||||
wait $01
|
||||
jr .asm_1aa1
|
||||
|
||||
Start: ; 1ae2
|
||||
API_121
|
||||
|
||||
CreateCustomSprite SpriteHandlePtr, $80, SpriteData
|
||||
SetSpritePos SpriteHandlePtr, 120, 64
|
||||
SpriteHide SpriteHandlePtr
|
||||
|
||||
CreateRegion RegionHandlePtr, 30, 6, 0, 14, 0, 4
|
||||
|
||||
ld h, a
|
||||
ld l, $00
|
||||
SetTextSize
|
||||
|
||||
API_09B RegionHandlePtr, $0102
|
||||
SetTextColor RegionHandlePtr, 2, 0
|
||||
SetRegionColor RegionHandlePtr, 0
|
||||
SetBackgroundPalette 16, $0040, TicketPalette
|
||||
|
||||
FadeIn 16
|
||||
wait 16
|
||||
|
||||
API $0C6
|
||||
|
||||
DrawText RegionHandlePtr, Instructions1, 8, 4
|
||||
API $08D
|
||||
|
||||
INCLUDE "../common/wait_for_link.asm"
|
||||
|
||||
SpriteShow SpriteHandlePtr
|
||||
|
||||
DrawText RegionHandlePtr, Instructions2, 8, 4
|
||||
API $08D
|
||||
|
||||
ld a, b
|
||||
nop
|
||||
|
||||
UNKNOWN_VALUE EQU $0078
|
||||
INCLUDE "../common/wait_for_ready.asm"
|
||||
|
||||
DrawText RegionHandlePtr, DeliveryInProcess, 8, 4
|
||||
|
||||
DATA_TRANSFER_LENGTH EQU 6144
|
||||
INCLUDE "../common/transfer_data.asm"
|
||||
ld hl, $5fff
|
||||
LD_IND_HL Space_1
|
||||
API_0C7 Space_1
|
||||
|
||||
wait $80
|
||||
|
||||
SpriteHide SpriteHandlePtr
|
||||
|
||||
DrawText RegionHandlePtr, TicketDelivered, 8, 4
|
||||
|
||||
API $08D
|
||||
ld c, a
|
||||
nop
|
||||
|
||||
INCLUDE "../common/wrap_up.asm"
|
||||
|
||||
INCLUDE "../common/word_shift_right.asm"
|
||||
|
||||
SomeVar1: ; 1CA2
|
||||
db $FF,0 ; mark EOF
|
||||
RegionHandlePtr: db 0 ; 1CA4
|
||||
SpriteHandlePtr: db 0,0 ; 1CA5
|
||||
SomeVar2: db 0,0 ; 1CA7
|
||||
BIN
SOURCE/Celebi No Tower Bug Em/00-C000.raw
Normal file
BIN
SOURCE/Celebi No Tower Bug Em/00-C000.raw
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
40
SOURCE/Celebi No Tower Bug Em/Makefile
Normal file
40
SOURCE/Celebi No Tower Bug Em/Makefile
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
all: 00-C000-EN.raw verify
|
||||
verify:
|
||||
md5sum --check eonticket.md5
|
||||
|
||||
|
||||
eonticket-%.tx: eonticket.asm
|
||||
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 $< $@
|
||||
|
||||
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 $< $@
|
||||
|
||||
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 $< $@
|
||||
00-C000-%.vpk: 00-C000-%.z80
|
||||
./nevpk -c -i $< -o $@
|
||||
00-C000-%.raw: 00-C000-%.vpk
|
||||
./nedcmake -i $< -o $@ -type 1 -region 1
|
||||
|
||||
clean:
|
||||
rm -f *.tx *.o *.gbc *.z80 *.bin *.mev *.vpk *.raw
|
||||
BIN
SOURCE/Celebi No Tower Bug Em/Spr_3r_251.img.bin
Normal file
BIN
SOURCE/Celebi No Tower Bug Em/Spr_3r_251.img.bin
Normal file
Binary file not shown.
1
SOURCE/Celebi No Tower Bug Em/Spr_3r_251.pal.bin
Normal file
1
SOURCE/Celebi No Tower Bug Em/Spr_3r_251.pal.bin
Normal file
|
|
@ -0,0 +1 @@
|
|||
_F9W˙ýk¸SO;č"$˙µîr'f€Y|Ö^ÍA
|
||||
BIN
SOURCE/Celebi No Tower Bug Em/arm-none-eabi-as.exe
Normal file
BIN
SOURCE/Celebi No Tower Bug Em/arm-none-eabi-as.exe
Normal file
Binary file not shown.
3
SOURCE/Celebi No Tower Bug Em/capturecelebi.txt
Normal file
3
SOURCE/Celebi No Tower Bug Em/capturecelebi.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
Start:
|
||||
PUSH {LR}
|
||||
PUSH {r0-r7}
|
||||
BIN
SOURCE/Celebi No Tower Bug Em/celebirng.arm
Normal file
BIN
SOURCE/Celebi No Tower Bug Em/celebirng.arm
Normal file
Binary file not shown.
152
SOURCE/Celebi No Tower Bug Em/celebirng.txt
Normal file
152
SOURCE/Celebi No Tower Bug Em/celebirng.txt
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
Start:
|
||||
PUSH {LR}
|
||||
PUSH {r0-r7}
|
||||
ColoRNGAlgo:
|
||||
ldr r2, gRNGValue
|
||||
ldr r1, [r2]
|
||||
ldr r0, TempCelebiLocation
|
||||
ldr r3, ColoMult
|
||||
ldr r4, ColoAdd
|
||||
mul r1, r3 @Colo RNG for IV1
|
||||
add r1, r4
|
||||
lsl r2, r1, #1 @bitshift and stores result into r0
|
||||
lsr r2, r2, #17
|
||||
mul r1, r3 @Colo RNG for IV2
|
||||
add r1, r4
|
||||
lsl r5, r1, #1
|
||||
lsr r5, r5, #17
|
||||
lsl r5, r5, #15
|
||||
ORR r2, r5
|
||||
str r2, [r0, #72] @combine and store IVs into Pokemon
|
||||
mul r1, r3 @Blank RNG for ability
|
||||
add r1, r4
|
||||
ldr r6, CelebiOTID
|
||||
SHINYLOCKSTART:
|
||||
mul r1, r3 @RNG for PID1
|
||||
add r1, r4
|
||||
lsr r2, r1, #16
|
||||
mul r1, r3 @RNG for PID2
|
||||
add r1, r4
|
||||
lsr r5, r1, #16
|
||||
EOR r6, r2
|
||||
EOR r6, r5
|
||||
cmp r6, #7
|
||||
bls SHINYLOCKSTART @comment this out to remove shinylock
|
||||
strh r2, [r0, #2] @Store PID in proper spot.
|
||||
strh r5, [r0, #0]
|
||||
MemoryCopyCelebi:
|
||||
ldr r1, gEnemyParty
|
||||
ldr r2, UnencryptedCopyLengthInfo
|
||||
SWI 11
|
||||
ldr r0, TempCelebiLocation
|
||||
ldr r5, SubstructureTable
|
||||
ldr r0, [r0]
|
||||
mov r1, #24
|
||||
mov r7, r0
|
||||
swi #06
|
||||
mov r0, r7
|
||||
cmp r0, #0
|
||||
bpl EndCorrectionMath
|
||||
add r1, #16
|
||||
cmp r1, #0
|
||||
bpl EndCorrectionMath
|
||||
add r1, #24
|
||||
EndCorrectionMath:
|
||||
add r5, r1
|
||||
ldrb r6, [r5]
|
||||
ldr r0, TempCelebiLocation
|
||||
mov r7, #3 @loop counter setup
|
||||
mov r4, #12
|
||||
mov r5, #3
|
||||
add r0, #32 @Substructure start location for TempCelebiLocation
|
||||
SubstructureCopyLoop:
|
||||
ldr r1, gEnemyParty @destination of substructures
|
||||
add r1, #32 @adding 32 to make substructure enemy ram celebi gEnemyParty
|
||||
ldr r2, SubstructureCopyLengthInfo
|
||||
mov r3, r6
|
||||
and r3, r5
|
||||
mul r3, r4
|
||||
add r1, r3
|
||||
swi #11
|
||||
lsr r6, #2
|
||||
sub r7, #1
|
||||
bpl SubstructureCopyLoop
|
||||
lsl r0, r0, #0
|
||||
FixCelebi:
|
||||
mov r4, pc
|
||||
add r4, #9
|
||||
mov lr, r4
|
||||
ldr r0, gEnemyParty
|
||||
ldr r3, CalculateBoxMonChecksum
|
||||
bx r3
|
||||
ldr r1, gEnemyParty
|
||||
strh r0, [r1, #28]
|
||||
mov r4, pc
|
||||
add r4, #9
|
||||
mov lr, r4
|
||||
mov r0, r1
|
||||
ldr r3, EncryptBoxMon
|
||||
bx r3
|
||||
mov r4, pc
|
||||
add r4, #9
|
||||
mov lr, r4
|
||||
ldr r0, gEnemyParty
|
||||
ldr r3, CalculateMonStats
|
||||
bx r3
|
||||
ldr r0, gEnemyParty
|
||||
ldr r1, TempCelebiLocation
|
||||
ldr r2, UnencryptedCopyLengthInfo
|
||||
add r2, #12
|
||||
swi #11
|
||||
pop {r0-r7, pc}
|
||||
CaptureCelebi:
|
||||
PUSH {LR}
|
||||
PUSH {r0-r7}
|
||||
ldr r0, TempCelebiLocation @Copy entire celebi over pre-battle
|
||||
ldr r1, gPlayerParty
|
||||
ldr r2, UnencryptedCopyLengthInfo
|
||||
add r2, #12
|
||||
mov r6, #100 @this section figures out party position
|
||||
ldr r3, gSpecialVar_0x800B @party size stored in special var, times 100
|
||||
ldrb r7, [r3] @add result to destination
|
||||
mul r7, r6
|
||||
add r1, r7
|
||||
swi #11
|
||||
ldr r0, gEnemyParty @this copies stuff to keep nickname
|
||||
ldr r1, gPlayerParty
|
||||
mov r2, #5
|
||||
add r1, r7
|
||||
add r0, #8
|
||||
add r1, #8
|
||||
swi #11
|
||||
pop {r0-r7, pc}
|
||||
.align
|
||||
gRNGValue:
|
||||
.long 0x03005d80
|
||||
ColoMult:
|
||||
.long 0x000343FD
|
||||
ColoAdd:
|
||||
.long 0x00269EC3
|
||||
TempCelebiLocation:
|
||||
.long 0x0203ABE0
|
||||
SubstructureTable:
|
||||
.long 0x0203AC30 @Change Later
|
||||
gPlayerParty:
|
||||
.long 0x020244ec
|
||||
gEnemyParty:
|
||||
.long 0x02024744
|
||||
UnencryptedCopyLengthInfo:
|
||||
.long 0x04000008
|
||||
SubstructureCopyLengthInfo:
|
||||
.long 0x04000003
|
||||
CalculateBoxMonChecksum:
|
||||
.long 0x08068c79
|
||||
EncryptBoxMon:
|
||||
.long 0x0806a229
|
||||
CalculateMonStats:
|
||||
.long 0x08068d0d
|
||||
CelebiOTID:
|
||||
.long 0x00007991
|
||||
gSpecialVar_0x800B:
|
||||
.long 0x020375ee @Player Party Size
|
||||
|
||||
BIN
SOURCE/Celebi No Tower Bug Em/celebis.bin
Normal file
BIN
SOURCE/Celebi No Tower Bug Em/celebis.bin
Normal file
Binary file not shown.
BIN
SOURCE/Celebi No Tower Bug Em/celebispal.bin
Normal file
BIN
SOURCE/Celebi No Tower Bug Em/celebispal.bin
Normal file
Binary file not shown.
213
SOURCE/Celebi No Tower Bug Em/eonticket.asm
Normal file
213
SOURCE/Celebi No Tower Bug Em/eonticket.asm
Normal file
|
|
@ -0,0 +1,213 @@
|
|||
INCLUDE "../macros.asm"
|
||||
INCLUDE "../constants/items.asm"
|
||||
INCLUDE "../constants/scriptcommandscelebinotower.asm"
|
||||
|
||||
Mystery_Event
|
||||
|
||||
db CHECKSUM_CRC
|
||||
dd 0 ; checksum placeholder
|
||||
GBAPTR DataStart
|
||||
GBAPTR DataEnd
|
||||
|
||||
DataStart:
|
||||
db IN_GAME_SCRIPT
|
||||
db 24,11 ; petalburg gym
|
||||
db 2 ; norman
|
||||
GBAPTR NormanScriptStart
|
||||
GBAPTR NormanScriptEnd
|
||||
|
||||
db PRELOAD_SCRIPT
|
||||
GBAPTR PreloadScriptStart
|
||||
|
||||
db END_OF_CHUNKS
|
||||
|
||||
PreloadScriptStart:
|
||||
setvirtualaddress PreloadScriptStart
|
||||
|
||||
callasm $0201C045
|
||||
|
||||
virtualloadpointer GoSeeYourFather
|
||||
|
||||
setbyte 2
|
||||
|
||||
dw $0000
|
||||
|
||||
end
|
||||
|
||||
WriteFlashMemory
|
||||
|
||||
CelebiScriptStart:
|
||||
setvirtualaddress CelebiScriptStart
|
||||
db $00
|
||||
dw $0000
|
||||
virtualmsgbox Poor
|
||||
waitmsg
|
||||
db $6E, $17, $8
|
||||
release
|
||||
|
||||
compare LASTRESULT, 0
|
||||
|
||||
virtualgotoif 1, Changemind
|
||||
|
||||
virtualgotoif 5, CelebiEvent
|
||||
|
||||
|
||||
db $00
|
||||
|
||||
TEMPCELEBI
|
||||
STRUCTURETABLECOMPRESSED
|
||||
LOADSTOREPARTYAMOUNT
|
||||
CelebiRNGAlgo2
|
||||
|
||||
|
||||
|
||||
|
||||
CelebiEvent:
|
||||
db $43
|
||||
|
||||
compare LASTRESULT, 5
|
||||
|
||||
virtualgotoif 2, NoRoom
|
||||
|
||||
copyvar $800B, $800D
|
||||
|
||||
setwildbattle $F4, $30, $00
|
||||
|
||||
callasm $0203AC5D ;Colo RNG
|
||||
|
||||
special $13F
|
||||
|
||||
sound $13
|
||||
|
||||
waitstate
|
||||
|
||||
playmoncry $FB, $0
|
||||
|
||||
virtualmsgbox Celebi
|
||||
|
||||
waitmsg
|
||||
|
||||
waitmoncry
|
||||
|
||||
waitkeypress
|
||||
|
||||
release
|
||||
|
||||
special $145
|
||||
|
||||
playsong $0166, $0
|
||||
|
||||
waitmoncry
|
||||
|
||||
waitstate
|
||||
|
||||
db $43
|
||||
|
||||
comparevar LASTRESULT, $800B
|
||||
|
||||
virtualgotoif 3, FlewAway
|
||||
|
||||
virtualgotoif 2, Catch
|
||||
|
||||
|
||||
|
||||
|
||||
Catch:
|
||||
callasm $0203AD19
|
||||
killscript
|
||||
|
||||
|
||||
|
||||
NoRoom:
|
||||
virtualmsgbox NoSpace
|
||||
waitmsg
|
||||
waitkeypress
|
||||
release
|
||||
end
|
||||
|
||||
Changemind:
|
||||
virtualmsgbox Change
|
||||
waitmsg
|
||||
waitkeypress
|
||||
release
|
||||
end
|
||||
|
||||
|
||||
NoRoomToGive:
|
||||
virtualloadpointer PartyFull
|
||||
setbyte 3
|
||||
killscript
|
||||
|
||||
FlewAway:
|
||||
db $97, $01
|
||||
db $97, $00
|
||||
virtualmsgbox Flew
|
||||
waitmsg
|
||||
waitkeypress
|
||||
release
|
||||
end
|
||||
|
||||
PartyFull:
|
||||
Text_EN "You need space in your party\n"
|
||||
Text_EN "to play this MYSTERY EVENT!@"
|
||||
Poor:
|
||||
Text_EN "A Pokemon is rustling around\n"
|
||||
Text_EN "in this tree.\p"
|
||||
Text_EN "Would you like to investigate?@"
|
||||
Change:
|
||||
Text_EN "Maybe another time.@"
|
||||
Flew:
|
||||
Text_EN "The CELEBI flew away!@"
|
||||
|
||||
NoSpace:
|
||||
Text_EN "You need space in your party\n"
|
||||
Text_EN "to capture CELEBI!@"
|
||||
|
||||
Celebi:
|
||||
Text_EN "CELEBI: Biyoo!@"
|
||||
|
||||
GoSeeYourFather:
|
||||
Text_EN "A bright flash was seen in\n"
|
||||
Text_EN "PETALBURG WOODS!\p"
|
||||
Text_EN "Ever since, a rare Pokemon has\n"
|
||||
Text_EN "been seen healing thin trees.@"
|
||||
|
||||
|
||||
|
||||
NormanScriptStart:
|
||||
|
||||
|
||||
writebytetoaddr $1E, $2024744
|
||||
writebytetoaddr $20, $2024745
|
||||
writebytetoaddr $01, $2024746
|
||||
writebytetoaddr $49, $2024747
|
||||
writebytetoaddr $01, $2024748
|
||||
writebytetoaddr $4B, $2024749
|
||||
writebytetoaddr $18, $202474A
|
||||
writebytetoaddr $47, $202474B
|
||||
writebytetoaddr $BC, $202474C
|
||||
writebytetoaddr $AB, $202474D
|
||||
writebytetoaddr $03, $202474E
|
||||
writebytetoaddr $02, $202474F
|
||||
writebytetoaddr $4D, $2024750
|
||||
writebytetoaddr $31, $2024751
|
||||
writebytetoaddr $15, $2024752
|
||||
writebytetoaddr $08, $2024753
|
||||
|
||||
callasm $02024745 ;readflash
|
||||
|
||||
goto $0203abbc
|
||||
|
||||
|
||||
NormanScriptEnd:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DataEnd:
|
||||
EOF
|
||||
|
||||
1
SOURCE/Celebi No Tower Bug Em/eonticket.md5
Normal file
1
SOURCE/Celebi No Tower Bug Em/eonticket.md5
Normal file
|
|
@ -0,0 +1 @@
|
|||
901180e44767e19e5dc9d5df881fe123 00-C000-EN.z80
|
||||
BIN
SOURCE/Celebi No Tower Bug Em/icon.4bpp
Normal file
BIN
SOURCE/Celebi No Tower Bug Em/icon.4bpp
Normal file
Binary file not shown.
BIN
SOURCE/Celebi No Tower Bug Em/nedclib.dll
Normal file
BIN
SOURCE/Celebi No Tower Bug Em/nedclib.dll
Normal file
Binary file not shown.
BIN
SOURCE/Celebi No Tower Bug Em/nedcmake
Normal file
BIN
SOURCE/Celebi No Tower Bug Em/nedcmake
Normal file
Binary file not shown.
BIN
SOURCE/Celebi No Tower Bug Em/nevpk
Normal file
BIN
SOURCE/Celebi No Tower Bug Em/nevpk
Normal file
Binary file not shown.
1
SOURCE/Celebi No Tower Bug Em/normal.gbapal
Normal file
1
SOURCE/Celebi No Tower Bug Em/normal.gbapal
Normal file
|
|
@ -0,0 +1 @@
|
|||
9.º5&¿BNW<4E>N‡-*!sB1d»qÏ)kÿc
|
||||
15
SOURCE/Celebi No Tower Bug Em/prologue.asm
Normal file
15
SOURCE/Celebi No Tower Bug Em/prologue.asm
Normal file
|
|
@ -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
|
||||
BIN
SOURCE/Celebi No Tower Bug Em/readflash.arm
Normal file
BIN
SOURCE/Celebi No Tower Bug Em/readflash.arm
Normal file
Binary file not shown.
11
SOURCE/Celebi No Tower Bug Em/readflash.txt
Normal file
11
SOURCE/Celebi No Tower Bug Em/readflash.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
Start:
|
||||
mov r0, #30
|
||||
ldr r1, gSaveDataBuffer
|
||||
ldr r3, ReadFlashSector
|
||||
bx r3
|
||||
.align
|
||||
gSaveDataBuffer:
|
||||
.long 0x0203abbc
|
||||
ReadFlashSector:
|
||||
.long 0x0815314d
|
||||
|
||||
BIN
SOURCE/Celebi No Tower Bug Em/rgbasm
Normal file
BIN
SOURCE/Celebi No Tower Bug Em/rgbasm
Normal file
Binary file not shown.
BIN
SOURCE/Celebi No Tower Bug Em/rgblink
Normal file
BIN
SOURCE/Celebi No Tower Bug Em/rgblink
Normal file
Binary file not shown.
1
SOURCE/Celebi No Tower Bug Em/shiny.gbapal
Normal file
1
SOURCE/Celebi No Tower Bug Em/shiny.gbapal
Normal file
|
|
@ -0,0 +1 @@
|
|||
9Wÿs¿s?c<>N»Aõ ÿwwM/É"E›lÖ^ÍAÆ
|
||||
BIN
SOURCE/Celebi No Tower Bug Em/storeunusedlocation.arm
Normal file
BIN
SOURCE/Celebi No Tower Bug Em/storeunusedlocation.arm
Normal file
Binary file not shown.
11
SOURCE/Celebi No Tower Bug Em/storeunusedlocation.txt
Normal file
11
SOURCE/Celebi No Tower Bug Em/storeunusedlocation.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
Start:
|
||||
mov r0, #30
|
||||
ldr r1, WRAMLocation
|
||||
ldr r2, TryWriteSector
|
||||
bx r2
|
||||
.align
|
||||
WRAMLocation:
|
||||
.long 0x0200005C
|
||||
TryWriteSector:
|
||||
.long 0x08152909
|
||||
|
||||
171
SOURCE/jirachievent - Em - No Tower/00-C000.asm
Normal file
171
SOURCE/jirachievent - Em - No Tower/00-C000.asm
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
INCLUDE "../macros.asm"
|
||||
SECTION "eonticket",ROM0[$100]
|
||||
jp Start
|
||||
db $00
|
||||
|
||||
|
||||
TicketPalette: ; 1604
|
||||
INCBIN "jirachi.pal.bin"
|
||||
|
||||
Prologue:
|
||||
INCBIN "prologue-{REGION_NAME}.bin"
|
||||
|
||||
DataPacket: ; 164a
|
||||
INCBIN "eonticket-{REGION_NAME}.mev"
|
||||
db 0,0,0 ; padding
|
||||
|
||||
INCLUDE "../common/mem_struct.asm"
|
||||
|
||||
SpriteData:
|
||||
dw TicketPalette
|
||||
db $00,$00,$01,$01,$01,$01,$01 ;
|
||||
|
||||
Instructions1: ; 1921
|
||||
db "Link e-Reader to Pokémon Emerald\n"
|
||||
db "and activate Mystery Event.\n"
|
||||
db "Press the B Button to cancel.\0"
|
||||
|
||||
Instructions2: ; 199d
|
||||
db "Press the A Button on the Game Boy\n"
|
||||
db "Advance containing Pokémon Emerald\n"
|
||||
db "to begin sending the JIRACHI EVENT.\0"
|
||||
|
||||
DeliveryInProcess: ; 1a0d
|
||||
db "JIRACHI EVENT delivery in Progress...\0"
|
||||
|
||||
TicketDelivered: ; 1a2f
|
||||
db "JIRACHI EVENT delivered!\n"
|
||||
db "\n"
|
||||
db "Press the A Button to resend.\n"
|
||||
db "Press the B Button to cancel.\0"
|
||||
|
||||
; this function is subtly different than the one
|
||||
; on the Battle e cards, for no apparent reason
|
||||
TransferData:
|
||||
LD_IND_HL SomeVar1
|
||||
push de
|
||||
ld hl, $bbbb
|
||||
LD_IND_HL Space_1
|
||||
EX_DE_HL
|
||||
LD_IND_HL Space_2
|
||||
API_0C7 Space_1
|
||||
|
||||
wait $01
|
||||
pop hl
|
||||
inc hl
|
||||
ld b, $01
|
||||
call WordShiftRight
|
||||
|
||||
LD_IND_HL SomeVar2
|
||||
.asm_1aa1
|
||||
LD_HL_IND SomeVar2
|
||||
ld a, l
|
||||
or h
|
||||
ret z
|
||||
|
||||
ld hl, $8888
|
||||
LD_IND_HL Space_1
|
||||
ld e, $01
|
||||
|
||||
.asm_1aaf
|
||||
ld a, e
|
||||
cp $08
|
||||
jr nc, .asm_1ad9
|
||||
|
||||
push de
|
||||
LD_HL_IND SomeVar1
|
||||
ld c, [hl]
|
||||
inc hl
|
||||
ld b, [hl]
|
||||
inc hl
|
||||
LD_IND_HL SomeVar1
|
||||
ld l, e
|
||||
ld h, $00
|
||||
add hl, hl
|
||||
ld de, Space_1
|
||||
add hl, de
|
||||
ld [hl], c
|
||||
inc hl
|
||||
ld [hl], b
|
||||
pop de
|
||||
LD_HL_IND SomeVar2
|
||||
dec hl
|
||||
LD_IND_HL SomeVar2
|
||||
ld a, l
|
||||
or h
|
||||
jr z, .asm_1ad9
|
||||
|
||||
inc e
|
||||
jr .asm_1aaf
|
||||
|
||||
.asm_1ad9
|
||||
API_0C7 Space_1
|
||||
wait $01
|
||||
jr .asm_1aa1
|
||||
|
||||
Start: ; 1ae2
|
||||
API_121
|
||||
|
||||
CreateCustomSprite SpriteHandlePtr, $80, SpriteData
|
||||
SetSpritePos SpriteHandlePtr, 120, 64
|
||||
SpriteHide SpriteHandlePtr
|
||||
|
||||
CreateRegion RegionHandlePtr, 30, 6, 0, 14, 0, 4
|
||||
|
||||
ld h, a
|
||||
ld l, $00
|
||||
SetTextSize
|
||||
|
||||
API_09B RegionHandlePtr, $0102
|
||||
SetTextColor RegionHandlePtr, 2, 0
|
||||
SetRegionColor RegionHandlePtr, 0
|
||||
SetBackgroundPalette 16, $0040, TicketPalette
|
||||
|
||||
FadeIn 16
|
||||
wait 16
|
||||
|
||||
API $0C6
|
||||
|
||||
DrawText RegionHandlePtr, Instructions1, 8, 4
|
||||
API $08D
|
||||
|
||||
INCLUDE "../common/wait_for_link.asm"
|
||||
|
||||
SpriteShow SpriteHandlePtr
|
||||
|
||||
DrawText RegionHandlePtr, Instructions2, 8, 4
|
||||
API $08D
|
||||
|
||||
ld a, b
|
||||
nop
|
||||
|
||||
UNKNOWN_VALUE EQU $0078
|
||||
INCLUDE "../common/wait_for_ready.asm"
|
||||
|
||||
DrawText RegionHandlePtr, DeliveryInProcess, 8, 4
|
||||
|
||||
DATA_TRANSFER_LENGTH EQU 6144
|
||||
INCLUDE "../common/transfer_data.asm"
|
||||
ld hl, $5fff
|
||||
LD_IND_HL Space_1
|
||||
API_0C7 Space_1
|
||||
|
||||
wait $80
|
||||
|
||||
SpriteHide SpriteHandlePtr
|
||||
|
||||
DrawText RegionHandlePtr, TicketDelivered, 8, 4
|
||||
|
||||
API $08D
|
||||
ld c, a
|
||||
nop
|
||||
|
||||
INCLUDE "../common/wrap_up.asm"
|
||||
|
||||
INCLUDE "../common/word_shift_right.asm"
|
||||
|
||||
SomeVar1: ; 1CA2
|
||||
db $FF,0 ; mark EOF
|
||||
RegionHandlePtr: db 0 ; 1CA4
|
||||
SpriteHandlePtr: db 0,0 ; 1CA5
|
||||
SomeVar2: db 0,0 ; 1CA7
|
||||
Binary file not shown.
40
SOURCE/jirachievent - Em - No Tower/Makefile
Normal file
40
SOURCE/jirachievent - Em - No Tower/Makefile
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
all: 00-C000-EN.raw verify
|
||||
verify:
|
||||
md5sum --check eonticket.md5
|
||||
|
||||
|
||||
eonticket-%.tx: eonticket.asm
|
||||
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 $< $@
|
||||
|
||||
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 $< $@
|
||||
|
||||
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 $< $@
|
||||
00-C000-%.vpk: 00-C000-%.z80
|
||||
./nevpk -c -i $< -o $@
|
||||
00-C000-%.raw: 00-C000-%.vpk
|
||||
./nedcmake -i $< -o $@ -type 1 -region 1
|
||||
|
||||
clean:
|
||||
rm -f *.tx *.o *.gbc *.z80 *.bin *.mev *.vpk *.raw
|
||||
263
SOURCE/jirachievent - Em - No Tower/eonticket.asm
Normal file
263
SOURCE/jirachievent - Em - No Tower/eonticket.asm
Normal file
|
|
@ -0,0 +1,263 @@
|
|||
INCLUDE "../macros.asm"
|
||||
INCLUDE "../constants/items.asm"
|
||||
INCLUDE "../constants/scriptcommandsjirachibattleemeraldnotower.asm"
|
||||
|
||||
Mystery_Event
|
||||
|
||||
db CHECKSUM_CRC
|
||||
dd 0 ; checksum placeholder
|
||||
GBAPTR DataStart
|
||||
GBAPTR DataEnd
|
||||
|
||||
DataStart:
|
||||
db IN_GAME_SCRIPT
|
||||
db 0,6 ; mossdeep
|
||||
db 8 ; girl near rock
|
||||
GBAPTR NormanScriptStart
|
||||
GBAPTR NormanScriptEnd
|
||||
|
||||
|
||||
db PRELOAD_SCRIPT
|
||||
GBAPTR PreloadScriptStart
|
||||
|
||||
db END_OF_CHUNKS
|
||||
|
||||
|
||||
|
||||
PreloadScriptStart:
|
||||
setvirtualaddress PreloadScriptStart
|
||||
|
||||
callasm $0201C045
|
||||
|
||||
virtualloadpointer GoSeeYourFather
|
||||
|
||||
setbyte 2
|
||||
|
||||
dw $0000
|
||||
|
||||
end
|
||||
|
||||
WriteFlashMemory
|
||||
|
||||
|
||||
JirachiScriptStart:
|
||||
setvirtualaddress JirachiScriptStart
|
||||
db $5A
|
||||
|
||||
virtualmsgbox Wish
|
||||
|
||||
waitmsg
|
||||
|
||||
db $6E, $17, $8
|
||||
|
||||
release
|
||||
|
||||
compare LASTRESULT, 0
|
||||
|
||||
virtualgotoif 5, checkspot
|
||||
|
||||
Changemind:
|
||||
virtualmsgbox Change
|
||||
waitmsg
|
||||
waitkeypress
|
||||
release
|
||||
end
|
||||
db $00
|
||||
db $00
|
||||
db $00
|
||||
db $00
|
||||
|
||||
|
||||
CHANNELRNG
|
||||
STORAGETABLE
|
||||
TEMPJIRACHI2
|
||||
STRUCTURETABLEG
|
||||
MEMCOPYJIRACHI
|
||||
RETURN
|
||||
FIXJIRACHIANDCOPY
|
||||
CAPTUREJIRACHI
|
||||
FINALSTORAGE
|
||||
MOVEPLAYERDOWNRIGHT
|
||||
MOVEPLAYERRIGHTFACEUP
|
||||
MOVEPLAYERQUESTION
|
||||
db $00
|
||||
TEMPJIRACHI
|
||||
MOVEPLAYERLEFTFACEUP
|
||||
|
||||
checkspot:
|
||||
|
||||
virtualmsgbox Youdo
|
||||
|
||||
waitmsg
|
||||
|
||||
waitkeypress
|
||||
|
||||
release
|
||||
|
||||
db $43
|
||||
|
||||
compare LASTRESULT, 5
|
||||
|
||||
virtualgotoif 2, NoRoom
|
||||
|
||||
copyvar $800B, $800D
|
||||
|
||||
getplayerpos $8000, $8001
|
||||
|
||||
compare $8000, $37
|
||||
|
||||
virtualgotoif 5, Movement1
|
||||
|
||||
Movement0:
|
||||
|
||||
|
||||
applymovement $FF, $0203ADE0
|
||||
|
||||
waitmovement $FF
|
||||
|
||||
Movement1:
|
||||
|
||||
|
||||
|
||||
applymovement $FF, $0203ADE3
|
||||
|
||||
battle:
|
||||
waitmovement $FF
|
||||
|
||||
pause $10
|
||||
|
||||
special $13D
|
||||
|
||||
sound $83
|
||||
|
||||
pause $10
|
||||
|
||||
pause $10
|
||||
|
||||
applymovement $FF, $0203ade8
|
||||
|
||||
waitmovement $FF
|
||||
|
||||
sound $15
|
||||
setwildbattle $F4, $30, $00
|
||||
|
||||
virtualmsgbox Pokemon
|
||||
|
||||
waitmsg
|
||||
|
||||
waitkeypress
|
||||
|
||||
release
|
||||
|
||||
playmoncry $199, $0
|
||||
|
||||
virtualmsgbox Jirachi
|
||||
|
||||
waitmsg
|
||||
|
||||
waitkeypress
|
||||
|
||||
release
|
||||
|
||||
callasm $0203ABE5 ;Channel RNG
|
||||
|
||||
callasm $0203AD69 ;FIXJIRACHIANDCOPY
|
||||
|
||||
waitmoncry
|
||||
|
||||
special $145
|
||||
|
||||
playsong $01CE, $0
|
||||
|
||||
waitstate
|
||||
|
||||
db $43
|
||||
|
||||
comparevar LASTRESULT, $800B
|
||||
|
||||
virtualgotoif 3, FlewAway
|
||||
|
||||
|
||||
Catch:
|
||||
callasm $0203AD9D
|
||||
killscript
|
||||
|
||||
|
||||
NoRoom:
|
||||
virtualmsgbox NoSpace
|
||||
waitmsg
|
||||
waitkeypress
|
||||
release
|
||||
end
|
||||
|
||||
|
||||
FlewAway:
|
||||
|
||||
db $97, $01
|
||||
db $97, $00
|
||||
virtualmsgbox Flew
|
||||
waitmsg
|
||||
waitkeypress
|
||||
release
|
||||
applymovement $FF, $0203AE3C
|
||||
waitmovement $FF
|
||||
end
|
||||
|
||||
Wish:
|
||||
Text_EN "Do you have a wish?@"
|
||||
|
||||
Youdo:
|
||||
Text_EN "You do? Then leave a wish tag\n"
|
||||
Text_EN "on the WHITE ROCK!@"
|
||||
Change:
|
||||
Text_EN "Really? I thought everyone had\n"
|
||||
Text_EN "a wish...@"
|
||||
Flew:
|
||||
Text_EN "The JIRACHI flew away!@"
|
||||
NoSpace:
|
||||
Text_EN "You can’t make wish\n"
|
||||
Text_EN "with a full party!@"
|
||||
|
||||
Pokemon:
|
||||
Text_EN "Huh? A POKéMON?@"
|
||||
Jirachi:
|
||||
Text_EN "Wiish!@"
|
||||
|
||||
GoSeeYourFather:
|
||||
Text_EN "The WHITE ROCK in MOSSDEEP has\n"
|
||||
Text_EN "been glowing...@"
|
||||
|
||||
|
||||
NormanScriptStart:
|
||||
setvirtualaddress NormanScriptStart
|
||||
|
||||
|
||||
writebytetoaddr $1E, $2024744
|
||||
writebytetoaddr $20, $2024745
|
||||
writebytetoaddr $01, $2024746
|
||||
writebytetoaddr $49, $2024747
|
||||
writebytetoaddr $01, $2024748
|
||||
writebytetoaddr $4B, $2024749
|
||||
writebytetoaddr $18, $202474A
|
||||
writebytetoaddr $47, $202474B
|
||||
writebytetoaddr $BC, $202474C
|
||||
writebytetoaddr $AB, $202474D
|
||||
writebytetoaddr $03, $202474E
|
||||
writebytetoaddr $02, $202474F
|
||||
writebytetoaddr $4D, $2024750
|
||||
writebytetoaddr $31, $2024751
|
||||
writebytetoaddr $15, $2024752
|
||||
writebytetoaddr $08, $2024753
|
||||
|
||||
callasm $02024745 ;readflash
|
||||
|
||||
goto $0203abbc
|
||||
|
||||
NormanScriptEnd:
|
||||
|
||||
|
||||
|
||||
|
||||
DataEnd:
|
||||
EOF
|
||||
|
||||
1
SOURCE/jirachievent - Em - No Tower/eonticket.md5
Normal file
1
SOURCE/jirachievent - Em - No Tower/eonticket.md5
Normal file
|
|
@ -0,0 +1 @@
|
|||
901180e44767e19e5dc9d5df881fe123 00-C000-EN.z80
|
||||
BIN
SOURCE/jirachievent - Em - No Tower/icon.4bpp
Normal file
BIN
SOURCE/jirachievent - Em - No Tower/icon.4bpp
Normal file
Binary file not shown.
BIN
SOURCE/jirachievent - Em - No Tower/icon2.4bpp
Normal file
BIN
SOURCE/jirachievent - Em - No Tower/icon2.4bpp
Normal file
Binary file not shown.
225
SOURCE/jirachievent - Em - No Tower/jirachi.asm
Normal file
225
SOURCE/jirachievent - Em - No Tower/jirachi.asm
Normal file
|
|
@ -0,0 +1,225 @@
|
|||
INCLUDE "../macros.asm"
|
||||
INCLUDE "../constants/items.asm"
|
||||
INCLUDE "../constants/scriptcommandsjirachibattle.asm"
|
||||
|
||||
Mystery_Event
|
||||
|
||||
db CHECKSUM_CRC
|
||||
dd 0 ; checksum placeholder
|
||||
GBAPTR DataStart
|
||||
GBAPTR DataEnd
|
||||
|
||||
DataStart:
|
||||
db IN_GAME_SCRIPT
|
||||
db 0,6 ; mossdeep
|
||||
db 8 ; girl near rock
|
||||
GBAPTR NormanScriptStart
|
||||
GBAPTR NormanScriptEnd
|
||||
|
||||
|
||||
db PRELOAD_SCRIPT
|
||||
GBAPTR PreloadScriptStart
|
||||
|
||||
db END_OF_CHUNKS
|
||||
|
||||
|
||||
GoSeeYourFather:
|
||||
Text_EN "The WHITE ROCK in MOSSDEEP has\n"
|
||||
Text_EN "been glowing...@"
|
||||
|
||||
|
||||
|
||||
|
||||
NormanScriptStart:
|
||||
setvirtualaddress NormanScriptStart
|
||||
|
||||
db $5A
|
||||
|
||||
virtualmsgbox Wish
|
||||
|
||||
waitmsg
|
||||
|
||||
db $6E, $17, $8
|
||||
|
||||
release
|
||||
|
||||
compare LASTRESULT, 0
|
||||
|
||||
virtualgotoif 5, checkspot
|
||||
|
||||
Changemind:
|
||||
virtualmsgbox Change
|
||||
waitmsg
|
||||
waitkeypress
|
||||
release
|
||||
end
|
||||
|
||||
|
||||
CHANNELRNG
|
||||
STORAGETABLE
|
||||
TEMPJIRACHI
|
||||
STRUCTURETABLEG
|
||||
MEMCOPYJIRACHI
|
||||
RETURN
|
||||
FIXJIRACHIANDCOPY
|
||||
CAPTUREJIRACHI
|
||||
FINALSTORAGE
|
||||
MOVEPLAYERDOWNRIGHT
|
||||
MOVEPLAYERRIGHTFACEUP
|
||||
MOVEPLAYERQUESTION
|
||||
checkspot:
|
||||
|
||||
virtualmsgbox Youdo
|
||||
|
||||
waitmsg
|
||||
|
||||
waitkeypress
|
||||
|
||||
release
|
||||
|
||||
db $43
|
||||
|
||||
compare LASTRESULT, 5
|
||||
|
||||
virtualgotoif 2, NoRoom
|
||||
|
||||
copyvar $800B, $800D
|
||||
|
||||
getplayerpos $8000, $8001
|
||||
|
||||
compare $8000, $37
|
||||
|
||||
virtualgotoif 5, Movement2
|
||||
|
||||
Movement0:
|
||||
|
||||
|
||||
applymovement $FF, $02029034
|
||||
|
||||
waitmovement $FF
|
||||
|
||||
Movement1:
|
||||
|
||||
|
||||
|
||||
applymovement $FF, $02029037
|
||||
|
||||
battle:
|
||||
waitmovement $FF
|
||||
|
||||
pause $10
|
||||
|
||||
special $13B
|
||||
|
||||
sound $83
|
||||
|
||||
pause $10
|
||||
|
||||
pause $10
|
||||
|
||||
applymovement $FF, $0202903C
|
||||
|
||||
waitmovement $FF
|
||||
|
||||
sound $15
|
||||
|
||||
virtualmsgbox Pokemon
|
||||
|
||||
waitmsg
|
||||
|
||||
waitkeypress
|
||||
|
||||
release
|
||||
|
||||
playmoncry $199, $0
|
||||
|
||||
virtualmsgbox Jirachi
|
||||
|
||||
waitmsg
|
||||
|
||||
waitkeypress
|
||||
|
||||
release
|
||||
|
||||
callasm $02028DF1
|
||||
|
||||
callasm $02028FBD
|
||||
|
||||
waitmoncry
|
||||
|
||||
special $139
|
||||
|
||||
playsong $01CE, $0
|
||||
|
||||
waitstate
|
||||
|
||||
db $43
|
||||
|
||||
comparevar LASTRESULT, $800B
|
||||
|
||||
virtualgotoif 3, FlewAway
|
||||
|
||||
|
||||
Catch:
|
||||
callasm $02028FF1
|
||||
killscript
|
||||
|
||||
|
||||
NoRoom:
|
||||
virtualmsgbox NoSpace
|
||||
waitmsg
|
||||
waitkeypress
|
||||
release
|
||||
end
|
||||
|
||||
|
||||
FlewAway:
|
||||
db $97, $01
|
||||
db $97, $00
|
||||
virtualmsgbox Flew
|
||||
waitmsg
|
||||
waitkeypress
|
||||
release
|
||||
end
|
||||
|
||||
Wish:
|
||||
Text_EN "Do you have a wish?@"
|
||||
|
||||
Youdo:
|
||||
Text_EN "You do? Then leave a wish tag\n"
|
||||
Text_EN "on the WHITE ROCK!@"
|
||||
Change:
|
||||
Text_EN "Really? I thought everyone had\n"
|
||||
Text_EN "a wish...@"
|
||||
Flew:
|
||||
Text_EN "The JIRACHI flew away!@"
|
||||
NoSpace:
|
||||
Text_EN "You can’t make a wish with a\n"
|
||||
Text_EN "full party!@"
|
||||
|
||||
Pokemon:
|
||||
Text_EN "Huh? A Pokémon?@"
|
||||
Jirachi:
|
||||
Text_EN "Wiiish!@"
|
||||
|
||||
|
||||
NormanScriptEnd:
|
||||
|
||||
|
||||
PreloadScriptStart:
|
||||
setvirtualaddress PreloadScriptStart
|
||||
|
||||
|
||||
virtualloadpointer GoSeeYourFather
|
||||
|
||||
setbyte 2
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DataEnd:
|
||||
EOF
|
||||
|
||||
BIN
SOURCE/jirachievent - Em - No Tower/jirachi.img.bin
Normal file
BIN
SOURCE/jirachievent - Em - No Tower/jirachi.img.bin
Normal file
Binary file not shown.
BIN
SOURCE/jirachievent - Em - No Tower/jirachi.pal.bin
Normal file
BIN
SOURCE/jirachievent - Em - No Tower/jirachi.pal.bin
Normal file
Binary file not shown.
BIN
SOURCE/jirachievent - Em - No Tower/nedclib.dll
Normal file
BIN
SOURCE/jirachievent - Em - No Tower/nedclib.dll
Normal file
Binary file not shown.
BIN
SOURCE/jirachievent - Em - No Tower/nedcmake
Normal file
BIN
SOURCE/jirachievent - Em - No Tower/nedcmake
Normal file
Binary file not shown.
BIN
SOURCE/jirachievent - Em - No Tower/nevpk
Normal file
BIN
SOURCE/jirachievent - Em - No Tower/nevpk
Normal file
Binary file not shown.
15
SOURCE/jirachievent - Em - No Tower/prologue.asm
Normal file
15
SOURCE/jirachievent - Em - No Tower/prologue.asm
Normal file
|
|
@ -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
|
||||
BIN
SOURCE/jirachievent - Em - No Tower/rgbasm
Normal file
BIN
SOURCE/jirachievent - Em - No Tower/rgbasm
Normal file
Binary file not shown.
BIN
SOURCE/jirachievent - Em - No Tower/rgblink
Normal file
BIN
SOURCE/jirachievent - Em - No Tower/rgblink
Normal file
Binary file not shown.
BIN
SOURCE/jirachievent - Em - No Tower/shinyhuntshowcase.mp4
Normal file
BIN
SOURCE/jirachievent - Em - No Tower/shinyhuntshowcase.mp4
Normal file
Binary file not shown.
5
SOURCE/jirachievent - Em - No Tower/ticket.pal
Normal file
5
SOURCE/jirachievent - Em - No Tower/ticket.pal
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
RGB 18, 0, 0
|
||||
RGB 0, 0, 0
|
||||
RGB 31, 31, 31
|
||||
RGB 15, 31, 31
|
||||
RGB 6, 15, 29
|
||||
Loading…
Reference in New Issue
Block a user