Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assorted labels in mobile related code #702

Merged
merged 8 commits into from
Apr 1, 2020
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion data/mobile/ascii-alpha.txt

This file was deleted.

1 change: 0 additions & 1 deletion data/mobile/ascii-sym.txt

This file was deleted.

1 change: 0 additions & 1 deletion data/mobile/x-game-code-prefix.txt

This file was deleted.

Binary file removed data/mobile/x-game-code.txt
Binary file not shown.
1 change: 0 additions & 1 deletion data/mobile/x-game-result-prefix.txt

This file was deleted.

Binary file removed data/mobile/x-game-result.txt
Binary file not shown.
40 changes: 20 additions & 20 deletions lib/mobile/main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -8440,9 +8440,9 @@ Function1136c1:

.asm_113734
ld hl, $cc0c
ld a, LOW(Unknown_113b8e)
ld a, LOW(MD5_K_Table)
ld [hli], a
ld a, HIGH(Unknown_113b8e)
ld a, HIGH(MD5_K_Table)
ld [hl], a
ld hl, $cc0e
ld a, LOW(Unknown_113a70)
Expand Down Expand Up @@ -8529,7 +8529,7 @@ endr
ld [$cc0d], a
ld a, l
ld [$cc0c], a
cp $8e ; XXX LOW(Unknown_113b8e + $100) ???
cp $8e ; XXX LOW(MD5_K_Table + $100) ???
jp nz, .asm_113751
ld de, $cc18
ld hl, $cbe7
Expand Down Expand Up @@ -8983,23 +8983,23 @@ Unknown_113b7e:
db $01, $23, $45, $67, $89, $ab, $cd, $ef
db $fe, $dc, $ba, $98, $76, $54, $32, $10

Unknown_113b8e:
db $78, $a4, $6a, $d7, $56, $b7, $c7, $e8, $db, $70, $20, $24, $ee, $ce, $bd, $c1
db $af, $0f, $7c, $f5, $2a, $c6, $87, $47, $13, $46, $30, $a8, $01, $95, $46, $fd
db $d8, $98, $80, $69, $af, $f7, $44, $8b, $b1, $5b, $ff, $ff, $be, $d7, $5c, $89
db $22, $11, $90, $6b, $93, $71, $98, $fd, $8e, $43, $79, $a6, $21, $08, $b4, $49
db $62, $25, $1e, $f6, $40, $b3, $40, $c0, $51, $5a, $5e, $26, $aa, $c7, $b6, $e9
db $5d, $10, $2f, $d6, $53, $14, $44, $02, $81, $e6, $a1, $d8, $c8, $fb, $d3, $e7
db $e6, $cd, $e1, $21, $d6, $07, $37, $c3, $87, $0d, $d5, $f4, $ed, $14, $5a, $45
db $05, $e9, $e3, $a9, $f8, $a3, $ef, $fc, $d9, $02, $6f, $67, $8a, $4c, $2a, $8d
db $42, $39, $fa, $ff, $81, $f6, $71, $87, $22, $61, $9d, $6d, $0c, $38, $e5, $fd
db $44, $ea, $be, $a4, $a9, $cf, $de, $4b, $60, $4b, $bb, $f6, $70, $bc, $bf, $be
db $c6, $7e, $9b, $28, $fa, $27, $a1, $ea, $85, $30, $ef, $d4, $05, $1d, $88, $04
db $39, $d0, $d4, $d9, $e5, $99, $db, $e6, $f8, $7c, $a2, $1f, $65, $56, $ac, $c4
db $44, $22, $29, $f4, $97, $ff, $2a, $43, $a7, $23, $94, $ab, $39, $a0, $93, $fc
db $c3, $59, $5b, $65, $92, $cc, $0c, $8f, $7d, $f4, $ef, $ff, $d1, $5d, $84, $85
db $4f, $7e, $a8, $6f, $e0, $e6, $2c, $fe, $14, $43, $01, $a3, $a1, $11, $08, $4e
db $82, $7e, $53, $f7, $35, $f2, $3a, $bd, $bb, $d2, $d7, $2a, $91, $d3, $86, $eb
MD5_K_Table:
dl $d76aa478, $e8c7b756, $242070db, $c1bdceee
dl $f57c0faf, $4787c62a, $a8304613, $fd469501
dl $698098d8, $8b44f7af, $ffff5bb1, $895cd7be
dl $6b901122, $fd987193, $a679438e, $49b40821
dl $f61e2562, $c040b340, $265e5a51, $e9b6c7aa
dl $d62f105d, $02441453, $d8a1e681, $e7d3fbc8
dl $21e1cde6, $c33707d6, $f4d50d87, $455a14ed
dl $a9e3e905, $fcefa3f8, $676f02d9, $8d2a4c8a
dl $fffa3942, $8771f681, $6d9d6122, $fde5380c
dl $a4beea44, $4bdecfa9, $f6bb4b60, $bebfbc70
dl $289b7ec6, $eaa127fa, $d4ef3085, $04881d05
dl $d9d4d039, $e6db99e5, $1fa27cf8, $c4ac5665
dl $f4292244, $432aff97, $ab9423a7, $fc93a039
dl $655b59c3, $8f0ccc92, $ffeff47d, $85845dd1
dl $6fa87e4f, $fe2ce6e0, $a3014314, $4e0811a1
dl $f7537e82, $bd3af235, $2ad7d2bb, $eb86d391

Function113c8e:
ld a, c
Expand Down
12 changes: 6 additions & 6 deletions mobile/mobile_12_2.asm
Original file line number Diff line number Diff line change
Expand Up @@ -267,24 +267,24 @@ Function4a9d7:
call GetNick
ld h, d
ld l, e
ld de, wd006
ld bc, 6
ld de, wMobileParticipant1Nickname
ld bc, NAME_LENGTH_JAPANESE
call CopyBytes
ld a, [wd003]
ld hl, wPartyMonNicknames
call GetNick
ld h, d
ld l, e
ld de, wd00c
ld bc, 6
ld de, wMobileParticipant2Nickname
ld bc, NAME_LENGTH_JAPANESE
call CopyBytes
ld a, [wd004]
ld hl, wPartyMonNicknames
call GetNick
ld h, d
ld l, e
ld de, wd012
ld bc, 6
ld de, wMobileParticipant3Nickname
ld bc, NAME_LENGTH_JAPANESE
call CopyBytes
ld hl, MobileUseTheseThreeMonText
call PrintText
Expand Down
20 changes: 10 additions & 10 deletions mobile/mobile_22.asm
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ Function891fe:
pop bc
ret

Function89209:
Mobile_EnableSpriteUpdates:
ld a, 1
ld [wSpriteUpdatesEnabled], a
ret

Function8920f:
Mobile_DisableSpriteUpdates:
ld a, 0
ld [wSpriteUpdatesEnabled], a
ret
Expand Down Expand Up @@ -237,13 +237,13 @@ Function89261:
ld [wMenuCursorBuffer], a
call PushWindow
call Mobile22_SetBGMapMode0
call Function89209
call Mobile_EnableSpriteUpdates
call VerticalMenu
push af
ld c, $a
call DelayFrames
call CloseWindow
call Function8920f
call Mobile_DisableSpriteUpdates
pop af
jr c, .done
ld a, [wMenuCursorY]
Expand Down Expand Up @@ -2514,9 +2514,9 @@ Function89ff6:

Function8a03d:
ld hl, MobileCardFolderIntro2Text
call Function89209
call Mobile_EnableSpriteUpdates
call PrintText
call Function8920f
call Mobile_DisableSpriteUpdates
jp Function89e36

Function8a04c:
Expand Down Expand Up @@ -2690,9 +2690,9 @@ Function8a116:
and a
ret
.asm_8a16b
call Function89209
call Mobile_EnableSpriteUpdates
call CloseWindow
call Function8920f
call Mobile_DisableSpriteUpdates
scf
ret

Expand Down Expand Up @@ -3726,9 +3726,9 @@ Function8a999:
pop bc
jr .asm_8a9a1
.asm_8a9bb
call Function89209
call Mobile_EnableSpriteUpdates
call CloseWindow
call Function8920f
call Mobile_DisableSpriteUpdates
ret

Jumptable_8a9c5:
Expand Down
4 changes: 2 additions & 2 deletions mobile/mobile_22_2.asm
Original file line number Diff line number Diff line change
Expand Up @@ -796,9 +796,9 @@ Function8b7bd:
call Function8b703
call Function8b75d
call UpdateSprites
call Function89209
call Mobile_EnableSpriteUpdates
call ScrollingMenu
call Function8920f
call Mobile_DisableSpriteUpdates
ld a, [wMenuJoypad]
cp $2
jr z, .asm_8b823
Expand Down
40 changes: 20 additions & 20 deletions mobile/mobile_45.asm
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ String_114228:
String_114232:
db "=?ISO-2022-JP?B?", 0

popc

Function114243::
ld a, SRAM_ENABLE
ld [MBC3SRamEnable], a
Expand Down Expand Up @@ -514,9 +512,9 @@ Function114412:
jr z, .asm_1144c2
inc e
call z, Function1144c8
cp $61 ; "a"
cp "a"
jr c, .asm_114462
cp $7b ; "z" + 1
cp "z" + 1
jr nc, .asm_114462
sub $20

Expand All @@ -540,10 +538,10 @@ Function114412:
jr .asm_11446e

.asm_114476
ld a, $20 ; " "
ld a, " "
cp b
jr z, .asm_114481
ld a, $a ; NL
ld a, "\n"
cp b
jr z, .asm_114481
dec de
Expand All @@ -559,18 +557,18 @@ Function114412:
inc bc
inc e
call z, Function1144c8
cp $d ; CR
cp $d ; "\r"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I've updated issue #686 to remind us to use "\r" here when rgbds 0.4.0 supports it.)

jr nz, .asm_114486
ld a, [de]
inc bc
inc e
call z, Function1144c8
cp $a ; NL
cp "\n"
jr nz, .asm_114486
ld a, [de]
cp $20 ; " "
cp " "
jr z, .asm_114486
cp $9 ; TAB
cp "\t"
jr z, .asm_114486
ld d, h
ld e, l
Expand Down Expand Up @@ -5026,27 +5024,27 @@ endr
jp nz, .asm_115c64
ret

Function115cfd:
cp $2b
Function115cfd: ; Base64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this encoding or decoding Base64? Please change the Function115cfd label to clarify.

cp "+"
jr c, .asm_115d27
jr z, .asm_115d2f
cp $2f
cp "/"
jr c, .asm_115d27
jr z, .asm_115d32
cp $30
cp "0"
jr c, .asm_115d27
cp $3a
cp "9" + 1
jr c, .asm_115d35
cp $3d
cp "="
jr c, .asm_115d27
jr z, .asm_115d38
cp $41
cp "A"
jr c, .asm_115d27
cp $5b
cp "Z" + 1
jr c, .asm_115d4d
cp $61
cp "a"
jr c, .asm_115d27
cp $7b
cp "z" + 1
jr c, .asm_115d50

.asm_115d27
Expand Down Expand Up @@ -5156,3 +5154,5 @@ Function115d80:
ld d, $a0
ld e, $0
ret

popc
12 changes: 10 additions & 2 deletions mobile/mobile_45_stadium.asm
Original file line number Diff line number Diff line change
Expand Up @@ -486,11 +486,19 @@ MobilePassword_IncrementJumptable:
inc [hl]
ret

pushc
setcharmap ascii

Unknown_117a0f:
INCBIN "data/mobile/ascii-alpha.txt"
db "ABCDEFGHIJKLMNOPQRSTUVWXYZ "
db "abcdefghijklmnopqrstuvwxyz "

Unknown_117a47:
INCBIN "data/mobile/ascii-sym.txt"
db "0123456789 "
db "!\"#$%&'()*+ "
db ",-./:;<=>?@ "
db "[\\]^_`\{|}~ "
popc

; everything from here to the end of the bank is related to the
; Mobile Stadium option from the continue/newgame menu.
Expand Down
Loading