

Nintendo DSI Shop reverse-engineering notes
source link: https://gist.github.com/jaames/daa7c92ae97d5de446cf87605abd5f55
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

ECommerceInterface
This API provides access to information and features related to ecommerce. Such as providing a list of installed titles, etc
Setup
First it's necessary to create an instance of the ECommerceInterface
class, the instance is used to interact with the API.
Nintendo create a single instance and store it globally as ec
:
var ec = new ECommerceInterface();
Methods
getSessionValue(key)
setSessionValue(key, value)
getDeviceInfo()
Returns an object with
country
region
isParentalControlEnabled
userAge
language
accountId
deviceId
serial
getTitleInfos()
Returns a title list object containing details for every installed title. This function is slow, so it should only be called once and then be cached. The title list object can be iterated through like so:
var titleList = ec.getTitleInfos()
if (typeof(titleList) === "object") {
// loop through title list
for (i = 0; i < titleList.length; ++i) {
// get title item by index
var title = titleList.get(i);
// get title ID
var titleId = title.titleId;
// etc
}
}
DSi shop filters out some results from this. It will only show titles that follow some specific rules:
- The title ID must begin with
0001
(a Nintendo Partner ID) or0003
. - The title ID cannot begin with
00010005
; these are data titles. - The title must have a personalised ticket; the
deviceId
value returned bygetTicketInfos(titleId)
cannot be0
.
getTicketInfos(titleId)
setWebSvcUrls(ecsUrl, iasUrl)
Set the SOAP endpoint urls for e-commerce and identity authentication.
In DSi Shop, ecsUrl = https://ecs.t.shop.nintendowifi.net/ecs/services/ECommerceSOAP
and iasUrl = https://ias.t.shop.nintendowifi.net/ias/services/IdentityAuthenticationSOAP
setContentUrls(ccsUrl, ucsUrl)
In DSi Shop, ccsUrl = http://ccs.cdn.t.shop.nintendowifi.net/ccs/download
and ucsUrl = https://ccs.t.shop.nintendowifi.net/ccs/download
getProgress()
cancelOperation()
checkDeviceStatus()
refreshCachedBalance()
checkParentalControlPassword(password)
getWeakToken()
getDeviceInfo()
Returns object with:
country
region
isParentalControlEnabled
userAge
language
accountId
deviceId
serial
ECTimeout
Unsure what this timeout does exactly, its constructor takes an integer value eg var timeout = new ECTimeout(60000)
Kong API
DSi Shop also provides a general JavaScript interface via the Kong
API, this API includes things such as page transitions, playing sound effects, detecting button input and some other neat features.
First it's necessary to create an instance of the Kong
constructor (a reference to Donkey Kong, I suppose?), the instance is used to interact with the API.
Nintendo create a single instance and store it globally as gkong
(probably short for "global kong"), so we'll be doing the same:
var gkong = new Kong;
Now the following methods will be available on gkong
:
Methods
Restart
ReturnToMenu
SetUpUrl
Load a URL with the top screen window
SetDownUrl
Load a URL with the bottom screen window
PlaySe
var TWL_SHOP_SE_ONMOUSEDOWN = 16; // #define TWL_CMN_SE_TOUCH 16 // 16 // 20
var TWL_SHOP_SE_ONCLICK = 17; // #define TWL_CMN_SE_DECIDE 17 // 17 // 19
var TWL_SHOP_SE_TRANSIT = 37; // #define TWL_SHP_SE_LOADED 37 // 35 // 17
var TWL_SHOP_SE_INVALID = 23; // #define TWL_CMN_SE_INVALID 23 // 23 // NEW
var TWL_SHOP_SE_WARNING = 36; // #define TWL_SHP_SE_WARNING_PAGE 36 // 34 // NEW
SetTransition
first arg is upper screen transition, second arg is lower screen
//----------------------------------------
//-- define : wipe animation types of transition (see Kong::SetTransition)
var WIPE_ANIM_NONE = 0;
var WIPE_ANIM_TRANS = 1;
var WIPE_ANIM_TRANS_LEFT = 2;
var WIPE_ANIM_TRANS_RIGHT = 3;
var WIPE_ANIM_LEFT = 4;
var WIPE_ANIM_RIGHT = 5;
var WIPE_ANIM_DOWN = 6;
var WIPE_ANIM_UP = 7;
var WIPE_ANIM_OVER_LEFT = 8;
var WIPE_ANIM_OVER_RIGHT = 9;
SetManualTransition
SetTransitionRangeOnce
StartManualTransition
GetMessage
var JMS_shop_error_title = 0;
var JMS_shop_error_code = 1;
var JMS_shop_menu = 2;
var JMS_shop_reset = 3;
var JMS_shop_ok = 4;
var JMS_shop_title = 5;
var JMS_shop_menu_02 = 6;
var JMS_shop_reset_02 = 7;
var JMS_shop_yes = 8;
var JMS_shop_no = 9;
GetErrorCode
GetErrorMessage
KbdActive
//----------------------------------------
//-- define : keyboard kinds & types of field (see Kong::KbdActive)
var KBD_KIND_TEN = 0;
var KBD_KIND_QWERTY = 1;
var KBD_KIND_NO_JAPANESE = 2;
var KBD_KIND_JAPANESE = 3;
var KBD_FIELD_NORMAL = 0;
var KBD_FIELD_4444 = 1;
ShowDialog
ShowClickEffect
takes x and y args
ShowLoadingIcon
HideLoadingIcon
ShowUpWindowScrollButton
ShowDownWindowScrollButton
takes 4 args
HideUpWindowScrollButton
HideDownWindowScrollButton
ShowProgressBar
UpdateProgressBar
IsProgressBarAnimFinished
HideProgressBar
StartRepeatScroll
StopRepeatScroll
LeftScroll
ScrollUpWindow
ScrollDownWindow
GetUpDocumentHeight
GetDownDocumentHeight
JumpToSystemUpdate
CreateSaveData
IsSaveDataCreating
FinishDownload
IsBatterySufficient
Recommend
-
113
Files Permalink Latest commit message...
-
165
dgiese/dustcloud master
-
77
Post with 371 views. Reverse engineering humor
-
67
README.md IDAConnect Overview IDAConnect is a collaborative reverse engineering plugin for IDA Pro and
-
250
README.md WhatsApp Web reverse engineered Introduction This project intends to provide a complete description and re-implementation of the WhatsApp Web API, which will eventually lead...
-
11
多视图立体几何PatchMatchStereo:DSI与Cost Volume ...
-
11
POSTED ON JUNE 21, 2021 TO Open Source Meet Kats — a one-stop shop for time series analysis
-
4
Nintendo Finally Acknowledges Wii And DSi Shop Outage
-
4
PrefacePermalink I am by no means a programming, or RE expert. But I’m going to have a go a...
-
6
I managed to exploit the Nintendo DSi browser 15 years after it was released in Japan. This post will go over the journey and the technical details. To see the exploit in action, check out the
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK