shithub: pokecrystal

Download patch

ref: b7770e5f885e8cdefb7fd7b8985aa1278bd6b0d9
parent: e68da6e717f1acaca0423e3db0f6013d92864d87
author: mid-kid <esteve.varela@gmail.com>
date: Thu Aug 22 13:31:45 EDT 2019

Add more error message translations

Thanks to melonjaywalk#5480

--- a/lib/mobile/main.asm
+++ b/lib/mobile/main.asm
@@ -773,7 +773,7 @@
 
 Function1104b0:
 	xor a
-	ld [$c81e], a
+	ld [wMobileSDK_SendCommandID], a
 	call Function110393
 	xor a
 	ld [$c86b], a
@@ -799,7 +799,7 @@
 	ld a, $2
 	ld [$c86b], a
 	ld a, $a2
-	ld [$c81e], a
+	ld [wMobileSDK_SendCommandID], a
 	ld de, MobilePacket_ISPLogout.End - MobilePacket_ISPLogout
 	ld hl, MobilePacket_ISPLogout
 	ld b, $5
@@ -860,7 +860,7 @@
 	ld b, c
 	call Function111f63
 	ld a, $95
-	ld [$c81e], a
+	ld [wMobileSDK_SendCommandID], a
 	ld hl, wMobileSDK_PacketBuffer
 	ld b, $5
 	call MobileSDK_SendBytes
@@ -1040,7 +1040,7 @@
 .asm_1106ac
 	ld hl, wMobileSDK_PacketBuffer
 	ld a, $a8
-	ld [$c81e], a
+	ld [wMobileSDK_SendCommandID], a
 	ld b, $5
 	call MobileSDK_SendBytes
 	ld a, $f
@@ -1203,7 +1203,7 @@
 	ld b, c
 	call Function111f63
 	ld a, $95
-	ld [$c81e], a
+	ld [wMobileSDK_SendCommandID], a
 	ld hl, $cb53
 	ld d, $0
 	ld e, c
@@ -1277,7 +1277,7 @@
 	ld b, c
 	call Function111f63
 	ld a, $95
-	ld [$c81e], a
+	ld [wMobileSDK_SendCommandID], a
 	ld de, $0011
 	ld hl, $cbdd
 	ld b, $5
@@ -1331,7 +1331,7 @@
 	ld b, c
 	call Function111f63
 	ld a, $95
-	ld [$c81e], a
+	ld [wMobileSDK_SendCommandID], a
 	ld hl, wMobileSDK_PacketBuffer
 	ld b, $5
 	call MobileSDK_SendBytes
@@ -1450,7 +1450,7 @@
 	ld b, c
 	call Function111f63
 	ld a, $95
-	ld [$c81e], a
+	ld [wMobileSDK_SendCommandID], a
 	ld hl, wMobileSDK_PacketBuffer
 	ld b, $5
 	call MobileSDK_SendBytes
@@ -1495,7 +1495,7 @@
 	ld b, c
 	call Function111f63
 	ld a, $95
-	ld [$c81e], a
+	ld [wMobileSDK_SendCommandID], a
 	ld hl, wMobileSDK_PacketBuffer
 	ld b, $5
 	call MobileSDK_SendBytes
@@ -1579,7 +1579,7 @@
 	ld b, c
 	call Function111f63
 	ld a, $95
-	ld [$c81e], a
+	ld [wMobileSDK_SendCommandID], a
 	ld hl, wMobileSDK_PacketBuffer
 	ld b, $5
 	call MobileSDK_SendBytes
@@ -1711,7 +1711,7 @@
 	ld [$c86b], a
 	ld de, $000b
 	ld a, $95
-	ld [$c81e], a
+	ld [wMobileSDK_SendCommandID], a
 	ld hl, $cbc7
 	ld b, $5
 	jp MobileSDK_SendBytes
@@ -1835,7 +1835,7 @@
 	ld b, c
 	call Function111f63
 	ld a, $95
-	ld [$c81e], a
+	ld [wMobileSDK_SendCommandID], a
 	ld hl, wMobileSDK_PacketBuffer
 	ld b, $5
 	call MobileSDK_SendBytes
@@ -1919,7 +1919,7 @@
 	ld b, c
 	call Function111f63
 	ld a, $95
-	ld [$c81e], a
+	ld [wMobileSDK_SendCommandID], a
 	ld hl, wMobileSDK_PacketBuffer
 	ld b, $5
 	call MobileSDK_SendBytes
@@ -2298,7 +2298,7 @@
 	ld [$c86b], a
 	ld de, wMobileSDK_PacketBuffer
 	ld hl, MobilePacket_OpenTCPConnection
-	ld b, MobilePacket_OpenTCPConnection.End - MobilePacket_OpenTCPConnection
+	ld b, $6
 	call MobileSDK_CopyBytes
 	ld hl, $c866
 	ld b, $4
@@ -2342,7 +2342,7 @@
 	ld de, $0010
 	ld hl, wMobileSDK_PacketBuffer
 	ld a, $a3
-	ld [$c81e], a
+	ld [wMobileSDK_SendCommandID], a
 	ld b, $5
 	call MobileSDK_SendBytes
 	ld a, $f
@@ -2494,7 +2494,7 @@
 	jr z, .asm_111144
 	ld de, $000b
 	ld a, $95
-	ld [$c81e], a
+	ld [wMobileSDK_SendCommandID], a
 	ld hl, wMobileSDK_PacketBuffer
 	ld b, $5
 	call MobileSDK_SendBytes
@@ -3272,7 +3272,7 @@
 	jr Function1115e4
 
 .asm_1115af
-	ld a, [$c81e]
+	ld a, [wMobileSDK_SendCommandID]
 	cp $92
 	jr nz, .asm_1115dd
 	ld a, $2a
@@ -3394,7 +3394,7 @@
 	ld e, a
 	ld a, [hli]
 	ld d, a
-	ld a, [$c81e]
+	ld a, [wMobileSDK_SendCommandID]
 	cp $ff
 	jr z, .asm_111679
 	ld a, [$c822]
@@ -3482,7 +3482,7 @@
 	ld a, $8
 	cp l
 	jp nz, Function1118bc
-	ld a, [$c81e]
+	ld a, [wMobileSDK_SendCommandID]
 	cp $ff
 	jr z, .asm_111716
 	ld a, $f2
@@ -3501,7 +3501,7 @@
 	or a
 	jr z, .asm_111778
 .asm_111716
-	ld a, [$c81e]
+	ld a, [wMobileSDK_SendCommandID]
 	cp $ff
 	jr z, .asm_111730
 	cp $ee
@@ -3539,7 +3539,7 @@
 	ld a, $b
 	jr .asm_111774
 .asm_111757
-	ld a, [$c81e]
+	ld a, [wMobileSDK_SendCommandID]
 	cp $ff
 	jr z, .asm_11176e
 	cp $92
@@ -3903,7 +3903,7 @@
 	ld e, a
 	ld d, $0
 	ld a, $95
-	ld [$c81e], a
+	ld [wMobileSDK_SendCommandID], a
 	ld hl, wMobileSDK_PacketBuffer
 	ld b, $5
 	call MobileSDK_SendBytes
@@ -3920,7 +3920,7 @@
 
 Function1119f0:
 	ld a, $90
-	ld [$c81e], a
+	ld [wMobileSDK_SendCommandID], a
 	ld [$c808], a
 	ld b, $5
 	ld de, MobilePacket_BeginSession.End - MobilePacket_BeginSession
@@ -4135,7 +4135,7 @@
 	push hl
 	cp $ee
 	jp z, Function111e2b
-	ld a, [$c81e]
+	ld a, [wMobileSDK_SendCommandID]
 	cp $ff
 	jp z, Function111ef8
 	cp $95
@@ -4547,7 +4547,7 @@
 	jp Function110029
 
 Function111e2b:
-	ld a, [$c81e]
+	ld a, [wMobileSDK_SendCommandID]
 	cp $ff
 	jp z, Function111ef8
 	ld a, [$c86a]
@@ -4670,7 +4670,7 @@
 	ld de, 10
 
 Function111f02:
-	ld [$c81e], a
+	ld [wMobileSDK_SendCommandID], a
 	ld b, $5
 
 MobileSDK_SendBytes:
@@ -4690,7 +4690,7 @@
 	and 1 << rSC_ON
 	jr nz, .asm_111f17
 	di
-	ld a, [$c81e]
+	ld a, [wMobileSDK_SendCommandID]
 	cp $ff
 	jr z, .asm_111f35
 	ld a, l
@@ -4804,7 +4804,7 @@
 	ret
 .asm_111fcd
 	ld b, $5
-	ld hl, $c81e
+	ld hl, wMobileSDK_SendCommandID
 	ld a, [hl]
 	cp $ff
 	jr z, .asm_111fe9
@@ -9339,7 +9339,7 @@
 .asm_113e85
 	xor a
 	ld [$c86d], a
-	ld [$c81e], a
+	ld [wMobileSDK_SendCommandID], a
 	ld a, $2
 	ld [$c86a], a
 	ld a, $3
@@ -9367,7 +9367,7 @@
 
 Function113eb8:
 	ld a, $ff
-	ld [$c81e], a
+	ld [wMobileSDK_SendCommandID], a
 	ld hl, $c822
 	res 5, [hl]
 	res 0, [hl]
@@ -9392,7 +9392,7 @@
 	ld a, [hld]
 	dec hl
 	xor $80
-	ld [$c81e], a
+	ld [wMobileSDK_SendCommandID], a
 	ld b, $5
 	call MobileSDK_SendBytes
 	pop af
@@ -9465,7 +9465,7 @@
 	xor a
 	ld [$ca3c], a
 	ld [$ca2f], a
-	ld a, [$c81e]
+	ld a, [wMobileSDK_SendCommandID]
 	cp $91
 	jr z, .asm_113f4f
 	jp Function113eb8
--- a/mobile/mobile_5f.asm
+++ b/mobile/mobile_5f.asm
@@ -4879,6 +4879,8 @@
 
 MobileErrorCode_11_000_Text:
 MobileErrorCode_13_000_Text:
+; Could not connect because either the phone cannot make the call, or the telephone line is busy.
+; Please wait for a while and call again.
 	db   "でんわが うまく かけられないか"
 	next "でんわかいせんが こんでいるので"
 	next "つうしん できません"
@@ -4913,7 +4915,7 @@
 MobileErrorCode_CommuncationErrorText:
 ; Communication error.
 ; Please wait a moment, and then try again.
-; If the issue persists, please contact the mobile support center.
+; If the issue persists, please contact the Mobile Support Center.
 	db   "つうしんエラーです"
 	next "しばらく まって"
 	next "かけなおして ください"
@@ -4923,6 +4925,8 @@
 	db   "@"
 
 MobileErrorCode_22_000_Text:
+; There is a mistake either with the login password, or the login ID.
+; Please confirm the password, wait for a while, and try again.
 	db   "ログインパスワードか"
 	next "ログイン アイディーに"
 	next "まちがいがあります"
@@ -4932,6 +4936,8 @@
 	db   "@"
 
 MobileErrorCode_23_000_Text:
+; The call was ended.
+; Please see the instruction manual, wait a moment, and try again.
 	db   "でんわが きれました"
 	next "とりあつかいせつめいしょを"
 	next "ごらんのうえ"
@@ -4960,6 +4966,9 @@
 	db   "@"
 
 MobileErrorCode_32_503_Text:
+; Could not connect because the Mobile Center is busy.
+; Please wait a moment and try again.
+; For details, please see the instruction manual.
 	db   "モバイルセンターが"
 	next "こんでいて つながりません"
 	next "しばらくまって"
@@ -4981,6 +4990,8 @@
 	db   "@"
 
 MobileErrorCode_31_002_Text:
+; There is a mistake with the email address.
+; Please see the instruction manual, and use the Mobile Trainer to repeat the initial registration (process).
 	db   "メールアドレスに"
 	next "まちがいが あります"
 	next "とりあつかいせつめいしょを"
@@ -4991,6 +5002,8 @@
 
 MobileErrorCode_31_003_Text:
 MobileErrorCode_33_201_Text:
+; There is either an error with the login password, or an error with the Mobile Center.
+; Please confirm the password, wait a moment, and then try again.
 	db   "ログインパスワードに"
 	next "まちがいが あるか"
 	next "モバイルセンターの エラーです"
@@ -5001,6 +5014,9 @@
 
 MobileErrorCode_32_403_Text:
 MobileErrorCode_32_404_Text:
+; Cannot read data.
+; Please wait a moment, and then try again.
+; If the issue persists, please contact the Mobile Support Center.
 	db   "データの よみこみが できません"
 	next "しばらくまって"
 	next "かけなおして ください"
@@ -5011,6 +5027,10 @@
 
 MobileErrorCode_26_000_Text:
 MobileErrorCode_32_408_Text:
+; Out of time.
+; The call was ended.
+; Please try again.
+; For details, please see the instruction manual.
 	db   "じかんぎれです"
 	next "でんわが きれました"
 	next "でんわを かけなおしてください"
@@ -5019,6 +5039,8 @@
 	db   "@"
 
 MobileErrorCode_33_101_Text:
+; The service cannot be used if payments for usage fees are late.
+; For details, please see the instruction manual.
 	db   "ごりよう りょうきんの "
 	next "おしはらいが おくれたばあいには"
 	next "ごりようが できなくなります"
@@ -5028,6 +5050,8 @@
 
 MobileErrorCode_33_102_Text:
 MobileErrorCode_33_299_Text:
+; Your access to this service has been restricted. Service cannot be used.
+; For details, please see the instruction manual.
 	db   "おきゃくさまの ごつごうにより"
 	next "ごりようできません"
 	next "くわしくは とりあつかい"
@@ -5045,6 +5069,8 @@
 	db   "@"
 
 MobileErrorCode_33_103_Text:
+; Service cannot be used this month because usage fees have exceeded conditions.
+; For details, please see the instruction manual.
 	db   "ごりよう りょうきんが"
 	next "じょうげんを こえているため"
 	next "こんげつは ごりようできません"
@@ -5053,6 +5079,8 @@
 	db   "@"
 
 MobileErrorCode_33_106_Text:
+; Cannot communicate because the Mobile Center is currently undergoing maintenance.
+; Please wait a moment, then try again.
 	db   "げんざい モバイルセンターの"
 	next "てんけんを しているので"
 	next "つうしんが できません"
@@ -5065,6 +5093,8 @@
 MobileErrorCode_33_203_Text:
 MobileErrorCode_33_206_Text:
 MobileErrorCode_101_004_Text:
+; Cannot read data.
+; For details, please see the instruction manual.
 	db   "データの よみこみが できません"
 	next "くわしくは とりあつかい"
 	next "せつめいしょを ごらんください"
@@ -5071,6 +5101,7 @@
 	db   "@"
 
 MobileErrorCode_101_006_Text:
+; Call ended because more than 3 minutes elapsed with no input.
 	db   "3ぷん いじょう なにも"
 	next "にゅうりょく しなかったので"
 	next "でんわが きれました"
@@ -5078,6 +5109,8 @@
 
 MobileErrorCode_101_001_Text:
 MobileErrorCode_101_002_Text:
+; Could not connect properly.
+; Please try again from the beginning (of the process).
 	db   "つうしんが うまく"
 	next "できませんでした"
 	next "もういちど はじめから"
@@ -5087,6 +5120,9 @@
 MobileErrorCode_101_003_Text:
 MobileErrorCode_101_008_Text:
 MobileErrorCode_101_009_Text:
+; Cannot read data.
+; Please wait a moment, then try again.
+; If the issue persists, please contact the Mobile Support Center.
 	db   "データの よみこみが できません"
 	next "しばらくまって"
 	next "かけなおして ください"
@@ -5096,11 +5132,14 @@
 	db   "@"
 
 MobileErrorCode_101_007_Text:
+; Call ended due to long waiting time.
 	db   "まちじかんが ながいので"
 	next "でんわが きれました"
 	db   "@"
 
 MobileErrorCode_101_005_Text:
+; (Your adapter's) type differs from the other user’s Mobile Adapter.
+; For details, please see the instruction manual.
 	db   "あいての モバイルアダプタと"
 	next "タイプが ちがいます"
 	next "くわしくは とりあつかい"
@@ -5108,6 +5147,8 @@
 	db   "@"
 
 String_17fe9a: ; unused
+; Cannot send your save data because Pokémon News is being updated.
+; Please send your save data after loading new Pokémon News.
 	db   "ポケモンニュースが"
 	next "あたらしくなっているので"
 	next "レポートを おくれません"
@@ -5116,6 +5157,8 @@
 	db   "@"
 
 MobileErrorCode_101_000_Text:
+; Either bad communication status, or the other user called was the incorrect user.
+; Please confirm and try again.
 	db   "つうしんの じょうきょうが"
 	next "よくないか かけるあいてが"
 	next "まちがっています"
--- a/wram.asm
+++ b/wram.asm
@@ -1044,7 +1044,9 @@
 wc812:: ds 1
 wc813:: ds 1
 wc814:: ds 4
-wc818:: ds 8
+wc818:: ds 6
+wMobileSDK_SendCommandID:: db ; c81e
+	ds 1
 wc820:: ds 1
 wc821:: ds 47