You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Document mobile SDK error packets
This commit is contained in:
@@ -77,11 +77,11 @@ Function110030::
|
|||||||
; clear [$c835].
|
; clear [$c835].
|
||||||
push de
|
push de
|
||||||
ld a, [$c988]
|
ld a, [$c988]
|
||||||
cp 2 * 6
|
cp $0c
|
||||||
jr z, .noreset
|
jr z, .noreset
|
||||||
cp 2 * 7
|
cp $0e
|
||||||
jr z, .noreset
|
jr z, .noreset
|
||||||
cp 2 * 8
|
cp $10
|
||||||
jr z, .noreset
|
jr z, .noreset
|
||||||
xor a
|
xor a
|
||||||
ld [$c835], a
|
ld [$c835], a
|
||||||
@@ -4134,7 +4134,7 @@ Function111b3c:
|
|||||||
ld hl, Function111e28
|
ld hl, Function111e28
|
||||||
push hl
|
push hl
|
||||||
cp $ee
|
cp $ee
|
||||||
jp z, Function111e2b
|
jp z, MobileSDK_GetErrorCode
|
||||||
ld a, [wMobileSDK_SendCommandID]
|
ld a, [wMobileSDK_SendCommandID]
|
||||||
cp $ff
|
cp $ff
|
||||||
jp z, Function111ef8
|
jp z, Function111ef8
|
||||||
@@ -4546,7 +4546,8 @@ Function111e15:
|
|||||||
Function111e28:
|
Function111e28:
|
||||||
jp Function110029
|
jp Function110029
|
||||||
|
|
||||||
Function111e2b:
|
MobileSDK_GetErrorCode:
|
||||||
|
; Converts an error packet into a BCD error code
|
||||||
ld a, [wMobileSDK_SendCommandID]
|
ld a, [wMobileSDK_SendCommandID]
|
||||||
cp $ff
|
cp $ff
|
||||||
jp z, Function111ef8
|
jp z, Function111ef8
|
||||||
@@ -4571,54 +4572,59 @@ Function111e2b:
|
|||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [$c80e], a
|
ld [$c80e], a
|
||||||
cp $10
|
cp $10
|
||||||
jr z, .asm_111e88
|
jr z, .adapter_not_plugged_in
|
||||||
cp $12
|
cp $12
|
||||||
jr z, .asm_111e8c
|
jr z, .dial_telephone
|
||||||
cp $13
|
cp $13
|
||||||
jr z, .asm_111ea1
|
jr z, .hang_up_logout
|
||||||
cp $15
|
cp $15
|
||||||
jr z, .asm_111eae
|
jr z, .transfer_data
|
||||||
cp $19
|
cp $19
|
||||||
jr z, .asm_111edc
|
jr z, .read_configuration_data
|
||||||
cp $21
|
cp $21
|
||||||
jr z, .asm_111ee0
|
jr z, .isp_login
|
||||||
cp $22
|
cp $22
|
||||||
jr z, .asm_111ea1
|
jr z, .hang_up_logout
|
||||||
cp $23
|
cp $23
|
||||||
jr z, .asm_111ee4
|
jr z, .open_tcp_connection
|
||||||
cp $24
|
cp $24
|
||||||
jr z, .asm_111eed
|
jr z, .close_tcp_connection
|
||||||
cp $28
|
cp $28
|
||||||
jr z, .asm_111ee9
|
jr z, .dns_query
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
.asm_111e84
|
|
||||||
|
.store_error_code
|
||||||
ld [$c80f], a
|
ld [$c80f], a
|
||||||
ret
|
ret
|
||||||
.asm_111e88
|
|
||||||
|
.adapter_not_plugged_in
|
||||||
ld a, $10
|
ld a, $10
|
||||||
jr .asm_111e84
|
jr .store_error_code
|
||||||
.asm_111e8c
|
|
||||||
|
.dial_telephone
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
or $0
|
or $0
|
||||||
jr z, .asm_111e9d
|
jr z, .asm_111e9d
|
||||||
cp $2
|
cp $2
|
||||||
jr z, .asm_111e99
|
jr z, .asm_111e99
|
||||||
ld a, $13
|
ld a, $13
|
||||||
jr .asm_111e84
|
jr .store_error_code
|
||||||
.asm_111e99
|
.asm_111e99
|
||||||
ld a, $17
|
ld a, $17
|
||||||
jr .asm_111e84
|
jr .store_error_code
|
||||||
.asm_111e9d
|
.asm_111e9d
|
||||||
ld a, $12
|
ld a, $12
|
||||||
jr .asm_111e84
|
jr .store_error_code
|
||||||
.asm_111ea1
|
|
||||||
|
.hang_up_logout
|
||||||
ld hl, $c821
|
ld hl, $c821
|
||||||
res 1, [hl]
|
res 1, [hl]
|
||||||
res 4, [hl]
|
res 4, [hl]
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ld [$c807], a
|
ld [$c807], a
|
||||||
ret
|
ret
|
||||||
.asm_111eae
|
|
||||||
|
.transfer_data
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp $1
|
cp $1
|
||||||
jr nz, .asm_111ed3
|
jr nz, .asm_111ed3
|
||||||
@@ -4641,20 +4647,25 @@ Function111e2b:
|
|||||||
ld hl, $c822
|
ld hl, $c822
|
||||||
res 5, [hl]
|
res 5, [hl]
|
||||||
ld a, $24
|
ld a, $24
|
||||||
jr .asm_111e84
|
jr .store_error_code
|
||||||
.asm_111edc
|
|
||||||
|
.read_configuration_data
|
||||||
ld a, $14
|
ld a, $14
|
||||||
jr .asm_111e84
|
jr .store_error_code
|
||||||
.asm_111ee0
|
|
||||||
|
.isp_login
|
||||||
ld a, $22
|
ld a, $22
|
||||||
jr .asm_111e84
|
jr .store_error_code
|
||||||
.asm_111ee4
|
|
||||||
|
.open_tcp_connection
|
||||||
ld hl, $c821
|
ld hl, $c821
|
||||||
res 1, [hl]
|
res 1, [hl]
|
||||||
.asm_111ee9
|
|
||||||
|
.dns_query
|
||||||
ld a, $24
|
ld a, $24
|
||||||
jr .asm_111e84
|
jr .store_error_code
|
||||||
.asm_111eed
|
|
||||||
|
.close_tcp_connection
|
||||||
ld hl, $c821
|
ld hl, $c821
|
||||||
res 1, [hl]
|
res 1, [hl]
|
||||||
ld a, $3
|
ld a, $3
|
||||||
|
@@ -59,8 +59,8 @@ SetRAMStateForMobile:
|
|||||||
ld bc, $65
|
ld bc, $65
|
||||||
call ByteFill
|
call ByteFill
|
||||||
xor a
|
xor a
|
||||||
ld hl, wMobileErrorCodeBuffer
|
ld hl, wMobileWRAM
|
||||||
ld bc, $100
|
ld bc, wMobileWRAMEnd - wMobileWRAM
|
||||||
call ByteFill
|
call ByteFill
|
||||||
ldh a, [rIE]
|
ldh a, [rIE]
|
||||||
ld [wBGMapBuffer], a
|
ld [wBGMapBuffer], a
|
||||||
|
@@ -4793,7 +4793,7 @@ MobileErrorCodes_23: db 1
|
|||||||
dw $000, MobileErrorCode_23_000_Text
|
dw $000, MobileErrorCode_23_000_Text
|
||||||
|
|
||||||
MobileErrorCodes_24: db 1
|
MobileErrorCodes_24: db 1
|
||||||
dw $000, MobileErrorCode_LineBusyText
|
dw $000, MobileErrorCode_ServerConnectionFailedText
|
||||||
|
|
||||||
MobileErrorCodes_25: db 1
|
MobileErrorCodes_25: db 1
|
||||||
dw $000, MobileErrorCode_25_000_Text
|
dw $000, MobileErrorCode_25_000_Text
|
||||||
@@ -4803,11 +4803,11 @@ MobileErrorCodes_26: db 1
|
|||||||
|
|
||||||
MobileErrorCodes_30: db 17
|
MobileErrorCodes_30: db 17
|
||||||
dw $000, MobileErrorCode_CommuncationErrorText
|
dw $000, MobileErrorCode_CommuncationErrorText
|
||||||
dw $221, MobileErrorCode_LineBusyText
|
dw $221, MobileErrorCode_ServerConnectionFailedText
|
||||||
dw $421, MobileErrorCode_LineBusyText
|
dw $421, MobileErrorCode_ServerConnectionFailedText
|
||||||
dw $450, MobileErrorCode_30_450_Text
|
dw $450, MobileErrorCode_30_450_Text
|
||||||
dw $451, MobileErrorCode_LineBusyText
|
dw $451, MobileErrorCode_ServerConnectionFailedText
|
||||||
dw $452, MobileErrorCode_LineBusyText
|
dw $452, MobileErrorCode_ServerConnectionFailedText
|
||||||
dw $500, MobileErrorCode_CommuncationErrorText
|
dw $500, MobileErrorCode_CommuncationErrorText
|
||||||
dw $501, MobileErrorCode_CommuncationErrorText
|
dw $501, MobileErrorCode_CommuncationErrorText
|
||||||
dw $502, MobileErrorCode_CommuncationErrorText
|
dw $502, MobileErrorCode_CommuncationErrorText
|
||||||
@@ -4815,17 +4815,17 @@ MobileErrorCodes_30: db 17
|
|||||||
dw $504, MobileErrorCode_CommuncationErrorText
|
dw $504, MobileErrorCode_CommuncationErrorText
|
||||||
dw $550, MobileErrorCode_30_550_Text
|
dw $550, MobileErrorCode_30_550_Text
|
||||||
dw $551, MobileErrorCode_30_551_Text
|
dw $551, MobileErrorCode_30_551_Text
|
||||||
dw $552, MobileErrorCode_LineBusyText
|
dw $552, MobileErrorCode_ServerConnectionFailedText
|
||||||
dw $553, MobileErrorCode_30_553_Text
|
dw $553, MobileErrorCode_30_553_Text
|
||||||
dw $554, MobileErrorCode_LineBusyText
|
dw $554, MobileErrorCode_ServerConnectionFailedText
|
||||||
dw -1, MobileErrorCode_LineBusyText
|
dw -1, MobileErrorCode_ServerConnectionFailedText
|
||||||
|
|
||||||
MobileErrorCodes_31: db 5
|
MobileErrorCodes_31: db 5
|
||||||
dw $000, MobileErrorCode_CommuncationErrorText
|
dw $000, MobileErrorCode_CommuncationErrorText
|
||||||
dw $002, MobileErrorCode_31_002_Text
|
dw $002, MobileErrorCode_31_002_Text
|
||||||
dw $003, MobileErrorCode_31_003_Text
|
dw $003, MobileErrorCode_31_003_Text
|
||||||
dw $004, MobileErrorCode_CommuncationErrorText
|
dw $004, MobileErrorCode_CommuncationErrorText
|
||||||
dw -1, MobileErrorCode_LineBusyText
|
dw -1, MobileErrorCode_ServerConnectionFailedText
|
||||||
|
|
||||||
MobileErrorCodes_32: db 17
|
MobileErrorCodes_32: db 17
|
||||||
dw $000, MobileErrorCode_CommuncationErrorText
|
dw $000, MobileErrorCode_CommuncationErrorText
|
||||||
@@ -5058,7 +5058,7 @@ MobileErrorCode_33_299_Text:
|
|||||||
next "せつめいしょを ごらんください"
|
next "せつめいしょを ごらんください"
|
||||||
db "@"
|
db "@"
|
||||||
|
|
||||||
MobileErrorCode_LineBusyText:
|
MobileErrorCode_ServerConnectionFailedText:
|
||||||
; The telephone line is busy. Due to this error, the Mobile Center cannot communicate.
|
; The telephone line is busy. Due to this error, the Mobile Center cannot communicate.
|
||||||
; Please wait for a little while and call again.
|
; Please wait for a little while and call again.
|
||||||
db "でんわかいせんが こんでいるか"
|
db "でんわかいせんが こんでいるか"
|
||||||
|
3
wram.asm
3
wram.asm
@@ -237,6 +237,7 @@ wc300::
|
|||||||
|
|
||||||
NEXTU ; c300
|
NEXTU ; c300
|
||||||
; mobile data
|
; mobile data
|
||||||
|
wMobileWRAM::
|
||||||
wMobileErrorCodeBuffer:: ds 3 ; c300
|
wMobileErrorCodeBuffer:: ds 3 ; c300
|
||||||
wc303:: ds 2
|
wc303:: ds 2
|
||||||
wc305:: ds 1
|
wc305:: ds 1
|
||||||
@@ -299,8 +300,8 @@ wc3f9:: ds 1
|
|||||||
wc3fa:: ds 1
|
wc3fa:: ds 1
|
||||||
wc3fb:: ds 1
|
wc3fb:: ds 1
|
||||||
wc3fc:: ds 1
|
wc3fc:: ds 1
|
||||||
|
|
||||||
ds 3
|
ds 3
|
||||||
|
wMobileWRAMEnd::
|
||||||
|
|
||||||
|
|
||||||
SECTION "Sprites", WRAM0
|
SECTION "Sprites", WRAM0
|
||||||
|
Reference in New Issue
Block a user