From 0dfff01149ca37721f081522a2f3c2466df5bb65 Mon Sep 17 00:00:00 2001 From: n2460 Date: Wed, 19 Oct 2011 00:47:45 +0000 Subject: [PATCH] =?UTF-8?q?TwlBkpImporterForWPS:TwlBkpImportWithPrivateSav?= =?UTF-8?q?e=20=E7=89=88=E3=81=AE=E8=BF=BD=E5=8A=A0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_test_tools@23 6b0af911-cb57-b745-895f-eec5701120e1 --- TwlBkpCheck/CTR/TwlBkpImporter/main.cpp | 6 ++- TwlBkpCheck/CTR/TwlBkpImporter/sdAccessor.cpp | 4 ++ .../CTR/TwlBkpImporterForWPS/OMakefile | 44 +++++++++++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 TwlBkpCheck/CTR/TwlBkpImporterForWPS/OMakefile diff --git a/TwlBkpCheck/CTR/TwlBkpImporter/main.cpp b/TwlBkpCheck/CTR/TwlBkpImporter/main.cpp index 41b9ddc..c7dc616 100644 --- a/TwlBkpCheck/CTR/TwlBkpImporter/main.cpp +++ b/TwlBkpCheck/CTR/TwlBkpImporter/main.cpp @@ -201,7 +201,11 @@ void Update(nn::hid::PadStatus& status) extern "C" void nnMain( void ) { - NN_LOG("DSiWare SD Card Export and Import Test\n"); +#ifndef TWL_BKP_WPS + NN_LOG("TwlBkpImpoerter.\n"); +#else + NN_LOG("TwlBkpImporterWithPrivateSave.\n"); +#endif TransitionHandler::Initialize(); // εˆζœŸεŒ– diff --git a/TwlBkpCheck/CTR/TwlBkpImporter/sdAccessor.cpp b/TwlBkpCheck/CTR/TwlBkpImporter/sdAccessor.cpp index f809a9c..34730b4 100644 --- a/TwlBkpCheck/CTR/TwlBkpImporter/sdAccessor.cpp +++ b/TwlBkpCheck/CTR/TwlBkpImporter/sdAccessor.cpp @@ -117,7 +117,11 @@ void SdAccessor::Import(u16 index,bit8* addrForAm) { std::wcscpy(mBinaryName, mFileName); std::wcscat(mBinaryName, mBinary.binaryType[index].directoryEntry.entryName); +#ifndef TWL_BKP_WITH_PRIVATE_SAVE mBinary.binaryType[index].result = nn::am::ImportTwlBackup(mBinaryName, addrForAm); +#else + mBinary.binaryType[index].result = nn::am::ImportTwlBackupWithPrivateSave(mBinaryName, addrForAm); +#endif if(mBinary.binaryType[index].result.GetPrintableBits() == CLEAR || mBinary.binaryType[index].result.GetPrintableBits() == CLEAR_INFO) { mBinary.binaryType[index].state = IMPORTED_CLEAR; diff --git a/TwlBkpCheck/CTR/TwlBkpImporterForWPS/OMakefile b/TwlBkpCheck/CTR/TwlBkpImporterForWPS/OMakefile new file mode 100644 index 0000000..3d5a11a --- /dev/null +++ b/TwlBkpCheck/CTR/TwlBkpImporterForWPS/OMakefile @@ -0,0 +1,44 @@ +#!/usr/bin/env omake +#---------------------------------------------------------------------------- +# Project: Horizon +# File: OMakefile +# +# Copyright (C)2009 Nintendo Co., Ltd. All rights reserved. +# +# These coded instructions, statements, and computer programs contain +# proprietary information of Nintendo of America Inc. and/or Nintendo +# Company Ltd., and are protected by Federal copyright law. They may +# not be disclosed to third parties or copied or duplicated in any form, +# in whole or in part, without the prior written consent of Nintendo. +# +# $Rev$ +#---------------------------------------------------------------------------- +SUPPORTED_TARGETS = CTR-T*.Process.MPCore.* + +# release ƒrƒ‹ƒh‚Ε‚Ν nn::dbg::xxx ‚ͺŽg—p‚Ε‚«‚Θ‚’‚½‚߁Arelease ‚Θ‚ηƒrƒ‹ƒh‚΅‚Θ‚’ +TARGET_BUILDTYPES = $(filter Development Debug, $(TARGET_BUILDTYPES)) + +SAMPLE_DEMOS_DIR = $(dir $(CTRSDK_ROOT)/../CTR/SampleDemos) +SAMPLE_DEMOS_COMMON_INCLUDE_DIR = $(dir $(SAMPLE_DEMOS_DIR)/common/include) +INCLUDES += $(SAMPLE_DEMOS_COMMON_INCLUDE_DIR) + +TWL_BKP_IMPORTER_DIR = ../TwlBkpImporter + +SOURCES[] = + $(TWL_BKP_IMPORTER_DIR)/main.cpp + $(TWL_BKP_IMPORTER_DIR)/draw.cpp + $(TWL_BKP_IMPORTER_DIR)/sdAccessor.cpp + $(TWL_BKP_IMPORTER_DIR)/window.cpp + +TARGET_PROGRAM = twlBkpImporterForWPS + +LIBS += libnn_am lib_demo lib_applet + +ROM_SPEC_FILE = $(TWL_BKP_IMPORTER_DIR)/twlBkpImporter.rsf +DESCRIPTOR = $(HORIZON_ROOT)/resources/specfiles/systemapplications/Mset.desc + +CCFLAGS += -DTWL_BKP_WITH_PRIVATE_SAVE + +include $(ROOT_OMAKE)/modulerules + +build: $(DEFAULT_TARGETS)