From 0bbe27333ab77b0fc405a4834218216f27f03669 Mon Sep 17 00:00:00 2001 From: pikalaxalt Date: Sun, 22 May 2016 13:29:34 -0400 Subject: Disassemble function at ea3ea --- gfx/stats_screen_hp.png | Bin 0 -> 82 bytes gfx/stats_screen_lv.png | Bin 0 -> 78 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 gfx/stats_screen_hp.png create mode 100644 gfx/stats_screen_lv.png (limited to 'gfx') diff --git a/gfx/stats_screen_hp.png b/gfx/stats_screen_hp.png new file mode 100644 index 00000000..adf086ca Binary files /dev/null and b/gfx/stats_screen_hp.png differ diff --git a/gfx/stats_screen_lv.png b/gfx/stats_screen_lv.png new file mode 100644 index 00000000..0d5c6620 Binary files /dev/null and b/gfx/stats_screen_lv.png differ -- cgit v1.3.1-sl0p From bd5caf92db057bdf32c77f3415f6411b4d327565 Mon Sep 17 00:00:00 2001 From: pikalaxalt Date: Sun, 22 May 2016 13:52:57 -0400 Subject: Another function related to OAM --- engine/unknown_ea3ea.asm | 27 +++++++++++++++++++++++++++ gfx/zero_one_ea597.png | Bin 0 -> 92 bytes main.asm | 2 +- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 gfx/zero_one_ea597.png (limited to 'gfx') diff --git a/engine/unknown_ea3ea.asm b/engine/unknown_ea3ea.asm index b883f785..78a73393 100755 --- a/engine/unknown_ea3ea.asm +++ b/engine/unknown_ea3ea.asm @@ -187,3 +187,30 @@ GFX_ea563End: ; ea56b (3a:656b) GFX_ea56b: INCBIN "gfx/stats_screen_lv.1bpp" GFX_ea56bEnd: ; ea573 (3a:6573) + +Func_ea573: ; ea573 (3a:6573) + ld hl, vChars1 + $7e0 + ld de, GFX_ea597 + lb bc, BANK(GFX_ea597), (GFX_ea597End - GFX_ea597) / 16 + call CopyVideoData + + ld hl, wOAMBuffer + 32 * 4 + ld a, $08 + ld c, $08 +.loop + ld [hl], $10 + inc hl + ld [hl], a + inc hl + ld [hl], $fe + inc hl + ld [hl], $00 + inc hl + add $08 + dec c + jr nz, .loop + ret + +GFX_ea597: ; ea597 (3a:6597) +INCBIN "gfx/zero_one_ea597.2bpp" +GFX_ea597End: diff --git a/gfx/zero_one_ea597.png b/gfx/zero_one_ea597.png new file mode 100644 index 00000000..0c11b9da Binary files /dev/null and b/gfx/zero_one_ea597.png differ diff --git a/main.asm b/main.asm index fde93d4b..98608ba1 100755 --- a/main.asm +++ b/main.asm @@ -893,7 +893,7 @@ SurfingPikachu2Graphics: INCBIN "gfx/surfing_pikachu_2.2bpp" SurfingPikachu3Graphics: INCBIN "gfx/surfing_pikachu_3.t1.2bpp" INCLUDE "engine/unknown_ea3ea.asm" - dr $ea573,$eaa02 + dr $ea5b7,$eaa02 FreezeEnemyTrainerSprite: ; eaa02 (3a:6a02) ld a, [wCurMap] cp POKEMONTOWER_7 -- cgit v1.3.1-sl0p From 805448c9749c7c729113e942d113dd4eed479892 Mon Sep 17 00:00:00 2001 From: pikalaxalt Date: Sun, 22 May 2016 18:37:42 -0400 Subject: Functions at 3a:4d35 --- engine/unknown_e8d35.asm | 159 +++++++++++++++++++++++++++++++++++++++++++++++ gfx/unknown_ea563.png | Bin 0 -> 82 bytes main.asm | 38 +++++++++-- 3 files changed, 192 insertions(+), 5 deletions(-) create mode 100755 engine/unknown_e8d35.asm create mode 100644 gfx/unknown_ea563.png (limited to 'gfx') diff --git a/engine/unknown_e8d35.asm b/engine/unknown_e8d35.asm new file mode 100755 index 00000000..e28073a0 --- /dev/null +++ b/engine/unknown_e8d35.asm @@ -0,0 +1,159 @@ +Func_e8d35:: ; e8d35 (3a:4e79) + ld a, [wBoxDataStart] + and a + jp z, Functione8df4 + ld a, [wUpdateSpritesEnabled] + push af + xor a + ld [wUpdateSpritesEnabled], a + ld [hItemCounter], a + call Func_e8f24 + ld a, [rIE] + push af + xor a + ld [rIF], a + ld a, $09 + ld [rIE], a + call SaveScreenTilesToBuffer1 + xor a + ld [H_AUTOBGTRANSFERENABLED], a + call Func_e988a + call Func_e8783 + ld a, $10 + ld [$cae2], a + call Func_e8efc + call LoadScreenTilesFromBuffer1 + call Functione8dfb + jr c, .asm_e8ddc + xor a + ld [wUnknownSerialFlag_d49a], a + ld [wUnknownSerialFlag_d49b], a + ld c, 12 + call DelayFrames + xor a + ld [H_AUTOBGTRANSFERENABLED], a + call Func_e98ec + call Func_e8783 + ld a, $00 + ld [$cae2], a + call Func_e8efc + call LoadScreenTilesFromBuffer1 + call Functione8dfb + jr c, .asm_e8ddc + xor a + ld [wUnknownSerialFlag_d49a], a + ld [$d49a], a + ld c, 12 + call DelayFrames + xor a + ld [H_AUTOBGTRANSFERENABLED], a + call Func_e9907 + call Func_e8783 + ld a, $00 + ld [$cae2], a + call Func_e8efc + call LoadScreenTilesFromBuffer1 + call Functione8dfb + jr c, .asm_e8ddc + xor a + ld [wUnknownSerialFlag_d49a], a + ld [wUnknownSerialFlag_d49b], a + ld c, 12 + call DelayFrames + xor a + ld [H_AUTOBGTRANSFERENABLED], a + call Func_e9922 + call Func_e8783 + ld a, $03 + ld [$cae2], a + call Func_e8efc + call LoadScreenTilesFromBuffer1 + call Functione8dfb +.asm_e8ddc + xor a + ld [wUnknownSerialFlag_d49a], a + ld [wUnknownSerialFlag_d49b], a + xor a + ld [rIF], a + pop af + ld [rIE], a + call Func_0f3d + call Func_e8f3b + pop af + ld [wUpdateSpritesEnabled], a + ret + +Functione8df4: ; e8df4 + ld hl, String_e8e1f + call PrintText + ret + +Functione8dfb: ; e8dfb + call Func_e8f16 +.asm_e8dfe + call JoypadLowSensitivity + call Func_e8eca + jr c, .asm_e8e1d + ld a, [wOverworldMap] + bit 7, a + jr nz, .asm_e8e1b + call Func_e87a8 + call Func_e8f51 + call Func_e8f82 + call DelayFrame + jr .asm_e8dfe + +.asm_e8e1b + and a + ret + +.asm_e8e1d + scf + ret + +String_e8e1f: ; e8e1f + TX_FAR _NoPokemonText + db "@" + +Functione8e24: ; e8e24 + xor a + ld [hItemCounter], a + call Func_e8f24 + call Func_ea3ea + ld a, [rIE] + push af + xor a + ld [rIF], a + ld a, $09 + ld [rIE], a + call Func_e8783 + ld a, $13 + ld [$cae2], a + call Func_e8efc + call Func_e8f16 +.asm_e8e45 + call JoypadLowSensitivity + call Func_e8eca + jr c, .asm_e8e62 + ld a, [wOverworldMap] + bit 7, a + jr nz, .asm_e8e62 + call Func_e87a8 + call Func_e8f51 + call Func_e8f82 + call DelayFrame + jr .asm_e8e45 + +.asm_e8e62 + xor a + ld [wUnknownSerialFlag_d49a], a + ld [wUnknownSerialFlag_d49b], a + call Func_e8f09 + xor a + ld [rIF], a + pop af + ld [rIE], a + call Func_0f3d + call Func_e8f3b + ret + diff --git a/gfx/unknown_ea563.png b/gfx/unknown_ea563.png new file mode 100644 index 00000000..adf086ca Binary files /dev/null and b/gfx/unknown_ea563.png differ diff --git a/main.asm b/main.asm index f7754dff..8f84396b 100755 --- a/main.asm +++ b/main.asm @@ -878,17 +878,45 @@ SECTION "bank3A",ROMX,BANK[$3A] MonsterNames: ; e8000 (3a:4000) dr $e8000,$e876c IsPlayerJustOutsideMap: ; e876c (3a:476c) - dr $e876c,$e8a5e + dr $e876c,$e8783 +Func_e8783: ; e8783 (3a:4783) + dr $e8783,$e87a8 +Func_e87a8: ; e87a8 (3a:47a8) + dr $e87a8,$e8a5e Func_e8a5e: ; e8a5e (3a:4a5e) dr $e8a5e,$e8b74 Func_e8b74: ; e8b74 (3a:4b74) dr $e8b74,$e8d35 -Func_e8d35:: ; e8d35 (3a:4d35) - dr $e8d35,$e8e79 + +INCLUDE "engine/unknown_e8d35.asm" + Func_e8e79: ; e8e79 (3a:4e79) - dr $e8e79,$e928a + dr $e8e79,$e8eca +Func_e8eca: ; e8eca (3a:4eca) + dr $e8eca,$e8efc +Func_e8efc: ; e8efc (3a:4efc) + dr $e8efc,$e8f09 +Func_e8f09: ; e8f09 (3a:4f09) + dr $e8f09,$e8f16 +Func_e8f16: ; e8f16 (3a:4f16) + dr $e8f16,$e8f24 +Func_e8f24: ; e8f24 (3a:4f24) + dr $e8f24,$e8f3b +Func_e8f3b: ; e8f3b (3a:4f3b) + dr $e8f3b,$e8f51 +Func_e8f51: ; e8f51 (3a:4f51) + dr $e8f51,$e8f82 +Func_e8f82: ; e8f82 (3a:4f82) + dr $e8f82,$e928a SurfingPikachu2Graphics: INCBIN "gfx/surfing_pikachu_2.2bpp" - dr $e988a,$e9bfa +Func_e988a: ; e988a (3a:588a) + dr $e988a,$e98ec +Func_e98ec: ; e98ec (3a:58ec) + dr $e98ec,$e9907 +Func_e9907: ; e9907 (3a:5907) + dr $e9907,$e9922 +Func_e9922: ; e9922 (3a:5922) + dr $e9922,$e9bfa SurfingPikachu3Graphics: INCBIN "gfx/surfing_pikachu_3.t1.2bpp" -- cgit v1.3.1-sl0p From c74453452847a60126816b61ae71f230c6c1c5ae Mon Sep 17 00:00:00 2001 From: pikalaxalt Date: Sun, 22 May 2016 23:30:24 -0400 Subject: Disassemble diploma in bank 3a --- engine/diploma_3a.asm | 137 ++++++++++++++++++++++++++++++++++++++++++++++ gfx/unknown_e9b3e.tilemap | 1 + gfx/unknown_e9bb6.tilemap | 2 + gfx/unknown_e9bc1.tilemap | 1 + main.asm | 5 +- 5 files changed, 144 insertions(+), 2 deletions(-) create mode 100755 engine/diploma_3a.asm create mode 100644 gfx/unknown_e9b3e.tilemap create mode 100644 gfx/unknown_e9bb6.tilemap create mode 100644 gfx/unknown_e9bc1.tilemap (limited to 'gfx') diff --git a/engine/diploma_3a.asm b/engine/diploma_3a.asm new file mode 100755 index 00000000..20c4ba43 --- /dev/null +++ b/engine/diploma_3a.asm @@ -0,0 +1,137 @@ +_DisplayDiploma: ; e9a08 (3a:5a08) + call GBPalWhiteOutWithDelay3 + call ClearScreen + ld de, SurfingPikachu3Graphics + ld hl, vChars2 + lb bc, BANK(SurfingPikachu3Graphics), (SurfingPikachu3GraphicsEnd - SurfingPikachu3Graphics) / $10 + call CopyVideoData + + coord hl, 0, 0 + call Func_e9bdf + + coord hl, 0, 0 + call Func_e9beb + + coord hl, 19, 0 + call Func_e9beb + + ld a, $00 + coord hl, 0, 0 + ld [hl], a + coord hl, 19, 0 + ld [hl], a + + ld de, String_e9a73 + coord hl, 5, 2 + call PlaceString + + ld de, String_e9a7d + coord hl, 3, 4 + call PlaceString + + ld de, wPlayerName + coord hl, 10, 4 + call PlaceString + + ld de, String_e9a84 + coord hl, 2, 6 + call PlaceString + + ld de, String_e9ac8 + coord hl, 9, 16 + call PlaceString + + ld b, SET_PAL_GENERIC + call RunPaletteCommand + ld a, $01 + ld [$ffba], a + call Delay3 + call GBPalNormal + ret + +; e9a73 +String_e9a73: + db $10, "Diploma", $10, "@" + +String_e9a7d: + db "Player@" + +String_e9a84: + db "Congrats! This" + next "diploma certifies" + next "that you have" + next "completed your" + next "#DEX.@" + +String_e9ac8: + db "GAME FREAK@" + +Func_e9ad3: + call ClearScreen + coord hl, 0, 17 + call Func_e9bdf + coord hl, 0, 0 + call Func_e9beb + coord hl, 19, 0 + call Func_e9beb + ld a, $00 + coord hl, 0, 17 + ld [hl], a + coord hl, 19, 17 + ld [hl], a + ld de, Tilemap_e9b3e + coord hl, 6, 2 + lb bc, 10, 12 + call $525d ; Func_e925d + ld de, Tilemap_e9bb6 + coord hl, 5, 13 + lb bc, 1, 11 + call $525d ; Func_e925d + ld de, String_e9bd5 + coord hl, 2, 15 + call PlaceString + coord hl, 12, 15 + ld de, wPlayTimeHours + 1 + lb bc, $40 | 1, 3 + call PrintNumber + ld [hl], $16 + inc hl + ld de, wPlayTimeMinutes + 1 + lb bc, $80 | 1, 2 + call PrintNumber + ld a, [wNumSetBits] + cp 151 + ret nz + ld de, TileMap_e9bc1 + coord hl, 2, 0 + lb bc, 4, 5 + call $525d ; Func_e925d + ret + +Tilemap_e9b3e: INCBIN "gfx/unknown_e9b3e.tilemap" +Tilemap_e9bb6: INCBIN "gfx/unknown_e9bb6.tilemap" +TileMap_e9bc1: INCBIN "gfx/unknown_e9bc1.tilemap" +String_e9bd5: db "PLAY TIME@" + +Func_e9bdf: + ld c, 10 +.asm_e9be1 + ld [hl], $02 + inc hl + ld [hl], $01 + inc hl + dec c + jr nz, .asm_e9be1 + ret + +Func_e9beb: + ld c, 9 + ld de, SCREEN_WIDTH +.asm_e9bed + ld [hl], $04 + add hl, de + ld [hl], $03 + add hl, de + dec c + jr nz, .asm_e9bed + ret diff --git a/gfx/unknown_e9b3e.tilemap b/gfx/unknown_e9b3e.tilemap new file mode 100644 index 00000000..95386372 --- /dev/null +++ b/gfx/unknown_e9b3e.tilemap @@ -0,0 +1 @@ + !"#$%&'()*+,-./0123456789:;<=>?@ABC)DEFGHIJK))LMNOPQRSTUVWXYZ[\]^_`abcdefghijklmn \ No newline at end of file diff --git a/gfx/unknown_e9bb6.tilemap b/gfx/unknown_e9bb6.tilemap new file mode 100644 index 00000000..1fc3cd90 --- /dev/null +++ b/gfx/unknown_e9bb6.tilemap @@ -0,0 +1,2 @@ + +  \ No newline at end of file diff --git a/gfx/unknown_e9bc1.tilemap b/gfx/unknown_e9bc1.tilemap new file mode 100644 index 00000000..13521d1e --- /dev/null +++ b/gfx/unknown_e9bc1.tilemap @@ -0,0 +1 @@ +pqrstuvwx \ No newline at end of file diff --git a/main.asm b/main.asm index 9fdb091c..ec76673b 100755 --- a/main.asm +++ b/main.asm @@ -918,10 +918,11 @@ Func_e8f82: ; e8f82 (3a:4f82) dr $e8f82,$e928a SurfingPikachu2Graphics: INCBIN "gfx/surfing_pikachu_2.2bpp" dr $e988a,$e9a08 -_DisplayDiploma: ; e9a08 (3a:5a08) - dr $e9a08,$e9bfa + +INCLUDE "engine/diploma_3a.asm" SurfingPikachu3Graphics: INCBIN "gfx/surfing_pikachu_3.t1.2bpp" +SurfingPikachu3GraphicsEnd: INCLUDE "engine/unknown_ea3ea.asm" -- cgit v1.3.1-sl0p From 2876e629ccc31699d45e7f7092f52e314b24f23c Mon Sep 17 00:00:00 2001 From: pikalaxalt Date: Mon, 23 May 2016 14:12:42 -0400 Subject: Move diploma tilemaps out of incbins --- engine/diploma_3a.asm | 36 +++++++++++++++++++++++++++++++++--- gfx/unknown_e9b3e.tilemap | 1 - gfx/unknown_e9bb6.tilemap | 2 -- gfx/unknown_e9bc1.tilemap | 1 - 4 files changed, 33 insertions(+), 7 deletions(-) delete mode 100644 gfx/unknown_e9b3e.tilemap delete mode 100644 gfx/unknown_e9bb6.tilemap delete mode 100644 gfx/unknown_e9bc1.tilemap (limited to 'gfx') diff --git a/engine/diploma_3a.asm b/engine/diploma_3a.asm index 471703d6..c8a7e740 100755 --- a/engine/diploma_3a.asm +++ b/engine/diploma_3a.asm @@ -108,9 +108,39 @@ Func_e9ad3: call Func_e925d ret -Tilemap_e9b3e: INCBIN "gfx/unknown_e9b3e.tilemap" -Tilemap_e9bb6: INCBIN "gfx/unknown_e9bb6.tilemap" -TileMap_e9bc1: INCBIN "gfx/unknown_e9bc1.tilemap" +Tilemap_e9b3e: + db $7f, $7f, $7f, $1a, $1b, $7f, $7f, $7f, $7f, $7f + db $7f, $7f, $7f, $7f, $7f, $1c, $1d, $1e, $1f, $20 + db $7f, $21, $22, $23, $7f, $24, $25, $26, $27, $28 + db $29, $2a, $2b, $2c, $2d, $2e, $2f, $30, $31, $32 + db $33, $34, $35, $36, $37, $38, $39, $3a, $3b, $3c + db $7f, $3d, $3e, $3f, $40, $41, $42, $43, $29, $44 + db $45, $46, $47, $48, $49, $4a, $4b, $29, $29, $4c + db $4d, $4e, $4f, $50, $51, $52, $53, $54, $55, $56 + db $57, $58, $59, $7f, $7f, $7f, $5a, $5b, $5c, $5d + db $5e, $5f, $60, $61, $62, $7f, $7f, $7f, $7f, $63 + db $64, $65, $66, $67, $68, $7f, $7f, $7f, $7f, $7f + db $7f, $69, $6a, $6b, $6c, $6d, $6e, $7f, $7f, $7f + +Tilemap_e9bb6: + db $05 + db $06 + db $07 + db $08 + db $09 + db $0a + db $0b + db $0c + db $0d + db $0e + db $0f + +TileMap_e9bc1: + db $70, $71, $7f, $72, $7f + db $73, $74, $75, $76, $77 + db $7f, $78, $11, $12, $13 + db $7f, $7f, $14, $15, $7f + String_e9bd5: db "PLAY TIME@" Func_e9bdf: diff --git a/gfx/unknown_e9b3e.tilemap b/gfx/unknown_e9b3e.tilemap deleted file mode 100644 index 95386372..00000000 --- a/gfx/unknown_e9b3e.tilemap +++ /dev/null @@ -1 +0,0 @@ - !"#$%&'()*+,-./0123456789:;<=>?@ABC)DEFGHIJK))LMNOPQRSTUVWXYZ[\]^_`abcdefghijklmn \ No newline at end of file diff --git a/gfx/unknown_e9bb6.tilemap b/gfx/unknown_e9bb6.tilemap deleted file mode 100644 index 1fc3cd90..00000000 --- a/gfx/unknown_e9bb6.tilemap +++ /dev/null @@ -1,2 +0,0 @@ - -  \ No newline at end of file diff --git a/gfx/unknown_e9bc1.tilemap b/gfx/unknown_e9bc1.tilemap deleted file mode 100644 index 13521d1e..00000000 --- a/gfx/unknown_e9bc1.tilemap +++ /dev/null @@ -1 +0,0 @@ -pqrstuvwx \ No newline at end of file -- cgit v1.3.1-sl0p