2013-09-15 15:56:25 -07:00
|
|
|
; A library included as part of the Mobile Adapter GB SDK.
|
|
|
|
|
2020-07-08 12:30:23 -07:00
|
|
|
INCLUDE "macros/const.asm"
|
2019-10-20 15:27:34 -07:00
|
|
|
INCLUDE "constants/hardware_constants.asm"
|
|
|
|
INCLUDE "constants/mobile_constants.asm"
|
|
|
|
|
|
|
|
; Mobile Adapter protocol commands
|
2022-06-06 14:25:42 -07:00
|
|
|
DEF MOBILE_COMMAND_BEGIN_SESSION EQU $10
|
|
|
|
DEF MOBILE_COMMAND_END_SESSION EQU $11
|
|
|
|
DEF MOBILE_COMMAND_DIAL_TELEPHONE EQU $12
|
|
|
|
DEF MOBILE_COMMAND_HANG_UP_TELEPHONE EQU $13
|
|
|
|
DEF MOBILE_COMMAND_WAIT_FOR_TELEPHONE_CALL EQU $14
|
|
|
|
DEF MOBILE_COMMAND_TRANSFER_DATA EQU $15
|
|
|
|
DEF MOBILE_COMMAND_TELEPHONE_STATUS EQU $17
|
|
|
|
DEF MOBILE_COMMAND_READ_CONFIGURATION_DATA EQU $19
|
|
|
|
DEF MOBILE_COMMAND_WRITE_CONFIGURATION_DATA EQU $1a
|
|
|
|
DEF MOBILE_COMMAND_TRANSFER_DATA_END EQU $1f
|
|
|
|
DEF MOBILE_COMMAND_ISP_LOGIN EQU $21
|
|
|
|
DEF MOBILE_COMMAND_ISP_LOGOUT EQU $22
|
|
|
|
DEF MOBILE_COMMAND_OPEN_TCP_CONNECTION EQU $23
|
|
|
|
DEF MOBILE_COMMAND_CLOSE_TCP_CONNECTION EQU $24
|
|
|
|
DEF MOBILE_COMMAND_DNS_QUERY EQU $28
|
|
|
|
DEF MOBILE_COMMAND_ERROR EQU $6e
|
2014-04-29 14:43:24 -07:00
|
|
|
|
2017-12-26 19:57:19 -08:00
|
|
|
|
|
|
|
SECTION "Mobile Adapter SDK", ROMX
|
2014-04-29 14:43:24 -07:00
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
MobileSDK_CopyBytes:
|
2015-10-16 10:35:43 -07:00
|
|
|
; Copy b bytes from hl to de
|
|
|
|
.loop
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
dec b
|
2015-10-16 10:35:43 -07:00
|
|
|
jr nz, .loop
|
2013-10-01 22:11:54 -07:00
|
|
|
ret
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
MobileSDK_CopyString:
|
2015-10-16 10:35:43 -07:00
|
|
|
; Copy bytes from hl to de until a 0 is encountered.
|
|
|
|
; Include the 0 in the copy, and count the number of
|
|
|
|
; nonzero bytes copied. Keep the de pointer at the
|
|
|
|
; copied zero.
|
|
|
|
.loop
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld [de], a
|
|
|
|
or a
|
|
|
|
ret z
|
|
|
|
inc de
|
|
|
|
inc bc
|
2015-10-16 10:35:43 -07:00
|
|
|
jr .loop
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
MobileSDK_CopyStringLen:
|
2015-10-16 10:35:43 -07:00
|
|
|
; Copy bytes from hl to de until a 0 is encountered,
|
|
|
|
; or a bytes have been copied, whichever comes first.
|
|
|
|
; Add the byte count to the count previously stored
|
|
|
|
; in bc.
|
2014-04-29 19:59:39 -07:00
|
|
|
push bc
|
|
|
|
ld c, $0
|
|
|
|
ld b, a
|
|
|
|
dec b
|
2015-10-16 10:35:43 -07:00
|
|
|
.loop
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld [de], a
|
|
|
|
or a
|
2015-10-16 10:35:43 -07:00
|
|
|
jr z, .done
|
2014-04-29 19:59:39 -07:00
|
|
|
inc de
|
|
|
|
inc c
|
|
|
|
dec b
|
2015-10-16 10:35:43 -07:00
|
|
|
jr nz, .loop
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
ld [de], a
|
|
|
|
|
2015-10-16 10:35:43 -07:00
|
|
|
.done
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, c
|
|
|
|
pop bc
|
|
|
|
add c
|
|
|
|
ld c, a
|
|
|
|
ld a, b
|
2018-02-04 10:16:40 -08:00
|
|
|
adc 0
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, a
|
|
|
|
ret
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2019-10-20 15:27:34 -07:00
|
|
|
ResetReceivePacketBuffer:
|
|
|
|
; Clear two bytes at wMobileSDK_ReceivedBytes
|
2013-10-01 22:11:54 -07:00
|
|
|
xor a
|
2019-10-20 15:27:34 -07:00
|
|
|
ld hl, wMobileSDK_ReceivedBytes
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hli], a
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
2022-01-16 14:50:50 -08:00
|
|
|
_MobileAPI::
|
|
|
|
; Use the byte at wMobileAPIIndex as a parameter
|
2015-12-26 18:59:03 -08:00
|
|
|
; for a dw.
|
2022-01-16 14:50:50 -08:00
|
|
|
; If [wMobileAPIIndex] not in {MOBILEAPI_06, MOBILEAPI_07, MOBILEAPI_08},
|
2021-09-05 09:47:24 -07:00
|
|
|
; clear [wc835].
|
2013-10-01 22:11:54 -07:00
|
|
|
push de
|
2022-01-16 14:50:50 -08:00
|
|
|
ld a, [wMobileAPIIndex]
|
|
|
|
cp MOBILEAPI_06
|
2015-10-16 10:35:43 -07:00
|
|
|
jr z, .noreset
|
2022-01-16 14:50:50 -08:00
|
|
|
cp MOBILEAPI_07
|
2015-10-16 10:35:43 -07:00
|
|
|
jr z, .noreset
|
2022-01-16 14:50:50 -08:00
|
|
|
cp MOBILEAPI_08
|
2015-10-16 10:35:43 -07:00
|
|
|
jr z, .noreset
|
2013-10-01 22:11:54 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc835], a
|
2022-01-16 14:50:50 -08:00
|
|
|
ld a, [wMobileAPIIndex]
|
2015-10-16 10:35:43 -07:00
|
|
|
.noreset
|
2016-05-05 12:07:37 -07:00
|
|
|
; Get the pointer
|
|
|
|
ld d, 0
|
2013-10-01 22:11:54 -07:00
|
|
|
ld e, a
|
2015-12-26 18:59:03 -08:00
|
|
|
ld hl, .dw
|
2013-10-01 22:11:54 -07:00
|
|
|
add hl, de
|
2022-01-16 14:50:50 -08:00
|
|
|
; Store the low byte in [wMobileAPIIndex]
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, [hli]
|
2022-01-16 14:50:50 -08:00
|
|
|
ld [wMobileAPIIndex], a
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, [hl]
|
2016-05-05 12:07:37 -07:00
|
|
|
; restore de
|
2013-10-01 22:11:54 -07:00
|
|
|
pop de
|
2022-01-16 14:50:50 -08:00
|
|
|
ld hl, ReturnMobileAPI ; return here
|
2013-10-01 22:11:54 -07:00
|
|
|
push hl
|
2016-05-05 12:07:37 -07:00
|
|
|
; If the destination function is not Function110236,
|
|
|
|
; call Function1100b4.
|
2013-10-01 22:11:54 -07:00
|
|
|
ld h, a
|
2022-01-16 14:50:50 -08:00
|
|
|
ld a, [wMobileAPIIndex]
|
2013-10-01 22:11:54 -07:00
|
|
|
ld l, a
|
|
|
|
push hl
|
2017-12-25 10:40:10 -08:00
|
|
|
ld a, LOW(Function110236)
|
2013-10-01 22:11:54 -07:00
|
|
|
cp l
|
2015-10-16 10:35:43 -07:00
|
|
|
jr nz, .okay
|
2017-12-25 10:40:10 -08:00
|
|
|
ld a, HIGH(Function110236)
|
2013-10-01 22:11:54 -07:00
|
|
|
cp h
|
2015-10-16 10:35:43 -07:00
|
|
|
.okay
|
2013-10-01 22:11:54 -07:00
|
|
|
call nz, Function1100b4
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc986
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2022-01-16 14:50:50 -08:00
|
|
|
ret ; indirectly jump to the function loaded from the dw, which returns to ReturnMobileAPI.
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
.dw
|
2014-04-29 19:59:39 -07:00
|
|
|
dw Function110115
|
|
|
|
dw Function110236
|
|
|
|
dw Function110291
|
|
|
|
dw Function1103ac
|
|
|
|
dw Function110438
|
|
|
|
dw Function1104c6
|
|
|
|
dw Function110578
|
|
|
|
dw Function110582
|
|
|
|
dw Function11058c
|
|
|
|
dw Function1105dd
|
|
|
|
dw Function1106ef
|
|
|
|
dw Function110757
|
|
|
|
dw Function1107ff
|
|
|
|
dw Function110899
|
|
|
|
dw Function1108a3
|
|
|
|
dw Function110905
|
|
|
|
dw Function1109a4
|
|
|
|
dw Function1109f9
|
|
|
|
dw Function110a5b
|
|
|
|
dw Function110c3c
|
|
|
|
dw Function110c9e
|
|
|
|
dw Function110ddd
|
|
|
|
dw Function1111fe
|
|
|
|
dw Function1113fe
|
2022-01-16 14:50:50 -08:00
|
|
|
dw MobileAPI_SetTimer
|
2022-09-14 17:49:58 -07:00
|
|
|
dw MobileAPI_TelephoneStatus
|
2014-04-29 19:59:39 -07:00
|
|
|
dw Function111596
|
|
|
|
dw Function11162d
|
|
|
|
dw Function11032c
|
|
|
|
dw Function11148c
|
|
|
|
dw Function111610
|
|
|
|
dw Function1103ac
|
|
|
|
dw Function110235
|
|
|
|
dw Function111540
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1100b4:
|
2013-10-01 22:11:54 -07:00
|
|
|
push bc
|
2015-10-16 10:35:43 -07:00
|
|
|
.loop
|
2013-10-01 22:11:54 -07:00
|
|
|
di
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc800]
|
2013-10-01 22:11:54 -07:00
|
|
|
ld b, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc80b]
|
2013-10-01 22:11:54 -07:00
|
|
|
ld c, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc822]
|
2013-10-01 22:11:54 -07:00
|
|
|
ei
|
|
|
|
or a
|
|
|
|
bit 0, a
|
2015-10-16 10:35:43 -07:00
|
|
|
jr z, .done
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, b
|
|
|
|
or a
|
2015-10-16 10:35:43 -07:00
|
|
|
jr nz, .loop
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, c
|
|
|
|
cp $4
|
2015-10-16 10:35:43 -07:00
|
|
|
jr z, .loop
|
2013-10-01 22:11:54 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc80f], a
|
|
|
|
ld hl, wc821
|
2013-10-01 22:11:54 -07:00
|
|
|
set 1, [hl]
|
|
|
|
scf
|
2015-10-16 10:35:43 -07:00
|
|
|
.done
|
2013-10-01 22:11:54 -07:00
|
|
|
pop bc
|
|
|
|
ret
|
|
|
|
|
2022-01-16 14:50:50 -08:00
|
|
|
MobileAPI_SetTimer:
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [rTAC], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, c
|
|
|
|
ld b, a
|
|
|
|
ld hl, Unknown_112089
|
|
|
|
add hl, bc
|
|
|
|
ld c, [hl]
|
|
|
|
inc hl
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh a, [rKEY1]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 7, a
|
|
|
|
jr nz, .asm_1100f9
|
|
|
|
ld a, e
|
|
|
|
sra c
|
|
|
|
ld a, e
|
|
|
|
cp $4
|
|
|
|
jr nc, .asm_1100f9
|
|
|
|
ld de, $000f
|
|
|
|
add hl, de
|
|
|
|
|
|
|
|
.asm_1100f9
|
|
|
|
ld a, c
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [rTMA], a
|
|
|
|
ldh [rTIMA], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc81f], a
|
|
|
|
ld [wc816], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc820], a
|
|
|
|
ld [wc815], a
|
2022-01-16 14:50:50 -08:00
|
|
|
ld c, LOW(rTAC)
|
|
|
|
ld a, rTAC_65536_HZ
|
2019-02-16 09:17:55 -08:00
|
|
|
ldh [c], a
|
2022-01-16 14:50:50 -08:00
|
|
|
ld a, 1 << rTAC_ON | rTAC_65536_HZ
|
2019-02-16 09:17:55 -08:00
|
|
|
ldh [c], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function110115:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 1, [hl]
|
|
|
|
jr nz, .asm_110120
|
|
|
|
xor a
|
|
|
|
ld l, a
|
|
|
|
ld h, a
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_110120
|
|
|
|
res 1, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc80f]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
|
|
|
cp $22
|
|
|
|
jr z, .asm_11016a
|
|
|
|
cp $23
|
|
|
|
jr z, .asm_11016a
|
|
|
|
cp $25
|
|
|
|
jr z, .asm_11016a
|
|
|
|
cp $26
|
|
|
|
jr z, .asm_11018e
|
|
|
|
cp $24
|
|
|
|
jr z, .asm_1101a4
|
|
|
|
cp $30
|
|
|
|
jp z, .asm_1101f8
|
|
|
|
cp $31
|
|
|
|
jp z, .asm_11020d
|
|
|
|
cp $32
|
|
|
|
jr z, .asm_1101a4
|
|
|
|
cp $33
|
|
|
|
jr z, .asm_1101a4
|
|
|
|
swap a
|
|
|
|
and $f
|
|
|
|
cp $1
|
|
|
|
jr z, .asm_11016a
|
|
|
|
cp $0
|
|
|
|
jr z, .asm_11015d
|
|
|
|
.asm_110158
|
2015-11-02 11:37:02 -08:00
|
|
|
ld hl, 0
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_11015b
|
|
|
|
ld a, e
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_11015d
|
|
|
|
ld a, e
|
|
|
|
add $15
|
|
|
|
ld e, a
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc810
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_11016a
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86d], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
2014-04-29 19:59:39 -07:00
|
|
|
inc a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
res 0, [hl]
|
|
|
|
res 5, [hl]
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
ld [hl], a
|
|
|
|
call Function111686
|
|
|
|
ld a, $15
|
|
|
|
cp e
|
|
|
|
jr nz, .asm_110158
|
|
|
|
jr .asm_1101d7
|
|
|
|
|
|
|
|
.asm_11018e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 4, a
|
|
|
|
ld a, $1
|
|
|
|
jr z, .asm_11016a
|
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
|
|
|
ld a, [wc805]
|
|
|
|
ld [wc807], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jr .asm_110158
|
|
|
|
|
|
|
|
.asm_1101a4
|
|
|
|
res 0, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
res 5, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 7, [hl]
|
|
|
|
res 6, [hl]
|
|
|
|
set 5, [hl]
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86d], a
|
|
|
|
ld [wc9af], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $4
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
cp $32
|
|
|
|
jr z, .asm_1101d7
|
|
|
|
cp $33
|
|
|
|
jr z, .asm_1101d7
|
|
|
|
cp $30
|
|
|
|
jr z, .asm_1101d7
|
|
|
|
cp $31
|
|
|
|
jp nz, .asm_110158
|
|
|
|
|
|
|
|
.asm_1101d7
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc810
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ld a, $32
|
|
|
|
cp e
|
|
|
|
jp nz, .asm_11015b
|
|
|
|
ld a, $3
|
|
|
|
cp h
|
|
|
|
jp nz, .asm_11015b
|
|
|
|
dec a
|
|
|
|
cp l
|
|
|
|
jr z, .asm_1101f2
|
|
|
|
dec a
|
|
|
|
cp l
|
|
|
|
jp nz, .asm_11015b
|
|
|
|
|
|
|
|
.asm_1101f2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld bc, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
jp .asm_11015b
|
|
|
|
|
|
|
|
.asm_1101f8
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $a4
|
|
|
|
jr z, .asm_1101a4
|
|
|
|
ld a, $3
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
|
|
|
ld hl, wc810
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
jp .asm_11015b
|
|
|
|
|
|
|
|
.asm_11020d
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc810]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $2
|
|
|
|
jr z, .asm_1101a4
|
|
|
|
cp $3
|
|
|
|
jr z, .asm_1101a4
|
|
|
|
ld a, $4
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
|
|
|
ld hl, wc810
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
jp .asm_11015b
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function110226:
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, $21
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function110228:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc80f], a
|
|
|
|
ld hl, wc821
|
2013-10-01 22:11:54 -07:00
|
|
|
set 1, [hl]
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function110231:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $20
|
|
|
|
jr Function110228
|
2013-09-15 15:56:25 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function110235:
|
2014-04-29 19:59:39 -07:00
|
|
|
nop
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function110236:
|
2022-01-16 14:50:50 -08:00
|
|
|
ld a, [wMobileAPIIndex]
|
2014-04-29 19:59:39 -07:00
|
|
|
push af
|
|
|
|
push bc
|
|
|
|
push hl
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [rTAC], a
|
|
|
|
ldh a, [rIF]
|
2014-04-29 19:59:39 -07:00
|
|
|
and $1b
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [rIF], a
|
2019-10-20 15:27:34 -07:00
|
|
|
call ResetReceivePacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
ld bc, $0452
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc800
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_11024e
|
2013-10-01 22:11:54 -07:00
|
|
|
xor a
|
|
|
|
ld [hli], a
|
2014-04-29 19:59:39 -07:00
|
|
|
dec bc
|
|
|
|
ld a, c
|
|
|
|
or b
|
|
|
|
jr nz, .asm_11024e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc822]
|
2014-04-29 19:59:39 -07:00
|
|
|
set 6, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc822], a
|
2014-04-29 19:59:39 -07:00
|
|
|
pop hl
|
|
|
|
ld a, l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc981], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc982], a
|
2014-04-29 19:59:39 -07:00
|
|
|
pop bc
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc983
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, c
|
|
|
|
ld [hli], a
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, b
|
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86e
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], d
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc819], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, $c
|
2022-01-16 14:50:50 -08:00
|
|
|
call MobileAPI_SetTimer
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function1104b0
|
|
|
|
pop af
|
|
|
|
cp $35
|
|
|
|
jr nz, .asm_110289
|
|
|
|
ld a, $2b
|
|
|
|
jr .asm_11028b
|
|
|
|
|
|
|
|
.asm_110289
|
|
|
|
ld a, $a
|
|
|
|
|
|
|
|
.asm_11028b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function110432
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function110291:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 1, a
|
|
|
|
jr z, .asm_1102a6
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc80f]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $14
|
|
|
|
jr z, .asm_1102b3
|
|
|
|
cp $25
|
|
|
|
jr z, .asm_1102b3
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_1102a6
|
|
|
|
bit 0, a
|
|
|
|
jp nz, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $1
|
|
|
|
jp nz, Function110226
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_1102b3
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [rTAC], a
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc819], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, l
|
|
|
|
ld b, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
|
|
|
ld a, b
|
|
|
|
ld [hli], a
|
|
|
|
ld a, c
|
|
|
|
ld [hli], a
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, e
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, d
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc870]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, a
|
2022-01-16 14:50:50 -08:00
|
|
|
call MobileAPI_SetTimer
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc829
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, LOW(wc872)
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, HIGH(wc872)
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer
|
|
|
|
ld b, MobilePacket_WriteConfigurationData.End - MobilePacket_WriteConfigurationData
|
|
|
|
ld hl, MobilePacket_WriteConfigurationData
|
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc882]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, a
|
2013-10-01 22:11:54 -07:00
|
|
|
or a
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_1102f2
|
|
|
|
cp $80
|
|
|
|
jr nc, .asm_1102f2
|
|
|
|
ld c, $80
|
|
|
|
jr .asm_1102f4
|
|
|
|
|
|
|
|
.asm_1102f2
|
|
|
|
ld a, $80
|
|
|
|
|
|
|
|
.asm_1102f4
|
|
|
|
ld b, a
|
|
|
|
inc a
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld a, $80
|
|
|
|
add c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc882
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
|
|
|
ld a, [hl]
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
add $80
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ld c, b
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc880], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, h
|
2022-09-14 17:49:58 -07:00
|
|
|
ld [wc880 + 1], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, c
|
|
|
|
inc b
|
|
|
|
call Function111f63
|
|
|
|
call Function1104b0
|
|
|
|
ld a, $2e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 1, [hl]
|
|
|
|
set 0, [hl]
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function11032c:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 1, a
|
|
|
|
jp nz, Function110226
|
|
|
|
bit 0, a
|
|
|
|
jp nz, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2013-10-01 22:11:54 -07:00
|
|
|
cp $1
|
2014-04-29 19:59:39 -07:00
|
|
|
jp nz, Function110226
|
2013-10-01 22:11:54 -07:00
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [rTAC], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc819], a
|
|
|
|
ld hl, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hli], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, d
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hli], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, c
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hli], a
|
|
|
|
ld a, b
|
|
|
|
ld [hli], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc829
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc870]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, a
|
2022-01-16 14:50:50 -08:00
|
|
|
call MobileAPI_SetTimer
|
2019-08-22 05:41:17 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer
|
|
|
|
ld b, 6 ; header size
|
|
|
|
ld hl, MobilePacket_ReadConfigurationDataPart1
|
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc883]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [de], a
|
|
|
|
inc de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc882]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, a
|
2013-10-01 22:11:54 -07:00
|
|
|
or a
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_11037f
|
|
|
|
cp $80
|
|
|
|
jr nc, .asm_11037f
|
|
|
|
ld c, $80
|
|
|
|
jr .asm_110381
|
|
|
|
|
|
|
|
.asm_11037f
|
|
|
|
ld a, $80
|
|
|
|
|
|
|
|
.asm_110381
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld b, $2
|
|
|
|
call Function111f63
|
|
|
|
call Function1104b0
|
|
|
|
ld a, $2d
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function110432
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function110393:
|
2017-12-25 10:40:10 -08:00
|
|
|
ld c, LOW(rIE)
|
2019-02-16 09:17:55 -08:00
|
|
|
ldh a, [c]
|
2019-05-05 09:14:46 -07:00
|
|
|
or (1 << SERIAL) | (1 << TIMER)
|
2019-02-16 09:17:55 -08:00
|
|
|
ldh [c], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function11039a:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $0
|
|
|
|
.asm_11039c
|
|
|
|
inc b
|
|
|
|
jr z, .asm_1103a3
|
|
|
|
ld a, [hli]
|
2013-10-01 22:11:54 -07:00
|
|
|
or a
|
2014-04-29 19:59:39 -07:00
|
|
|
jr nz, .asm_11039c
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_1103a3
|
|
|
|
ld a, b
|
|
|
|
cp c
|
|
|
|
jr nc, .asm_1103aa
|
|
|
|
cp $2
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_1103aa
|
|
|
|
scf
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1103ac:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, a
|
|
|
|
jp nz, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $1
|
|
|
|
jp nz, Function110226
|
|
|
|
push hl
|
|
|
|
ld c, $15
|
|
|
|
call Function11039a
|
|
|
|
jr c, .asm_1103d2
|
|
|
|
ld c, $22
|
|
|
|
call Function11039a
|
|
|
|
jr c, .asm_1103d2
|
|
|
|
ld c, $12
|
|
|
|
call Function11039a
|
2022-09-14 17:49:58 -07:00
|
|
|
jr nc, .isp_login
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_1103d2
|
|
|
|
pop hl
|
|
|
|
jp Function110231
|
|
|
|
|
2022-09-14 17:49:58 -07:00
|
|
|
.isp_login
|
2013-10-01 22:11:54 -07:00
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [rTAC], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86d], a
|
|
|
|
ld [wc97a], a
|
|
|
|
ld a, [wc870]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, a
|
2022-01-16 14:50:50 -08:00
|
|
|
call MobileAPI_SetTimer
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc829
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, LOW(wc880)
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hli], a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, HIGH(wc880)
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hl], a
|
2022-09-14 17:49:58 -07:00
|
|
|
call Mobile_DialTelephone
|
2014-04-29 19:59:39 -07:00
|
|
|
push hl
|
|
|
|
ld b, a
|
|
|
|
call Function111f63
|
2019-08-22 05:41:17 -07:00
|
|
|
ld b, MobilePacket_ISPLogin.End - MobilePacket_ISPLogin
|
|
|
|
ld hl, MobilePacket_ISPLogin
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 45
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
inc de
|
2016-05-04 08:46:23 -07:00
|
|
|
inc de
|
2014-04-29 19:59:39 -07:00
|
|
|
pop hl
|
2015-11-02 11:37:02 -08:00
|
|
|
ld bc, 0
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyString
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 51], a
|
|
|
|
ld [wc86b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
push de
|
|
|
|
inc de
|
2015-11-02 11:37:02 -08:00
|
|
|
ld bc, 0
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $20
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyStringLen
|
2014-04-29 19:59:39 -07:00
|
|
|
ld l, e
|
|
|
|
ld h, d
|
|
|
|
pop de
|
|
|
|
ld a, c
|
|
|
|
ld [de], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86b]
|
2014-04-29 19:59:39 -07:00
|
|
|
add c
|
|
|
|
add $a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 50], a
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function1104b0
|
|
|
|
ld a, $b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function110432:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
set 0, [hl]
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function110438:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, a
|
|
|
|
jp nz, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $1
|
|
|
|
jp nz, Function110226
|
|
|
|
push hl
|
|
|
|
ld c, $15
|
|
|
|
call Function11039a
|
|
|
|
jr nc, .asm_110454
|
|
|
|
pop hl
|
|
|
|
jp Function110231
|
|
|
|
|
|
|
|
.asm_110454
|
2013-10-01 22:11:54 -07:00
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [rTAC], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc97a], a
|
|
|
|
ld a, [wc870]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, a
|
2022-01-16 14:50:50 -08:00
|
|
|
call MobileAPI_SetTimer
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc98f
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, LOW(wc880 + 1)
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hli], a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, HIGH(wc880 + 1)
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hli], a
|
|
|
|
xor a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2016-05-10 09:31:49 -07:00
|
|
|
ld [hli], a
|
|
|
|
ld [hli], a
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hl], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $ff
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86e], a
|
2022-09-14 17:49:58 -07:00
|
|
|
call Mobile_DialTelephone
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, a
|
|
|
|
call Function111f63
|
|
|
|
call Function1104b0
|
|
|
|
ld a, $c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jr Function110432
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2022-09-14 17:49:58 -07:00
|
|
|
Mobile_DialTelephone:
|
2019-08-22 05:41:17 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer
|
|
|
|
ld hl, MobilePacket_DialTelephone
|
|
|
|
ld b, MobilePacket_DialTelephone.End - MobilePacket_DialTelephone
|
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
pop bc
|
|
|
|
pop hl
|
|
|
|
push bc
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_AdapterType]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $8c
|
|
|
|
jr c, .asm_11049e
|
|
|
|
ld a, $3
|
|
|
|
jr .asm_1104a1
|
|
|
|
|
|
|
|
.asm_11049e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc871]
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_1104a1
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld bc, $0001
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_PHONE_NUMBER_LENGTH
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyStringLen
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, c
|
2019-08-22 05:41:17 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 5], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1104b0:
|
2013-10-01 22:11:54 -07:00
|
|
|
xor a
|
2019-08-22 08:31:45 -07:00
|
|
|
ld [wMobileSDK_SendCommandID], a
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function110393
|
2013-10-01 22:11:54 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld de, MobilePacket_Idle.End - MobilePacket_Idle
|
|
|
|
ld hl, MobilePacket_Idle
|
|
|
|
ld b, 1
|
2019-10-20 15:27:34 -07:00
|
|
|
jp PacketSendBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1104c6:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, a
|
|
|
|
jp nz, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $4
|
|
|
|
jr z, .asm_110526
|
|
|
|
cp $3
|
|
|
|
jr z, .asm_110526
|
|
|
|
cp $2
|
|
|
|
jp nz, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 4, [hl]
|
|
|
|
jr nz, .asm_110507
|
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_ISP_LOGOUT | $80
|
2019-08-22 08:31:45 -07:00
|
|
|
ld [wMobileSDK_SendCommandID], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld de, MobilePacket_ISPLogout.End - MobilePacket_ISPLogout
|
|
|
|
ld hl, MobilePacket_ISPLogout
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-10-20 15:27:34 -07:00
|
|
|
call PacketSendBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_1104fa
|
|
|
|
ld a, $e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
set 0, [hl]
|
|
|
|
res 3, [hl]
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_110507
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc807]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr nz, .asm_11051f
|
|
|
|
ld a, $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
res 4, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, [hl]
|
2014-04-29 19:59:39 -07:00
|
|
|
and $17
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hl], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_11051f
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jr .asm_1104fa
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_110526
|
|
|
|
call Function112724
|
2013-10-01 22:11:54 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
|
|
|
ld de, wMobileSDK_PacketBuffer + 32
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_TransferData
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $6
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86c]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld b, $1
|
|
|
|
call Function111f63
|
2019-08-22 05:41:17 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer
|
|
|
|
ld hl, MobilePacket_TransferData
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $7
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86c]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld bc, $0001
|
|
|
|
ld hl, Unknown_1120c1
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyString
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, c
|
|
|
|
call Function111f63
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_TRANSFER_DATA | $80
|
2019-08-22 08:31:45 -07:00
|
|
|
ld [wMobileSDK_SendCommandID], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-10-20 15:27:34 -07:00
|
|
|
call PacketSendBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function110432
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function110578:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $25
|
|
|
|
call Function110596
|
2013-10-01 22:11:54 -07:00
|
|
|
or a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp nz, Function1135ba
|
|
|
|
ret
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function110582:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $26
|
|
|
|
call Function110596
|
|
|
|
or a
|
|
|
|
jp nz, Function11359d
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function11058c:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $27
|
|
|
|
call Function110596
|
|
|
|
or a
|
|
|
|
jp nz, Function1135ad
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function110596:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, a
|
|
|
|
jr nz, .asm_1105d9
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $1
|
|
|
|
jr nz, .asm_1105d9
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc835]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
ret nz
|
|
|
|
ld a, b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wcb36], a
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [rTAC], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86e], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, d
|
2022-09-14 17:49:58 -07:00
|
|
|
ld [wc86e + 1], a
|
2013-10-01 22:11:54 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc819], a
|
|
|
|
ld a, [wc870]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, a
|
2022-01-16 14:50:50 -08:00
|
|
|
call MobileAPI_SetTimer
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc829
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, LOW(wc880)
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hli], a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, HIGH(wc880)
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
|
|
|
call Function1104b0
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wcb36]
|
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
jp Function110432
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_1105d9
|
|
|
|
pop hl
|
|
|
|
jp Function110226
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1105dd:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, a
|
|
|
|
jp nz, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $1
|
|
|
|
jp nz, Function110226
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [rTAC], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc870]
|
2013-10-01 22:11:54 -07:00
|
|
|
ld c, a
|
2022-01-16 14:50:50 -08:00
|
|
|
call MobileAPI_SetTimer
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc98f
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, LOW(wc880 + 1)
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, HIGH(wc880 + 1)
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2013-10-01 22:11:54 -07:00
|
|
|
xor a
|
|
|
|
ld [hli], a
|
2016-05-10 09:31:49 -07:00
|
|
|
ld [hli], a
|
|
|
|
ld [hli], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
|
|
|
ld a, $ff
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86e], a
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function1104b0
|
|
|
|
ld a, $d
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function110432
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function110615:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $15
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86e], a
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr z, .asm_110625
|
|
|
|
dec a
|
|
|
|
jr z, .asm_11062c
|
|
|
|
dec a
|
|
|
|
jp z, .asm_1106c1
|
2013-10-01 22:11:54 -07:00
|
|
|
ret
|
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_110625
|
|
|
|
ld a, $19
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc83e
|
2014-04-29 19:59:39 -07:00
|
|
|
jr .asm_110631
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_11062c
|
|
|
|
ld a, $6e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc852
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_110631
|
|
|
|
push hl
|
|
|
|
push bc
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 91], a
|
|
|
|
ld hl, wc829
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, LOW(wMobileSDK_PacketBuffer + 86)
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, HIGH(wMobileSDK_PacketBuffer + 86)
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hl], a
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 90], a
|
|
|
|
ld [wc86b], a
|
|
|
|
ld [wc9af], a
|
|
|
|
ld de, wMobileSDK_PacketBuffer + 80
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_OpenTCPConnection
|
|
|
|
ld b, MobilePacket_OpenTCPConnection.End - MobilePacket_OpenTCPConnection
|
|
|
|
call MobileSDK_CopyBytes
|
|
|
|
ld de, wMobileSDK_PacketBuffer
|
|
|
|
ld hl, MobilePacket_DNSQuery
|
|
|
|
ld b, MobilePacket_DNSQuery.End - MobilePacket_DNSQuery
|
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
pop bc
|
|
|
|
pop hl
|
|
|
|
push de
|
|
|
|
inc de
|
|
|
|
ld a, b
|
2015-11-02 11:37:02 -08:00
|
|
|
ld bc, 0
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyStringLen
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, c
|
|
|
|
pop hl
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hl], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, c
|
|
|
|
call Function111f63
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86e]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $2
|
|
|
|
jr nz, .asm_1106ac
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer + 128]
|
2013-10-01 22:11:54 -07:00
|
|
|
or a
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_1106ac
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc995
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
cp $99
|
|
|
|
jr nz, .asm_1106ac
|
|
|
|
ld a, [hli]
|
|
|
|
cp $66
|
|
|
|
jr nz, .asm_1106ac
|
|
|
|
ld a, [hli]
|
|
|
|
cp $23
|
|
|
|
jr nz, .asm_1106ac
|
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86e], a
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $a3
|
|
|
|
ld de, $0010
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc995
|
2013-10-01 22:11:54 -07:00
|
|
|
call Function111f02
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $f
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function110432
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_1106ac
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_DNS_QUERY | $80
|
2019-08-22 08:31:45 -07:00
|
|
|
ld [wMobileSDK_SendCommandID], a
|
2013-10-01 22:11:54 -07:00
|
|
|
ld b, $5
|
2019-10-20 15:27:34 -07:00
|
|
|
call PacketSendBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $f
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function110432
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_1106c1
|
|
|
|
ld b, $50
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc876
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld de, $0007
|
|
|
|
add hl, de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wc8ff
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_1106d0
|
|
|
|
ld a, [hli]
|
|
|
|
ld [de], a
|
|
|
|
cp $2f
|
|
|
|
jr z, .asm_1106da
|
|
|
|
inc de
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_1106d0
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_1106da
|
|
|
|
xor a
|
|
|
|
ld [de], a
|
|
|
|
dec hl
|
|
|
|
ld a, l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc876], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc877], a
|
|
|
|
ld hl, wc8ff
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $50
|
|
|
|
ld b, $40
|
|
|
|
jp .asm_110631
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1106ef:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, a
|
|
|
|
jp nz, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2013-10-01 22:11:54 -07:00
|
|
|
cp $2
|
2014-04-29 19:59:39 -07:00
|
|
|
jp nz, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86d]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jp nz, Function110226
|
|
|
|
push hl
|
|
|
|
ld c, $20
|
|
|
|
call Function11039a
|
|
|
|
jr nc, .asm_110712
|
|
|
|
pop hl
|
|
|
|
jp Function110231
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_110712
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
|
|
|
ld de, wMobileSDK_PacketBuffer + 96
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_TransferData
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $6
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 112
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_TransferData
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
inc de
|
2016-05-04 08:46:23 -07:00
|
|
|
inc de
|
2014-04-29 19:59:39 -07:00
|
|
|
ld bc, $0001
|
|
|
|
ld hl, Unknown_11209e
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyString
|
2014-04-29 19:59:39 -07:00
|
|
|
pop hl
|
|
|
|
push hl
|
|
|
|
ld b, $ff
|
|
|
|
.asm_11073b
|
|
|
|
inc b
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, [hli]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr z, .asm_110744
|
|
|
|
cp $40
|
|
|
|
jr nz, .asm_11073b
|
|
|
|
|
|
|
|
.asm_110744
|
|
|
|
ld a, c
|
|
|
|
add b
|
|
|
|
add $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 117], a
|
2014-04-29 19:59:39 -07:00
|
|
|
pop hl
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function11295e
|
|
|
|
ld a, $0
|
|
|
|
jp Function110615
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function110757:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, a
|
|
|
|
jp nz, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $3
|
|
|
|
jp nz, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc98a]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jp nz, Function110226
|
|
|
|
push hl
|
|
|
|
.asm_11076f
|
|
|
|
ld a, [hli]
|
|
|
|
or a
|
|
|
|
jr nz, .asm_11076f
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, [hl]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jp z, .asm_1107fb
|
|
|
|
pop hl
|
|
|
|
push hl
|
|
|
|
ld c, $20
|
|
|
|
call Function11039a
|
|
|
|
jr c, .asm_1107fb
|
|
|
|
.asm_110781
|
|
|
|
ld c, $81
|
|
|
|
call Function11039a
|
|
|
|
jr c, .asm_1107fb
|
|
|
|
xor a
|
|
|
|
cp [hl]
|
|
|
|
jr nz, .asm_110781
|
|
|
|
call Function112724
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer
|
|
|
|
ld hl, MobilePacket_TransferData
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $6
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86c]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld b, $1
|
|
|
|
call Function111f63
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 12
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_TransferData
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 18
|
|
|
|
ld a, [wc86c]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld bc, $0001
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 19
|
2014-04-29 19:59:39 -07:00
|
|
|
ld hl, Unknown_1120a4
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyString
|
2014-04-29 19:59:39 -07:00
|
|
|
pop hl
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyString
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $3e
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
inc c
|
|
|
|
ld a, l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc87c], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc87d], a
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function11295e
|
|
|
|
ld a, c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 17], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, c
|
|
|
|
call Function111f63
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_TRANSFER_DATA | $80
|
2019-08-22 08:31:45 -07:00
|
|
|
ld [wMobileSDK_SendCommandID], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 12
|
2014-04-29 19:59:39 -07:00
|
|
|
ld d, $0
|
|
|
|
ld e, c
|
|
|
|
ld b, $5
|
2019-10-20 15:27:34 -07:00
|
|
|
call PacketSendBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $15
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function110432
|
|
|
|
|
|
|
|
.asm_1107fb
|
|
|
|
pop hl
|
|
|
|
jp Function110231
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1107ff:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, a
|
|
|
|
jp nz, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $3
|
|
|
|
jp nz, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc98a]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jp z, Function110226
|
|
|
|
ld a, c
|
|
|
|
or b
|
|
|
|
jp z, Function110231
|
|
|
|
ld a, l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc87c], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc87d], a
|
|
|
|
ld hl, wc87e
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, c
|
|
|
|
ld [hli], a
|
|
|
|
ld a, b
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
2022-09-14 17:49:58 -07:00
|
|
|
ld [wc86e + 1], a
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function112724
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc98a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
|
|
|
and $1
|
|
|
|
xor $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
inc [hl]
|
2019-08-22 05:41:17 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer
|
|
|
|
ld hl, MobilePacket_TransferData
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $6
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 6
|
|
|
|
ld a, [wc86c]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld b, $1
|
|
|
|
call Function111f63
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 150
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_TransferData
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 156
|
|
|
|
ld a, [wc86c]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [de], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86b]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr nz, .asm_110891
|
|
|
|
ld bc, $0001
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 157
|
2014-04-29 19:59:39 -07:00
|
|
|
ld hl, Unknown_1120ba
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyString
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 155], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, c
|
|
|
|
call Function111f63
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_TRANSFER_DATA | $80
|
2019-08-22 08:31:45 -07:00
|
|
|
ld [wMobileSDK_SendCommandID], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld de, $0011
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 150
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-10-20 15:27:34 -07:00
|
|
|
call PacketSendBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_110891
|
|
|
|
ld a, $16
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function110432
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function110899:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $3
|
|
|
|
jp nz, Function110226
|
|
|
|
jr Function1108ab
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1108a3:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $4
|
|
|
|
jp nz, Function110226
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1108ab:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, [hl]
|
|
|
|
jp nz, Function110226
|
|
|
|
call Function112724
|
2013-10-01 22:11:54 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
|
|
|
ld de, wMobileSDK_PacketBuffer + 32
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_TransferData
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $6
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86c]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld b, $1
|
|
|
|
call Function111f63
|
2019-08-22 05:41:17 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer
|
|
|
|
ld hl, MobilePacket_TransferData
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $7
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86c]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld bc, $0001
|
|
|
|
ld hl, Unknown_1120c1
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyString
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, c
|
|
|
|
call Function111f63
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_TRANSFER_DATA | $80
|
2019-08-22 08:31:45 -07:00
|
|
|
ld [wMobileSDK_SendCommandID], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-10-20 15:27:34 -07:00
|
|
|
call PacketSendBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $17
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function110432
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function110905:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, a
|
|
|
|
jp nz, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $2
|
|
|
|
jp nz, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86d]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jp nz, Function110226
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
push hl
|
|
|
|
ld c, $20
|
|
|
|
call Function11039a
|
|
|
|
jr c, .asm_11092f
|
|
|
|
ld c, $22
|
|
|
|
call Function11039a
|
|
|
|
jr nc, .asm_110933
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_11092f
|
|
|
|
pop hl
|
|
|
|
jp Function110231
|
|
|
|
|
|
|
|
.asm_110933
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 96
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_TransferData
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
inc de
|
2016-05-04 08:46:23 -07:00
|
|
|
inc de
|
2014-04-29 19:59:39 -07:00
|
|
|
ld hl, Unknown_1120c8
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyString
|
2014-04-29 19:59:39 -07:00
|
|
|
pop hl
|
|
|
|
push hl
|
|
|
|
ld b, $ff
|
|
|
|
.asm_11094a
|
|
|
|
inc b
|
|
|
|
ld a, [hli]
|
2013-10-01 22:11:54 -07:00
|
|
|
or a
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_110953
|
|
|
|
cp $40
|
|
|
|
jr nz, .asm_11094a
|
|
|
|
|
|
|
|
.asm_110953
|
|
|
|
ld a, b
|
|
|
|
add $6
|
|
|
|
ld c, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 101], a
|
2014-04-29 19:59:39 -07:00
|
|
|
pop hl
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 108
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_110961
|
|
|
|
ld a, [hli]
|
|
|
|
or a
|
|
|
|
jr nz, .asm_110961
|
|
|
|
call Function11295e
|
|
|
|
ld a, c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 101], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld bc, $0006
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 172
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $20
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyStringLen
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function11295e
|
|
|
|
ld a, c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 165], a
|
|
|
|
ld de, wMobileSDK_PacketBuffer + 160
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_TransferData
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 167
|
2014-04-29 19:59:39 -07:00
|
|
|
ld hl, Unknown_1120ce
|
|
|
|
ld b, $5
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 128
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_TransferData
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $6
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $1
|
|
|
|
jp Function110615
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1109a4:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, [hl]
|
|
|
|
jp nz, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $4
|
|
|
|
jp nz, Function110226
|
|
|
|
ld a, e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86e], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, d
|
2022-09-14 17:49:58 -07:00
|
|
|
ld [wc86e + 1], a
|
2013-10-01 22:11:54 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function112729
|
2019-08-22 05:41:17 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer
|
|
|
|
ld hl, MobilePacket_TransferData
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $7
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86c]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld bc, $0001
|
|
|
|
ld hl, Unknown_1120d4
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyString
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, c
|
|
|
|
call Function111f63
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_TRANSFER_DATA | $80
|
2019-08-22 08:31:45 -07:00
|
|
|
ld [wMobileSDK_SendCommandID], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-10-20 15:27:34 -07:00
|
|
|
call PacketSendBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $18
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function110432
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1109f9:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, a
|
|
|
|
jp nz, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $4
|
|
|
|
jp nz, Function110226
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86e], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, d
|
2022-09-14 17:49:58 -07:00
|
|
|
ld [wc86e + 1], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, l
|
|
|
|
or h
|
|
|
|
jp z, Function110231
|
|
|
|
push hl
|
|
|
|
call Function112729
|
2019-08-22 05:41:17 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer
|
|
|
|
ld hl, MobilePacket_TransferData
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $d
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86c]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld bc, $0001
|
|
|
|
ld hl, Unknown_1120db
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyString
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 12
|
2014-04-29 19:59:39 -07:00
|
|
|
pop hl
|
|
|
|
call Function110d37
|
|
|
|
ld b, c
|
|
|
|
call Function111f63
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_TRANSFER_DATA | $80
|
2019-08-22 08:31:45 -07:00
|
|
|
ld [wMobileSDK_SendCommandID], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-10-20 15:27:34 -07:00
|
|
|
call PacketSendBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $1d
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function110432
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function110a5b:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 2, a
|
|
|
|
jr z, .asm_110a6d
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $1a
|
|
|
|
jp nz, Function110226
|
|
|
|
jp Function110af4
|
|
|
|
|
|
|
|
.asm_110a6d
|
|
|
|
bit 0, a
|
|
|
|
jp nz, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $4
|
|
|
|
jp nz, Function110226
|
|
|
|
ld a, l
|
|
|
|
or h
|
|
|
|
jp z, Function110231
|
|
|
|
ld a, l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86e], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, h
|
2022-09-14 17:49:58 -07:00
|
|
|
ld [wc86e + 1], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc827
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
|
|
|
ld [hli], a
|
|
|
|
inc de
|
2016-05-04 08:46:23 -07:00
|
|
|
inc de
|
|
|
|
dec bc
|
2014-04-29 19:59:39 -07:00
|
|
|
dec bc
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc98f
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hli], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, c
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hli], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, b
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc829
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, LOW(wc880)
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hli], a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, HIGH(wc880)
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hli], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $80
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hli], a
|
|
|
|
xor a
|
|
|
|
ld [hli], a
|
|
|
|
xor a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2016-05-04 08:46:23 -07:00
|
|
|
ld [hli], a
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer
|
|
|
|
ld hl, MobilePacket_TransferData
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $d
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86c]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld bc, $0001
|
|
|
|
ld hl, Unknown_1120e8
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyString
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 12
|
|
|
|
ld hl, wc86e
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
call Function110d37
|
|
|
|
ld b, c
|
|
|
|
call Function111f63
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_TRANSFER_DATA | $80
|
2019-08-22 08:31:45 -07:00
|
|
|
ld [wMobileSDK_SendCommandID], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-10-20 15:27:34 -07:00
|
|
|
call PacketSendBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $1a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function110432
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function110af4:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc827
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
|
|
|
ld [hli], a
|
|
|
|
inc de
|
2016-05-04 08:46:23 -07:00
|
|
|
inc de
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
|
|
|
ld [hli], a
|
|
|
|
ld e, [hl]
|
|
|
|
ld a, b
|
|
|
|
or c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86e], a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld [wc86e + 1], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_110b5c
|
|
|
|
dec bc
|
2016-05-04 08:46:23 -07:00
|
|
|
dec bc
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc993]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jp nz, .asm_110bd5
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc994]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr z, .asm_110b1c
|
|
|
|
ld e, a
|
|
|
|
|
|
|
|
.asm_110b1c
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc994], a
|
2014-04-29 19:59:39 -07:00
|
|
|
cp b
|
|
|
|
jr nz, .asm_110b5c
|
|
|
|
ld a, e
|
|
|
|
cp c
|
|
|
|
jr c, .asm_110b5c
|
|
|
|
push bc
|
|
|
|
sub c
|
|
|
|
ld [hl], a
|
|
|
|
ld b, c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc82d
|
|
|
|
ld a, [wc993]
|
2014-04-29 19:59:39 -07:00
|
|
|
add c
|
|
|
|
ld [hli], a
|
|
|
|
ld a, b
|
2018-02-04 10:16:40 -08:00
|
|
|
adc 0
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc993], a
|
|
|
|
ld hl, wMobileSDK_ReceivePacketBuffer + 3
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
inc hl
|
|
|
|
sub e
|
|
|
|
dec a
|
|
|
|
ld e, a
|
2020-11-09 12:17:03 -08:00
|
|
|
ld d, 0
|
2014-04-29 19:59:39 -07:00
|
|
|
add hl, de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc829]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, [wc829 + 1]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld d, a
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
pop bc
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc827
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ld a, c
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], b
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_110b5c
|
|
|
|
ld a, c
|
|
|
|
sub e
|
|
|
|
ld c, a
|
|
|
|
ld a, b
|
|
|
|
sbc $0
|
|
|
|
ld b, a
|
|
|
|
ld a, c
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc82d
|
|
|
|
ld a, [wc993]
|
2014-04-29 19:59:39 -07:00
|
|
|
add e
|
|
|
|
ld [hli], a
|
2018-02-04 10:16:40 -08:00
|
|
|
ld a, 0
|
|
|
|
adc 0
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc993], a
|
|
|
|
ld a, [wc86e]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr z, .asm_110b9b
|
|
|
|
ld b, e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_ReceivePacketBuffer + 3
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
inc hl
|
|
|
|
sub e
|
|
|
|
dec a
|
|
|
|
ld e, a
|
2020-11-09 12:17:03 -08:00
|
|
|
ld d, 0
|
2014-04-29 19:59:39 -07:00
|
|
|
add hl, de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc829]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, [wc829 + 1]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld d, a
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc829
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
|
|
|
ld [hl], a
|
|
|
|
|
|
|
|
.asm_110b9b
|
|
|
|
call Function1127f3
|
|
|
|
jr z, .asm_110bbb
|
|
|
|
di
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 2, [hl]
|
|
|
|
ld a, $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld de, $000b
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_TRANSFER_DATA | $80
|
2019-08-22 08:31:45 -07:00
|
|
|
ld [wMobileSDK_SendCommandID], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 128
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-10-20 15:27:34 -07:00
|
|
|
jp PacketSendBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_110bbb
|
|
|
|
ld a, $4
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 0, [hl]
|
|
|
|
res 2, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc827
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld e, a
|
|
|
|
ld d, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc82d
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $2
|
2019-08-22 05:41:17 -07:00
|
|
|
jp MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_110bd5
|
|
|
|
ld e, a
|
|
|
|
xor a
|
|
|
|
cp b
|
|
|
|
jr nz, .asm_110c05
|
|
|
|
ld a, e
|
|
|
|
cp c
|
|
|
|
jr c, .asm_110c05
|
|
|
|
ld b, c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc993
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
|
|
|
sub c
|
|
|
|
ld [hl], a
|
|
|
|
ld a, $80
|
|
|
|
sub e
|
|
|
|
ld e, a
|
2020-11-09 12:17:03 -08:00
|
|
|
ld d, 0
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
add hl, de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc829]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, [wc829 + 1]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld d, a
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc827
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ld a, c
|
|
|
|
ld [hli], a
|
|
|
|
xor a
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_110c05
|
|
|
|
push hl
|
|
|
|
push bc
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc993]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, a
|
|
|
|
ld a, $80
|
|
|
|
sub e
|
|
|
|
ld e, a
|
2020-11-09 12:17:03 -08:00
|
|
|
ld d, 0
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
add hl, de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc829]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, [wc829 + 1]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld d, a
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc829], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, d
|
2022-09-14 17:49:58 -07:00
|
|
|
ld [wc829 + 1], a
|
2014-04-29 19:59:39 -07:00
|
|
|
pop bc
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc993]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
|
|
|
ld a, c
|
|
|
|
sub e
|
|
|
|
ld c, a
|
|
|
|
ld a, b
|
|
|
|
sbc $0
|
|
|
|
ld b, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc994]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
|
|
|
pop hl
|
|
|
|
jp .asm_110b1c
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function110c3c:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, a
|
|
|
|
jp nz, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $4
|
|
|
|
jp nz, Function110226
|
|
|
|
ld a, l
|
|
|
|
or h
|
|
|
|
jp z, Function110231
|
|
|
|
ld a, l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86e], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, h
|
2022-09-14 17:49:58 -07:00
|
|
|
ld [wc86e + 1], a
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function112729
|
2019-08-22 05:41:17 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer
|
|
|
|
ld hl, MobilePacket_TransferData
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $d
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86c]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld bc, $0001
|
|
|
|
ld hl, Unknown_1120f5
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyString
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 12
|
|
|
|
ld hl, wc86e
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
call Function110d37
|
|
|
|
ld b, c
|
|
|
|
call Function111f63
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_TRANSFER_DATA | $80
|
2019-08-22 08:31:45 -07:00
|
|
|
ld [wMobileSDK_SendCommandID], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-10-20 15:27:34 -07:00
|
|
|
call PacketSendBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $1b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function110432
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function110c9e:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 2, a
|
|
|
|
jr z, .asm_110cb0
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $1c
|
|
|
|
jp nz, Function110226
|
|
|
|
jp Function110af4
|
|
|
|
|
|
|
|
.asm_110cb0
|
|
|
|
bit 0, a
|
|
|
|
jp nz, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $4
|
|
|
|
jp nz, Function110226
|
|
|
|
ld a, l
|
|
|
|
or h
|
|
|
|
jp z, Function110231
|
|
|
|
ld a, l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86e], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, h
|
2022-09-14 17:49:58 -07:00
|
|
|
ld [wc86e + 1], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc827
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
|
|
|
ld [hli], a
|
|
|
|
inc de
|
2016-05-04 08:46:23 -07:00
|
|
|
inc de
|
|
|
|
dec bc
|
2014-04-29 19:59:39 -07:00
|
|
|
dec bc
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc98f
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
|
|
|
ld [hli], a
|
|
|
|
ld a, c
|
|
|
|
ld [hli], a
|
|
|
|
ld a, b
|
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc829
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, LOW(wc880)
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, HIGH(wc880)
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
|
|
|
ld a, $80
|
|
|
|
ld [hli], a
|
|
|
|
xor a
|
|
|
|
ld [hli], a
|
|
|
|
xor a
|
|
|
|
ld [hli], a
|
2016-05-04 08:46:23 -07:00
|
|
|
ld [hli], a
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer
|
|
|
|
ld hl, MobilePacket_TransferData
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $e
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86c]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld bc, $0001
|
|
|
|
ld hl, Unknown_112102
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyString
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 11
|
|
|
|
ld hl, wc86e
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
call Function110d37
|
|
|
|
ld b, c
|
|
|
|
call Function111f63
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_TRANSFER_DATA | $80
|
2019-08-22 08:31:45 -07:00
|
|
|
ld [wMobileSDK_SendCommandID], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-10-20 15:27:34 -07:00
|
|
|
call PacketSendBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $1c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function110432
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function110d37:
|
2014-04-29 19:59:39 -07:00
|
|
|
push bc
|
|
|
|
push de
|
2015-12-15 15:59:49 -08:00
|
|
|
ld b, 0
|
|
|
|
.check_under_10k
|
2017-12-25 10:40:10 -08:00
|
|
|
ld a, HIGH(10000)
|
2014-04-29 19:59:39 -07:00
|
|
|
cp h
|
2015-12-15 15:59:49 -08:00
|
|
|
jr c, .subtract_10k
|
|
|
|
jr nz, .done_10k
|
2017-12-25 10:40:10 -08:00
|
|
|
ld a, LOW(10000)
|
2014-04-29 19:59:39 -07:00
|
|
|
cp l
|
2015-12-15 15:59:49 -08:00
|
|
|
jr z, .subtract_10k
|
|
|
|
jr nc, .done_10k
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2015-12-15 15:59:49 -08:00
|
|
|
.subtract_10k
|
2014-04-29 19:59:39 -07:00
|
|
|
inc b
|
|
|
|
ld a, b
|
2015-12-15 15:59:49 -08:00
|
|
|
ld bc, -10000
|
2014-04-29 19:59:39 -07:00
|
|
|
add hl, bc
|
|
|
|
ld b, a
|
2015-12-15 15:59:49 -08:00
|
|
|
jr .check_under_10k
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2015-12-15 15:59:49 -08:00
|
|
|
.done_10k
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $30
|
|
|
|
or b
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
2015-12-15 15:59:49 -08:00
|
|
|
ld b, 0
|
|
|
|
.check_under_1k
|
2017-12-25 10:40:10 -08:00
|
|
|
ld a, HIGH(1000)
|
2014-04-29 19:59:39 -07:00
|
|
|
cp h
|
2015-12-15 15:59:49 -08:00
|
|
|
jr c, .subtract_1k
|
|
|
|
jr nz, .done_1k
|
2017-12-25 10:40:10 -08:00
|
|
|
ld a, LOW(1000)
|
2014-04-29 19:59:39 -07:00
|
|
|
cp l
|
2015-12-15 15:59:49 -08:00
|
|
|
jr z, .subtract_1k
|
|
|
|
jr nc, .done_1k
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2015-12-15 15:59:49 -08:00
|
|
|
.subtract_1k
|
2014-04-29 19:59:39 -07:00
|
|
|
inc b
|
|
|
|
ld a, b
|
2015-12-15 15:59:49 -08:00
|
|
|
ld bc, -1000
|
2014-04-29 19:59:39 -07:00
|
|
|
add hl, bc
|
|
|
|
ld b, a
|
2015-12-15 15:59:49 -08:00
|
|
|
jr .check_under_1k
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2015-12-15 15:59:49 -08:00
|
|
|
.done_1k
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $30
|
|
|
|
or b
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
2015-12-15 15:59:49 -08:00
|
|
|
ld b, 0
|
|
|
|
.check_under_100
|
2017-12-25 10:40:10 -08:00
|
|
|
ld a, HIGH(100)
|
2014-04-29 19:59:39 -07:00
|
|
|
cp h
|
2015-12-15 15:59:49 -08:00
|
|
|
jr nz, .subtract_100
|
2017-12-25 10:40:10 -08:00
|
|
|
ld a, LOW(100)
|
2014-04-29 19:59:39 -07:00
|
|
|
cp l
|
2015-12-15 15:59:49 -08:00
|
|
|
jr z, .subtract_100
|
|
|
|
jr nc, .check_under_10
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2015-12-15 15:59:49 -08:00
|
|
|
.subtract_100
|
2014-04-29 19:59:39 -07:00
|
|
|
inc b
|
|
|
|
ld a, b
|
2015-12-15 15:59:49 -08:00
|
|
|
ld bc, -100
|
2014-04-29 19:59:39 -07:00
|
|
|
add hl, bc
|
|
|
|
ld b, a
|
2015-12-15 15:59:49 -08:00
|
|
|
jr .check_under_100
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2015-12-15 15:59:49 -08:00
|
|
|
.check_under_10
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $30
|
|
|
|
or b
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld b, $0
|
|
|
|
ld a, l
|
2015-12-15 15:59:49 -08:00
|
|
|
.subtract_10
|
|
|
|
cp 10
|
|
|
|
jr c, .done_10
|
|
|
|
sub 10
|
2014-04-29 19:59:39 -07:00
|
|
|
inc b
|
2015-12-15 15:59:49 -08:00
|
|
|
jr .subtract_10
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2015-12-15 15:59:49 -08:00
|
|
|
.done_10
|
2014-04-29 19:59:39 -07:00
|
|
|
ld l, a
|
|
|
|
ld a, $30
|
|
|
|
or b
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld a, $30
|
|
|
|
or l
|
|
|
|
ld [de], a
|
|
|
|
pop de
|
|
|
|
ld l, e
|
|
|
|
ld h, d
|
|
|
|
ld b, $5
|
2015-12-15 15:59:49 -08:00
|
|
|
.find_first_digit
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
|
|
|
cp $30
|
2015-12-15 15:59:49 -08:00
|
|
|
jr nz, .found_first_digit
|
2014-04-29 19:59:39 -07:00
|
|
|
inc hl
|
|
|
|
dec b
|
2015-12-15 15:59:49 -08:00
|
|
|
jr nz, .find_first_digit
|
|
|
|
jr .done
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2015-12-15 15:59:49 -08:00
|
|
|
.found_first_digit
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $5
|
|
|
|
cp b
|
2015-12-15 15:59:49 -08:00
|
|
|
jr z, .done
|
2014-04-29 19:59:39 -07:00
|
|
|
sub b
|
|
|
|
ld c, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 5]
|
2014-04-29 19:59:39 -07:00
|
|
|
sub c
|
|
|
|
ld c, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 5], a
|
2014-04-29 19:59:39 -07:00
|
|
|
push hl
|
|
|
|
ld b, $1
|
2015-12-15 15:59:49 -08:00
|
|
|
.penultimate_loop
|
2014-04-29 19:59:39 -07:00
|
|
|
inc b
|
|
|
|
ld a, [hli]
|
|
|
|
cp $d
|
2015-12-15 15:59:49 -08:00
|
|
|
jr nz, .penultimate_loop
|
2014-04-29 19:59:39 -07:00
|
|
|
pop hl
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
pop hl
|
|
|
|
ret
|
|
|
|
|
2015-12-15 15:59:49 -08:00
|
|
|
.done
|
2014-04-29 19:59:39 -07:00
|
|
|
pop bc
|
2015-12-15 15:59:49 -08:00
|
|
|
.last_loop
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
cp $a
|
2015-12-15 15:59:49 -08:00
|
|
|
jr nz, .last_loop
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function110ddd:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 2, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_110e00
|
|
|
|
cp $13
|
|
|
|
jp z, Function111044
|
|
|
|
cp $1f
|
|
|
|
jp z, Function111044
|
|
|
|
cp $21
|
|
|
|
jp z, Function111044
|
|
|
|
jp Function110226
|
|
|
|
|
|
|
|
.asm_110df9
|
|
|
|
pop hl
|
|
|
|
.asm_110dfa
|
|
|
|
pop hl
|
|
|
|
pop hl
|
|
|
|
pop hl
|
|
|
|
.asm_110dfd
|
|
|
|
jp Function110231
|
|
|
|
|
|
|
|
.asm_110e00
|
|
|
|
cp $2
|
|
|
|
jp nz, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, a
|
|
|
|
jp nz, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86d]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jp nz, Function110226
|
|
|
|
ld a, l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc9b5], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc9b6], a
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc989], a
|
|
|
|
ld [wc9a5], a
|
|
|
|
ld [wc98a], a
|
|
|
|
ld [wc993], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc833], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc834], a
|
2014-04-29 19:59:39 -07:00
|
|
|
inc hl
|
2016-05-04 08:46:23 -07:00
|
|
|
inc hl
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc97f], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc980], a
|
2014-04-29 19:59:39 -07:00
|
|
|
dec hl
|
2016-05-04 08:46:23 -07:00
|
|
|
dec hl
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, LOW(wc880)
|
2014-04-29 19:59:39 -07:00
|
|
|
cp l
|
|
|
|
jr nz, .asm_110e4a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, HIGH(wc880)
|
2014-04-29 19:59:39 -07:00
|
|
|
cp h
|
|
|
|
jr z, .asm_110dfd
|
|
|
|
|
|
|
|
.asm_110e4a
|
|
|
|
push hl
|
|
|
|
push de
|
|
|
|
push bc
|
|
|
|
push hl
|
2018-01-22 10:00:35 -08:00
|
|
|
ld b, URIPrefix.End - URIPrefix
|
2014-04-29 19:59:39 -07:00
|
|
|
ld de, URIPrefix
|
|
|
|
.asm_110e53
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
cp [hl]
|
|
|
|
jr nz, .asm_110df9
|
|
|
|
inc hl
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_110e53
|
|
|
|
push hl
|
2018-01-22 10:00:35 -08:00
|
|
|
ld b, HTTPUploadURL.End - HTTPUploadURL
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, $0
|
|
|
|
ld de, HTTPUploadURL
|
|
|
|
.asm_110e64
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
cp [hl]
|
|
|
|
jr nz, .asm_110e70
|
|
|
|
inc hl
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_110e64
|
|
|
|
pop hl
|
|
|
|
jr .asm_110df9
|
|
|
|
|
|
|
|
.asm_110e70
|
|
|
|
pop hl
|
|
|
|
push hl
|
2018-01-22 10:00:35 -08:00
|
|
|
ld b, HTTPRankingURL.End - HTTPRankingURL
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, $0
|
|
|
|
ld de, HTTPRankingURL
|
|
|
|
.asm_110e79
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
cp [hl]
|
|
|
|
jr nz, .asm_110e86
|
|
|
|
inc hl
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_110e79
|
|
|
|
pop hl
|
|
|
|
jp .asm_110df9
|
|
|
|
|
|
|
|
.asm_110e86
|
|
|
|
pop hl
|
|
|
|
push hl
|
2018-01-22 10:00:35 -08:00
|
|
|
ld b, HTTPUtilityURL.End - HTTPUtilityURL
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, $0
|
|
|
|
ld de, HTTPUtilityURL
|
|
|
|
.asm_110e8f
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
cp [hl]
|
|
|
|
jr nz, .asm_110ea2
|
|
|
|
inc hl
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_110e8f
|
|
|
|
pop hl
|
|
|
|
ld a, $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc98a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, $1
|
|
|
|
jr .asm_110eb3
|
|
|
|
|
|
|
|
.asm_110ea2
|
|
|
|
pop hl
|
2018-01-22 10:00:35 -08:00
|
|
|
ld b, HTTPDownloadURL.End - HTTPDownloadURL
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, $0
|
|
|
|
ld de, HTTPDownloadURL
|
|
|
|
.asm_110eaa
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
cp [hl]
|
|
|
|
jr nz, .asm_110ecb
|
|
|
|
inc hl
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_110eaa
|
|
|
|
|
|
|
|
.asm_110eb3
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc97f
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ld c, $12
|
|
|
|
call Function11039a
|
|
|
|
jp c, .asm_110df9
|
|
|
|
ld c, $12
|
|
|
|
call Function11039a
|
|
|
|
jp c, .asm_110df9
|
|
|
|
ld c, $1
|
|
|
|
|
|
|
|
.asm_110ecb
|
|
|
|
ld a, c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc98f], a
|
|
|
|
ld [wMobileSDK_ReceivePacketBuffer + 128], a
|
2014-04-29 19:59:39 -07:00
|
|
|
pop hl
|
|
|
|
call Function1111d7
|
|
|
|
ld a, b
|
|
|
|
cp $4
|
|
|
|
jr c, .asm_110ee3
|
|
|
|
jp nz, .asm_110dfa
|
|
|
|
xor a
|
|
|
|
or c
|
|
|
|
jp nz, .asm_110dfa
|
|
|
|
|
|
|
|
.asm_110ee3
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc98b
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
ld [hli], a
|
2016-05-10 09:31:49 -07:00
|
|
|
ld [hli], a
|
|
|
|
ld [hli], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
|
|
|
pop bc
|
|
|
|
pop de
|
|
|
|
pop hl
|
|
|
|
ld a, l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc876], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc877], a
|
|
|
|
ld hl, wc872
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, c
|
|
|
|
ld [hli], a
|
|
|
|
ld a, b
|
|
|
|
ld [hli], a
|
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
|
|
|
ld [hli], a
|
|
|
|
inc hl
|
2016-05-04 08:46:23 -07:00
|
|
|
inc hl
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc994], a
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function110f07:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc833
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
or h
|
|
|
|
jr z, .asm_110f12
|
|
|
|
xor a
|
|
|
|
ld [hl], a
|
|
|
|
|
|
|
|
.asm_110f12
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc991
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc866
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
or [hl]
|
|
|
|
inc hl
|
|
|
|
or [hl]
|
|
|
|
inc hl
|
|
|
|
or [hl]
|
|
|
|
jr nz, .asm_110f28
|
|
|
|
ld a, $2
|
|
|
|
jp Function110615
|
|
|
|
|
|
|
|
.asm_110f28
|
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86e], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $1f
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 10], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $90
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 11], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer
|
|
|
|
ld hl, MobilePacket_OpenTCPConnection
|
2019-08-22 08:31:45 -07:00
|
|
|
ld b, $6
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc866
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $4
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
inc de
|
2016-05-04 08:46:23 -07:00
|
|
|
inc de
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $6
|
|
|
|
call Function111f63
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer + 128]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr z, .asm_110f95
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc995
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
cp $99
|
|
|
|
jr nz, .asm_110f8a
|
|
|
|
ld a, [hli]
|
|
|
|
cp $66
|
|
|
|
jr nz, .asm_110f8a
|
|
|
|
ld a, [hli]
|
|
|
|
cp $23
|
|
|
|
jr nz, .asm_110f8a
|
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86e], a
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $a3
|
|
|
|
ld de, $0010
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc995
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function111f02
|
|
|
|
ld a, $f
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function110432
|
|
|
|
|
|
|
|
.asm_110f8a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wc995
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $10
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_110f95
|
|
|
|
ld de, $0010
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_OPEN_TCP_CONNECTION | $80
|
2019-08-22 08:31:45 -07:00
|
|
|
ld [wMobileSDK_SendCommandID], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-10-20 15:27:34 -07:00
|
|
|
call PacketSendBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $f
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function110432
|
|
|
|
|
2018-06-24 17:10:37 -07:00
|
|
|
URIPrefix:
|
2015-01-20 00:01:23 -08:00
|
|
|
db "http://"
|
2018-01-22 10:00:35 -08:00
|
|
|
.End
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 17:10:37 -07:00
|
|
|
HTTPDownloadURL:
|
2015-01-20 00:01:23 -08:00
|
|
|
db "gameboy.datacenter.ne.jp/cgb/download"
|
2018-01-22 10:00:35 -08:00
|
|
|
.End
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 17:10:37 -07:00
|
|
|
HTTPUploadURL:
|
2015-01-20 00:01:23 -08:00
|
|
|
db "gameboy.datacenter.ne.jp/cgb/upload"
|
2018-01-22 10:00:35 -08:00
|
|
|
.End
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 17:10:37 -07:00
|
|
|
HTTPUtilityURL:
|
2015-01-20 00:01:23 -08:00
|
|
|
db "gameboy.datacenter.ne.jp/cgb/utility"
|
2018-01-22 10:00:35 -08:00
|
|
|
.End
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 17:10:37 -07:00
|
|
|
HTTPRankingURL:
|
2015-01-20 00:01:23 -08:00
|
|
|
db "gameboy.datacenter.ne.jp/cgb/ranking"
|
2018-01-22 10:00:35 -08:00
|
|
|
.End
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111044:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc827
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
|
|
|
ld [hli], a
|
|
|
|
inc de
|
2016-05-04 08:46:23 -07:00
|
|
|
inc de
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
|
|
|
ld [hli], a
|
|
|
|
ld e, [hl]
|
|
|
|
ld a, b
|
|
|
|
or c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86e], a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld [wc86e + 1], a
|
2014-04-29 19:59:39 -07:00
|
|
|
dec bc
|
2016-05-04 08:46:23 -07:00
|
|
|
dec bc
|
2014-04-29 19:59:39 -07:00
|
|
|
jp z, Function1111ca
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc991]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
call nz, Function11115f
|
|
|
|
xor a
|
|
|
|
cp e
|
|
|
|
jp z, .asm_1110eb
|
|
|
|
xor a
|
|
|
|
cp b
|
|
|
|
jr nz, .asm_1110ac
|
|
|
|
ld a, e
|
|
|
|
cp c
|
|
|
|
jr c, .asm_1110ac
|
|
|
|
push bc
|
|
|
|
sub c
|
|
|
|
ld [hl], a
|
|
|
|
ld b, c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc82d
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, c
|
|
|
|
ld [hli], a
|
|
|
|
xor a
|
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_ReceivePacketBuffer + 3
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
inc hl
|
|
|
|
sub e
|
|
|
|
dec a
|
|
|
|
ld e, a
|
2020-11-09 12:17:03 -08:00
|
|
|
ld d, 0
|
2014-04-29 19:59:39 -07:00
|
|
|
add hl, de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc829]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, [wc829 + 1]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld d, a
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
pop bc
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc991]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld l, a
|
2020-11-09 12:17:03 -08:00
|
|
|
ld h, 0
|
2014-04-29 19:59:39 -07:00
|
|
|
add hl, bc
|
|
|
|
ld c, l
|
|
|
|
ld b, h
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc991], a
|
|
|
|
ld hl, wc827
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ld a, c
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], b
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_1110ac
|
|
|
|
ld a, c
|
|
|
|
sub e
|
|
|
|
ld c, a
|
|
|
|
ld a, b
|
|
|
|
sbc $0
|
|
|
|
ld b, a
|
|
|
|
ld a, c
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc82d
|
|
|
|
ld a, [wc991]
|
2014-04-29 19:59:39 -07:00
|
|
|
add e
|
|
|
|
ld [hli], a
|
2018-02-04 10:16:40 -08:00
|
|
|
ld a, 0
|
|
|
|
adc 0
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc991], a
|
|
|
|
ld a, [wc86e]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr z, .asm_1110eb
|
|
|
|
ld b, e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_ReceivePacketBuffer + 3
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
inc hl
|
|
|
|
sub e
|
|
|
|
dec a
|
|
|
|
ld e, a
|
2020-11-09 12:17:03 -08:00
|
|
|
ld d, 0
|
2014-04-29 19:59:39 -07:00
|
|
|
add hl, de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc829]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, [wc829 + 1]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld d, a
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc829
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
|
|
|
ld [hl], a
|
|
|
|
|
|
|
|
.asm_1110eb
|
|
|
|
di
|
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc989], a
|
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 2, [hl]
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
2022-09-14 17:49:58 -07:00
|
|
|
cp MOBILE_COMMAND_TRANSFER_DATA_END | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_111144
|
|
|
|
ld de, $000b
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_TRANSFER_DATA | $80
|
2019-08-22 08:31:45 -07:00
|
|
|
ld [wMobileSDK_SendCommandID], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-10-20 15:27:34 -07:00
|
|
|
call PacketSendBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc827
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc82d]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc82e]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc98f
|
2014-04-29 19:59:39 -07:00
|
|
|
inc [hl]
|
|
|
|
ld a, $f
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
|
|
|
ld a, [wc86d]
|
|
|
|
ld [wc86e], a
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc989], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $a3
|
|
|
|
ld de, $0010
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc995
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function111f02
|
|
|
|
|
|
|
|
.asm_111144
|
|
|
|
res 0, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc827
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc82d]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc82e]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86d], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ei
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function11115f:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
|
|
|
xor a
|
|
|
|
cp b
|
|
|
|
jr nz, .asm_111168
|
|
|
|
ld a, c
|
|
|
|
cp e
|
|
|
|
jr c, .asm_1111a2
|
|
|
|
|
|
|
|
.asm_111168
|
|
|
|
push hl
|
|
|
|
push bc
|
|
|
|
ld b, e
|
|
|
|
ld c, e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc993]
|
2014-04-29 19:59:39 -07:00
|
|
|
sub e
|
|
|
|
ld e, a
|
2020-11-09 12:17:03 -08:00
|
|
|
ld d, 0
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
add hl, de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc829]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, [wc829 + 1]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld d, a
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc829
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
|
|
|
ld [hl], a
|
|
|
|
ld e, c
|
|
|
|
ld a, c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc82d
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
|
|
|
xor a
|
|
|
|
ld [hl], a
|
|
|
|
pop bc
|
|
|
|
ld a, c
|
|
|
|
sub e
|
|
|
|
ld c, a
|
|
|
|
ld a, b
|
|
|
|
sbc $0
|
|
|
|
ld b, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc992]
|
|
|
|
ld [wc82b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
|
|
|
pop hl
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_1111a2
|
|
|
|
ld a, e
|
|
|
|
sub c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc991], a
|
|
|
|
ld a, [wc993]
|
2014-04-29 19:59:39 -07:00
|
|
|
sub e
|
|
|
|
ld e, a
|
2020-11-09 12:17:03 -08:00
|
|
|
ld d, 0
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
add hl, de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc829]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, [wc829 + 1]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld d, a
|
|
|
|
ld b, c
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc827
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ld a, c
|
|
|
|
ld [hli], a
|
|
|
|
xor a
|
|
|
|
ld [hl], a
|
|
|
|
pop af
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1111ca:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 2, [hl]
|
|
|
|
ld a, $6
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function112430
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1111d7:
|
2014-04-29 19:59:39 -07:00
|
|
|
push hl
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc866
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
or [hl]
|
|
|
|
inc hl
|
|
|
|
or [hl]
|
|
|
|
inc hl
|
|
|
|
or [hl]
|
|
|
|
pop hl
|
|
|
|
jr nz, .asm_1111ee
|
|
|
|
ld de, $0007
|
|
|
|
add hl, de
|
|
|
|
.asm_1111e8
|
|
|
|
ld a, [hli]
|
|
|
|
cp $2f
|
|
|
|
jr nz, .asm_1111e8
|
|
|
|
dec hl
|
|
|
|
|
|
|
|
.asm_1111ee
|
2015-12-14 08:12:18 -08:00
|
|
|
ld bc, -1
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_1111f1
|
|
|
|
ld a, [hli]
|
|
|
|
inc bc
|
|
|
|
or a
|
|
|
|
jr nz, .asm_1111f1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc87a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, c
|
|
|
|
ld [hli], a
|
|
|
|
ld a, b
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1111fe:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 2, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
jp nz, Function1113ea
|
|
|
|
cp $2
|
|
|
|
jp nz, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, a
|
|
|
|
jp nz, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86d]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jp nz, Function110226
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc989], a
|
|
|
|
ld [wc98a], a
|
|
|
|
ld [wc993], a
|
2014-04-29 19:59:39 -07:00
|
|
|
push hl
|
|
|
|
push de
|
|
|
|
push bc
|
|
|
|
push hl
|
2015-07-20 19:18:18 -07:00
|
|
|
rept 4
|
2014-04-29 19:59:39 -07:00
|
|
|
inc hl
|
2015-07-20 19:18:18 -07:00
|
|
|
endr
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc833], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc834], a
|
2014-04-29 19:59:39 -07:00
|
|
|
inc hl
|
2016-05-04 08:46:23 -07:00
|
|
|
inc hl
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc97f], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc980], a
|
2014-04-29 19:59:39 -07:00
|
|
|
dec hl
|
2016-05-04 08:46:23 -07:00
|
|
|
dec hl
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, LOW(wc880)
|
2014-04-29 19:59:39 -07:00
|
|
|
cp l
|
|
|
|
jr nz, .asm_111251
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, HIGH(wc880)
|
2014-04-29 19:59:39 -07:00
|
|
|
cp h
|
|
|
|
jp z, Function1113f7
|
|
|
|
|
|
|
|
.asm_111251
|
2018-01-22 10:00:35 -08:00
|
|
|
ld b, URIPrefix.End - URIPrefix
|
2014-04-29 19:59:39 -07:00
|
|
|
ld de, URIPrefix
|
|
|
|
.asm_111256
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
cp [hl]
|
|
|
|
jp nz, Function1113f7
|
|
|
|
inc hl
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_111256
|
|
|
|
push hl
|
2018-01-22 10:00:35 -08:00
|
|
|
ld b, HTTPDownloadURL.End - HTTPDownloadURL
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, $0
|
|
|
|
ld de, HTTPDownloadURL
|
|
|
|
.asm_111268
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
cp [hl]
|
|
|
|
jr nz, .asm_111275
|
|
|
|
inc hl
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_111268
|
|
|
|
pop hl
|
|
|
|
jp Function1113f7
|
|
|
|
|
|
|
|
.asm_111275
|
|
|
|
pop hl
|
|
|
|
push hl
|
2018-01-22 10:00:35 -08:00
|
|
|
ld b, HTTPRankingURL.End - HTTPRankingURL
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, $0
|
|
|
|
ld de, HTTPRankingURL
|
|
|
|
.asm_11127e
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
cp [hl]
|
|
|
|
jr nz, .asm_11128f
|
|
|
|
inc hl
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_11127e
|
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc98a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
pop hl
|
|
|
|
jr .asm_1112a0
|
|
|
|
|
|
|
|
.asm_11128f
|
|
|
|
pop hl
|
2018-01-22 10:00:35 -08:00
|
|
|
ld b, HTTPUploadURL.End - HTTPUploadURL
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, $0
|
|
|
|
ld de, HTTPUploadURL
|
|
|
|
.asm_111297
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
cp [hl]
|
|
|
|
jr nz, .asm_1112cc
|
|
|
|
inc hl
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_111297
|
|
|
|
|
|
|
|
.asm_1112a0
|
|
|
|
ld a, [hli]
|
|
|
|
or a
|
|
|
|
jr nz, .asm_1112a0
|
|
|
|
.asm_1112a4
|
|
|
|
ld a, [hld]
|
|
|
|
cp $2f
|
|
|
|
jr nz, .asm_1112a4
|
|
|
|
inc hl
|
2016-05-04 08:46:23 -07:00
|
|
|
inc hl
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
|
|
|
cp $30
|
|
|
|
jr c, .asm_1112cc
|
|
|
|
cp $3a
|
|
|
|
jr nc, .asm_1112cc
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc97f
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ld c, $12
|
|
|
|
call Function11039a
|
|
|
|
jp c, Function1113f7
|
|
|
|
ld c, $12
|
|
|
|
call Function11039a
|
|
|
|
jp c, Function1113f7
|
|
|
|
ld c, $1
|
|
|
|
|
|
|
|
.asm_1112cc
|
|
|
|
ld a, c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc98f], a
|
|
|
|
ld [wMobileSDK_ReceivePacketBuffer + 128], a
|
2014-04-29 19:59:39 -07:00
|
|
|
pop hl
|
|
|
|
ld de, $0006
|
|
|
|
add hl, de
|
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
call Function1111d7
|
|
|
|
ld a, b
|
|
|
|
cp $4
|
|
|
|
jr c, .asm_1112eb
|
|
|
|
jp nz, Function1113f8
|
|
|
|
xor a
|
|
|
|
or c
|
|
|
|
jp nz, Function1113f8
|
|
|
|
|
|
|
|
.asm_1112eb
|
|
|
|
pop bc
|
|
|
|
pop de
|
|
|
|
pop hl
|
|
|
|
ld a, l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc876], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc877], a
|
|
|
|
ld hl, wc872
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, c
|
|
|
|
ld [hli], a
|
|
|
|
ld a, b
|
|
|
|
ld [hli], a
|
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
|
|
|
ld [hli], a
|
|
|
|
inc hl
|
2016-05-04 08:46:23 -07:00
|
|
|
inc hl
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
|
|
|
ld [hl], a
|
|
|
|
call Function111335
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc876
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ld a, [hli]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc9aa], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc9ab], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc9ac], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc9ad], a
|
2014-04-29 19:59:39 -07:00
|
|
|
inc hl
|
2016-05-04 08:46:23 -07:00
|
|
|
inc hl
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc876], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc877], a
|
|
|
|
ld a, [wc98f]
|
2014-04-29 19:59:39 -07:00
|
|
|
xor $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc994], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function110f07
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111335:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc876
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
inc hl
|
2016-05-04 08:46:23 -07:00
|
|
|
inc hl
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc8c9], a
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_111344
|
|
|
|
ld de, $8ad0
|
|
|
|
add hl, de
|
|
|
|
jr nc, .asm_11134e
|
|
|
|
add $3
|
|
|
|
jr .asm_111344
|
|
|
|
|
|
|
|
.asm_11134e
|
|
|
|
ld de, $7530
|
|
|
|
add hl, de
|
|
|
|
.asm_111352
|
|
|
|
ld de, $d8f0
|
|
|
|
add hl, de
|
|
|
|
jr nc, .asm_11135b
|
|
|
|
inc a
|
|
|
|
jr .asm_111352
|
|
|
|
|
|
|
|
.asm_11135b
|
|
|
|
ld de, $2710
|
|
|
|
add hl, de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc8c6], a
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
.asm_111363
|
|
|
|
ld de, $f448
|
|
|
|
add hl, de
|
|
|
|
jr nc, .asm_11136d
|
|
|
|
add $30
|
|
|
|
jr .asm_111363
|
|
|
|
|
|
|
|
.asm_11136d
|
|
|
|
ld de, $0bb8
|
|
|
|
add hl, de
|
|
|
|
.asm_111371
|
|
|
|
ld de, $fc18
|
|
|
|
add hl, de
|
|
|
|
jr nc, .asm_11137b
|
|
|
|
add $10
|
|
|
|
jr .asm_111371
|
|
|
|
|
|
|
|
.asm_11137b
|
|
|
|
ld de, $03e8
|
|
|
|
add hl, de
|
|
|
|
.asm_11137f
|
|
|
|
ld de, $fed4
|
|
|
|
add hl, de
|
|
|
|
jr nc, .asm_111389
|
|
|
|
add $3
|
|
|
|
jr .asm_11137f
|
|
|
|
|
|
|
|
.asm_111389
|
|
|
|
ld de, $012c
|
|
|
|
add hl, de
|
|
|
|
.asm_11138d
|
|
|
|
ld de, $ff9c
|
|
|
|
add hl, de
|
|
|
|
jr nc, .asm_111396
|
|
|
|
inc a
|
|
|
|
jr .asm_11138d
|
|
|
|
|
|
|
|
.asm_111396
|
|
|
|
ld de, $0064
|
|
|
|
add hl, de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc8c7], a
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
.asm_11139e
|
|
|
|
ld de, $ffe2
|
|
|
|
add hl, de
|
|
|
|
jr nc, .asm_1113a8
|
|
|
|
add $30
|
|
|
|
jr .asm_11139e
|
|
|
|
|
|
|
|
.asm_1113a8
|
|
|
|
ld de, $001e
|
|
|
|
add hl, de
|
|
|
|
.asm_1113ac
|
|
|
|
ld de, $fff6
|
|
|
|
add hl, de
|
|
|
|
jr nc, .asm_1113b6
|
|
|
|
add $10
|
|
|
|
jr .asm_1113ac
|
|
|
|
|
|
|
|
.asm_1113b6
|
|
|
|
ld de, $000a
|
|
|
|
add hl, de
|
|
|
|
add l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc8c8], a
|
|
|
|
ld de, wc9a5
|
|
|
|
ld hl, wc8c6
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
or $30
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld a, [hl]
|
|
|
|
swap a
|
|
|
|
and $f
|
|
|
|
or $30
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld a, [hli]
|
|
|
|
and $f
|
|
|
|
or $30
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld a, [hl]
|
|
|
|
swap a
|
|
|
|
and $f
|
|
|
|
or $30
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld a, [hl]
|
|
|
|
and $f
|
|
|
|
or $30
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1113ea:
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $14
|
|
|
|
jp z, Function111044
|
|
|
|
cp $24
|
|
|
|
jp z, Function111044
|
|
|
|
jp Function110226
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1113f7:
|
2014-04-29 19:59:39 -07:00
|
|
|
pop hl
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1113f8:
|
2014-04-29 19:59:39 -07:00
|
|
|
pop hl
|
|
|
|
pop hl
|
|
|
|
pop hl
|
|
|
|
jp Function110231
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1113fe:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc822]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 4, a
|
|
|
|
jp z, .asm_11147f
|
|
|
|
bit 7, a
|
|
|
|
jp nz, .asm_11147f
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, a
|
|
|
|
jp nz, .asm_11147f
|
|
|
|
.asm_111413
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc800]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr nz, .asm_111413
|
|
|
|
di
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 3, a
|
|
|
|
jp nz, .asm_11147b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc807]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr nz, .asm_111436
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
set 1, [hl]
|
|
|
|
ld a, $23
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc80f], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $ff
|
|
|
|
ei
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_111436
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
push hl
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc829
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
ld [hli], a
|
2016-05-10 09:31:49 -07:00
|
|
|
ld [hli], a
|
|
|
|
ld [hli], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer
|
|
|
|
ld hl, MobilePacket_TransferData
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
pop hl
|
|
|
|
ld a, [hli]
|
|
|
|
or a
|
|
|
|
jr z, .asm_111485
|
|
|
|
cp $81
|
|
|
|
jr nc, .asm_111485
|
|
|
|
ld c, a
|
|
|
|
inc a
|
2016-05-04 08:46:23 -07:00
|
|
|
inc a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld a, $ff
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld a, c
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld b, c
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, c
|
|
|
|
inc b
|
2016-05-04 08:46:23 -07:00
|
|
|
inc b
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function111f63
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
set 7, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
set 0, [hl]
|
|
|
|
ld a, $0
|
|
|
|
ei
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_11147b
|
|
|
|
ei
|
|
|
|
ld a, $1
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_11147f
|
|
|
|
call Function110226
|
|
|
|
ld a, $ff
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_111485
|
|
|
|
ei
|
|
|
|
call Function110231
|
|
|
|
ld a, $ff
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function11148c:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc822]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 4, a
|
|
|
|
jp z, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, a
|
|
|
|
jp nz, Function110226
|
|
|
|
bit 3, a
|
|
|
|
jp z, Function110226
|
|
|
|
ld e, l
|
|
|
|
ld d, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc992]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr nz, .asm_111507
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc993]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
ld b, 0
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_ReceivePacketBuffer + 4
|
2014-04-29 19:59:39 -07:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hli]
|
|
|
|
or a
|
|
|
|
jr z, .asm_1114bb
|
|
|
|
cp $81
|
|
|
|
jr c, .asm_1114bd
|
|
|
|
|
|
|
|
.asm_1114bb
|
|
|
|
ld a, $80
|
|
|
|
|
|
|
|
.asm_1114bd
|
|
|
|
ld b, a
|
|
|
|
inc c
|
|
|
|
add c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc993], a
|
|
|
|
ld a, [wc994]
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
sub b
|
|
|
|
ld c, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc994], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, b
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_1114d2
|
|
|
|
xor a
|
|
|
|
or c
|
|
|
|
jr nz, .asm_1114dc
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 3, [hl]
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_1114dc
|
|
|
|
ld a, [hli]
|
|
|
|
or a
|
|
|
|
jr z, .asm_1114e4
|
|
|
|
cp $81
|
|
|
|
jr c, .asm_1114e6
|
|
|
|
|
|
|
|
.asm_1114e4
|
|
|
|
ld a, $80
|
|
|
|
|
|
|
|
.asm_1114e6
|
|
|
|
cp c
|
|
|
|
ret c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc991], a
|
2014-04-29 19:59:39 -07:00
|
|
|
dec c
|
|
|
|
ld a, c
|
|
|
|
or a
|
|
|
|
jr z, .asm_111500
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc992], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wc880
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_1114fa
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 3, [hl]
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_111500
|
|
|
|
ld a, $ff
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc992], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jr .asm_1114fa
|
|
|
|
|
|
|
|
.asm_111507
|
|
|
|
cp $ff
|
|
|
|
jr nz, .asm_11150c
|
|
|
|
xor a
|
|
|
|
|
|
|
|
.asm_11150c
|
|
|
|
ld b, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc991]
|
2014-04-29 19:59:39 -07:00
|
|
|
sub b
|
|
|
|
ld c, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc880
|
|
|
|
ld a, [wc991]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld a, b
|
|
|
|
or a
|
|
|
|
jr z, .asm_111521
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_111521
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_ReceivePacketBuffer + 5
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, c
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
push hl
|
|
|
|
ld a, c
|
|
|
|
inc a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc993], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer + 3]
|
2014-04-29 19:59:39 -07:00
|
|
|
sub b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc994], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, a
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc991
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
|
|
|
ld [hl], a
|
|
|
|
pop hl
|
|
|
|
jr .asm_1114d2
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111540:
|
2014-04-29 19:59:39 -07:00
|
|
|
nop
|
|
|
|
|
2022-09-14 17:49:58 -07:00
|
|
|
MobileAPI_TelephoneStatus:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, [hl]
|
|
|
|
jp nz, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $5
|
|
|
|
jp nc, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc985], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86e], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, d
|
2022-09-14 17:49:58 -07:00
|
|
|
ld [wc86e + 1], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc807]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $2
|
|
|
|
jr c, .asm_111582
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_TELEPHONE_STATUS | $80
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_TelephoneStatus
|
2019-10-20 15:27:34 -07:00
|
|
|
call PacketSendEmptyBody
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_11156f
|
2022-01-16 14:50:50 -08:00
|
|
|
ld a, [wMobileAPIIndex]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $40
|
|
|
|
jr nz, .asm_11157a
|
|
|
|
ld a, $2c
|
|
|
|
jr .asm_11157c
|
|
|
|
|
|
|
|
.asm_11157a
|
|
|
|
ld a, $1e
|
|
|
|
|
|
|
|
.asm_11157c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function110432
|
|
|
|
|
|
|
|
.asm_111582
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [rTAC], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc870]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, a
|
2022-01-16 14:50:50 -08:00
|
|
|
call MobileAPI_SetTimer
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function1104b0
|
|
|
|
ld a, $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jr .asm_11156f
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111596:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
|
|
|
cp $1
|
|
|
|
jp z, Function110226
|
|
|
|
cp $2a
|
|
|
|
jp z, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc800]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 1, a
|
|
|
|
jr nz, .asm_1115af
|
|
|
|
ld a, $2a
|
|
|
|
jr Function1115e4
|
|
|
|
|
|
|
|
.asm_1115af
|
2019-08-22 08:31:45 -07:00
|
|
|
ld a, [wMobileSDK_SendCommandID]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $92
|
|
|
|
jr nz, .asm_1115dd
|
|
|
|
ld a, $2a
|
|
|
|
ld b, $0
|
|
|
|
di
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
res 5, [hl]
|
|
|
|
res 0, [hl]
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc80b], a
|
|
|
|
ld [wc800], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $8
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
2019-10-20 15:27:34 -07:00
|
|
|
call ResetReceivePacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function11164f
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
set 0, [hl]
|
|
|
|
ei
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_1115dd
|
|
|
|
ld a, $2a
|
|
|
|
ld [hli], a
|
|
|
|
ld a, $1
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1115e4:
|
2014-04-29 19:59:39 -07:00
|
|
|
di
|
|
|
|
push af
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
set 0, [hl]
|
|
|
|
ld a, $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
|
|
|
ld a, [wc86d]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_111609
|
2022-09-14 17:49:58 -07:00
|
|
|
cp MOBILE_COMMAND_TRANSFER_DATA_END | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_11160d
|
2022-09-14 17:49:58 -07:00
|
|
|
cp MOBILE_COMMAND_CLOSE_TCP_CONNECTION | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_11160d
|
|
|
|
.asm_111601
|
|
|
|
call Function112430
|
|
|
|
.asm_111604
|
|
|
|
pop af
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_111609
|
|
|
|
cp $a3
|
|
|
|
jr z, .asm_111601
|
|
|
|
|
|
|
|
.asm_11160d
|
|
|
|
ei
|
|
|
|
jr .asm_111604
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111610:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
|
|
|
dec a
|
|
|
|
jp z, Function110226
|
|
|
|
dec a
|
|
|
|
jp z, Function110226
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc800]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr nz, .asm_111626
|
|
|
|
ld a, $28
|
|
|
|
jr Function1115e4
|
|
|
|
|
|
|
|
.asm_111626
|
|
|
|
ld a, $28
|
|
|
|
ld b, $2
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], b
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function11162d:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $1
|
|
|
|
jp nz, Function110226
|
|
|
|
xor a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
|
|
|
ld [hl], a
|
|
|
|
call Function111686
|
2019-10-20 15:27:34 -07:00
|
|
|
call ResetReceivePacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
ld bc, $0452
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc800
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_111647
|
|
|
|
xor a
|
|
|
|
ld [hli], a
|
|
|
|
dec bc
|
|
|
|
ld a, c
|
|
|
|
or b
|
|
|
|
jr nz, .asm_111647
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function11164f:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc815
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
ld [hli], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc81f]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, a
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_AdapterType]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, b
|
|
|
|
srl a
|
|
|
|
srl a
|
|
|
|
add b
|
2016-05-04 08:46:23 -07:00
|
|
|
add b
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111664:
|
2019-10-20 15:27:34 -07:00
|
|
|
ld hl, wMobileSDK_ReceivedBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld e, a
|
|
|
|
ld a, [hli]
|
|
|
|
ld d, a
|
2019-08-22 08:31:45 -07:00
|
|
|
ld a, [wMobileSDK_SendCommandID]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $ff
|
|
|
|
jr z, .asm_111679
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wc822]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, a
|
|
|
|
jr z, .asm_11167c
|
|
|
|
.asm_111679
|
2019-10-20 15:27:34 -07:00
|
|
|
ld hl, wMobileSDK_ReceivePacketBufferAlt
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_11167c
|
|
|
|
add hl, de
|
|
|
|
ld [hl], c
|
|
|
|
inc de
|
2019-10-20 15:27:34 -07:00
|
|
|
ld hl, wMobileSDK_ReceivedBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], d
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111686:
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [rTAC], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, $ff
|
2019-02-16 09:17:55 -08:00
|
|
|
ldh a, [c]
|
2014-04-29 19:59:39 -07:00
|
|
|
and $f3
|
2019-02-16 09:17:55 -08:00
|
|
|
ldh [c], a
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 1]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
|
|
|
or c
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1116a0:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $1
|
|
|
|
jr Function1116a9
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1116a4:
|
2014-04-29 19:59:39 -07:00
|
|
|
set 1, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1116a9:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 1], a
|
|
|
|
ld hl, wc815
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
ld [hli], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc81f]
|
2014-04-29 19:59:39 -07:00
|
|
|
rla
|
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
|
|
|
ld b, a
|
|
|
|
and $d
|
|
|
|
ld [hl], a
|
|
|
|
ld a, $2
|
|
|
|
and b
|
2019-08-22 05:41:17 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
_MobileReceive::
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc800]
|
2014-04-29 19:59:39 -07:00
|
|
|
rrca
|
|
|
|
jp nc, Function1118bc
|
|
|
|
rrca
|
|
|
|
jp c, Function1117e7
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc801
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld d, [hl]
|
|
|
|
ld e, a
|
|
|
|
dec de
|
|
|
|
ld a, d
|
|
|
|
ld [hld], a
|
|
|
|
ld a, e
|
|
|
|
ld [hl], a
|
|
|
|
cp $2
|
|
|
|
jp nc, Function1118bc
|
|
|
|
ld a, d
|
|
|
|
or a
|
|
|
|
jp nz, Function1118bc
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc808
|
2014-04-29 19:59:39 -07:00
|
|
|
add hl, de
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh a, [rSB]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
|
|
|
ld a, $8
|
|
|
|
cp l
|
|
|
|
jp nz, Function1118bc
|
2019-08-22 08:31:45 -07:00
|
|
|
ld a, [wMobileSDK_SendCommandID]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $ff
|
|
|
|
jr z, .asm_111716
|
|
|
|
ld a, $f2
|
|
|
|
cp [hl]
|
|
|
|
jp z, Function111796
|
|
|
|
dec a
|
|
|
|
cp [hl]
|
|
|
|
jp z, Function1117a0
|
|
|
|
dec a
|
|
|
|
cp [hl]
|
|
|
|
jp z, Function1117a0
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc807]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $1
|
|
|
|
jr nz, .asm_111716
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc806]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr z, .asm_111778
|
|
|
|
.asm_111716
|
2019-08-22 08:31:45 -07:00
|
|
|
ld a, [wMobileSDK_SendCommandID]
|
2019-10-20 15:27:34 -07:00
|
|
|
cp -1
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_111730
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_ERROR | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_111727
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_TRANSFER_DATA_END | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
jr nz, .asm_111727
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_TRANSFER_DATA | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_111727
|
|
|
|
cp [hl]
|
|
|
|
jr nz, asm_11179a
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_AdapterType]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr z, .asm_111730
|
|
|
|
.asm_111730
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc819], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $3
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc800], a
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc80a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2016-05-10 09:31:49 -07:00
|
|
|
ld [hli], a
|
|
|
|
ld [hli], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc81f
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld b, a
|
|
|
|
ld a, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc815
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
|
|
|
ld a, b
|
|
|
|
ld [hli], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc822]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, a
|
|
|
|
jr z, .asm_111757
|
|
|
|
ld a, $b
|
|
|
|
jr .asm_111774
|
|
|
|
.asm_111757
|
2019-08-22 08:31:45 -07:00
|
|
|
ld a, [wMobileSDK_SendCommandID]
|
2019-10-20 15:27:34 -07:00
|
|
|
cp -1
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_11176e
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_DIAL_TELEPHONE | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_111772
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_OPEN_TCP_CONNECTION | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_111772
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_DNS_QUERY | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_111772
|
|
|
|
ld a, $20
|
|
|
|
jr .asm_111774
|
|
|
|
.asm_11176e
|
|
|
|
ld a, $3
|
|
|
|
jr .asm_111774
|
|
|
|
.asm_111772
|
|
|
|
ld a, $60
|
|
|
|
.asm_111774
|
|
|
|
ld [hl], a
|
|
|
|
jp Function1118bc
|
|
|
|
.asm_111778
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc800], a
|
2018-06-24 07:09:41 -07:00
|
|
|
Function11177c:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc820
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hld]
|
|
|
|
ld e, a
|
|
|
|
ld a, [hl]
|
|
|
|
dec a
|
|
|
|
ld b, $3
|
|
|
|
.asm_111785
|
|
|
|
or a
|
|
|
|
rra
|
|
|
|
rr e
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_111785
|
|
|
|
or a
|
|
|
|
inc a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc816
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hld], a
|
|
|
|
ld [hl], e
|
|
|
|
jp Function1118bc
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111796:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $a
|
|
|
|
jr asm_1117a2
|
2018-06-24 07:09:41 -07:00
|
|
|
asm_11179a:
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], a
|
|
|
|
jp Function1118bc
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1117a0:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $3
|
2018-06-24 07:09:41 -07:00
|
|
|
asm_1117a2:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
set 3, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc815
|
|
|
|
ld a, [wc820]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc81f]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc800], a
|
|
|
|
ld hl, wc819
|
2014-04-29 19:59:39 -07:00
|
|
|
inc [hl]
|
|
|
|
ld a, b
|
|
|
|
cp [hl]
|
|
|
|
jp nc, Function1118bc
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc806
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc800], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $6
|
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
set 1, [hl]
|
|
|
|
ld a, $15
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc80f], a
|
|
|
|
ld hl, wc810
|
|
|
|
ld a, [wc808]
|
2014-04-29 19:59:39 -07:00
|
|
|
and $f
|
|
|
|
cp $2
|
|
|
|
jr nz, .asm_1117e1
|
|
|
|
inc a
|
|
|
|
.asm_1117e1
|
|
|
|
ld [hli], a
|
|
|
|
xor a
|
|
|
|
ld [hl], a
|
|
|
|
jp Function1118bc
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1117e7:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc80b]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr z, .asm_1117f8
|
|
|
|
dec a
|
|
|
|
jp z, Function11186e
|
|
|
|
dec a
|
|
|
|
jp z, Function111884
|
|
|
|
jp Function111892
|
|
|
|
.asm_1117f8
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc80a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
|
|
|
or a
|
|
|
|
jr nz, .asm_111803
|
|
|
|
ld b, $99
|
|
|
|
jr .asm_111805
|
|
|
|
.asm_111803
|
|
|
|
ld b, $66
|
|
|
|
.asm_111805
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh a, [rSB]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp b
|
|
|
|
jr z, .asm_111840
|
|
|
|
cp $d2
|
|
|
|
jr nz, .asm_111817
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc9ae], a
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_111812
|
|
|
|
xor a
|
|
|
|
ld [hl], a
|
|
|
|
jp Function1118bc
|
|
|
|
.asm_111817
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc9ae]
|
2014-04-29 19:59:39 -07:00
|
|
|
inc a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc9ae], a
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $14
|
|
|
|
jr c, .asm_111812
|
|
|
|
ld a, $6
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $10
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc80f], a
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc800], a
|
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
res 0, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
|
|
|
set 1, a
|
|
|
|
and $f
|
|
|
|
ld [hl], a
|
|
|
|
jr Function1118bc
|
|
|
|
.asm_111840
|
|
|
|
inc [hl]
|
|
|
|
ld a, $2
|
|
|
|
cp [hl]
|
|
|
|
jr nz, Function1118bc
|
|
|
|
xor a
|
|
|
|
ld [hli], a
|
|
|
|
inc [hl]
|
2019-10-20 15:27:34 -07:00
|
|
|
ld hl, wMobileSDK_PacketChecksum
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $3
|
|
|
|
.asm_11184e
|
|
|
|
ld [hli], a
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_11184e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc822]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 4, a
|
|
|
|
jr z, .asm_111864
|
|
|
|
ld b, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 3, a
|
|
|
|
jr nz, .asm_111864
|
|
|
|
jp Function11177c
|
|
|
|
.asm_111864
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc820]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc81f]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
|
|
|
jr Function1118bc
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function11186e:
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function1118c2
|
|
|
|
ld a, $4
|
|
|
|
cp [hl]
|
|
|
|
jr nz, Function1118bc
|
|
|
|
xor a
|
|
|
|
ld [hli], a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh a, [rSB]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc80c], a
|
2014-04-29 19:59:39 -07:00
|
|
|
inc [hl]
|
|
|
|
or a
|
|
|
|
jr nz, Function1118bc
|
|
|
|
inc [hl]
|
|
|
|
jr Function1118bc
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111884:
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function1118c2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc80c]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp [hl]
|
|
|
|
jr nz, Function1118bc
|
|
|
|
xor a
|
|
|
|
ld [hli], a
|
|
|
|
inc [hl]
|
|
|
|
jr Function1118bc
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111892:
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh a, [rSB]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, a
|
|
|
|
call Function111664
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc80a
|
2014-04-29 19:59:39 -07:00
|
|
|
inc [hl]
|
|
|
|
ld a, $2
|
|
|
|
cp [hl]
|
|
|
|
jr c, .asm_1118b4
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc80a]
|
2014-04-29 19:59:39 -07:00
|
|
|
add $11
|
|
|
|
ld e, a
|
|
|
|
ld d, $c8
|
|
|
|
ld a, [de]
|
|
|
|
cp c
|
|
|
|
jr z, Function1118bc
|
|
|
|
ld a, $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc814], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jr Function1118bc
|
|
|
|
.asm_1118b4
|
|
|
|
ld a, $4
|
|
|
|
cp [hl]
|
|
|
|
jr nz, Function1118bc
|
|
|
|
xor a
|
|
|
|
ld [hli], a
|
|
|
|
inc [hl]
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1118bc:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
res 1, [hl]
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1118c2:
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh a, [rSB]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
ld b, 0
|
2019-10-20 15:27:34 -07:00
|
|
|
ld hl, wMobileSDK_PacketChecksum
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld l, [hl]
|
|
|
|
ld h, a
|
|
|
|
add hl, bc
|
|
|
|
ld a, h
|
2019-10-20 15:27:34 -07:00
|
|
|
ld [wMobileSDK_PacketChecksum], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, l
|
2019-10-20 15:27:34 -07:00
|
|
|
ld [wMobileSDK_PacketChecksum + 1], a
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function111664
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc80a
|
2014-04-29 19:59:39 -07:00
|
|
|
inc [hl]
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
_Timer::
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc80b]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $4
|
|
|
|
call z, Function111b3c
|
|
|
|
call Function11214e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc807
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
cp $2
|
|
|
|
jr c, .asm_111927
|
|
|
|
ld a, [hli]
|
|
|
|
ld b, a
|
|
|
|
ld a, [hl]
|
|
|
|
ld c, a
|
|
|
|
and b
|
|
|
|
cp $ff
|
|
|
|
jr z, .asm_1118fe
|
|
|
|
ld a, c
|
|
|
|
or b
|
|
|
|
jr nz, .asm_111927
|
|
|
|
.asm_1118fe
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc807
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $6
|
|
|
|
cp [hl]
|
|
|
|
jp z, Function111b3b
|
|
|
|
ld [hl], a
|
|
|
|
ld a, $10
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc80f], a
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc800], a
|
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
res 0, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
|
|
|
and $f
|
|
|
|
or $2
|
|
|
|
ld [hl], a
|
|
|
|
ld a, $10
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc80f], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function111b3b
|
|
|
|
.asm_111927
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc800]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $1
|
|
|
|
jp z, Function111b21
|
|
|
|
cp $3
|
|
|
|
jp z, Function111a2a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc807]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $1
|
|
|
|
jp c, Function111b3b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc815
|
2014-04-29 19:59:39 -07:00
|
|
|
dec [hl]
|
|
|
|
jp nz, Function111b3b
|
|
|
|
inc hl
|
|
|
|
dec [hl]
|
|
|
|
jp nz, Function111b3b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc807
|
|
|
|
ld a, [wc822]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 3, a
|
|
|
|
jp nz, Function111a0b
|
|
|
|
bit 4, a
|
|
|
|
jr nz, .asm_11199c
|
|
|
|
ld a, [hl]
|
|
|
|
cp $1
|
2022-09-14 17:49:58 -07:00
|
|
|
jp z, Function1119f0_BeginSession
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $a
|
|
|
|
jr z, .asm_111984
|
|
|
|
cp $8
|
|
|
|
jr z, .asm_11197d
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $2a
|
|
|
|
jr z, .asm_111991
|
|
|
|
cp $d
|
|
|
|
jr nz, .asm_111977
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86b]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $4
|
|
|
|
jr nc, .asm_11199c
|
|
|
|
.asm_111977
|
|
|
|
call Function111f97
|
|
|
|
jp Function111b3b
|
|
|
|
.asm_11197d
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc805]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
|
|
|
jp Function111b3b
|
|
|
|
.asm_111984
|
|
|
|
xor a
|
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 0, [hl]
|
|
|
|
call Function111686
|
|
|
|
jp Function111b3b
|
|
|
|
.asm_111991
|
|
|
|
xor a
|
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc821], a
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function111686
|
|
|
|
jp Function111b3b
|
|
|
|
.asm_11199c
|
|
|
|
ld b, a
|
|
|
|
ld [hl], a
|
|
|
|
or a
|
|
|
|
jp z, Function111b3b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc822]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 7, a
|
|
|
|
jr nz, .asm_1119be
|
|
|
|
.asm_1119a9
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 3, a
|
|
|
|
jr nz, .asm_111977
|
2019-08-22 05:41:17 -07:00
|
|
|
ld de, MobilePacket_TransferData.End - MobilePacket_TransferData
|
|
|
|
ld hl, MobilePacket_TransferData
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $95
|
|
|
|
call Function111f02
|
|
|
|
jp Function111b3b
|
|
|
|
.asm_1119be
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 3, a
|
|
|
|
jr nz, .asm_1119dd
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 5]
|
2014-04-29 19:59:39 -07:00
|
|
|
add $a
|
|
|
|
ld e, a
|
2020-11-09 12:17:03 -08:00
|
|
|
ld d, 0
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_TRANSFER_DATA | $80
|
2019-08-22 08:31:45 -07:00
|
|
|
ld [wMobileSDK_SendCommandID], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-10-20 15:27:34 -07:00
|
|
|
call PacketSendBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function111b3b
|
|
|
|
.asm_1119dd
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
set 1, [hl]
|
|
|
|
res 0, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
res 7, [hl]
|
|
|
|
ld a, $21
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc80f], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jr .asm_1119a9
|
|
|
|
|
2022-09-14 17:49:58 -07:00
|
|
|
Function1119f0_BeginSession:
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_BEGIN_SESSION | $80
|
2019-08-22 08:31:45 -07:00
|
|
|
ld [wMobileSDK_SendCommandID], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc808], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-08-22 05:41:17 -07:00
|
|
|
ld de, MobilePacket_BeginSession.End - MobilePacket_BeginSession
|
|
|
|
ld hl, MobilePacket_BeginSession
|
2019-10-20 15:27:34 -07:00
|
|
|
call PacketSendBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc806], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function111b3b
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111a0b:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
|
|
|
cp $6
|
|
|
|
jp z, Function111b3b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
res 3, [hl]
|
|
|
|
res 0, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc81a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld e, a
|
|
|
|
ld a, [hli]
|
|
|
|
ld d, a
|
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ld b, $5
|
2019-10-20 15:27:34 -07:00
|
|
|
call PacketSendBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function111b3b
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111a2a:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc80b
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hld]
|
|
|
|
or a
|
|
|
|
jr z, asm_111a47
|
|
|
|
cp $3
|
|
|
|
jr nz, asm_111a40
|
|
|
|
ld a, [hl]
|
|
|
|
cp $2
|
|
|
|
jp z, Function111ab9
|
|
|
|
cp $3
|
|
|
|
jp z, Function111abd
|
2018-06-24 07:09:41 -07:00
|
|
|
asm_111a40:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $4b
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111a42:
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [rSB], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function111b2e
|
2019-10-20 15:27:34 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
asm_111a47:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc815
|
2014-04-29 19:59:39 -07:00
|
|
|
dec [hl]
|
|
|
|
jr nz, asm_111a40
|
|
|
|
inc hl
|
|
|
|
dec [hl]
|
|
|
|
jr nz, asm_111a40
|
|
|
|
inc hl
|
|
|
|
dec [hl]
|
|
|
|
jr z, .asm_111a63
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc81f
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld d, a
|
|
|
|
ld a, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc815
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
|
|
|
ld [hli], a
|
|
|
|
jr asm_111a40
|
|
|
|
.asm_111a63
|
|
|
|
di
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $2a
|
|
|
|
jr z, .asm_111aa8
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc9b2
|
2014-04-29 19:59:39 -07:00
|
|
|
inc [hl]
|
|
|
|
ld a, [hl]
|
|
|
|
cp $1
|
|
|
|
jr z, .asm_111a91
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
res 5, [hl]
|
|
|
|
res 0, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 4, [hl]
|
|
|
|
ld a, $0
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc805], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $29
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc806], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jr .asm_111aa8
|
|
|
|
.asm_111a91
|
|
|
|
ld a, $29
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc806], a
|
|
|
|
ld [wc86b], a
|
|
|
|
ld [wc80b], a
|
|
|
|
ld [wc800], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $8
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_111aa8
|
2019-10-20 15:27:34 -07:00
|
|
|
call ResetReceivePacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function11164f
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
res 5, [hl]
|
|
|
|
res 0, [hl]
|
|
|
|
ei
|
|
|
|
jp Function111b3b
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111ab9:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $80
|
|
|
|
jr Function111a42
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111abd:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc814]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr nz, .asm_111acb
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
2014-04-29 19:59:39 -07:00
|
|
|
xor $80
|
|
|
|
jp Function111a42
|
|
|
|
.asm_111acb
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc819
|
2014-04-29 19:59:39 -07:00
|
|
|
inc [hl]
|
|
|
|
ld a, $3
|
|
|
|
cp [hl]
|
|
|
|
jr z, .asm_111afe
|
2019-10-20 15:27:34 -07:00
|
|
|
call ResetReceivePacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $3
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc800], a
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc80a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2016-05-04 08:46:23 -07:00
|
|
|
ld [hli], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc815
|
|
|
|
ld a, [wc820]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc81f]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc822]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, a
|
|
|
|
jr z, .asm_111af9
|
|
|
|
ld a, $b
|
|
|
|
jr .asm_111afb
|
|
|
|
.asm_111af9
|
|
|
|
ld a, $20
|
|
|
|
.asm_111afb
|
|
|
|
ld [hli], a
|
|
|
|
jr .asm_111b1c
|
|
|
|
.asm_111afe
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc806
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
ld [hli], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc800], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $6
|
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
set 1, [hl]
|
|
|
|
ld a, $15
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc80f], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc810], a
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld [wc810 + 1], a
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_111b1c
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, $f1
|
|
|
|
jp Function111a42
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111b21:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc803
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld e, a
|
|
|
|
ld d, [hl]
|
|
|
|
ld a, [de]
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [rSB], a
|
2014-04-29 19:59:39 -07:00
|
|
|
inc de
|
|
|
|
ld a, d
|
|
|
|
ld [hld], a
|
|
|
|
ld [hl], e
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111b2e:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
set 1, [hl]
|
2019-05-05 09:14:46 -07:00
|
|
|
ld a, (0 << rSC_ON) | (1 << rSC_CGB) | (1 << rSC_CLOCK)
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [rSC], a
|
2019-05-05 09:14:46 -07:00
|
|
|
ld a, (1 << rSC_ON) | (1 << rSC_CGB) | (1 << rSC_CLOCK)
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [rSC], a
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111b3b:
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111b3c:
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc819], a
|
|
|
|
ld [wc80b], a
|
|
|
|
ld hl, wc9b1
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc800], a
|
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
res 5, [hl]
|
|
|
|
bit 0, [hl]
|
|
|
|
jr z, .asm_111b59
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBufferAlt]
|
2014-04-29 19:59:39 -07:00
|
|
|
jr .asm_111b5c
|
|
|
|
.asm_111b59
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_111b5c
|
2019-10-20 15:27:34 -07:00
|
|
|
|
|
|
|
cp MOBILE_COMMAND_TRANSFER_DATA_END | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
jr nz, .asm_111b62
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_TRANSFER_DATA | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_111b62
|
|
|
|
ld b, a
|
2019-10-20 15:27:34 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
ld hl, Function111e28
|
|
|
|
push hl
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_ERROR | $80
|
|
|
|
jp z, GetErrorCode
|
2019-08-22 08:31:45 -07:00
|
|
|
ld a, [wMobileSDK_SendCommandID]
|
2019-10-20 15:27:34 -07:00
|
|
|
cp -1
|
2014-04-29 19:59:39 -07:00
|
|
|
jp z, Function111ef8
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_TRANSFER_DATA | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
jp z, Function111c17
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_DNS_QUERY | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
jp z, Function111d23
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_OPEN_TCP_CONNECTION | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_111bbe
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_CLOSE_TCP_CONNECTION | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_111bbe
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_HANG_UP_TELEPHONE | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_111be0
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_READ_CONFIGURATION_DATA | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_111bf0
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_WRITE_CONFIGURATION_DATA | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
jp z, Function111c06
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_TELEPHONE_STATUS | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
jp z, Function111d70
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_ISP_LOGIN | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_111bd0
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_ISP_LOGOUT | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_111bca
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_BEGIN_SESSION | $80
|
|
|
|
jp z, ParseResponse_BeginSession
|
|
|
|
cp MOBILE_COMMAND_WAIT_FOR_TELEPHONE_CALL | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
jp z, Function111d65
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_DIAL_TELEPHONE | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
jp z, Function111d65
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
res 0, [hl]
|
|
|
|
ld a, $a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc800], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
2019-10-20 15:27:34 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_111bbe
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer + 4]
|
|
|
|
ld [wc86c], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $4
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
2019-10-20 15:27:34 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_111bca
|
|
|
|
ld a, $3
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
2019-10-20 15:27:34 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_111bd0
|
|
|
|
ld a, $4
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
|
|
|
ld de, wc823
|
|
|
|
ld hl, wMobileSDK_ReceivePacketBuffer + 4
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $4
|
2019-08-22 05:41:17 -07:00
|
|
|
jp MobileSDK_CopyBytes
|
2019-10-20 15:27:34 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_111be0
|
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
res 4, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 4, [hl]
|
|
|
|
ret
|
2019-10-20 15:27:34 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_111bf0
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc829
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld d, [hl]
|
|
|
|
ld e, a
|
2019-10-20 15:27:34 -07:00
|
|
|
ld hl, wMobileSDK_ReceivePacketBuffer + 3 ; packet size
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
dec a
|
|
|
|
ld b, a
|
|
|
|
inc hl
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111c06:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wc872
|
|
|
|
ld hl, wMobileSDK_ReceivePacketBuffer + 4
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $2
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111c17:
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
|
|
|
cp MOBILE_COMMAND_TRANSFER_DATA_END | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
jp z, Function111d07
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, [wc86e + 1]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86e]
|
2014-04-29 19:59:39 -07:00
|
|
|
or b
|
|
|
|
jp z, Function111d07
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc82b
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld e, a
|
|
|
|
ld d, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer + 3]
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
jp z, Function111d07
|
|
|
|
ld c, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc822]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 4, a
|
|
|
|
jp z, Function111cc2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc992]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr nz, .asm_111c89
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer + 5]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr z, .asm_111c50
|
|
|
|
cp $81
|
|
|
|
jr c, .asm_111c52
|
|
|
|
.asm_111c50
|
|
|
|
ld a, $80
|
|
|
|
.asm_111c52
|
|
|
|
ld b, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer + 3]
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
2016-05-04 08:46:23 -07:00
|
|
|
dec a
|
2014-04-29 19:59:39 -07:00
|
|
|
cp b
|
|
|
|
jr c, .asm_111c6e
|
|
|
|
.asm_111c5b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
set 3, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc993
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $1
|
|
|
|
ld [hli], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer + 3]
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
ld [hl], a
|
|
|
|
jp Function111d07
|
|
|
|
.asm_111c6e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc992
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr z, .asm_111c83
|
|
|
|
ld [hld], a
|
|
|
|
ld [hl], b
|
|
|
|
ld b, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_ReceivePacketBuffer + 6
|
|
|
|
ld de, wc880
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function111d07
|
|
|
|
.asm_111c83
|
|
|
|
ld a, $ff
|
|
|
|
ld [hld], a
|
|
|
|
ld [hl], b
|
|
|
|
jr Function111d07
|
|
|
|
.asm_111c89
|
|
|
|
cp $ff
|
|
|
|
jr nz, .asm_111c9d
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc991
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld b, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer + 3]
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
cp b
|
|
|
|
jr nc, .asm_111c5b
|
|
|
|
jr z, .asm_111c5b
|
|
|
|
xor a
|
|
|
|
ld [hl], a
|
|
|
|
.asm_111c9d
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc991
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
sub [hl]
|
|
|
|
ld b, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer + 3]
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
cp b
|
|
|
|
jr nc, .asm_111c5b
|
|
|
|
jr z, .asm_111c5b
|
|
|
|
ld b, a
|
|
|
|
ld l, [hl]
|
|
|
|
ld h, $0
|
|
|
|
add l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc992], a
|
|
|
|
ld de, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
add hl, de
|
|
|
|
ld e, l
|
|
|
|
ld d, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_ReceivePacketBuffer + 5
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
jr Function111d07
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111cc2:
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
cp d
|
|
|
|
jr nz, .asm_111cda
|
|
|
|
ld a, c
|
|
|
|
cp e
|
|
|
|
jr c, .asm_111cda
|
|
|
|
jr z, .asm_111cda
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
set 2, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc821], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, c
|
|
|
|
sub e
|
|
|
|
ld c, e
|
|
|
|
ld e, a
|
|
|
|
jr .asm_111ce1
|
|
|
|
.asm_111cda
|
|
|
|
ld a, e
|
|
|
|
sub c
|
|
|
|
ld e, a
|
|
|
|
ld a, d
|
|
|
|
sbc $0
|
|
|
|
ld d, a
|
|
|
|
.asm_111ce1
|
|
|
|
ld a, d
|
|
|
|
ld [hld], a
|
|
|
|
ld [hl], e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc829]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, [wc829 + 1]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld d, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_ReceivePacketBuffer + 5
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, c
|
|
|
|
or a
|
|
|
|
jr z, Function111d07
|
|
|
|
ld b, a
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc829
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], d
|
|
|
|
ld de, $3
|
|
|
|
add hl, de
|
|
|
|
ld a, [hl]
|
|
|
|
add c
|
|
|
|
ld [hli], a
|
|
|
|
jr nc, Function111d07
|
|
|
|
inc [hl]
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111d07:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc822]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 4, a
|
|
|
|
jr z, .asm_111d1c
|
|
|
|
bit 7, a
|
|
|
|
jr z, .asm_111d1c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
res 7, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 0, [hl]
|
|
|
|
.asm_111d1c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc805]
|
|
|
|
ld [wc807], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111d23:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc829]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, [wc829 + 1]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld d, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_ReceivePacketBuffer + 4
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $4
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $4
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2019-10-20 15:27:34 -07:00
|
|
|
ParseResponse_BeginSession:
|
|
|
|
ld de, wMobileSDK_ReceivePacketBuffer + 3
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_BeginSession + 5
|
2019-10-20 15:27:34 -07:00
|
|
|
ld b, 1 + STRLEN("NINTENDO")
|
|
|
|
.check_loop
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
cp [hl]
|
2019-10-20 15:27:34 -07:00
|
|
|
jr nz, .check_done
|
2014-04-29 19:59:39 -07:00
|
|
|
inc hl
|
|
|
|
dec b
|
2019-10-20 15:27:34 -07:00
|
|
|
jr nz, .check_loop
|
|
|
|
.check_done
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, b
|
|
|
|
or a
|
2019-10-20 15:27:34 -07:00
|
|
|
jr nz, .done
|
|
|
|
|
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer + 14] ; device type
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $80
|
2019-10-20 15:27:34 -07:00
|
|
|
jr c, .fail
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $90
|
2019-10-20 15:27:34 -07:00
|
|
|
jr nc, .fail
|
|
|
|
.done
|
|
|
|
ld [wMobileSDK_AdapterType], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
2019-10-20 15:27:34 -07:00
|
|
|
.fail
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2019-10-20 15:27:34 -07:00
|
|
|
jr .done
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111d65:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $3
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
set 4, [hl]
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111d70:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, [hl]
|
|
|
|
jr z, .asm_111dc0
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc805]
|
|
|
|
ld [wc807], a
|
|
|
|
ld a, [wMobileSDK_ReceivePacketBufferAlt + 4]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, a
|
|
|
|
call Function111dd9
|
|
|
|
call Function111e15
|
|
|
|
res 0, [hl]
|
|
|
|
ld a, b
|
|
|
|
cp $7
|
|
|
|
jr z, .asm_111da9
|
|
|
|
or a
|
|
|
|
ret nz
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 4, [hl]
|
|
|
|
set 1, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc822]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 4, a
|
|
|
|
jr nz, .asm_111dbb
|
|
|
|
ld a, $23
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc80f], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $6
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
.asm_111da9
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 4, [hl]
|
|
|
|
set 1, [hl]
|
|
|
|
ld a, $11
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc80f], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $6
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
.asm_111dbb
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
.asm_111dc0
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86e
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer + 4]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, a
|
|
|
|
call Function111dd9
|
|
|
|
call Function111e15
|
|
|
|
ld a, b
|
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc805]
|
|
|
|
ld [wc807], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111dd9:
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $ff
|
|
|
|
jr z, .asm_111de7
|
|
|
|
or a
|
|
|
|
ret z
|
|
|
|
cp $4
|
|
|
|
jr z, .asm_111dea
|
|
|
|
cp $5
|
|
|
|
jr z, .asm_111e12
|
|
|
|
.asm_111de7
|
|
|
|
ld b, $7
|
|
|
|
ret
|
|
|
|
.asm_111dea
|
|
|
|
ld b, $5
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc822]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, a
|
|
|
|
jr z, .asm_111df8
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
jr .asm_111dfb
|
|
|
|
.asm_111df8
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc985]
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_111dfb
|
|
|
|
cp $4
|
|
|
|
ret z
|
|
|
|
cp $1c
|
|
|
|
ret z
|
|
|
|
cp $1a
|
|
|
|
ret z
|
|
|
|
dec b
|
|
|
|
cp $3
|
|
|
|
ret z
|
|
|
|
ld b, $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc822]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 4, a
|
|
|
|
ret z
|
|
|
|
inc b
|
|
|
|
ret
|
|
|
|
.asm_111e12
|
|
|
|
ld b, $3
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111e15:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, b
|
|
|
|
and $7
|
|
|
|
rrca
|
|
|
|
rrca
|
|
|
|
rrca
|
|
|
|
push hl
|
|
|
|
ld l, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
and $1f
|
|
|
|
or l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc821], a
|
2014-04-29 19:59:39 -07:00
|
|
|
pop hl
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111e28:
|
2019-10-20 15:27:34 -07:00
|
|
|
jp ResetReceivePacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2019-10-20 15:27:34 -07:00
|
|
|
GetErrorCode:
|
2019-08-22 19:10:58 -07:00
|
|
|
; Converts an error packet into a BCD error code
|
2019-08-22 08:31:45 -07:00
|
|
|
ld a, [wMobileSDK_SendCommandID]
|
2019-10-20 15:27:34 -07:00
|
|
|
cp -1
|
2014-04-29 19:59:39 -07:00
|
|
|
jp z, Function111ef8
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $d
|
|
|
|
jr z, .asm_111e48
|
|
|
|
cp $2a
|
|
|
|
jr z, .asm_111e48
|
|
|
|
ld a, $6
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
set 1, [hl]
|
|
|
|
.asm_111e48
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc822]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, a
|
|
|
|
jr z, .asm_111e54
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_ReceivePacketBufferAlt + 4
|
2014-04-29 19:59:39 -07:00
|
|
|
jr .asm_111e57
|
|
|
|
.asm_111e54
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_ReceivePacketBuffer + 4
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_111e57
|
|
|
|
ld a, [hli]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc80e], a
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_BEGIN_SESSION
|
2019-08-22 19:10:58 -07:00
|
|
|
jr z, .adapter_not_plugged_in
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_DIAL_TELEPHONE
|
2019-08-22 19:10:58 -07:00
|
|
|
jr z, .dial_telephone
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_HANG_UP_TELEPHONE
|
2019-08-22 19:10:58 -07:00
|
|
|
jr z, .hang_up_logout
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_TRANSFER_DATA
|
2019-08-22 19:10:58 -07:00
|
|
|
jr z, .transfer_data
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_READ_CONFIGURATION_DATA
|
2019-08-22 19:10:58 -07:00
|
|
|
jr z, .read_configuration_data
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_ISP_LOGIN
|
2019-08-22 19:10:58 -07:00
|
|
|
jr z, .isp_login
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_ISP_LOGOUT
|
2019-08-22 19:10:58 -07:00
|
|
|
jr z, .hang_up_logout
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_OPEN_TCP_CONNECTION
|
2019-08-22 19:10:58 -07:00
|
|
|
jr z, .open_tcp_connection
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_CLOSE_TCP_CONNECTION
|
2019-08-22 19:10:58 -07:00
|
|
|
jr z, .close_tcp_connection
|
2019-10-20 15:27:34 -07:00
|
|
|
cp MOBILE_COMMAND_DNS_QUERY
|
2019-08-22 19:10:58 -07:00
|
|
|
jr z, .dns_query
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
2019-08-22 19:10:58 -07:00
|
|
|
|
|
|
|
.store_error_code
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc80f], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
2019-08-22 19:10:58 -07:00
|
|
|
|
|
|
|
.adapter_not_plugged_in
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $10
|
2019-08-22 19:10:58 -07:00
|
|
|
jr .store_error_code
|
|
|
|
|
|
|
|
.dial_telephone
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
|
|
|
or $0
|
|
|
|
jr z, .asm_111e9d
|
|
|
|
cp $2
|
|
|
|
jr z, .asm_111e99
|
|
|
|
ld a, $13
|
2019-08-22 19:10:58 -07:00
|
|
|
jr .store_error_code
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_111e99
|
|
|
|
ld a, $17
|
2019-08-22 19:10:58 -07:00
|
|
|
jr .store_error_code
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_111e9d
|
|
|
|
ld a, $12
|
2019-08-22 19:10:58 -07:00
|
|
|
jr .store_error_code
|
|
|
|
|
|
|
|
.hang_up_logout
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 1, [hl]
|
|
|
|
res 4, [hl]
|
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
2019-08-22 19:10:58 -07:00
|
|
|
|
|
|
|
.transfer_data
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
|
|
|
cp $1
|
|
|
|
jr nz, .asm_111ed3
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc822]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 4, a
|
|
|
|
jr z, .asm_111ed3
|
|
|
|
res 4, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc822], a
|
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
|
|
|
and $f
|
|
|
|
or $2
|
|
|
|
ld [hl], a
|
|
|
|
ld a, $23
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc80f], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $6
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
.asm_111ed3
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
res 5, [hl]
|
|
|
|
ld a, $24
|
2019-08-22 19:10:58 -07:00
|
|
|
jr .store_error_code
|
|
|
|
|
|
|
|
.read_configuration_data
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $14
|
2019-08-22 19:10:58 -07:00
|
|
|
jr .store_error_code
|
|
|
|
|
|
|
|
.isp_login
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $22
|
2019-08-22 19:10:58 -07:00
|
|
|
jr .store_error_code
|
|
|
|
|
|
|
|
.open_tcp_connection
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 1, [hl]
|
2019-08-22 19:10:58 -07:00
|
|
|
|
|
|
|
.dns_query
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $24
|
2019-08-22 19:10:58 -07:00
|
|
|
jr .store_error_code
|
|
|
|
|
|
|
|
.close_tcp_connection
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 1, [hl]
|
|
|
|
ld a, $3
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111ef8:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc805]
|
|
|
|
ld [wc807], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2019-10-20 15:27:34 -07:00
|
|
|
PacketSendEmptyBody:
|
2019-08-22 05:41:17 -07:00
|
|
|
ld de, 10
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111f02:
|
2019-08-22 08:31:45 -07:00
|
|
|
ld [wMobileSDK_SendCommandID], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
|
|
|
|
2019-10-20 15:27:34 -07:00
|
|
|
PacketSendBytes:
|
2019-08-22 05:41:17 -07:00
|
|
|
; hl = bytes
|
|
|
|
; de = size
|
|
|
|
; b = ?
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function1100b4
|
|
|
|
ret c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc800]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $0
|
|
|
|
jr z, .asm_111f17
|
|
|
|
call Function110226
|
|
|
|
scf
|
|
|
|
ret
|
|
|
|
.asm_111f17
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh a, [rSC]
|
2019-05-05 09:14:46 -07:00
|
|
|
and 1 << rSC_ON
|
2014-04-29 19:59:39 -07:00
|
|
|
jr nz, .asm_111f17
|
|
|
|
di
|
2019-08-22 08:31:45 -07:00
|
|
|
ld a, [wMobileSDK_SendCommandID]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $ff
|
|
|
|
jr z, .asm_111f35
|
|
|
|
ld a, l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc81c], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc81d], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc81a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, d
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc81b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_111f35
|
|
|
|
ld a, e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc801], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, d
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc802], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc803], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc804], a
|
|
|
|
ld hl, wc807
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
|
|
|
cp b
|
|
|
|
jr z, .asm_111f4f
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc805], a
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_111f4f
|
|
|
|
ld a, b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc806], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc800], a
|
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
set 5, [hl]
|
|
|
|
ei
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111f63:
|
2014-04-29 19:59:39 -07:00
|
|
|
push de
|
2015-11-02 11:37:02 -08:00
|
|
|
ld hl, 0
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, b
|
|
|
|
xor a
|
|
|
|
cp b
|
|
|
|
jr z, .asm_111f71
|
|
|
|
.asm_111f6c
|
|
|
|
call Function111f8d
|
|
|
|
jr nz, .asm_111f6c
|
|
|
|
|
|
|
|
.asm_111f71
|
|
|
|
ld b, $4
|
|
|
|
.asm_111f73
|
|
|
|
call Function111f8d
|
|
|
|
jr nz, .asm_111f73
|
|
|
|
ld e, l
|
|
|
|
ld d, h
|
|
|
|
ld hl, $000a
|
|
|
|
add hl, bc
|
|
|
|
ld c, l
|
|
|
|
ld b, h
|
|
|
|
pop hl
|
|
|
|
ld a, d
|
|
|
|
ld [hli], a
|
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld a, $80
|
|
|
|
ld [hli], a
|
|
|
|
xor a
|
|
|
|
ld [hl], a
|
|
|
|
ld e, c
|
|
|
|
ld d, b
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111f8d:
|
2014-04-29 19:59:39 -07:00
|
|
|
dec de
|
|
|
|
ld a, [de]
|
|
|
|
add l
|
|
|
|
ld l, a
|
|
|
|
ld a, $0
|
|
|
|
adc h
|
|
|
|
ld h, a
|
|
|
|
dec b
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function111f97:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, [hl]
|
|
|
|
ret nz
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc807]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $2
|
2022-09-14 17:49:58 -07:00
|
|
|
jr c, .done
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $5
|
2022-09-14 17:49:58 -07:00
|
|
|
jr z, .done
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $6
|
2022-09-14 17:49:58 -07:00
|
|
|
jr nz, .hang_up
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc80f]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $22
|
2022-09-14 17:49:58 -07:00
|
|
|
jr z, .done
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $23
|
2022-09-14 17:49:58 -07:00
|
|
|
jr z, .done
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $26
|
2022-09-14 17:49:58 -07:00
|
|
|
jr z, .done
|
2014-04-29 19:59:39 -07:00
|
|
|
swap a
|
|
|
|
and $f
|
|
|
|
cp $1
|
2022-09-14 17:49:58 -07:00
|
|
|
jr z, .done
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $0
|
2022-09-14 17:49:58 -07:00
|
|
|
jr z, .done
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $8
|
2022-09-14 17:49:58 -07:00
|
|
|
jr nz, .hang_up
|
|
|
|
.done
|
2014-04-29 19:59:39 -07:00
|
|
|
scf
|
|
|
|
ret
|
2022-09-14 17:49:58 -07:00
|
|
|
.hang_up
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-08-22 08:31:45 -07:00
|
|
|
ld hl, wMobileSDK_SendCommandID
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
2019-10-20 15:27:34 -07:00
|
|
|
cp -1
|
2022-09-14 17:49:58 -07:00
|
|
|
jr z, .begin_session
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_TELEPHONE_STATUS | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_TelephoneStatus
|
|
|
|
ld de, MobilePacket_TelephoneStatus.End - MobilePacket_TelephoneStatus
|
2019-10-20 15:27:34 -07:00
|
|
|
call PacketSendBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
set 0, [hl]
|
|
|
|
ret
|
2022-09-14 17:49:58 -07:00
|
|
|
.begin_session
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_BeginSession
|
|
|
|
ld de, MobilePacket_BeginSession.End - MobilePacket_BeginSession
|
2019-10-20 15:27:34 -07:00
|
|
|
jp PacketSendBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
ds 14
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
MobilePacket_Idle:
|
2015-03-11 22:23:30 -07:00
|
|
|
db $4b
|
2019-08-22 05:41:17 -07:00
|
|
|
.End
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
MobilePacket_BeginSession:
|
2019-10-20 15:27:34 -07:00
|
|
|
db $99, $66, MOBILE_COMMAND_BEGIN_SESSION, $00, $00, $08, "NINTENDO", $02, $77, $80, $00
|
2019-08-22 05:41:17 -07:00
|
|
|
.End
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
MobilePacket_EndSession:
|
2019-10-20 15:27:34 -07:00
|
|
|
db $99, $66, MOBILE_COMMAND_END_SESSION, $00, $00, $00, $00, $11, $80, $00
|
2019-08-22 05:41:17 -07:00
|
|
|
.End
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
MobilePacket_DialTelephone:
|
2019-10-20 15:27:34 -07:00
|
|
|
db $99, $66, MOBILE_COMMAND_DIAL_TELEPHONE, $00, $00, $00
|
2019-08-22 05:41:17 -07:00
|
|
|
.End
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
MobilePacket_HangUpTelephone:
|
2019-10-20 15:27:34 -07:00
|
|
|
db $99, $66, MOBILE_COMMAND_HANG_UP_TELEPHONE, $00, $00, $00, $00, $13, $80, $00
|
2019-08-22 05:41:17 -07:00
|
|
|
.End
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
MobilePacket_TelephoneStatus:
|
2019-10-20 15:27:34 -07:00
|
|
|
db $99, $66, MOBILE_COMMAND_TELEPHONE_STATUS, $00, $00, $00, $00, $17, $80, $00
|
2019-08-22 05:41:17 -07:00
|
|
|
.End
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
MobilePacket_ISPLogin:
|
2019-10-20 15:27:34 -07:00
|
|
|
db $99, $66, MOBILE_COMMAND_ISP_LOGIN, $00, $00
|
2019-08-22 05:41:17 -07:00
|
|
|
.End
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
MobilePacket_ISPLogout:
|
2019-10-20 15:27:34 -07:00
|
|
|
db $99, $66, MOBILE_COMMAND_ISP_LOGOUT, $00, $00, $00, $00, $22, $80, $00
|
2019-08-22 05:41:17 -07:00
|
|
|
.End
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
MobilePacket_ReadConfigurationDataPart1:
|
2019-10-20 15:27:34 -07:00
|
|
|
db $99, $66, MOBILE_COMMAND_READ_CONFIGURATION_DATA, $00, $00, $02, $00, $60, $00, $7b, $80, $00
|
2019-08-22 05:41:17 -07:00
|
|
|
.End
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
MobilePacket_ReadConfigurationDataPart2:
|
2019-10-20 15:27:34 -07:00
|
|
|
db $99, $66, MOBILE_COMMAND_READ_CONFIGURATION_DATA, $00, $00, $02, $60, $60, $00, $db, $80, $00
|
2019-08-22 05:41:17 -07:00
|
|
|
.End
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
MobilePacket_WriteConfigurationData:
|
2019-10-20 15:27:34 -07:00
|
|
|
db $99, $66, MOBILE_COMMAND_WRITE_CONFIGURATION_DATA, $00, $00
|
2019-08-22 05:41:17 -07:00
|
|
|
.End
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
MobilePacket_DNSQuery:
|
2019-10-20 15:27:34 -07:00
|
|
|
db $99, $66, MOBILE_COMMAND_DNS_QUERY, $00, $00
|
2019-08-22 05:41:17 -07:00
|
|
|
.End
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
MobilePacket_WaitForTelephoneCall:
|
2019-10-20 15:27:34 -07:00
|
|
|
db $99, $66, MOBILE_COMMAND_WAIT_FOR_TELEPHONE_CALL, $00, $00, $00, $00, $14, $80, $00
|
2019-08-22 05:41:17 -07:00
|
|
|
.End
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
MobilePacket_TransferData:
|
2019-10-20 15:27:34 -07:00
|
|
|
db $99, $66, MOBILE_COMMAND_TRANSFER_DATA, $00, $00, $01, $ff, $01, $15, $80, $00
|
2019-08-22 05:41:17 -07:00
|
|
|
.End
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
MobilePacket_OpenTCPConnection:
|
2019-10-20 15:27:34 -07:00
|
|
|
db $99, $66, MOBILE_COMMAND_OPEN_TCP_CONNECTION, $00, $00, $06
|
2019-08-22 05:41:17 -07:00
|
|
|
.End
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
MobilePacket_CloseTCPConnection:
|
2019-10-20 15:27:34 -07:00
|
|
|
db $99, $66, MOBILE_COMMAND_CLOSE_TCP_CONNECTION, $00, $00, $01
|
2019-08-22 05:41:17 -07:00
|
|
|
.End
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Unknown_112089:
|
2022-01-16 14:50:50 -08:00
|
|
|
db -20, $14, $c9
|
|
|
|
db -28, $0f, $0e
|
|
|
|
db -32, $0c, $53
|
|
|
|
db -60, $07, $94
|
|
|
|
db -80, $05, $ee
|
|
|
|
db -20, $10, $b4
|
|
|
|
db -28, $0c, $dd
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
Unknown_11209e:
|
2015-01-20 00:01:23 -08:00
|
|
|
db "HELO ", 0
|
2014-04-29 19:59:39 -07:00
|
|
|
Unknown_1120a4:
|
2015-01-20 00:01:23 -08:00
|
|
|
db "MAIL FROM:<", 0
|
2014-04-29 19:59:39 -07:00
|
|
|
Unknown_1120b0:
|
2015-01-20 00:01:23 -08:00
|
|
|
db "RCPT TO:<", 0
|
2014-04-29 19:59:39 -07:00
|
|
|
Unknown_1120ba:
|
2020-04-04 11:42:31 -07:00
|
|
|
db "DATA\r\n", 0
|
2014-04-29 19:59:39 -07:00
|
|
|
Unknown_1120c1:
|
2020-04-04 11:42:31 -07:00
|
|
|
db "QUIT\r\n", 0
|
2014-04-29 19:59:39 -07:00
|
|
|
Unknown_1120c8:
|
2015-01-20 00:01:23 -08:00
|
|
|
db "USER ", 0
|
2014-04-29 19:59:39 -07:00
|
|
|
Unknown_1120ce:
|
2015-01-20 00:01:23 -08:00
|
|
|
db "PASS ", 0
|
2014-04-29 19:59:39 -07:00
|
|
|
Unknown_1120d4:
|
2020-04-04 11:42:31 -07:00
|
|
|
db "STAT\r\n", 0
|
2014-04-29 19:59:39 -07:00
|
|
|
Unknown_1120db:
|
2020-04-04 11:42:31 -07:00
|
|
|
db "LIST 00000\r\n", 0
|
2014-04-29 19:59:39 -07:00
|
|
|
Unknown_1120e8:
|
2020-04-04 11:42:31 -07:00
|
|
|
db "RETR 00000\r\n", 0
|
2014-04-29 19:59:39 -07:00
|
|
|
Unknown_1120f5:
|
2020-04-04 11:42:31 -07:00
|
|
|
db "DELE 00000\r\n", 0
|
2014-04-29 19:59:39 -07:00
|
|
|
Unknown_112102:
|
2020-04-04 11:42:31 -07:00
|
|
|
db "TOP 00000 0\r\n", 0
|
2014-04-29 19:59:39 -07:00
|
|
|
Unknown_112110:
|
2015-01-20 00:01:23 -08:00
|
|
|
db "GET ", 0
|
2014-04-29 19:59:39 -07:00
|
|
|
Unknown_112115:
|
2020-04-04 11:42:31 -07:00
|
|
|
db " HTTP/1.0\r\n", 0
|
2014-04-29 19:59:39 -07:00
|
|
|
Unknown_112121:
|
2015-01-20 00:01:23 -08:00
|
|
|
db "User-Agent: CGB-", 0
|
2014-04-29 19:59:39 -07:00
|
|
|
Unknown_112132:
|
2020-04-04 11:42:31 -07:00
|
|
|
db "\r\n\r\n", 0
|
2014-04-29 19:59:39 -07:00
|
|
|
Unknown_112137:
|
2015-01-20 00:01:23 -08:00
|
|
|
db "POST ", 0
|
2014-04-29 19:59:39 -07:00
|
|
|
Unknown_11213d:
|
2015-01-20 00:01:23 -08:00
|
|
|
db "Content-Length: ", 0
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function11214e:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc822]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 5, a
|
|
|
|
ret nz
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $a
|
|
|
|
ret c
|
|
|
|
ld c, a
|
|
|
|
cp $d
|
|
|
|
jr z, .asm_112187
|
|
|
|
cp $f
|
|
|
|
jr z, .asm_112196
|
|
|
|
cp $29
|
|
|
|
jr z, .asm_112175
|
|
|
|
cp $2a
|
|
|
|
jr z, .asm_112175
|
|
|
|
cp $28
|
|
|
|
jr z, .asm_112175
|
|
|
|
.asm_11216f
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc807]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $6
|
|
|
|
ret z
|
|
|
|
.asm_112175
|
|
|
|
ld b, $0
|
|
|
|
sla c
|
|
|
|
ld hl, Jumptable_1121ac - 2 * $a
|
|
|
|
add hl, bc
|
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
push hl
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86b
|
2014-04-29 19:59:39 -07:00
|
|
|
inc [hl]
|
|
|
|
ld a, [hl]
|
|
|
|
ret
|
|
|
|
.asm_112187
|
|
|
|
ld c, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86b]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $1
|
|
|
|
jr nz, .asm_11216f
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 1, [hl]
|
|
|
|
jr .asm_112175
|
|
|
|
.asm_112196
|
|
|
|
ld c, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc80f]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $24
|
|
|
|
jr nz, .asm_11216f
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86b]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $1
|
|
|
|
jr nz, .asm_11216f
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 1, [hl]
|
|
|
|
jr .asm_112175
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Jumptable_1121ac:
|
2014-04-29 19:59:39 -07:00
|
|
|
dw Function1121f6
|
|
|
|
dw Function112271
|
|
|
|
dw Function112373
|
|
|
|
dw Function1123b6
|
|
|
|
dw Function1123e1
|
|
|
|
dw Function112451
|
|
|
|
dw Function112715
|
|
|
|
dw Function11273a
|
|
|
|
dw Function11299c
|
|
|
|
dw Function112d33
|
|
|
|
dw Function112d33
|
|
|
|
dw Function112840
|
|
|
|
dw Function1128db
|
|
|
|
dw Function112969
|
|
|
|
dw Function112a56
|
|
|
|
dw Function112b71
|
|
|
|
dw Function112bec
|
|
|
|
dw Function112bbb
|
|
|
|
dw Function112bec
|
|
|
|
dw Function112b71
|
|
|
|
dw Function1134cb
|
|
|
|
dw Function112d33
|
|
|
|
dw Function112d33
|
|
|
|
dw Function112d33
|
|
|
|
dw Function112d33
|
|
|
|
dw Function112d33
|
|
|
|
dw Function112d33
|
|
|
|
dw Function113519
|
|
|
|
dw Function113519
|
|
|
|
dw Function113519
|
|
|
|
dw Function113e42
|
|
|
|
dw Function113ef2
|
|
|
|
dw Function113f2d
|
|
|
|
dw Function1121f6
|
|
|
|
dw Function1134cb
|
|
|
|
dw Function113672
|
|
|
|
dw Function113626
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1121f6:
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
jr z, .asm_1121fe
|
|
|
|
dec a
|
|
|
|
jr z, .asm_112210
|
|
|
|
dec [hl]
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_1121fe
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_AdapterType]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr z, .asm_112206
|
2022-09-14 17:49:58 -07:00
|
|
|
jr Mobile_EndSession
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_112206
|
|
|
|
ld a, $10
|
|
|
|
call Function11225d
|
|
|
|
res 0, [hl]
|
|
|
|
set 1, [hl]
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_112210
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86e
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_AdapterType]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $88
|
|
|
|
jr c, .asm_112249
|
|
|
|
sub $88
|
|
|
|
ld [hl], a
|
2019-10-20 15:27:34 -07:00
|
|
|
|
|
|
|
; There aren't more than four adapters
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $4
|
|
|
|
jr c, .asm_112226
|
|
|
|
ld a, $3
|
|
|
|
.asm_112226
|
2019-10-20 15:27:34 -07:00
|
|
|
|
|
|
|
; The green adapter was scrapped, so the red adapter is the third
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $3
|
|
|
|
jr nz, .asm_11222b
|
|
|
|
dec a
|
|
|
|
.asm_11222b
|
2019-10-20 15:27:34 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, a
|
|
|
|
ld a, $4
|
|
|
|
sub b
|
|
|
|
ld d, a
|
|
|
|
rlca
|
|
|
|
add d
|
|
|
|
ld c, a
|
|
|
|
xor a
|
|
|
|
cp b
|
|
|
|
jr z, .asm_11223a
|
|
|
|
ld a, $3
|
|
|
|
xor b
|
|
|
|
|
|
|
|
.asm_11223a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc871
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hld], a
|
|
|
|
ld [hl], c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $a
|
|
|
|
jr nz, Function112251
|
|
|
|
jp Function1116a0
|
|
|
|
|
|
|
|
.asm_112249
|
|
|
|
ld a, $10
|
|
|
|
call Function11225d
|
|
|
|
jp Function1116a4
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112251:
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc821], a
|
|
|
|
ld [wc807], a
|
2014-04-29 19:59:39 -07:00
|
|
|
inc a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function11225d:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc80f], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $5
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2022-09-14 17:49:58 -07:00
|
|
|
Mobile_EndSession:
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_END_SESSION | $80
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_EndSession
|
2019-10-20 15:27:34 -07:00
|
|
|
jp PacketSendEmptyBody
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112271:
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
jr z, .asm_11228c
|
|
|
|
dec a
|
|
|
|
jr z, .asm_112292
|
|
|
|
dec a
|
|
|
|
jr z, .asm_1122a1
|
|
|
|
dec a
|
|
|
|
jp z, .asm_112309
|
|
|
|
dec a
|
|
|
|
jp z, .asm_112326
|
|
|
|
dec a
|
|
|
|
jp z, .asm_112335
|
|
|
|
dec a
|
|
|
|
jp z, .asm_112342
|
|
|
|
dec [hl]
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_11228c
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_ReadConfigurationDataPart1
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function11236b
|
|
|
|
|
|
|
|
.asm_112292
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc829
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, LOW(wc8ca + 22)
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, HIGH(wc8ca + 22)
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_ReadConfigurationDataPart2
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function11236b
|
|
|
|
|
|
|
|
.asm_1122a1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
2022-09-14 17:49:58 -07:00
|
|
|
cp "M"
|
2014-04-29 19:59:39 -07:00
|
|
|
jr nz, .asm_1122f5
|
|
|
|
ld a, [hld]
|
2022-09-14 17:49:58 -07:00
|
|
|
cp "A"
|
2014-04-29 19:59:39 -07:00
|
|
|
jr nz, .asm_1122f5
|
|
|
|
ld b, $be
|
2015-11-02 11:37:02 -08:00
|
|
|
ld de, 0
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_1122b3
|
|
|
|
ld a, [hli]
|
|
|
|
add e
|
|
|
|
ld e, a
|
|
|
|
ld a, $0
|
|
|
|
adc d
|
|
|
|
ld d, a
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_1122b3
|
|
|
|
ld a, [hli]
|
|
|
|
cp d
|
|
|
|
jr nz, .asm_1122fc
|
|
|
|
ld a, [hl]
|
|
|
|
cp e
|
|
|
|
jr nz, .asm_1122fc
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc884
|
|
|
|
ld de, wc836
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $8
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc8ca
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $2c
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 50]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, a
|
|
|
|
sub $8
|
|
|
|
ld e, a
|
2020-11-09 12:17:03 -08:00
|
|
|
ld d, 0
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 51
|
2014-04-29 19:59:39 -07:00
|
|
|
add hl, de
|
|
|
|
ld e, l
|
|
|
|
ld d, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc836
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $8
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, c
|
|
|
|
call Function111f63
|
|
|
|
jr Function11235a
|
|
|
|
|
|
|
|
.asm_1122f5
|
|
|
|
ld a, $25
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc872], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jr .asm_112301
|
|
|
|
|
|
|
|
.asm_1122fc
|
|
|
|
ld a, $14
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc872], a
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_112301
|
|
|
|
ld a, $6
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2022-09-14 17:49:58 -07:00
|
|
|
jp Mobile_EndSession
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_112309
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
and $e0
|
|
|
|
jr nz, .asm_112314
|
|
|
|
ld b, $92
|
|
|
|
jr Function11234b
|
|
|
|
|
|
|
|
.asm_112314
|
|
|
|
cp $e0
|
|
|
|
ld a, $11
|
|
|
|
jr z, .asm_11231b
|
|
|
|
inc a
|
|
|
|
|
|
|
|
.asm_11231b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc872], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $6
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2022-09-14 17:49:58 -07:00
|
|
|
jp Mobile_EndSession
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_112326
|
|
|
|
ld d, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 50]
|
2014-04-29 19:59:39 -07:00
|
|
|
add $a
|
|
|
|
ld e, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 45
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $a1
|
|
|
|
jp Function111f02
|
|
|
|
|
|
|
|
.asm_112335
|
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 0, [hl]
|
|
|
|
set 5, [hl]
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_112342
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc872]
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function11225d
|
|
|
|
jp Function1116a4
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function11234b:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 5]
|
2014-04-29 19:59:39 -07:00
|
|
|
add $a
|
|
|
|
ld e, a
|
2020-11-09 12:17:03 -08:00
|
|
|
ld d, 0
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, b
|
|
|
|
jp Function111f02
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function11235a:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86e
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, LOW(wc880)
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, HIGH(wc880)
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_TELEPHONE_STATUS | $80
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_TelephoneStatus
|
2019-10-20 15:27:34 -07:00
|
|
|
jp PacketSendEmptyBody
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function11236b:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $99
|
|
|
|
ld de, $000c
|
|
|
|
jp Function111f02
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112373:
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
jr z, Function11235a
|
|
|
|
dec a
|
|
|
|
jr z, .asm_112381
|
|
|
|
dec a
|
|
|
|
jr z, .asm_11239b
|
|
|
|
dec a
|
|
|
|
jr z, .asm_1123ad
|
|
|
|
dec [hl]
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_112381
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
and $e0
|
|
|
|
jr nz, .asm_11238c
|
|
|
|
ld b, $92
|
|
|
|
jr Function11234b
|
|
|
|
|
|
|
|
.asm_11238c
|
|
|
|
cp $e0
|
|
|
|
ld a, $11
|
|
|
|
jr z, .asm_112393
|
|
|
|
inc a
|
|
|
|
|
|
|
|
.asm_112393
|
|
|
|
ld a, $3
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2022-09-14 17:49:58 -07:00
|
|
|
jp Mobile_EndSession
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_11239b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
set 4, [hl]
|
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 0, [hl]
|
|
|
|
set 6, [hl]
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_1123ad
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc872]
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function11225d
|
|
|
|
jp Function1116a4
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1123b6:
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
2022-09-14 17:49:58 -07:00
|
|
|
jr z, .wait_for_call
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
jr z, .asm_1123c6
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_1123bd
|
|
|
|
dec [hl]
|
|
|
|
|
2022-09-14 17:49:58 -07:00
|
|
|
.wait_for_call
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_WAIT_FOR_TELEPHONE_CALL | $80
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_WaitForTelephoneCall
|
2019-10-20 15:27:34 -07:00
|
|
|
jp PacketSendEmptyBody
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_1123c6
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $ee
|
|
|
|
jr z, .asm_1123bd
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
set 4, [hl]
|
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 0, [hl]
|
|
|
|
set 6, [hl]
|
|
|
|
set 5, [hl]
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1123e1:
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
jr z, .asm_1123f2
|
|
|
|
dec a
|
|
|
|
jr z, .asm_11240a
|
|
|
|
dec a
|
|
|
|
jr z, .asm_112416
|
|
|
|
dec a
|
|
|
|
jr z, .asm_11241e
|
|
|
|
dec a
|
|
|
|
jr z, .asm_112421
|
|
|
|
dec [hl]
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_1123f2
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $9f
|
|
|
|
jr z, .asm_112408
|
|
|
|
call Function1127e1
|
|
|
|
jr z, .asm_112408
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86b
|
2014-04-29 19:59:39 -07:00
|
|
|
dec [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 32
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function1127c5
|
|
|
|
|
|
|
|
.asm_112408
|
|
|
|
jr Function112430
|
|
|
|
|
|
|
|
.asm_11240a
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86d], a
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_ISP_LOGOUT | $80
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_ISPLogout
|
2019-10-20 15:27:34 -07:00
|
|
|
jp PacketSendEmptyBody
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_112416
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_HANG_UP_TELEPHONE | $80
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_HangUpTelephone
|
2019-10-20 15:27:34 -07:00
|
|
|
jp PacketSendEmptyBody
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_11241e
|
2022-09-14 17:49:58 -07:00
|
|
|
jp Mobile_EndSession
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_112421
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
res 4, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
|
|
|
and $f
|
|
|
|
ld [hl], a
|
|
|
|
jp Function1116a0
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112430:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $3
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer
|
|
|
|
ld hl, MobilePacket_CloseTCPConnection
|
|
|
|
ld b, MobilePacket_CloseTCPConnection.End - MobilePacket_CloseTCPConnection
|
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86c]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
inc b
|
|
|
|
call Function111f63
|
|
|
|
ld a, $a4
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function111f02
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112451:
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
jr z, .asm_112458
|
|
|
|
dec a
|
|
|
|
jr z, .asm_112496
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_112458
|
|
|
|
ld b, $6
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 92
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function111f63
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86e]
|
2014-04-29 19:59:39 -07:00
|
|
|
inc a
|
|
|
|
cp $3
|
|
|
|
jr nz, .asm_11248b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer + 128]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr z, .asm_11248b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc995
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
cp $99
|
|
|
|
jr nz, .asm_112480
|
|
|
|
ld a, [hli]
|
|
|
|
cp $66
|
|
|
|
jr nz, .asm_112480
|
|
|
|
ld a, [hli]
|
|
|
|
cp $23
|
|
|
|
jr z, .asm_11248b
|
|
|
|
|
|
|
|
.asm_112480
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 80
|
|
|
|
ld de, wc995
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $10
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_11248b
|
|
|
|
ld a, $a3
|
|
|
|
ld de, $0010
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 80
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function111f02
|
|
|
|
|
|
|
|
.asm_112496
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $a3
|
|
|
|
jr z, .asm_1124ce
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc822]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 3, a
|
|
|
|
jr z, .asm_1124ab
|
|
|
|
dec [hl]
|
|
|
|
ld a, $3
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_1124ab
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc9af]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $5
|
|
|
|
jr c, .asm_1124b8
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
set 1, [hl]
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_1124b8
|
|
|
|
dec [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc9af
|
2014-04-29 19:59:39 -07:00
|
|
|
inc [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
set 3, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc815
|
|
|
|
ld a, [wc820]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc81f]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_1124ce
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc9af], a
|
|
|
|
ld a, [wc86e]
|
2014-04-29 19:59:39 -07:00
|
|
|
inc a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86d], a
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
jp z, Function11261c
|
|
|
|
dec a
|
|
|
|
jp z, Function112654
|
|
|
|
dec a
|
|
|
|
jp z, Function112597
|
|
|
|
dec a
|
|
|
|
jp z, Function112566
|
|
|
|
call Function1125c7
|
|
|
|
push de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wc880
|
|
|
|
ld hl, wc827
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
|
|
|
ld [hli], a
|
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
|
|
|
ld [hli], a
|
|
|
|
ld a, $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86e], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $fa
|
|
|
|
ld [hli], a
|
|
|
|
xor a
|
|
|
|
ld [hli], a
|
|
|
|
xor a
|
|
|
|
ld [hli], a
|
2016-05-04 08:46:23 -07:00
|
|
|
ld [hli], a
|
2014-04-29 19:59:39 -07:00
|
|
|
pop de
|
|
|
|
ld a, $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc994], a
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function11269b
|
|
|
|
ld a, $5
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function112534
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc9a5]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr z, .asm_112521
|
|
|
|
ld a, $1
|
|
|
|
|
|
|
|
.asm_112521
|
|
|
|
add $23
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
|
|
|
ld a, [wc98a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $2
|
|
|
|
jr nz, .asm_112531
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc9a5], a
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_112531
|
|
|
|
jp Function1125bf
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112534:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $fa
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
.asm_11253a
|
|
|
|
ld [hli], a
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_11253a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc876]
|
|
|
|
ld [wc87c], a
|
|
|
|
ld a, [wc877]
|
|
|
|
ld [wc87d], a
|
|
|
|
ld a, [wc87a]
|
|
|
|
ld [wc87e], a
|
|
|
|
ld a, [wc87b]
|
|
|
|
ld [wc87f], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 17], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, c
|
|
|
|
call Function111f63
|
|
|
|
ld a, $95
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 12
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function111f02
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112566:
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function1125c7
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 19]
|
2014-04-29 19:59:39 -07:00
|
|
|
and $1
|
|
|
|
or a
|
|
|
|
jr nz, .asm_11257d
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc98a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $2
|
|
|
|
jr nz, .asm_11257d
|
|
|
|
ld a, $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc994], a
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_11257d
|
|
|
|
call Function11269b
|
|
|
|
ld a, $5
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function112534
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc9a5]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr z, .asm_112590
|
|
|
|
ld a, $1
|
|
|
|
|
|
|
|
.asm_112590
|
|
|
|
add $21
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jr Function1125bf
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112597:
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function1125c7
|
|
|
|
call Function11269b
|
|
|
|
ld a, $5
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function112534
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc98f]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc994]
|
2014-04-29 19:59:39 -07:00
|
|
|
and $1
|
|
|
|
add $13
|
|
|
|
bit 0, b
|
|
|
|
jr z, .asm_1125bc
|
|
|
|
sub $13
|
|
|
|
add $1f
|
|
|
|
dec b
|
|
|
|
sla b
|
|
|
|
add b
|
|
|
|
|
|
|
|
.asm_1125bc
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1125bf:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
set 0, [hl]
|
|
|
|
res 2, [hl]
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1125c7:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc872
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld c, a
|
|
|
|
ld a, [hli]
|
|
|
|
ld b, a
|
|
|
|
ld a, [hli]
|
|
|
|
ld e, a
|
|
|
|
ld d, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc994]
|
2014-04-29 19:59:39 -07:00
|
|
|
and $1
|
|
|
|
xor $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
|
|
|
ld hl, wc827
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
|
|
|
ld [hli], a
|
|
|
|
inc de
|
2016-05-04 08:46:23 -07:00
|
|
|
inc de
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, LOW(wc880)
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, HIGH(wc880)
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
|
|
|
dec bc
|
2016-05-04 08:46:23 -07:00
|
|
|
dec bc
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $fa
|
|
|
|
ld [hli], a
|
|
|
|
ld a, $0
|
|
|
|
ld [hli], a
|
|
|
|
xor a
|
|
|
|
ld [hli], a
|
2016-05-04 08:46:23 -07:00
|
|
|
ld [hli], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer
|
|
|
|
ld hl, MobilePacket_TransferData
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $6
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86c]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld b, $1
|
|
|
|
call Function111f63
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 12
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_TransferData
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
inc de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86c]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function11261c:
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
|
|
|
ld a, [wc86c]
|
|
|
|
ld [wMobileSDK_PacketBuffer + 118], a
|
|
|
|
ld de, wMobileSDK_PacketBuffer + 102
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld b, $1
|
|
|
|
call Function111f63
|
|
|
|
call Function112724
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 117]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 118
|
2014-04-29 19:59:39 -07:00
|
|
|
add e
|
|
|
|
ld e, a
|
|
|
|
ld a, $0
|
|
|
|
adc d
|
|
|
|
ld d, a
|
|
|
|
call Function111f63
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 96
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function1127c5
|
|
|
|
ld a, $11
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function11264e:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
set 0, [hl]
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112654:
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
|
|
|
ld a, [wc86c]
|
|
|
|
ld [wMobileSDK_PacketBuffer + 102], a
|
|
|
|
ld [wMobileSDK_PacketBuffer + 166], a
|
|
|
|
ld de, wMobileSDK_PacketBuffer + 134
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld b, $1
|
|
|
|
call Function111f63
|
|
|
|
call Function112724
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 165]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 166
|
2014-04-29 19:59:39 -07:00
|
|
|
add e
|
|
|
|
ld e, a
|
|
|
|
ld a, $0
|
|
|
|
adc d
|
|
|
|
ld d, a
|
|
|
|
call Function111f63
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 101]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 102
|
2014-04-29 19:59:39 -07:00
|
|
|
add e
|
|
|
|
ld e, a
|
|
|
|
ld a, $0
|
|
|
|
adc d
|
|
|
|
ld d, a
|
|
|
|
call Function111f63
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 128
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function1127c5
|
|
|
|
ld a, $12
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jr Function11264e
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function11269b:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld bc, $0001
|
|
|
|
ld hl, Unknown_112110
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc994]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
call nz, Function1126ac
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyString
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1126ac:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld hl, Unknown_112137
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1126b0:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld hl, Unknown_112115
|
2019-08-22 05:41:17 -07:00
|
|
|
jp MobileSDK_CopyString
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1126b6:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld hl, Unknown_112121
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyString
|
2014-04-29 19:59:39 -07:00
|
|
|
ld hl, $013f
|
|
|
|
ld b, $4
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $2d
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld a, [$014c]
|
|
|
|
and $f0
|
|
|
|
swap a
|
|
|
|
or $30
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld a, [$014c]
|
|
|
|
and $f
|
|
|
|
or $30
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld a, $7
|
|
|
|
add c
|
|
|
|
ld c, a
|
|
|
|
ld hl, Unknown_112132
|
2019-08-22 05:41:17 -07:00
|
|
|
jp MobileSDK_CopyString
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1126e6:
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld hl, Unknown_11213d
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyString
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc9a5
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
|
|
|
.asm_1126f5
|
|
|
|
ld a, [hl]
|
|
|
|
cp $30
|
|
|
|
jr nz, .asm_112701
|
|
|
|
inc hl
|
|
|
|
dec b
|
|
|
|
ld a, $1
|
|
|
|
cp b
|
|
|
|
jr nz, .asm_1126f5
|
|
|
|
|
|
|
|
.asm_112701
|
|
|
|
push bc
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $d
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld a, $a
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
pop bc
|
|
|
|
ld a, b
|
|
|
|
add $2
|
|
|
|
add c
|
|
|
|
ld c, a
|
|
|
|
or c
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112715:
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86c], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 0, [hl]
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112724:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $ff
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86e], a
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112729:
|
2014-04-29 19:59:39 -07:00
|
|
|
push hl
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc82c
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
ld [hld], a
|
|
|
|
ld a, $ff
|
|
|
|
ld [hld], a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, HIGH(wc880)
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hld], a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, LOW(wc880)
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
|
|
|
pop hl
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function11273a:
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
jr z, .asm_112752
|
|
|
|
dec a
|
|
|
|
jr z, .asm_11278f
|
|
|
|
dec a
|
|
|
|
jr z, .asm_112744
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_112744
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86d], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $30
|
|
|
|
call Function11225d
|
|
|
|
set 1, [hl]
|
|
|
|
res 0, [hl]
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_112752
|
|
|
|
call Function1127e1
|
|
|
|
jr nz, .asm_11277a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function112b11
|
|
|
|
ld a, $2
|
|
|
|
cp d
|
|
|
|
jr nz, .asm_1127b7
|
|
|
|
ld a, $20
|
|
|
|
cp e
|
|
|
|
jr nz, .asm_1127b7
|
|
|
|
call Function112724
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 117]
|
2014-04-29 19:59:39 -07:00
|
|
|
add $a
|
|
|
|
ld e, a
|
2020-11-09 12:17:03 -08:00
|
|
|
ld d, 0
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $95
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 112
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function111f02
|
|
|
|
|
|
|
|
.asm_11277a
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $9f
|
|
|
|
jr z, Function1127cd
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86b
|
2014-04-29 19:59:39 -07:00
|
|
|
dec [hl]
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_ReceivePacketBuffer + 3], a
|
|
|
|
ld hl, wMobileSDK_PacketBuffer + 96
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function1127c5
|
|
|
|
|
|
|
|
.asm_11278f
|
|
|
|
call Function1127e1
|
|
|
|
jr nz, .asm_11277a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function112b11
|
|
|
|
ld a, $2
|
|
|
|
cp d
|
|
|
|
jr nz, .asm_1127b7
|
|
|
|
ld a, $50
|
|
|
|
cp e
|
|
|
|
jr nz, .asm_1127b7
|
|
|
|
ld a, $3
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
|
|
|
and $d6
|
|
|
|
or $80
|
|
|
|
ld [hl], a
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc98a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_1127b7
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc810
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], d
|
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function112430
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1127c5:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld de, $000b
|
|
|
|
ld a, $95
|
|
|
|
jp Function111f02
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1127cd:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc810
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], a
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86d], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $30
|
|
|
|
call Function11225d
|
|
|
|
set 1, [hl]
|
|
|
|
res 0, [hl]
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1127e1:
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function112807
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc832
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1127e7:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
cp $d
|
|
|
|
ret nz
|
|
|
|
ld a, [hl]
|
|
|
|
cp $a
|
|
|
|
ret nz
|
|
|
|
ld a, $20
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1127f3:
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function112807
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc82f
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
cp $d
|
|
|
|
ret nz
|
|
|
|
ld a, [hli]
|
|
|
|
cp $a
|
|
|
|
ret nz
|
|
|
|
ld a, [hli]
|
|
|
|
cp $2e
|
|
|
|
ret nz
|
|
|
|
jr Function1127e7
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112807:
|
2014-04-29 19:59:39 -07:00
|
|
|
push bc
|
|
|
|
push de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_ReceivePacketBuffer + 3
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
|
|
|
dec a
|
|
|
|
jr z, .asm_11282d
|
|
|
|
ld c, a
|
|
|
|
cp $5
|
|
|
|
jr nc, .asm_112830
|
|
|
|
ld a, $5
|
|
|
|
sub c
|
|
|
|
ld b, a
|
|
|
|
ld e, c
|
|
|
|
ld d, $0
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc82f
|
2014-04-29 19:59:39 -07:00
|
|
|
add hl, de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wc82f
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_ReceivePacketBuffer + 5
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, c
|
|
|
|
.asm_11282a
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_11282d
|
|
|
|
pop de
|
|
|
|
pop bc
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_112830
|
|
|
|
sub $5
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
ld b, 0
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_ReceivePacketBuffer + 5
|
2014-04-29 19:59:39 -07:00
|
|
|
add hl, bc
|
|
|
|
ld b, $5
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wc82f
|
2014-04-29 19:59:39 -07:00
|
|
|
jr .asm_11282a
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112840:
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
jr z, .asm_112844
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_112844
|
|
|
|
call Function1127e1
|
|
|
|
jr nz, .asm_1128ab
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
cp $32
|
|
|
|
jr nz, Function1128bd
|
|
|
|
ld a, [hli]
|
|
|
|
cp $35
|
|
|
|
jr nz, Function1128bd
|
|
|
|
call Function112724
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc87c
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ld a, [hl]
|
|
|
|
or a
|
|
|
|
jr z, .asm_11289d
|
|
|
|
push hl
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86b
|
2014-04-29 19:59:39 -07:00
|
|
|
dec [hl]
|
|
|
|
ld bc, $0001
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 19
|
2014-04-29 19:59:39 -07:00
|
|
|
ld hl, Unknown_1120b0
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyString
|
2014-04-29 19:59:39 -07:00
|
|
|
pop hl
|
|
|
|
ld a, $80
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyStringLen
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $3e
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
inc c
|
|
|
|
ld a, l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc87c], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc87d], a
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function11295e
|
|
|
|
ld a, c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 17], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, c
|
|
|
|
call Function111f63
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 12
|
2014-04-29 19:59:39 -07:00
|
|
|
ld d, $0
|
|
|
|
ld e, c
|
|
|
|
ld a, $95
|
|
|
|
jp Function111f02
|
|
|
|
|
|
|
|
.asm_11289d
|
|
|
|
ld a, $3
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function1128d3
|
|
|
|
ld a, $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc98a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_1128ab
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $9f
|
|
|
|
jp z, Function1127cd
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86b
|
2014-04-29 19:59:39 -07:00
|
|
|
dec [hl]
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function1127c5
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1128bd:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function112b11
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc810
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], d
|
|
|
|
ld a, $30
|
|
|
|
call Function11225d
|
|
|
|
set 1, [hl]
|
|
|
|
res 0, [hl]
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1128d3:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 0, [hl]
|
|
|
|
res 2, [hl]
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1128db:
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
jr z, .asm_112947
|
|
|
|
dec a
|
|
|
|
jr z, .asm_1128e5
|
|
|
|
dec a
|
|
|
|
jr z, .asm_112913
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_1128e5
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $9f
|
|
|
|
jp z, Function1127cd
|
|
|
|
call Function113482
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, [wc86e + 1]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr nz, .asm_112901
|
|
|
|
ld a, $3
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 0, [hl]
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_112901
|
|
|
|
call Function112724
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 5
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $1
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
2016-05-04 08:46:23 -07:00
|
|
|
inc de
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $1
|
|
|
|
call Function111f63
|
|
|
|
jr .asm_112941
|
|
|
|
|
|
|
|
.asm_112913
|
|
|
|
call Function1127e1
|
|
|
|
jr nz, .asm_11293d
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $9f
|
|
|
|
jp z, Function1127cd
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function112b11
|
|
|
|
ld a, d
|
|
|
|
cp $2
|
|
|
|
jr nz, .asm_11295b
|
|
|
|
ld a, e
|
|
|
|
cp $50
|
|
|
|
jr nz, .asm_11295b
|
|
|
|
ld a, $3
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function1128d3
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc98a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_11293d
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86b
|
2014-04-29 19:59:39 -07:00
|
|
|
dec [hl]
|
|
|
|
|
|
|
|
.asm_112941
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function1127c5
|
|
|
|
|
|
|
|
.asm_112947
|
|
|
|
call Function1127e1
|
|
|
|
jr nz, .asm_11293d
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function112b11
|
|
|
|
ld a, d
|
|
|
|
cp $3
|
|
|
|
jr nz, .asm_11295b
|
|
|
|
ld a, e
|
|
|
|
cp $54
|
|
|
|
ret z
|
|
|
|
|
|
|
|
.asm_11295b
|
|
|
|
jp Function1128bd
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function11295e:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $d
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
inc c
|
|
|
|
ld a, $a
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
inc c
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112969:
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
jr z, .asm_112970
|
|
|
|
dec a
|
|
|
|
jr z, .asm_112989
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_112970
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $9f
|
|
|
|
jr z, .asm_112986
|
|
|
|
call Function1127e1
|
|
|
|
jr z, .asm_112986
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86b
|
2014-04-29 19:59:39 -07:00
|
|
|
dec [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 32
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function1127c5
|
|
|
|
|
|
|
|
.asm_112986
|
|
|
|
jp Function112430
|
|
|
|
|
|
|
|
.asm_112989
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86d], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 0, [hl]
|
|
|
|
res 7, [hl]
|
|
|
|
set 5, [hl]
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function11299c:
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
jr z, .asm_1129aa
|
|
|
|
dec a
|
|
|
|
jr z, .asm_1129c9
|
|
|
|
dec a
|
|
|
|
jr z, .asm_1129e7
|
|
|
|
dec a
|
|
|
|
jp z, .asm_112a1d
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_1129aa
|
|
|
|
call Function1127e1
|
|
|
|
jr nz, .asm_1129fe
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc880]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $2b
|
|
|
|
jr nz, .asm_112a0f
|
|
|
|
call Function112724
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 101]
|
2014-04-29 19:59:39 -07:00
|
|
|
add $a
|
|
|
|
ld e, a
|
2020-11-09 12:17:03 -08:00
|
|
|
ld d, 0
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $95
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 96
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function111f02
|
|
|
|
|
|
|
|
.asm_1129c9
|
|
|
|
ld d, a
|
|
|
|
call Function1127e1
|
|
|
|
jr nz, .asm_1129fe
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc880]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $2b
|
|
|
|
jr nz, .asm_112a0f
|
|
|
|
call Function112724
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 165]
|
2014-04-29 19:59:39 -07:00
|
|
|
add $a
|
|
|
|
ld e, a
|
|
|
|
ld a, $95
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 160
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function111f02
|
|
|
|
|
|
|
|
.asm_1129e7
|
|
|
|
call Function1127e1
|
|
|
|
jr nz, .asm_1129fe
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc880]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $2b
|
|
|
|
jr nz, .asm_112a0f
|
|
|
|
ld a, $4
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function1128d3
|
|
|
|
set 7, [hl]
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_1129fe
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $9f
|
|
|
|
jr z, Function112a42
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86b
|
2014-04-29 19:59:39 -07:00
|
|
|
dec [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 128
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function1127c5
|
|
|
|
|
|
|
|
.asm_112a0f
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86b]
|
|
|
|
ld [wMobileSDK_PacketBuffer + 32], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $3
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function112430
|
|
|
|
|
|
|
|
.asm_112a1d
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86d], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld de, $0002
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 32]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $1
|
|
|
|
jr z, .asm_112a2c
|
|
|
|
inc de
|
|
|
|
.asm_112a2c
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112a2c:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
set 1, [hl]
|
|
|
|
res 0, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc80f
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $31
|
|
|
|
ld [hli], a
|
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], d
|
|
|
|
ld a, $5
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112a42:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc810
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], a
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86d], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $31
|
|
|
|
call Function11225d
|
|
|
|
set 1, [hl]
|
|
|
|
res 0, [hl]
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112a56:
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
jr z, .asm_112a5a
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_112a5a
|
|
|
|
call Function1127e1
|
|
|
|
jr nz, .asm_112a95
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
cp $2b
|
|
|
|
jr nz, .asm_112aa6
|
|
|
|
.asm_112a67
|
|
|
|
ld a, [hli]
|
|
|
|
cp $20
|
|
|
|
jr nz, .asm_112a67
|
|
|
|
call Function112aac
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86e]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, [wc86e + 1]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, a
|
|
|
|
ld a, e
|
|
|
|
ld [bc], a
|
|
|
|
inc bc
|
|
|
|
ld a, d
|
|
|
|
ld [bc], a
|
|
|
|
call Function112aac
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86e
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
inc hl
|
2016-05-04 08:46:23 -07:00
|
|
|
inc hl
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
|
|
|
ld [hli], a
|
|
|
|
ld a, c
|
|
|
|
ld [hli], a
|
|
|
|
ld a, $4
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function1128d3
|
|
|
|
|
|
|
|
.asm_112a95
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $9f
|
|
|
|
jr z, Function112a42
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86b
|
2014-04-29 19:59:39 -07:00
|
|
|
dec [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 128
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function1127c5
|
|
|
|
|
|
|
|
.asm_112aa6
|
|
|
|
ld de, $0005
|
|
|
|
jp Function112a2c
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112aac:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc872]
|
2014-04-29 19:59:39 -07:00
|
|
|
push af
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc873]
|
2014-04-29 19:59:39 -07:00
|
|
|
push af
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc874]
|
2014-04-29 19:59:39 -07:00
|
|
|
push af
|
2015-11-02 11:37:02 -08:00
|
|
|
ld bc, 0
|
|
|
|
ld de, 0
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_112abe
|
|
|
|
ld a, [hli]
|
|
|
|
cp $d
|
|
|
|
jr z, .asm_112b04
|
|
|
|
cp $20
|
|
|
|
jr z, .asm_112b04
|
|
|
|
and $f
|
|
|
|
ld b, a
|
|
|
|
sla e
|
|
|
|
rl d
|
|
|
|
rl c
|
|
|
|
ld a, e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc872], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, d
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc873], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc874], a
|
2014-04-29 19:59:39 -07:00
|
|
|
sla e
|
|
|
|
rl d
|
|
|
|
rl c
|
|
|
|
sla e
|
|
|
|
rl d
|
|
|
|
rl c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc872]
|
2014-04-29 19:59:39 -07:00
|
|
|
add e
|
|
|
|
ld e, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc873]
|
2014-04-29 19:59:39 -07:00
|
|
|
adc d
|
|
|
|
ld d, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc874]
|
2014-04-29 19:59:39 -07:00
|
|
|
adc c
|
|
|
|
ld c, a
|
|
|
|
ld a, b
|
|
|
|
add e
|
|
|
|
ld e, a
|
|
|
|
ld a, $0
|
|
|
|
adc d
|
|
|
|
ld d, a
|
|
|
|
ld a, $0
|
|
|
|
adc c
|
|
|
|
ld c, a
|
|
|
|
jr .asm_112abe
|
|
|
|
|
|
|
|
.asm_112b04
|
|
|
|
pop af
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc874], a
|
2014-04-29 19:59:39 -07:00
|
|
|
pop af
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc873], a
|
2014-04-29 19:59:39 -07:00
|
|
|
pop af
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc872], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112b11:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc872]
|
2014-04-29 19:59:39 -07:00
|
|
|
push af
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc873]
|
2014-04-29 19:59:39 -07:00
|
|
|
push af
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc874]
|
2014-04-29 19:59:39 -07:00
|
|
|
push af
|
|
|
|
ld bc, $0300
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wc872
|
2022-09-14 17:49:58 -07:00
|
|
|
call .asm_112b60
|
|
|
|
call nc, .asm_112b60
|
|
|
|
call nc, .asm_112b60
|
2014-04-29 19:59:39 -07:00
|
|
|
dec hl
|
|
|
|
.asm_112b2d
|
|
|
|
ld a, [hli]
|
2022-09-14 17:49:58 -07:00
|
|
|
cp "\r"
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_112b36
|
2022-09-14 17:49:58 -07:00
|
|
|
cp " "
|
2014-04-29 19:59:39 -07:00
|
|
|
jr nz, .asm_112b2d
|
|
|
|
|
|
|
|
.asm_112b36
|
|
|
|
push hl
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc872
|
2015-11-02 11:37:02 -08:00
|
|
|
ld de, 0
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, b
|
|
|
|
or a
|
|
|
|
jr z, .asm_112b49
|
|
|
|
dec a
|
|
|
|
jr z, .asm_112b4b
|
|
|
|
dec a
|
|
|
|
jr z, .asm_112b4f
|
|
|
|
jr .asm_112b52
|
|
|
|
|
|
|
|
.asm_112b49
|
|
|
|
ld a, [hli]
|
|
|
|
ld d, a
|
|
|
|
|
|
|
|
.asm_112b4b
|
|
|
|
ld a, [hli]
|
|
|
|
swap a
|
|
|
|
ld e, a
|
|
|
|
|
|
|
|
.asm_112b4f
|
|
|
|
ld a, [hli]
|
|
|
|
or e
|
|
|
|
ld e, a
|
|
|
|
|
|
|
|
.asm_112b52
|
|
|
|
pop hl
|
|
|
|
pop af
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc874], a
|
2014-04-29 19:59:39 -07:00
|
|
|
pop af
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc873], a
|
2014-04-29 19:59:39 -07:00
|
|
|
pop af
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc872], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2022-09-14 17:49:58 -07:00
|
|
|
.asm_112b60:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
2022-09-14 17:49:58 -07:00
|
|
|
cp "0"
|
2014-04-29 19:59:39 -07:00
|
|
|
jr c, .asm_112b6f
|
2022-09-14 17:49:58 -07:00
|
|
|
cp "9" + 1
|
2014-04-29 19:59:39 -07:00
|
|
|
jr nc, .asm_112b6f
|
|
|
|
and $f
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
dec b
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_112b6f
|
|
|
|
scf
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112b71:
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
jr z, .asm_112b75
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_112b75
|
|
|
|
call Function1127e1
|
|
|
|
jr nz, .asm_112ba3
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
cp $2b
|
|
|
|
jr nz, .asm_112bb5
|
|
|
|
.asm_112b82
|
|
|
|
ld a, [hli]
|
|
|
|
cp $20
|
|
|
|
jr nz, .asm_112b82
|
|
|
|
.asm_112b87
|
|
|
|
ld a, [hli]
|
|
|
|
cp $20
|
|
|
|
jr nz, .asm_112b87
|
|
|
|
call Function112aac
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86e
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
|
|
|
ld [hli], a
|
|
|
|
ld a, c
|
|
|
|
ld [hli], a
|
|
|
|
ld a, $4
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function1128d3
|
|
|
|
|
|
|
|
.asm_112ba3
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $9f
|
|
|
|
jp z, Function112a42
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86b
|
2014-04-29 19:59:39 -07:00
|
|
|
dec [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 128
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function1127c5
|
|
|
|
|
|
|
|
.asm_112bb5
|
|
|
|
ld de, $0004
|
|
|
|
jp Function112a2c
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112bbb:
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
jr z, .asm_112bbf
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_112bbf
|
|
|
|
call Function1127e1
|
|
|
|
jr nz, .asm_112bd4
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
cp $2b
|
|
|
|
jr nz, .asm_112be6
|
|
|
|
ld a, $4
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function1128d3
|
|
|
|
|
|
|
|
.asm_112bd4
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $9f
|
|
|
|
jp z, Function112a42
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86b
|
2014-04-29 19:59:39 -07:00
|
|
|
dec [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 128
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function1127c5
|
|
|
|
|
|
|
|
.asm_112be6
|
|
|
|
ld de, $0004
|
|
|
|
jp Function112a2c
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112bec:
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
jr z, .asm_112bf7
|
|
|
|
dec a
|
|
|
|
jp z, .asm_112cdb
|
|
|
|
dec a
|
|
|
|
ret nz
|
|
|
|
dec [hl]
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_112bf7
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc880]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $2d
|
|
|
|
jr nz, .asm_112c03
|
|
|
|
call Function1127e1
|
|
|
|
jr z, .asm_112c0b
|
|
|
|
|
|
|
|
.asm_112c03
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 2, a
|
|
|
|
jp z, .asm_112cef
|
|
|
|
|
|
|
|
.asm_112c0b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86b
|
2014-04-29 19:59:39 -07:00
|
|
|
inc [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
cp $2b
|
|
|
|
jp nz, Function112d20
|
|
|
|
ld b, $7f
|
|
|
|
.asm_112c1a
|
|
|
|
ld a, [hli]
|
|
|
|
dec b
|
|
|
|
cp $a
|
|
|
|
jr nz, .asm_112c1a
|
|
|
|
push hl
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc98f
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld e, a
|
|
|
|
ld a, [hli]
|
|
|
|
ld d, a
|
|
|
|
ld a, b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc82d], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
sub b
|
|
|
|
ld l, a
|
|
|
|
ld a, h
|
|
|
|
sbc $0
|
|
|
|
ld h, a
|
|
|
|
jr nc, .asm_112c56
|
|
|
|
cp $ff
|
|
|
|
jr nz, .asm_112c56
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc991
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld c, a
|
|
|
|
inc hl
|
|
|
|
ld a, b
|
|
|
|
sub c
|
|
|
|
ld [hli], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc82b]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc827
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ld a, c
|
|
|
|
ld [hli], a
|
|
|
|
xor a
|
|
|
|
ld [hl], a
|
|
|
|
pop hl
|
|
|
|
ld b, c
|
2019-08-22 05:41:17 -07:00
|
|
|
jp MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_112c56
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc993], a
|
|
|
|
ld a, [wc82b]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc994], a
|
2014-04-29 19:59:39 -07:00
|
|
|
push hl
|
|
|
|
ld a, l
|
|
|
|
sub c
|
|
|
|
ld l, a
|
|
|
|
ld a, h
|
|
|
|
sbc $0
|
|
|
|
ld h, a
|
|
|
|
jr nc, .asm_112c9f
|
|
|
|
cp $ff
|
|
|
|
jr nz, .asm_112c9f
|
|
|
|
ld a, c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_ReceivePacketBuffer + 1], a
|
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer + 3]
|
2014-04-29 19:59:39 -07:00
|
|
|
sub c
|
|
|
|
pop hl
|
|
|
|
ld c, l
|
|
|
|
pop hl
|
|
|
|
push af
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
pop af
|
|
|
|
push de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_ReceivePacketBuffer + 4
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
2020-11-09 12:17:03 -08:00
|
|
|
ld d, 0
|
2014-04-29 19:59:39 -07:00
|
|
|
add hl, de
|
|
|
|
pop de
|
|
|
|
ld b, c
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer + 1]
|
2014-04-29 19:59:39 -07:00
|
|
|
sub c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc994], a
|
|
|
|
ld hl, wc827
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc991]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
|
|
|
xor a
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_112c9f
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc994], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc82b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc82c], a
|
2014-04-29 19:59:39 -07:00
|
|
|
pop hl
|
|
|
|
pop hl
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer + 3]
|
2014-04-29 19:59:39 -07:00
|
|
|
sub c
|
|
|
|
push de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_ReceivePacketBuffer + 4
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
2020-11-09 12:17:03 -08:00
|
|
|
ld d, 0
|
2014-04-29 19:59:39 -07:00
|
|
|
add hl, de
|
|
|
|
pop de
|
|
|
|
ld b, c
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc82d]
|
2014-04-29 19:59:39 -07:00
|
|
|
add c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc82d], a
|
|
|
|
ld a, [wc82e]
|
2018-02-04 10:16:40 -08:00
|
|
|
adc 0
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc82e], a
|
|
|
|
ld hl, wc829
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 2, [hl]
|
|
|
|
|
|
|
|
.asm_112cdb
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 2, a
|
|
|
|
jr z, .asm_112cea
|
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp .asm_112d09
|
|
|
|
|
|
|
|
.asm_112cea
|
|
|
|
call Function1127f3
|
|
|
|
jr z, .asm_112d01
|
|
|
|
|
|
|
|
.asm_112cef
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $9f
|
|
|
|
jp z, Function112a42
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86b
|
2014-04-29 19:59:39 -07:00
|
|
|
dec [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 128
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function1127c5
|
|
|
|
|
|
|
|
.asm_112d01
|
|
|
|
ld a, $4
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function1128d3
|
|
|
|
|
|
|
|
.asm_112d09
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86e]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld l, a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, [wc86e + 1]
|
2014-04-29 19:59:39 -07:00
|
|
|
or l
|
|
|
|
ret z
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc827
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld e, a
|
|
|
|
ld d, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc82d
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $2
|
2019-08-22 05:41:17 -07:00
|
|
|
jp MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112d20:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $1a
|
|
|
|
jr nz, .asm_112d2d
|
|
|
|
ld de, $0004
|
|
|
|
jp Function112a2c
|
|
|
|
|
|
|
|
.asm_112d2d
|
|
|
|
ld de, $0004
|
|
|
|
jp Function112a2c
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112d33:
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
jr z, .asm_112d87
|
|
|
|
dec a
|
|
|
|
jr z, .asm_112d9f
|
|
|
|
dec a
|
|
|
|
jp z, .asm_112e46
|
|
|
|
dec a
|
|
|
|
jr z, .asm_112d4d
|
|
|
|
dec a
|
|
|
|
jp z, Function113317
|
|
|
|
dec a
|
|
|
|
jp z, Function113386
|
|
|
|
dec a
|
|
|
|
jp .asm_112e46
|
|
|
|
|
2020-10-28 07:21:10 -07:00
|
|
|
.asm_112d4c ; unreferenced
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_112d4d
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $23
|
|
|
|
jr z, .asm_112d6d
|
|
|
|
cp $1f
|
|
|
|
jr z, .asm_112d60
|
|
|
|
cp $20
|
|
|
|
jr z, .asm_112d6d
|
|
|
|
cp $22
|
|
|
|
jr nz, .asm_112d82
|
|
|
|
|
|
|
|
.asm_112d60
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc98b
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
cp $1
|
|
|
|
jr nz, .asm_112d82
|
|
|
|
ld a, [hl]
|
|
|
|
cp $4
|
|
|
|
jr nz, .asm_112d82
|
|
|
|
|
|
|
|
.asm_112d6d
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86e
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc82b
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 2, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86b
|
2014-04-29 19:59:39 -07:00
|
|
|
dec [hl]
|
2016-05-04 08:46:23 -07:00
|
|
|
dec [hl]
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_112d82
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86b
|
2014-04-29 19:59:39 -07:00
|
|
|
dec [hl]
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_112d87
|
|
|
|
call Function113482
|
2019-08-22 05:41:17 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer
|
|
|
|
ld hl, MobilePacket_TransferData
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $6
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86c]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld b, $1
|
|
|
|
call Function111f63
|
|
|
|
|
|
|
|
.asm_112d9f
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 2, a
|
|
|
|
jr z, .asm_112dab
|
|
|
|
ld a, $3
|
|
|
|
ld [hl], a
|
|
|
|
jr .asm_112dc1
|
|
|
|
|
|
|
|
.asm_112dab
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
|
|
|
cp MOBILE_COMMAND_TRANSFER_DATA_END | $80
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_112dc1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86b
|
2014-04-29 19:59:39 -07:00
|
|
|
dec [hl]
|
|
|
|
ld de, $000b
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-10-20 15:27:34 -07:00
|
|
|
jp PacketSendBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_112dc1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc989]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $2
|
|
|
|
jr nc, .asm_112df2
|
|
|
|
call Function112f61
|
|
|
|
bit 2, a
|
|
|
|
ret nz
|
|
|
|
cp $3
|
|
|
|
jr z, .asm_112e38
|
|
|
|
cp $1
|
|
|
|
jr nz, .asm_112df2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $1f
|
|
|
|
jr z, .asm_112de1
|
|
|
|
cp $20
|
|
|
|
jr nz, .asm_112df2
|
|
|
|
|
|
|
|
.asm_112de1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc98b
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
cp $1
|
|
|
|
jr nz, .asm_112df2
|
|
|
|
ld a, $4
|
|
|
|
cp [hl]
|
|
|
|
jr nz, .asm_112df2
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc990], a
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_112df2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86e]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld l, a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, [wc86e + 1]
|
2014-04-29 19:59:39 -07:00
|
|
|
or l
|
|
|
|
ret z
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $13
|
|
|
|
jr z, .asm_112e21
|
|
|
|
cp $14
|
|
|
|
jr z, .asm_112e21
|
|
|
|
cp $20
|
|
|
|
ret z
|
|
|
|
cp $22
|
|
|
|
ret z
|
|
|
|
cp $23
|
|
|
|
ret z
|
|
|
|
cp $1f
|
|
|
|
jr nz, .asm_112e21
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc98b
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
cp $0
|
|
|
|
ret nz
|
|
|
|
ld a, $2
|
|
|
|
cp [hl]
|
|
|
|
ret nz
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_112e21
|
|
|
|
cp $24
|
|
|
|
jr nz, .asm_112e2a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc878
|
2014-04-29 19:59:39 -07:00
|
|
|
jr .asm_112e2d
|
|
|
|
|
|
|
|
.asm_112e2a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc827
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_112e2d
|
|
|
|
ld a, [hli]
|
|
|
|
ld e, a
|
|
|
|
ld d, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc82d
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $2
|
2019-08-22 05:41:17 -07:00
|
|
|
jp MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_112e38
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
set 1, [hl]
|
|
|
|
res 0, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wc98b
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $24
|
|
|
|
jr .asm_112e95
|
|
|
|
|
|
|
|
.asm_112e46
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $1f
|
|
|
|
jr z, .asm_112ea6
|
|
|
|
cp $20
|
|
|
|
jr z, .asm_112ea6
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc98a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $1
|
|
|
|
jr z, .asm_112e65
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $21
|
|
|
|
jp z, .asm_112eea
|
|
|
|
cp $22
|
|
|
|
jp z, .asm_112eea
|
|
|
|
|
|
|
|
.asm_112e65
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc990]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jp z, .asm_112f3d
|
|
|
|
.asm_112e6c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc98c
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hld]
|
|
|
|
cp $3
|
|
|
|
jr nz, .asm_112e7f
|
|
|
|
ld a, [hl]
|
|
|
|
or a
|
|
|
|
jr z, .asm_112e7f
|
|
|
|
cp $3
|
|
|
|
jr nc, .asm_112e7f
|
|
|
|
call Function1133fe
|
|
|
|
|
|
|
|
.asm_112e7f
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
set 1, [hl]
|
|
|
|
res 0, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wc98b
|
|
|
|
ld a, [wc990]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $1
|
|
|
|
ld a, $32
|
|
|
|
jr z, .asm_112e95
|
|
|
|
inc de
|
2016-05-04 08:46:23 -07:00
|
|
|
inc de
|
2014-04-29 19:59:39 -07:00
|
|
|
inc a
|
|
|
|
|
|
|
|
.asm_112e95
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc80f], a
|
|
|
|
ld hl, wc810
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
ld [hli], a
|
|
|
|
ld a, [de]
|
|
|
|
ld [hl], a
|
|
|
|
ld a, $5
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_112ea6
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc98b
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
cp $0
|
|
|
|
jr nz, .asm_112ec1
|
|
|
|
ld a, $2
|
|
|
|
cp h
|
|
|
|
jr nz, .asm_112ec1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc98d]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc98e]
|
2014-04-29 19:59:39 -07:00
|
|
|
or b
|
|
|
|
jr nz, .asm_112e6c
|
|
|
|
jr .asm_112f3d
|
|
|
|
|
|
|
|
.asm_112ec1
|
|
|
|
ld a, $1
|
|
|
|
cp l
|
|
|
|
jr nz, .asm_112e6c
|
|
|
|
ld a, $4
|
|
|
|
cp h
|
|
|
|
jr nz, .asm_112e6c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc9a5]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr nz, .asm_112efb
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86e]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld l, a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, [wc86e + 1]
|
2014-04-29 19:59:39 -07:00
|
|
|
or l
|
|
|
|
jr nz, .asm_112efb
|
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86d], a
|
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 0, [hl]
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_112eea
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc98b
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
cp $0
|
|
|
|
jp nz, .asm_112e6c
|
|
|
|
ld a, $2
|
|
|
|
cp h
|
|
|
|
jp nz, .asm_112e6c
|
|
|
|
|
|
|
|
.asm_112efb
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc98d]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc98e]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp b
|
|
|
|
jp nz, .asm_112e6c
|
|
|
|
or a
|
|
|
|
jr z, .asm_112f13
|
|
|
|
cp $1
|
|
|
|
jp nz, .asm_112e6c
|
|
|
|
ld a, $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc993], a
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_112f13
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86b]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $7
|
|
|
|
jr z, .asm_112f3d
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc98f
|
2014-04-29 19:59:39 -07:00
|
|
|
inc [hl]
|
|
|
|
ld a, $f
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
|
|
|
ld a, [wc86d]
|
|
|
|
ld [wc86e], a
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc989], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $a3
|
|
|
|
ld de, $0010
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc995
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function111f02
|
|
|
|
|
|
|
|
.asm_112f3d
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc993]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $1
|
|
|
|
jr nz, .asm_112f52
|
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc990], a
|
|
|
|
ld hl, wc98d
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], a
|
|
|
|
jp .asm_112e7f
|
|
|
|
|
|
|
|
.asm_112f52
|
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86d], a
|
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 0, [hl]
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112f61:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc989
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
|
|
|
or a
|
|
|
|
jr nz, .asm_112f8a
|
|
|
|
inc [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
ld de, $0008
|
|
|
|
add hl, de
|
|
|
|
.asm_112f70
|
|
|
|
ld a, [hli]
|
|
|
|
cp $20
|
|
|
|
jr z, .asm_112f70
|
|
|
|
dec hl
|
|
|
|
ld d, $0
|
|
|
|
cp $32
|
|
|
|
jr z, .asm_112f7d
|
|
|
|
inc d
|
|
|
|
|
|
|
|
.asm_112f7d
|
|
|
|
ld a, d
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc990], a
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function112b11
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc98b
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], d
|
|
|
|
|
|
|
|
.asm_112f8a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc880
|
|
|
|
ld a, [wc82d]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, a
|
|
|
|
or a
|
|
|
|
jr nz, .asm_112fa1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc98b
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $0
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], a
|
|
|
|
ld a, $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc990], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_112fa1
|
|
|
|
call Function112fd5
|
|
|
|
call Function113008
|
|
|
|
call Function113026
|
|
|
|
call Function113054
|
|
|
|
call Function113167
|
|
|
|
call Function113180
|
|
|
|
call Function113268
|
|
|
|
jr c, .asm_112fc9
|
|
|
|
ld a, $d
|
|
|
|
cp [hl]
|
|
|
|
jr z, .asm_112fc2
|
|
|
|
ld a, $a
|
|
|
|
cp [hl]
|
|
|
|
jr nz, .asm_112fa1
|
|
|
|
|
|
|
|
.asm_112fc2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc990
|
2014-04-29 19:59:39 -07:00
|
|
|
res 2, [hl]
|
|
|
|
jr .asm_112fce
|
|
|
|
|
|
|
|
.asm_112fc9
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc990
|
2014-04-29 19:59:39 -07:00
|
|
|
set 2, [hl]
|
|
|
|
|
|
|
|
.asm_112fce
|
|
|
|
call Function11306b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc990]
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function112fd5:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld de, Unknown_113001
|
|
|
|
push hl
|
|
|
|
call Function113281
|
|
|
|
jr nc, .asm_112fe0
|
|
|
|
pop hl
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_112fe0
|
|
|
|
pop de
|
|
|
|
push bc
|
|
|
|
push de
|
|
|
|
push hl
|
|
|
|
ld b, $0
|
|
|
|
.asm_112fe6
|
|
|
|
inc b
|
|
|
|
ld a, [hli]
|
|
|
|
cp $a
|
|
|
|
jr nz, .asm_112fe6
|
|
|
|
pop hl
|
|
|
|
ld c, b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc833]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc834]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld d, a
|
|
|
|
or e
|
|
|
|
jr z, .asm_112ffe
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
ld [de], a
|
|
|
|
|
|
|
|
.asm_112ffe
|
|
|
|
pop hl
|
|
|
|
pop bc
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Unknown_113001:
|
2015-01-20 00:01:23 -08:00
|
|
|
db "date: ", 0
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113008:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld de, Unknown_1132a6
|
|
|
|
push hl
|
|
|
|
call Function113273
|
|
|
|
jr nc, .asm_113013
|
|
|
|
pop hl
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_113013
|
|
|
|
call Function112b11
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc98d
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], d
|
|
|
|
pop hl
|
|
|
|
ld a, d
|
|
|
|
or e
|
|
|
|
ret z
|
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc990], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113026:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld de, Unknown_1132b2
|
|
|
|
push hl
|
|
|
|
call Function113273
|
|
|
|
jr nc, .asm_113031
|
|
|
|
pop hl
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_113031
|
|
|
|
pop hl
|
|
|
|
push bc
|
|
|
|
push hl
|
|
|
|
push hl
|
|
|
|
ld b, $0
|
|
|
|
.asm_113037
|
|
|
|
inc b
|
|
|
|
ld a, [hli]
|
|
|
|
cp $a
|
|
|
|
jr nz, .asm_113037
|
|
|
|
pop hl
|
|
|
|
ld c, b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 18
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 18
|
|
|
|
ld de, wc9b5
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, c
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
ld [de], a
|
|
|
|
pop hl
|
|
|
|
pop bc
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113054:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld de, Unknown_1132bf
|
|
|
|
push hl
|
|
|
|
call Function113273
|
|
|
|
jr nc, .asm_11305f
|
|
|
|
pop hl
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_11305f
|
|
|
|
push bc
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wc9b5
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $30
|
|
|
|
call Function1136c1
|
|
|
|
pop bc
|
|
|
|
pop hl
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function11306b:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc880
|
|
|
|
ld a, [wc82d]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, a
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113072:
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function113268
|
|
|
|
jp nc, Function113089
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $9f
|
|
|
|
jp nz, Function1131a9
|
|
|
|
push hl
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc990
|
2014-04-29 19:59:39 -07:00
|
|
|
res 2, [hl]
|
|
|
|
pop hl
|
|
|
|
jr Function113095
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113089:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
|
|
|
cp $d
|
|
|
|
jr z, .asm_113094
|
|
|
|
cp $a
|
|
|
|
jr z, Function113095
|
|
|
|
jr Function113072
|
|
|
|
|
|
|
|
.asm_113094
|
|
|
|
inc hl
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113095:
|
2014-04-29 19:59:39 -07:00
|
|
|
inc hl
|
|
|
|
push bc
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc872]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc873]
|
2014-04-29 19:59:39 -07:00
|
|
|
or b
|
|
|
|
pop bc
|
|
|
|
jr z, .asm_1130b3
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $23
|
|
|
|
jr z, .asm_1130b3
|
|
|
|
cp $20
|
|
|
|
jr z, .asm_1130b3
|
|
|
|
cp $22
|
|
|
|
jr z, .asm_1130b3
|
|
|
|
jr .asm_1130d6
|
|
|
|
|
|
|
|
.asm_1130b3
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86e
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 2, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $13
|
|
|
|
jr z, .asm_1130c8
|
|
|
|
cp $14
|
|
|
|
ret nz
|
|
|
|
|
|
|
|
.asm_1130c8
|
|
|
|
ld a, $6
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $9f
|
|
|
|
ret z
|
|
|
|
jp Function112430
|
|
|
|
|
|
|
|
.asm_1130d6
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc82b]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, a
|
|
|
|
dec b
|
2016-05-04 08:46:23 -07:00
|
|
|
dec b
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc82d], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_11310d
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc873]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld d, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc872]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
|
|
|
dec de
|
2016-05-04 08:46:23 -07:00
|
|
|
dec de
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
or d
|
|
|
|
jr nz, .asm_1130f5
|
|
|
|
ld a, e
|
|
|
|
cp b
|
|
|
|
jp c, Function113206
|
|
|
|
|
|
|
|
.asm_1130f5
|
|
|
|
ld a, e
|
|
|
|
sub b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc82b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, d
|
|
|
|
sbc $0
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc82c], a
|
|
|
|
ld a, [wc874]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc875]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld d, a
|
|
|
|
inc de
|
2016-05-04 08:46:23 -07:00
|
|
|
inc de
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_11310d
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $9f
|
|
|
|
jr z, .asm_113150
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer + 3]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr z, .asm_113150
|
|
|
|
ld l, c
|
|
|
|
sub c
|
|
|
|
ld c, a
|
|
|
|
ld a, l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_ReceivePacketBuffer + 4
|
2014-04-29 19:59:39 -07:00
|
|
|
add hl, bc
|
|
|
|
ld b, a
|
|
|
|
push de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc82b]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc82c]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld d, a
|
|
|
|
xor a
|
|
|
|
or d
|
|
|
|
jr nz, .asm_113135
|
|
|
|
ld a, e
|
|
|
|
cp b
|
|
|
|
jp c, Function113245
|
|
|
|
|
|
|
|
.asm_113135
|
|
|
|
pop de
|
|
|
|
push hl
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc82d
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
|
|
|
add b
|
|
|
|
ld [hli], a
|
|
|
|
ld a, [hl]
|
2018-02-04 10:16:40 -08:00
|
|
|
adc 0
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
|
|
|
ld c, b
|
|
|
|
pop hl
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc82b
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
|
|
|
sub c
|
|
|
|
ld [hli], a
|
|
|
|
ld a, [hl]
|
|
|
|
sbc $0
|
|
|
|
ld [hl], a
|
|
|
|
|
|
|
|
.asm_113150
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc829
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 2, [hl]
|
|
|
|
ld a, $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc989], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113167:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld de, Unknown_1132ff
|
|
|
|
push hl
|
|
|
|
call Function113273
|
|
|
|
jr nc, .asm_113172
|
|
|
|
pop hl
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_113172
|
|
|
|
pop de
|
|
|
|
push bc
|
|
|
|
push de
|
|
|
|
push hl
|
|
|
|
ld b, $0
|
|
|
|
.asm_113178
|
|
|
|
inc b
|
|
|
|
ld a, [hli]
|
|
|
|
cp $a
|
|
|
|
jr nz, .asm_113178
|
|
|
|
jr Function113197
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113180:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld de, Unknown_11330c
|
|
|
|
push hl
|
|
|
|
call Function113273
|
|
|
|
jr nc, .asm_11318b
|
|
|
|
pop hl
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_11318b
|
|
|
|
pop de
|
|
|
|
push bc
|
|
|
|
push de
|
|
|
|
push hl
|
|
|
|
ld b, $0
|
|
|
|
.asm_113191
|
|
|
|
inc b
|
|
|
|
ld a, [hli]
|
|
|
|
cp $a
|
|
|
|
jr nz, .asm_113191
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113197:
|
2014-04-29 19:59:39 -07:00
|
|
|
pop hl
|
|
|
|
ld c, b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 16
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, b
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
dec b
|
2016-05-04 08:46:23 -07:00
|
|
|
dec b
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
ld [de], a
|
|
|
|
pop hl
|
|
|
|
pop bc
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1131a9:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc979
|
|
|
|
ld de, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $0
|
|
|
|
ld c, b
|
|
|
|
ld a, [hl]
|
|
|
|
cp $a
|
|
|
|
jr z, .asm_1131c4
|
|
|
|
.asm_1131b7
|
|
|
|
ld a, [hld]
|
|
|
|
inc b
|
|
|
|
cp $a
|
|
|
|
jr nz, .asm_1131b7
|
|
|
|
inc hl
|
2016-05-04 08:46:23 -07:00
|
|
|
inc hl
|
2014-04-29 19:59:39 -07:00
|
|
|
dec b
|
|
|
|
ld c, b
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_1131c4
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc82b]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, a
|
|
|
|
add c
|
|
|
|
ld c, a
|
|
|
|
push bc
|
|
|
|
ld a, $ff
|
|
|
|
sub b
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
ld b, 0
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_ReceivePacketBuffer + 4
|
2014-04-29 19:59:39 -07:00
|
|
|
add hl, bc
|
|
|
|
pop bc
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc82d], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $fa
|
|
|
|
sub c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc82b], a
|
|
|
|
ld hl, wc829
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
|
|
|
ld [hl], a
|
|
|
|
ld l, e
|
|
|
|
ld h, d
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wc97a
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_1131ef
|
|
|
|
xor a
|
|
|
|
ld [hli], a
|
|
|
|
ld a, l
|
|
|
|
cp e
|
|
|
|
jr nz, .asm_1131ef
|
|
|
|
ld a, d
|
|
|
|
cp h
|
|
|
|
jr nz, .asm_1131ef
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 2, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86b
|
2014-04-29 19:59:39 -07:00
|
|
|
dec [hl]
|
2016-05-04 08:46:23 -07:00
|
|
|
dec [hl]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $4
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113206:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, b
|
|
|
|
sub e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc991], a
|
|
|
|
ld a, [wc821]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 2, a
|
|
|
|
ld a, c
|
|
|
|
jr nz, .asm_113214
|
|
|
|
xor a
|
|
|
|
|
|
|
|
.asm_113214
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc992], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, e
|
|
|
|
ld c, e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc874]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc875]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld d, a
|
|
|
|
inc de
|
2016-05-04 08:46:23 -07:00
|
|
|
inc de
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc991]
|
|
|
|
ld [wc993], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wc880
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc82d
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, c
|
|
|
|
ld [hli], a
|
|
|
|
xor a
|
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
set 2, [hl]
|
|
|
|
ld a, $3
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113245:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, b
|
|
|
|
sub e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc992], a
|
|
|
|
ld [wc82b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, e
|
|
|
|
ld c, e
|
|
|
|
pop de
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc82d
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, c
|
|
|
|
add [hl]
|
|
|
|
ld [hli], a
|
|
|
|
ld a, $0
|
|
|
|
adc [hl]
|
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
set 2, [hl]
|
|
|
|
ld a, $3
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113268:
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_113268
|
|
|
|
dec b
|
|
|
|
ld a, [hli]
|
|
|
|
cp $a
|
|
|
|
ret z
|
|
|
|
xor a
|
|
|
|
or b
|
|
|
|
jr nz, .asm_113268
|
|
|
|
scf
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113273:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, $0
|
|
|
|
.asm_113275
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
or a
|
|
|
|
ret z
|
|
|
|
xor [hl]
|
|
|
|
inc hl
|
|
|
|
or c
|
|
|
|
ld c, a
|
|
|
|
jr z, .asm_113275
|
|
|
|
scf
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113281:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, $0
|
|
|
|
push hl
|
|
|
|
ld l, e
|
|
|
|
ld h, d
|
|
|
|
pop de
|
|
|
|
.asm_113287
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
call Function11329d
|
|
|
|
xor [hl]
|
|
|
|
inc hl
|
|
|
|
or c
|
|
|
|
ld c, a
|
|
|
|
xor a
|
|
|
|
cp [hl]
|
|
|
|
jr z, .asm_113298
|
|
|
|
cp c
|
|
|
|
jr z, .asm_113287
|
|
|
|
scf
|
|
|
|
|
|
|
|
.asm_113298
|
|
|
|
push hl
|
|
|
|
ld l, e
|
|
|
|
ld h, d
|
|
|
|
pop de
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function11329d:
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $41
|
|
|
|
ret c
|
|
|
|
cp $5b
|
|
|
|
ret nc
|
|
|
|
or $20
|
|
|
|
ret
|
|
|
|
|
|
|
|
Unknown_1132a6:
|
2015-01-20 00:01:23 -08:00
|
|
|
db "Gb-Status: ", 0
|
2014-04-29 19:59:39 -07:00
|
|
|
Unknown_1132b2:
|
2015-01-20 00:01:23 -08:00
|
|
|
db "Gb-Auth-ID: ", 0
|
2014-04-29 19:59:39 -07:00
|
|
|
Unknown_1132bf:
|
2015-01-20 00:01:23 -08:00
|
|
|
db "WWW-Authenticate: GB00 name=", $22, 0
|
2014-04-29 19:59:39 -07:00
|
|
|
Unknown_1132dd:
|
2015-01-20 00:01:23 -08:00
|
|
|
db "Content-Type: application/x-cgb", $d, "\n", 0
|
2014-04-29 19:59:39 -07:00
|
|
|
Unknown_1132ff:
|
2015-01-20 00:01:23 -08:00
|
|
|
db "URI-header: ", 0
|
2014-04-29 19:59:39 -07:00
|
|
|
Unknown_11330c:
|
2015-01-20 00:01:23 -08:00
|
|
|
db "Location: ", 0
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113317:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
|
|
|
ld de, wMobileSDK_PacketBuffer + 18
|
|
|
|
ld a, [wc86c]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld bc, $0001
|
|
|
|
call Function1126b0
|
|
|
|
ld hl, Unknown_1132dd
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc9a5]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
2019-08-22 05:41:17 -07:00
|
|
|
call nz, MobileSDK_CopyString
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $22
|
|
|
|
jr nz, .asm_113344
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc98a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $2
|
|
|
|
jr nz, .asm_113351
|
|
|
|
jr .asm_113348
|
|
|
|
|
|
|
|
.asm_113344
|
|
|
|
cp $24
|
|
|
|
jr nz, .asm_113351
|
|
|
|
|
|
|
|
.asm_113348
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc9a5]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr z, .asm_11336a
|
|
|
|
call Function1133de
|
|
|
|
|
|
|
|
.asm_113351
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc9b5
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyString
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function1126b6
|
|
|
|
ld a, c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 17], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, c
|
|
|
|
call Function111f63
|
|
|
|
ld a, $95
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 12
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function111f02
|
|
|
|
|
|
|
|
.asm_11336a
|
|
|
|
ld hl, Unknown_113372
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyString
|
2014-04-29 19:59:39 -07:00
|
|
|
jr .asm_113351
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Unknown_113372:
|
2015-01-20 00:01:23 -08:00
|
|
|
db "Content-Length: 0", $d, "\n", 0
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113386:
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function113482
|
|
|
|
ld a, $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer
|
|
|
|
ld hl, MobilePacket_TransferData
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $6
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86c]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld b, $1
|
|
|
|
call Function111f63
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 12
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_TransferData
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $6
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86d]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $3
|
|
|
|
jp nz, Function113317
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 18
|
|
|
|
ld a, [wc86c]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld bc, $0001
|
|
|
|
call Function1126b0
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc994]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
call nz, Function1133de
|
|
|
|
call Function1126b6
|
|
|
|
ld a, c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 17], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, c
|
|
|
|
call Function111f63
|
|
|
|
ld a, $95
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 12
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function111f02
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1133de:
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function1126e6
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
|
|
|
ld a, [wc9aa]
|
|
|
|
ld [wc87c], a
|
|
|
|
ld a, [wc9ab]
|
|
|
|
ld [wc87d], a
|
|
|
|
ld a, [wc9ac]
|
|
|
|
ld [wc87e], a
|
|
|
|
ld a, [wc9ad]
|
|
|
|
ld [wc87f], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1133fe:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 17
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
2022-09-14 17:49:58 -07:00
|
|
|
cp "h"
|
2014-04-29 19:59:39 -07:00
|
|
|
jr nz, .asm_113432
|
|
|
|
ld a, [hli]
|
2022-09-14 17:49:58 -07:00
|
|
|
cp "t"
|
2014-04-29 19:59:39 -07:00
|
|
|
jr nz, .asm_113432
|
|
|
|
ld a, [hli]
|
2022-09-14 17:49:58 -07:00
|
|
|
cp "t"
|
2014-04-29 19:59:39 -07:00
|
|
|
jr nz, .asm_113432
|
|
|
|
ld a, [hli]
|
2022-09-14 17:49:58 -07:00
|
|
|
cp "p"
|
2014-04-29 19:59:39 -07:00
|
|
|
jr nz, .asm_113432
|
|
|
|
ld a, [hli]
|
2022-09-14 17:49:58 -07:00
|
|
|
cp ":"
|
2014-04-29 19:59:39 -07:00
|
|
|
jr nz, .asm_113432
|
|
|
|
ld a, [hli]
|
2022-09-14 17:49:58 -07:00
|
|
|
cp "/"
|
2014-04-29 19:59:39 -07:00
|
|
|
jr nz, .asm_113432
|
|
|
|
ld a, [hli]
|
2022-09-14 17:49:58 -07:00
|
|
|
cp "/"
|
2014-04-29 19:59:39 -07:00
|
|
|
jr nz, .asm_113432
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 16
|
|
|
|
ld de, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld b, a
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
ld [de], a
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_113432
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 17]
|
2022-09-14 17:49:58 -07:00
|
|
|
cp "/"
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_113460
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wc880
|
|
|
|
ld hl, wc9b5
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
inc hl
|
2016-05-04 08:46:23 -07:00
|
|
|
inc hl
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyString
|
2014-04-29 19:59:39 -07:00
|
|
|
ld l, e
|
|
|
|
ld h, d
|
|
|
|
.asm_11344c
|
|
|
|
ld a, [hld]
|
2022-09-14 17:49:58 -07:00
|
|
|
cp "/"
|
2014-04-29 19:59:39 -07:00
|
|
|
jr nz, .asm_11344c
|
|
|
|
inc hl
|
2016-05-04 08:46:23 -07:00
|
|
|
inc hl
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, l
|
|
|
|
ld d, h
|
|
|
|
.asm_113455
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 16
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld b, a
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
ld [de], a
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_113460
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wc880
|
|
|
|
ld hl, wc9b5
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
inc hl
|
2016-05-04 08:46:23 -07:00
|
|
|
inc hl
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ld a, [hl]
|
2022-09-14 17:49:58 -07:00
|
|
|
cp "/"
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_113478
|
|
|
|
ld b, $7
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_113478
|
|
|
|
ld a, [hli]
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
2022-09-14 17:49:58 -07:00
|
|
|
cp "/"
|
2014-04-29 19:59:39 -07:00
|
|
|
jr nz, .asm_113478
|
|
|
|
dec de
|
|
|
|
jr .asm_113455
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113482:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc87f
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hld]
|
|
|
|
ld b, a
|
|
|
|
ld a, [hld]
|
|
|
|
ld c, a
|
|
|
|
ld a, b
|
|
|
|
or c
|
|
|
|
ret z
|
|
|
|
pop hl
|
|
|
|
ld hl, rSC
|
|
|
|
add hl, bc
|
|
|
|
jr c, .asm_113496
|
|
|
|
xor a
|
|
|
|
ld l, a
|
|
|
|
ld h, a
|
|
|
|
|
|
|
|
.asm_113496
|
|
|
|
ld e, l
|
|
|
|
ld d, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc87f
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, d
|
|
|
|
ld [hld], a
|
|
|
|
ld a, e
|
|
|
|
ld [hld], a
|
|
|
|
jr nc, .asm_1134a3
|
|
|
|
ld c, $fe
|
|
|
|
|
|
|
|
.asm_1134a3
|
|
|
|
ld a, [hld]
|
|
|
|
ld l, [hl]
|
|
|
|
ld h, a
|
|
|
|
ld a, c
|
|
|
|
inc a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 5], a
|
|
|
|
ld de, wMobileSDK_PacketBuffer + 7
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, c
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc87c], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc87d], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, c
|
|
|
|
inc b
|
|
|
|
call Function111f63
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86b
|
2014-04-29 19:59:39 -07:00
|
|
|
dec [hl]
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $95
|
|
|
|
jp Function111f02
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1134cb:
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
jr z, .asm_1134d9
|
|
|
|
dec a
|
|
|
|
jr z, .asm_1134f4
|
|
|
|
dec a
|
|
|
|
jr z, .asm_1134fc
|
|
|
|
dec a
|
|
|
|
jr z, .asm_11350e
|
|
|
|
dec [hl]
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_1134d9
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer + 4]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $0
|
|
|
|
jr z, .asm_1134f0
|
|
|
|
cp $ff
|
|
|
|
jr z, .asm_1134f0
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc985]
|
|
|
|
ld [wc86a], a
|
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
res 0, [hl]
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_1134f0
|
|
|
|
inc [hl]
|
2016-05-04 08:46:23 -07:00
|
|
|
inc [hl]
|
2014-04-29 19:59:39 -07:00
|
|
|
jr .asm_1134fc
|
|
|
|
|
|
|
|
.asm_1134f4
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, MOBILE_COMMAND_TELEPHONE_STATUS | $80
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_TelephoneStatus
|
2019-10-20 15:27:34 -07:00
|
|
|
jp PacketSendEmptyBody
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_1134fc
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc86e
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer + 6]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $f0
|
|
|
|
jr c, .asm_11350b
|
|
|
|
set 7, [hl]
|
|
|
|
|
|
|
|
.asm_11350b
|
2022-09-14 17:49:58 -07:00
|
|
|
jp Mobile_EndSession
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_11350e
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $1e
|
|
|
|
jp nz, Function112251
|
|
|
|
jp Function1116a0
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113519:
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
jr z, .asm_113527
|
|
|
|
dec a
|
|
|
|
jr z, .asm_11352d
|
|
|
|
dec a
|
|
|
|
jr z, .asm_11353c
|
|
|
|
dec a
|
|
|
|
jr z, .asm_11353f
|
|
|
|
dec [hl]
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_113527
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_ReadConfigurationDataPart1
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function11236b
|
|
|
|
|
|
|
|
.asm_11352d
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc829
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, LOW(wc8ca + 22)
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, HIGH(wc8ca + 22)
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, MobilePacket_ReadConfigurationDataPart2
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function11236b
|
|
|
|
|
|
|
|
.asm_11353c
|
2022-09-14 17:49:58 -07:00
|
|
|
jp Mobile_EndSession
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_11353f
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
2022-09-14 17:49:58 -07:00
|
|
|
cp "M"
|
2014-04-29 19:59:39 -07:00
|
|
|
jr nz, .asm_113586
|
|
|
|
ld a, [hld]
|
2022-09-14 17:49:58 -07:00
|
|
|
cp "A"
|
2014-04-29 19:59:39 -07:00
|
|
|
jr nz, .asm_113586
|
|
|
|
ld b, $be
|
2015-11-02 11:37:02 -08:00
|
|
|
ld de, 0
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_113551
|
|
|
|
ld a, [hli]
|
|
|
|
add e
|
|
|
|
ld e, a
|
|
|
|
ld a, $0
|
|
|
|
adc d
|
|
|
|
ld d, a
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_113551
|
|
|
|
ld a, [hli]
|
|
|
|
cp d
|
|
|
|
jr nz, .asm_11358a
|
|
|
|
ld a, [hl]
|
|
|
|
cp e
|
|
|
|
jr nz, .asm_11358a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86e]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
2022-09-14 17:49:58 -07:00
|
|
|
ld a, [wc86e + 1]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld d, a
|
|
|
|
ld hl, .asm_11357e
|
|
|
|
push hl
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86a]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $25
|
|
|
|
jr z, Function1135ba
|
|
|
|
cp $26
|
|
|
|
jr z, Function11359d
|
|
|
|
cp $27
|
|
|
|
jr z, Function1135ad
|
|
|
|
.asm_11357e
|
|
|
|
ld a, $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc835], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function1116a0
|
|
|
|
|
|
|
|
.asm_113586
|
|
|
|
ld a, $25
|
|
|
|
jr .asm_11358c
|
|
|
|
|
|
|
|
.asm_11358a
|
|
|
|
ld a, $14
|
|
|
|
|
|
|
|
.asm_11358c
|
|
|
|
call Function11225d
|
|
|
|
jp Function1116a4
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113592:
|
2014-04-29 19:59:39 -07:00
|
|
|
push de
|
|
|
|
ld l, e
|
|
|
|
ld h, d
|
|
|
|
xor a
|
|
|
|
ld [hl], a
|
|
|
|
inc de
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
pop de
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function11359d:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $20
|
|
|
|
call Function113592
|
|
|
|
ld a, $21
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc88c
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyStringLen
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
ld [de], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1135ad:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $1e
|
|
|
|
call Function113592
|
|
|
|
ld a, $1f
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc8ac
|
2019-08-22 05:41:17 -07:00
|
|
|
jp MobileSDK_CopyStringLen
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1135ba:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $65
|
|
|
|
call Function113592
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc8f6
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function1135eb
|
|
|
|
ld a, $11
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc8fe
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyStringLen
|
2014-04-29 19:59:39 -07:00
|
|
|
inc de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc90e
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function1135eb
|
|
|
|
ld a, $11
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc916
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyStringLen
|
2014-04-29 19:59:39 -07:00
|
|
|
inc de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc926
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function1135eb
|
|
|
|
ld a, $11
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc92e
|
2019-08-22 05:41:17 -07:00
|
|
|
jp MobileSDK_CopyStringLen
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1135eb:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $8
|
|
|
|
.asm_1135ed
|
|
|
|
ld a, [hl]
|
|
|
|
swap a
|
|
|
|
and $f
|
|
|
|
cp $f
|
|
|
|
jr z, .asm_11361c
|
|
|
|
or $30
|
|
|
|
cp $3a
|
|
|
|
call z, Function113620
|
|
|
|
cp $3b
|
|
|
|
call z, Function113623
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld a, [hli]
|
|
|
|
and $f
|
|
|
|
cp $f
|
|
|
|
jr z, .asm_11361c
|
|
|
|
or $30
|
|
|
|
cp $3a
|
|
|
|
call z, Function113620
|
|
|
|
cp $3b
|
|
|
|
call z, Function113623
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_1135ed
|
|
|
|
|
|
|
|
.asm_11361c
|
|
|
|
xor a
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113620:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $23
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113623:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $2a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113626:
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
jr z, .asm_113634
|
|
|
|
dec a
|
|
|
|
jr z, .asm_113639
|
|
|
|
dec a
|
|
|
|
jr z, .asm_11366c
|
|
|
|
dec a
|
|
|
|
jr z, .asm_11366f
|
|
|
|
dec [hl]
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_113634
|
|
|
|
ld b, $9a
|
|
|
|
jp Function11234b
|
|
|
|
|
|
|
|
.asm_113639
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc882]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr nz, .asm_113642
|
|
|
|
inc [hl]
|
|
|
|
jr .asm_11366c
|
|
|
|
|
|
|
|
.asm_113642
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 5
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, a
|
|
|
|
inc a
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld a, $80
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ld b, c
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, c
|
|
|
|
inc b
|
|
|
|
call Function111f63
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 5]
|
2014-04-29 19:59:39 -07:00
|
|
|
add $a
|
|
|
|
ld e, a
|
2020-11-09 12:17:03 -08:00
|
|
|
ld d, 0
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $9a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function111f02
|
|
|
|
|
|
|
|
.asm_11366c
|
2022-09-14 17:49:58 -07:00
|
|
|
jp Mobile_EndSession
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_11366f
|
|
|
|
jp Function1116a0
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113672:
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
jr z, .asm_113680
|
|
|
|
dec a
|
|
|
|
jr z, .asm_113686
|
|
|
|
dec a
|
|
|
|
jr z, .asm_1136bb
|
|
|
|
dec a
|
|
|
|
jr z, .asm_1136be
|
|
|
|
dec [hl]
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_113680
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function11236b
|
|
|
|
|
|
|
|
.asm_113686
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc882]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr z, .asm_113693
|
|
|
|
cp $81
|
|
|
|
jr nc, .asm_113693
|
|
|
|
inc [hl]
|
|
|
|
jr .asm_1136bb
|
|
|
|
|
|
|
|
.asm_113693
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 7
|
2014-04-29 19:59:39 -07:00
|
|
|
sub $80
|
|
|
|
ld [hld], a
|
|
|
|
ld a, $80
|
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 8
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $2
|
|
|
|
call Function111f63
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc880
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ld de, $0080
|
|
|
|
add hl, de
|
|
|
|
ld e, h
|
|
|
|
ld a, l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc829
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
|
|
|
ld [hl], e
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function11236b
|
|
|
|
|
|
|
|
.asm_1136bb
|
2022-09-14 17:49:58 -07:00
|
|
|
jp Mobile_EndSession
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_1136be
|
|
|
|
jp Function1116a0
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1136c1:
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 225], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 192], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 193], a
|
|
|
|
ld hl, wMobileSDK_PacketBuffer + 194
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, e
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
|
|
|
ld [hli], a
|
|
|
|
ld a, b
|
|
|
|
ld [hli], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 192
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 32
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $30
|
|
|
|
ld c, b
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc97f
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
.asm_1136eb
|
|
|
|
ld a, [hli]
|
|
|
|
or a
|
|
|
|
jr nz, .asm_1136eb
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyString
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $37
|
|
|
|
cp c
|
|
|
|
inc a
|
|
|
|
jr nc, .asm_1136ff
|
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 225], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $78
|
|
|
|
|
|
|
|
.asm_1136ff
|
|
|
|
sub c
|
|
|
|
ld b, a
|
|
|
|
ld a, $80
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
xor a
|
|
|
|
.asm_113706
|
|
|
|
dec b
|
|
|
|
jr z, .asm_11370d
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
jr .asm_113706
|
|
|
|
|
|
|
|
.asm_11370d
|
|
|
|
or a
|
|
|
|
sla c
|
|
|
|
rl b
|
|
|
|
sla c
|
|
|
|
rl b
|
|
|
|
sla c
|
|
|
|
rl b
|
|
|
|
ld a, c
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld a, b
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
ld l, e
|
|
|
|
ld h, d
|
|
|
|
ld b, $6
|
|
|
|
xor a
|
|
|
|
.asm_113725
|
|
|
|
ld [hli], a
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_113725
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 160
|
2014-04-29 19:59:39 -07:00
|
|
|
ld hl, Unknown_113b7e
|
|
|
|
ld b, $10
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_113734
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 197
|
2020-03-31 18:26:59 -07:00
|
|
|
ld a, LOW(MD5_K_Table)
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2020-03-31 18:26:59 -07:00
|
|
|
ld a, HIGH(MD5_K_Table)
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 199
|
2017-12-25 10:40:10 -08:00
|
|
|
ld a, LOW(Unknown_113a70)
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2017-12-25 10:40:10 -08:00
|
|
|
ld a, HIGH(Unknown_113a70)
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 160
|
|
|
|
ld de, wMobileSDK_PacketBuffer + 209
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $10
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_113751
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 199
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ld a, [hli]
|
|
|
|
ld c, a
|
|
|
|
push hl
|
|
|
|
call Function113909
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 176
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld d, [hl]
|
|
|
|
ld e, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 184
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function113a32
|
|
|
|
pop hl
|
|
|
|
ld a, [hli]
|
|
|
|
ld d, [hl]
|
|
|
|
inc hl
|
|
|
|
ld e, a
|
|
|
|
push hl
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 225]
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, a
|
|
|
|
jr z, .asm_11377c
|
|
|
|
ld hl, $0040
|
|
|
|
add hl, de
|
|
|
|
ld e, l
|
|
|
|
ld d, h
|
|
|
|
|
|
|
|
.asm_11377c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 32
|
2014-04-29 19:59:39 -07:00
|
|
|
add hl, de
|
|
|
|
ld e, l
|
|
|
|
ld d, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 184
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function113a32
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 197
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld d, [hl]
|
|
|
|
ld e, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 184
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function113a32
|
|
|
|
pop hl
|
|
|
|
ld a, [hli]
|
|
|
|
ld b, a
|
|
|
|
ld a, l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 199], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 200], a
|
|
|
|
ld hl, wMobileSDK_PacketBuffer + 184
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function113a40
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 178
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld d, [hl]
|
|
|
|
ld e, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 184
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function113a32
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 176
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld d, [hl]
|
|
|
|
ld e, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 184
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $4
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 197
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2015-07-20 19:18:18 -07:00
|
|
|
rept 4
|
2014-04-29 19:59:39 -07:00
|
|
|
inc hl
|
2015-07-20 19:18:18 -07:00
|
|
|
endr
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 198], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 197], a
|
2020-11-09 13:38:11 -08:00
|
|
|
cp $8e ; LOW(MD5_K_Table + $100) ???
|
2014-04-29 19:59:39 -07:00
|
|
|
jp nz, .asm_113751
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 209
|
|
|
|
ld hl, wMobileSDK_PacketBuffer + 160
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function113a32
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 213
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function113a32
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 217
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function113a32
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 221
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function113a32
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 225
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 1, [hl]
|
|
|
|
jr z, .asm_1137fc
|
|
|
|
dec [hl]
|
|
|
|
jp .asm_113734
|
|
|
|
|
|
|
|
.asm_1137fc
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 32
|
|
|
|
ld de, wMobileSDK_PacketBuffer + 80
|
2014-04-29 19:59:39 -07:00
|
|
|
ld bc, $0030
|
|
|
|
call Function113d66
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 194
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld d, [hl]
|
|
|
|
ld e, a
|
|
|
|
ld hl, Unknown_113a55
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyString
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 80
|
2014-04-29 19:59:39 -07:00
|
|
|
ld bc, $0020
|
|
|
|
call Function113c8e
|
|
|
|
ld a, l
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 194], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 195], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $12
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 80
|
|
|
|
ld de, wMobileSDK_PacketBuffer + 32
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_11382d
|
|
|
|
ld a, $40
|
|
|
|
and [hl]
|
|
|
|
rlca
|
|
|
|
ld c, a
|
|
|
|
ld a, [hli]
|
|
|
|
bit 4, a
|
|
|
|
jr z, .asm_113839
|
|
|
|
set 6, c
|
|
|
|
|
|
|
|
.asm_113839
|
|
|
|
bit 2, a
|
|
|
|
jr z, .asm_11383f
|
|
|
|
set 5, c
|
|
|
|
|
|
|
|
.asm_11383f
|
|
|
|
bit 0, a
|
|
|
|
jr z, .asm_113845
|
|
|
|
set 4, c
|
|
|
|
|
|
|
|
.asm_113845
|
|
|
|
ld a, [hli]
|
|
|
|
bit 6, a
|
|
|
|
jr z, .asm_11384c
|
|
|
|
set 3, c
|
|
|
|
|
|
|
|
.asm_11384c
|
|
|
|
bit 4, a
|
|
|
|
jr z, .asm_113852
|
|
|
|
set 2, c
|
|
|
|
|
|
|
|
.asm_113852
|
|
|
|
bit 2, a
|
|
|
|
jr z, .asm_113858
|
|
|
|
set 1, c
|
|
|
|
|
|
|
|
.asm_113858
|
|
|
|
bit 0, a
|
|
|
|
jr z, .asm_11385e
|
|
|
|
set 0, c
|
|
|
|
|
|
|
|
.asm_11385e
|
|
|
|
ld a, c
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_11382d
|
|
|
|
ld b, $12
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 115
|
|
|
|
ld de, wMobileSDK_PacketBuffer + 67
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_11386c
|
|
|
|
ld a, $2
|
|
|
|
and [hl]
|
|
|
|
rrca
|
|
|
|
ld c, a
|
|
|
|
ld a, [hld]
|
|
|
|
bit 3, a
|
|
|
|
jr z, .asm_113878
|
|
|
|
set 1, c
|
|
|
|
|
|
|
|
.asm_113878
|
|
|
|
bit 5, a
|
|
|
|
jr z, .asm_11387e
|
|
|
|
set 2, c
|
|
|
|
|
|
|
|
.asm_11387e
|
|
|
|
bit 7, a
|
|
|
|
jr z, .asm_113884
|
|
|
|
set 3, c
|
|
|
|
|
|
|
|
.asm_113884
|
|
|
|
ld a, [hld]
|
|
|
|
bit 1, a
|
|
|
|
jr z, .asm_11388b
|
|
|
|
set 4, c
|
|
|
|
|
|
|
|
.asm_11388b
|
|
|
|
bit 3, a
|
|
|
|
jr z, .asm_113891
|
|
|
|
set 5, c
|
|
|
|
|
|
|
|
.asm_113891
|
|
|
|
bit 5, a
|
|
|
|
jr z, .asm_113897
|
|
|
|
set 6, c
|
|
|
|
|
|
|
|
.asm_113897
|
|
|
|
bit 7, a
|
|
|
|
jr z, .asm_11389d
|
|
|
|
set 7, c
|
|
|
|
|
|
|
|
.asm_11389d
|
|
|
|
ld a, c
|
|
|
|
ld [de], a
|
|
|
|
dec de
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_11386c
|
|
|
|
ld b, $10
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 80
|
|
|
|
ld hl, wMobileSDK_PacketBuffer + 160
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
ld bc, $0010
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc97f
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, [hli]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyString
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $24
|
|
|
|
sub c
|
|
|
|
ld b, a
|
|
|
|
ld l, e
|
|
|
|
ld h, d
|
|
|
|
ld a, $ff
|
|
|
|
.asm_1138c2
|
|
|
|
ld [hli], a
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_1138c2
|
|
|
|
xor a
|
|
|
|
ld [hl], a
|
|
|
|
ld b, $24
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 32
|
|
|
|
ld de, wMobileSDK_PacketBuffer + 80
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_1138d0
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, [de]
|
|
|
|
inc de
|
2014-04-29 19:59:39 -07:00
|
|
|
xor [hl]
|
|
|
|
ld c, $0
|
|
|
|
bit 0, a
|
|
|
|
jr z, .asm_1138db
|
|
|
|
set 3, c
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_1138db
|
|
|
|
bit 3, a
|
|
|
|
jr z, .asm_1138e1
|
|
|
|
set 6, c
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_1138e1
|
|
|
|
bit 6, a
|
|
|
|
jr z, .asm_1138e7
|
|
|
|
set 0, c
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_1138e7
|
|
|
|
and $b6
|
|
|
|
or c
|
|
|
|
ld [hli], a
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_1138d0
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 194
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld d, [hl]
|
|
|
|
ld e, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 32
|
2014-04-29 19:59:39 -07:00
|
|
|
ld bc, $0024
|
|
|
|
call Function113c8e
|
|
|
|
ld a, $22
|
|
|
|
ld [hli], a
|
|
|
|
ld a, $d
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hli], a
|
|
|
|
ld a, $a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
2013-10-01 22:11:54 -07:00
|
|
|
xor a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hl], a
|
2013-10-01 22:11:54 -07:00
|
|
|
ret
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113909:
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function11391e
|
|
|
|
ld a, c
|
|
|
|
and $f0
|
|
|
|
swap a
|
|
|
|
or a
|
|
|
|
jr z, Function11392f
|
|
|
|
dec a
|
|
|
|
jr z, Function113973
|
|
|
|
dec a
|
|
|
|
jp z, Function1139b7
|
|
|
|
jp Function1139de
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function11391e:
|
2014-04-29 19:59:39 -07:00
|
|
|
and $f
|
|
|
|
ld e, a
|
2020-11-09 12:17:03 -08:00
|
|
|
ld d, 0
|
2014-04-29 19:59:39 -07:00
|
|
|
ld hl, Unknown_113b70
|
|
|
|
add hl, de
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 176
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $8
|
2019-08-22 05:41:17 -07:00
|
|
|
jp MobileSDK_CopyBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function11392f:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 178
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 184
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $4
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 180
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld d, [hl]
|
|
|
|
ld e, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 184
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function113a0b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 178
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 188
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $4
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 188
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function113a1f
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 182
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld d, [hl]
|
|
|
|
ld e, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 188
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function113a0b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 184
|
|
|
|
ld de, wMobileSDK_PacketBuffer + 188
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function113a15
|
2013-10-01 22:11:54 -07:00
|
|
|
ret
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113973:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 178
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 184
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $4
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 182
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld d, [hl]
|
|
|
|
ld e, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 184
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function113a0b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 182
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, [hli]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 188
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $4
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 188
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function113a1f
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 180
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld d, [hl]
|
|
|
|
ld e, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 188
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function113a0b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 184
|
|
|
|
ld de, wMobileSDK_PacketBuffer + 188
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function113a15
|
2013-10-01 22:11:54 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1139b7:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 178
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 184
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $4
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 180
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld d, [hl]
|
|
|
|
ld e, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 184
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function113a28
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 182
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld d, [hl]
|
|
|
|
ld e, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 184
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function113a28
|
2013-10-01 22:11:54 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function1139de:
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 182
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld de, wMobileSDK_PacketBuffer + 184
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $4
|
2019-08-22 05:41:17 -07:00
|
|
|
call MobileSDK_CopyBytes
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 184
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function113a1f
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 178
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, [hli]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld d, [hl]
|
2013-10-01 22:11:54 -07:00
|
|
|
ld e, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 184
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function113a15
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 180
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
2013-10-01 22:11:54 -07:00
|
|
|
ld d, [hl]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 184
|
2014-04-29 19:59:39 -07:00
|
|
|
call Function113a28
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113a0b:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $4
|
|
|
|
.asm_113a0d
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
and [hl]
|
|
|
|
ld [hli], a
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_113a0d
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113a15:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $4
|
|
|
|
.asm_113a17
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
or [hl]
|
|
|
|
ld [hli], a
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_113a17
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113a1f:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $4
|
|
|
|
.asm_113a21
|
|
|
|
ld a, [hl]
|
|
|
|
cpl
|
|
|
|
ld [hli], a
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_113a21
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113a28:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $4
|
|
|
|
.asm_113a2a
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
xor [hl]
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hli], a
|
2014-04-29 19:59:39 -07:00
|
|
|
dec b
|
|
|
|
jr nz, .asm_113a2a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113a32:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
add [hl]
|
|
|
|
ld [hli], a
|
|
|
|
ld b, $3
|
|
|
|
.asm_113a38
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
adc [hl]
|
|
|
|
ld [hli], a
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_113a38
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113a40:
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_113a40
|
2013-10-01 22:11:54 -07:00
|
|
|
or a
|
2014-04-29 19:59:39 -07:00
|
|
|
push hl
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, [hli]
|
2014-04-29 19:59:39 -07:00
|
|
|
rla
|
|
|
|
ld a, [hl]
|
|
|
|
rla
|
|
|
|
ld [hli], a
|
|
|
|
ld a, [hl]
|
|
|
|
rla
|
|
|
|
ld [hli], a
|
|
|
|
ld a, [hl]
|
|
|
|
rla
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hl], a
|
2014-04-29 19:59:39 -07:00
|
|
|
pop hl
|
|
|
|
ld a, [hl]
|
|
|
|
rla
|
|
|
|
ld [hl], a
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_113a40
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Unknown_113a55:
|
2015-01-20 00:01:23 -08:00
|
|
|
db "Authorization: GB00 name=", $22, 0
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2015-03-11 22:23:30 -07:00
|
|
|
Unknown_113a70:
|
|
|
|
db $00, $00, $00, $07, $06, $04, $00, $0c, $04, $08, $00, $11, $02, $0c, $00, $16
|
|
|
|
db $00, $10, $00, $07, $06, $14, $00, $0c, $04, $18, $00, $11, $02, $1c, $00, $16
|
|
|
|
db $00, $20, $00, $07, $06, $24, $00, $0c, $04, $28, $00, $11, $02, $2c, $00, $16
|
|
|
|
db $00, $30, $00, $07, $06, $34, $00, $0c, $04, $38, $00, $11, $02, $3c, $00, $16
|
|
|
|
db $10, $04, $00, $05, $16, $18, $00, $09, $14, $2c, $00, $0e, $12, $00, $00, $14
|
|
|
|
db $10, $14, $00, $05, $16, $28, $00, $09, $14, $3c, $00, $0e, $12, $10, $00, $14
|
|
|
|
db $10, $24, $00, $05, $16, $38, $00, $09, $14, $0c, $00, $0e, $12, $20, $00, $14
|
|
|
|
db $10, $34, $00, $05, $16, $08, $00, $09, $14, $1c, $00, $0e, $12, $30, $00, $14
|
|
|
|
db $20, $14, $00, $04, $26, $20, $00, $0b, $24, $2c, $00, $10, $22, $38, $00, $17
|
|
|
|
db $20, $04, $00, $04, $26, $10, $00, $0b, $24, $1c, $00, $10, $22, $28, $00, $17
|
|
|
|
db $20, $34, $00, $04, $26, $00, $00, $0b, $24, $0c, $00, $10, $22, $18, $00, $17
|
|
|
|
db $20, $24, $00, $04, $26, $30, $00, $0b, $24, $3c, $00, $10, $22, $08, $00, $17
|
|
|
|
db $30, $00, $00, $06, $36, $1c, $00, $0a, $34, $38, $00, $0f, $32, $14, $00, $15
|
|
|
|
db $30, $30, $00, $06, $36, $0c, $00, $0a, $34, $28, $00, $0f, $32, $04, $00, $15
|
|
|
|
db $30, $20, $00, $06, $36, $3c, $00, $0a, $34, $18, $00, $0f, $32, $34, $00, $15
|
|
|
|
db $30, $10, $00, $06, $36, $2c, $00, $0a, $34, $08, $00, $0f, $32, $24, $00, $15
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Unknown_113b70:
|
2021-09-05 09:47:24 -07:00
|
|
|
dw wMobileSDK_PacketBuffer + 160
|
|
|
|
dw wMobileSDK_PacketBuffer + 164
|
|
|
|
dw wMobileSDK_PacketBuffer + 168
|
|
|
|
dw wMobileSDK_PacketBuffer + 172
|
|
|
|
dw wMobileSDK_PacketBuffer + 160
|
|
|
|
dw wMobileSDK_PacketBuffer + 164
|
|
|
|
dw wMobileSDK_PacketBuffer + 168
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Unknown_113b7e:
|
2017-12-09 21:06:20 -08:00
|
|
|
db $01, $23, $45, $67, $89, $ab, $cd, $ef
|
|
|
|
db $fe, $dc, $ba, $98, $76, $54, $32, $10
|
2015-03-11 22:23:30 -07:00
|
|
|
|
2020-03-31 18:26:59 -07:00
|
|
|
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
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113c8e:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 201], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 202], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, e
|
|
|
|
ld b, d
|
2013-10-01 22:11:54 -07:00
|
|
|
ld e, l
|
|
|
|
ld d, h
|
2014-04-29 19:59:39 -07:00
|
|
|
ld l, c
|
|
|
|
ld h, b
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 207], a
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_113ca0
|
|
|
|
ld b, $3
|
|
|
|
push hl
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 203
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_113ca6
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
ld [hli], a
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_113ca6
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 201]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 202]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, a
|
2013-10-01 22:11:54 -07:00
|
|
|
xor a
|
2014-04-29 19:59:39 -07:00
|
|
|
or b
|
|
|
|
jr nz, .asm_113ccf
|
|
|
|
ld a, $2
|
|
|
|
cp c
|
|
|
|
jr c, .asm_113ccf
|
|
|
|
push hl
|
|
|
|
dec hl
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 207], a
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_113cc3
|
|
|
|
xor a
|
|
|
|
ld [hld], a
|
|
|
|
inc c
|
|
|
|
ld a, $3
|
|
|
|
cp c
|
|
|
|
jr nz, .asm_113cc3
|
|
|
|
pop hl
|
|
|
|
ld bc, $0003
|
|
|
|
|
|
|
|
.asm_113ccf
|
|
|
|
dec bc
|
2016-05-10 09:31:49 -07:00
|
|
|
dec bc
|
|
|
|
dec bc
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 201], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 202], a
|
2014-04-29 19:59:39 -07:00
|
|
|
push de
|
|
|
|
dec hl
|
|
|
|
ld c, [hl]
|
|
|
|
dec hl
|
|
|
|
ld b, [hl]
|
|
|
|
dec hl
|
|
|
|
ld a, [hl]
|
2013-10-01 22:11:54 -07:00
|
|
|
ld d, a
|
2014-04-29 19:59:39 -07:00
|
|
|
srl a
|
|
|
|
srl a
|
|
|
|
ld [hli], a
|
|
|
|
ld a, $3
|
|
|
|
and d
|
|
|
|
ld d, a
|
|
|
|
ld a, $f0
|
|
|
|
and b
|
|
|
|
or d
|
|
|
|
swap a
|
|
|
|
ld [hli], a
|
|
|
|
ld a, $f
|
|
|
|
and b
|
2013-10-01 22:11:54 -07:00
|
|
|
ld d, a
|
|
|
|
ld a, c
|
2014-04-29 19:59:39 -07:00
|
|
|
and $c0
|
|
|
|
or d
|
|
|
|
rlca
|
|
|
|
rlca
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hli], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $3f
|
|
|
|
and c
|
|
|
|
ld [hld], a
|
|
|
|
dec hl
|
2016-05-04 08:46:23 -07:00
|
|
|
dec hl
|
2014-04-29 19:59:39 -07:00
|
|
|
pop de
|
|
|
|
ld b, h
|
|
|
|
ld c, l
|
|
|
|
pop hl
|
|
|
|
ld a, [bc]
|
|
|
|
inc bc
|
|
|
|
call Function113d47
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hli], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [bc]
|
|
|
|
inc bc
|
|
|
|
call Function113d47
|
|
|
|
ld [hli], a
|
|
|
|
ld a, [bc]
|
|
|
|
inc bc
|
|
|
|
call Function113d47
|
|
|
|
ld [hli], a
|
|
|
|
ld a, [bc]
|
|
|
|
inc bc
|
|
|
|
call Function113d47
|
|
|
|
ld [hli], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 201]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $0
|
|
|
|
jp nz, .asm_113ca0
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 202]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $0
|
|
|
|
jp nz, .asm_113ca0
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 207]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $0
|
|
|
|
jr z, .asm_113d43
|
|
|
|
push hl
|
|
|
|
dec hl
|
|
|
|
ld b, a
|
|
|
|
.asm_113d39
|
|
|
|
ld a, $3d
|
|
|
|
ld [hld], a
|
|
|
|
inc b
|
|
|
|
ld a, $3
|
|
|
|
cp b
|
|
|
|
jr nz, .asm_113d39
|
|
|
|
pop hl
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_113d43
|
|
|
|
ld a, $0
|
|
|
|
ld [hl], a
|
2013-10-01 22:11:54 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113d47:
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $1a
|
|
|
|
jr c, .asm_113d5a
|
|
|
|
cp $34
|
|
|
|
jr c, .asm_113d5d
|
|
|
|
cp $3e
|
|
|
|
jr c, .asm_113d60
|
|
|
|
cp $3e
|
|
|
|
jr z, .asm_113d63
|
|
|
|
ld a, $2f
|
2013-10-01 22:11:54 -07:00
|
|
|
ret
|
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_113d5a
|
|
|
|
add $41
|
2013-10-01 22:11:54 -07:00
|
|
|
ret
|
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_113d5d
|
|
|
|
add $47
|
2013-10-01 22:11:54 -07:00
|
|
|
ret
|
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_113d60
|
|
|
|
sub $4
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_113d63
|
|
|
|
ld a, $2b
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113d66:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 201], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 202], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, e
|
|
|
|
ld b, d
|
|
|
|
ld e, l
|
|
|
|
ld d, h
|
|
|
|
ld l, c
|
|
|
|
ld h, b
|
|
|
|
.asm_113d74
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 202]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jr nz, .asm_113d82
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 201]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $4
|
|
|
|
jp c, .asm_113e26
|
|
|
|
|
|
|
|
.asm_113d82
|
|
|
|
ld b, $4
|
|
|
|
push hl
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer + 203
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_113d88
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
2022-09-14 17:49:58 -07:00
|
|
|
call .decodeBase64Character
|
2014-04-29 19:59:39 -07:00
|
|
|
ld [hli], a
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_113d88
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 201]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld c, a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 202]
|
2013-10-01 22:11:54 -07:00
|
|
|
ld b, a
|
2015-07-20 19:18:18 -07:00
|
|
|
rept 4
|
2014-04-29 19:59:39 -07:00
|
|
|
dec bc
|
2015-07-20 19:18:18 -07:00
|
|
|
endr
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, b
|
2014-04-29 19:59:39 -07:00
|
|
|
or c
|
|
|
|
jr z, .asm_113dae
|
|
|
|
.asm_113da1
|
|
|
|
ld a, [de]
|
|
|
|
cp $d
|
|
|
|
jr z, .asm_113daa
|
|
|
|
cp $a
|
|
|
|
jr nz, .asm_113dae
|
|
|
|
|
|
|
|
.asm_113daa
|
|
|
|
inc de
|
|
|
|
dec bc
|
|
|
|
jr .asm_113da1
|
|
|
|
|
|
|
|
.asm_113dae
|
|
|
|
ld a, c
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 201], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, b
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer + 202], a
|
2014-04-29 19:59:39 -07:00
|
|
|
push de
|
|
|
|
dec hl
|
|
|
|
ld d, [hl]
|
|
|
|
dec hl
|
|
|
|
ld c, [hl]
|
|
|
|
dec hl
|
|
|
|
ld b, [hl]
|
|
|
|
dec hl
|
|
|
|
ld a, [hl]
|
|
|
|
sla b
|
|
|
|
sla b
|
|
|
|
sla b
|
|
|
|
rla
|
|
|
|
sla b
|
|
|
|
rla
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], b
|
|
|
|
inc hl
|
|
|
|
rrc c
|
|
|
|
rrc c
|
|
|
|
ld [hl], c
|
|
|
|
dec hl
|
|
|
|
ld a, $f
|
|
|
|
and c
|
|
|
|
or [hl]
|
|
|
|
ld [hli], a
|
|
|
|
ld a, [hli]
|
|
|
|
and $c0
|
|
|
|
or [hl]
|
|
|
|
dec hl
|
|
|
|
ld [hld], a
|
|
|
|
dec hl
|
|
|
|
pop de
|
|
|
|
ld b, h
|
|
|
|
ld c, l
|
|
|
|
pop hl
|
|
|
|
ld a, [bc]
|
|
|
|
ld [hli], a
|
|
|
|
inc bc
|
|
|
|
ld a, [bc]
|
|
|
|
ld [hli], a
|
|
|
|
inc bc
|
|
|
|
ld a, [bc]
|
|
|
|
ld [hli], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 201]
|
2013-10-01 22:11:54 -07:00
|
|
|
or a
|
2014-04-29 19:59:39 -07:00
|
|
|
jr nz, .asm_113d74
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wMobileSDK_PacketBuffer + 202]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
|
|
|
jp nz, .asm_113d74
|
|
|
|
xor a
|
|
|
|
ld [hl], a
|
2013-10-01 22:11:54 -07:00
|
|
|
ret
|
2014-04-29 19:59:39 -07:00
|
|
|
|
2022-09-14 17:49:58 -07:00
|
|
|
.decodeBase64Character:
|
|
|
|
cp "+"
|
2014-04-29 19:59:39 -07:00
|
|
|
jr c, .asm_113e24
|
|
|
|
jr z, .asm_113e31
|
2022-09-14 17:49:58 -07:00
|
|
|
cp "/"
|
2014-04-29 19:59:39 -07:00
|
|
|
jr c, .asm_113e24
|
|
|
|
jr z, .asm_113e34
|
2022-09-14 17:49:58 -07:00
|
|
|
cp "0"
|
2014-04-29 19:59:39 -07:00
|
|
|
jr c, .asm_113e24
|
2022-09-14 17:49:58 -07:00
|
|
|
cp "9" + 1
|
2014-04-29 19:59:39 -07:00
|
|
|
jr c, .asm_113e37
|
2022-09-14 17:49:58 -07:00
|
|
|
cp "="
|
2014-04-29 19:59:39 -07:00
|
|
|
jr c, .asm_113e24
|
|
|
|
jr z, .asm_113e3a
|
2022-09-14 17:49:58 -07:00
|
|
|
cp "A"
|
2014-04-29 19:59:39 -07:00
|
|
|
jr c, .asm_113e24
|
2022-09-14 17:49:58 -07:00
|
|
|
cp "Z" + 1
|
2014-04-29 19:59:39 -07:00
|
|
|
jr c, .asm_113e3c
|
2022-09-14 17:49:58 -07:00
|
|
|
cp "a"
|
2014-04-29 19:59:39 -07:00
|
|
|
jr c, .asm_113e24
|
2022-09-14 17:49:58 -07:00
|
|
|
cp "z" + 1
|
2014-04-29 19:59:39 -07:00
|
|
|
jr c, .asm_113e3f
|
|
|
|
|
|
|
|
.asm_113e24
|
|
|
|
pop hl
|
|
|
|
pop hl
|
|
|
|
.asm_113e26
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc821
|
2013-10-01 22:11:54 -07:00
|
|
|
set 1, [hl]
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $20
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc80f], a
|
2013-10-01 22:11:54 -07:00
|
|
|
ret
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_113e31
|
|
|
|
ld a, $3e
|
2013-10-01 22:11:54 -07:00
|
|
|
ret
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_113e34
|
|
|
|
ld a, $3f
|
2013-10-01 22:11:54 -07:00
|
|
|
ret
|
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_113e37
|
|
|
|
add $4
|
2013-10-01 22:11:54 -07:00
|
|
|
ret
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_113e3a
|
|
|
|
xor a
|
2013-10-01 22:11:54 -07:00
|
|
|
ret
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_113e3c
|
|
|
|
sub $41
|
2013-10-01 22:11:54 -07:00
|
|
|
ret
|
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_113e3f
|
|
|
|
sub $47
|
2013-10-01 22:11:54 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113e42:
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
jr z, .asm_113e4f
|
|
|
|
dec a
|
|
|
|
jr z, .asm_113e85
|
|
|
|
dec a
|
|
|
|
jr z, .asm_113ea8
|
|
|
|
dec a
|
|
|
|
jr z, .asm_113eb0
|
|
|
|
ret
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_113e4f
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc807]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $8
|
|
|
|
jr nz, .asm_113e58
|
|
|
|
.asm_113e56
|
|
|
|
dec [hl]
|
2013-10-01 22:11:54 -07:00
|
|
|
ret
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_113e58
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86d], a
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
|
|
|
ld hl, wc821
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, [hl]
|
2014-04-29 19:59:39 -07:00
|
|
|
and $10
|
|
|
|
set 5, a
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hl], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp Function113eb8
|
|
|
|
|
|
|
|
.asm_113e6d
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc86d]
|
2014-04-29 19:59:39 -07:00
|
|
|
or a
|
2019-10-20 15:27:34 -07:00
|
|
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
2014-04-29 19:59:39 -07:00
|
|
|
jr z, .asm_113e81
|
|
|
|
cp $9f
|
|
|
|
jr z, .asm_113e85
|
|
|
|
cp $a4
|
|
|
|
jr z, .asm_113e85
|
|
|
|
.asm_113e7e
|
|
|
|
jp Function112430
|
|
|
|
|
|
|
|
.asm_113e81
|
|
|
|
cp $a3
|
|
|
|
jr z, .asm_113e7e
|
|
|
|
|
|
|
|
.asm_113e85
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86d], a
|
2019-08-22 08:31:45 -07:00
|
|
|
ld [wMobileSDK_SendCommandID], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $2
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, $3
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc807], a
|
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hl]
|
|
|
|
and $10
|
|
|
|
set 5, a
|
|
|
|
ld [hl], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
bit 0, [hl]
|
|
|
|
call z, Function111f97
|
2013-10-01 22:11:54 -07:00
|
|
|
ret
|
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_113ea8
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc807]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $8
|
|
|
|
jr z, .asm_113e56
|
2013-10-01 22:11:54 -07:00
|
|
|
ret
|
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_113eb0
|
|
|
|
ld a, $1
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
jp .asm_113e6d
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113eb8:
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $ff
|
2019-08-22 08:31:45 -07:00
|
|
|
ld [wMobileSDK_SendCommandID], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
res 5, [hl]
|
|
|
|
res 0, [hl]
|
|
|
|
jp Function111f97
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2020-06-21 13:27:43 -07:00
|
|
|
Function113ec7: ; unreferenced
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2013-10-01 22:11:54 -07:00
|
|
|
ld a, [hl]
|
2014-04-29 19:59:39 -07:00
|
|
|
push af
|
|
|
|
res 3, [hl]
|
|
|
|
res 0, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc81a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld e, a
|
|
|
|
ld a, [hli]
|
|
|
|
ld d, a
|
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
inc hl
|
2016-05-04 08:46:23 -07:00
|
|
|
inc hl
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hld]
|
|
|
|
dec hl
|
|
|
|
xor $80
|
2019-08-22 08:31:45 -07:00
|
|
|
ld [wMobileSDK_SendCommandID], a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld b, $5
|
2019-10-20 15:27:34 -07:00
|
|
|
call PacketSendBytes
|
2014-04-29 19:59:39 -07:00
|
|
|
pop af
|
|
|
|
bit 0, a
|
|
|
|
ret z
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
set 0, [hl]
|
2013-10-01 22:11:54 -07:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113ef2:
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
jr z, .asm_113efa
|
|
|
|
dec a
|
|
|
|
jr z, .asm_113f03
|
|
|
|
dec [hl]
|
|
|
|
ret
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_113efa
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc807]
|
2013-10-01 22:11:54 -07:00
|
|
|
cp $8
|
2014-04-29 19:59:39 -07:00
|
|
|
jr nz, Function113eb8
|
|
|
|
dec [hl]
|
2013-10-01 22:11:54 -07:00
|
|
|
ret
|
2014-04-29 19:59:39 -07:00
|
|
|
|
|
|
|
.asm_113f03
|
|
|
|
ld a, $26
|
|
|
|
call Function11225d
|
|
|
|
ld a, $2a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86a], a
|
|
|
|
ld hl, wc820
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hld]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ld e, l
|
|
|
|
ld d, h
|
|
|
|
add hl, de
|
2016-05-04 08:46:23 -07:00
|
|
|
add hl, de
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, l
|
|
|
|
ld d, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc815
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
|
|
|
ld [hl], a
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc800], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, $2
|
|
|
|
ld [hli], a
|
|
|
|
dec a
|
2013-10-01 22:11:54 -07:00
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function113f2d:
|
2014-04-29 19:59:39 -07:00
|
|
|
dec a
|
|
|
|
jr z, .asm_113f35
|
|
|
|
dec a
|
|
|
|
jr z, .asm_113f4f
|
|
|
|
dec [hl]
|
|
|
|
ret
|
2013-10-01 22:11:54 -07:00
|
|
|
|
2014-04-29 19:59:39 -07:00
|
|
|
.asm_113f35
|
2021-09-05 09:47:24 -07:00
|
|
|
ld a, [wc807]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $8
|
|
|
|
jr nz, .asm_113f3e
|
|
|
|
dec [hl]
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_113f3e
|
|
|
|
xor a
|
2019-10-20 15:27:34 -07:00
|
|
|
ld [wMobileSDK_ReceivePacketBuffer], a
|
|
|
|
ld [wMobileSDK_ReceivePacketBufferAlt], a
|
2019-08-22 08:31:45 -07:00
|
|
|
ld a, [wMobileSDK_SendCommandID]
|
2014-04-29 19:59:39 -07:00
|
|
|
cp $91
|
|
|
|
jr z, .asm_113f4f
|
|
|
|
jp Function113eb8
|
|
|
|
|
|
|
|
.asm_113f4f
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc86d], a
|
|
|
|
ld hl, wc821
|
2014-04-29 19:59:39 -07:00
|
|
|
set 0, [hl]
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc822
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
ld [hl], a
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc80b], a
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld [wMobileSDK_PacketBuffer], a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc820
|
2014-04-29 19:59:39 -07:00
|
|
|
ld a, [hld]
|
2013-10-01 22:11:54 -07:00
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, l
|
|
|
|
ld d, h
|
|
|
|
add hl, de
|
2016-05-04 08:46:23 -07:00
|
|
|
add hl, de
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, l
|
|
|
|
ld d, h
|
2021-09-05 09:47:24 -07:00
|
|
|
ld hl, wc815
|
2014-04-29 19:59:39 -07:00
|
|
|
ld e, a
|
|
|
|
ld [hli], a
|
|
|
|
ld a, d
|
|
|
|
ld [hl], a
|
|
|
|
xor a
|
2021-09-05 09:47:24 -07:00
|
|
|
ld [wc800], a
|
2019-08-22 05:41:17 -07:00
|
|
|
ld hl, wMobileSDK_PacketBuffer
|
2014-04-29 19:59:39 -07:00
|
|
|
xor a
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
ld [hl], a
|
2013-10-01 22:11:54 -07:00
|
|
|
ret
|