1@echo off
2
3:: ##############################################################################
4:: #
5:: # Copyright (C) 2009-2013 Nintendo.  All rights reserved.
6:: #
7:: # These coded instructions, statements, and computer programs contain
8:: # proprietary information of Nintendo of America Inc. and/or Nintendo
9:: # Company Ltd., and are protected by Federal copyright law.  They may
10:: # not be disclosed to third parties or copied or duplicated in any form,
11:: # in whole or in part, without the prior written consent of Nintendo.
12:: #
13:: ##############################################################################
14
15:: ##############################################################################
16:: # setbootmode.bat
17:: #
18:: # This script enables a CAT_DEV to boot from PCFS or NAND.
19:: #   setbootmode.bat PCFS|NAND
20:: #
21:: ##############################################################################
22
23set ARGS=
24set MODE=
25
26:scan_args
27
28if "%1"=="" goto args_end
29
30if "%1"=="-noreflash" (
31    set ARGS=%ARGS% -noreflash
32) else if "%1"=="-production" (
33    set ARGS=%ARGS% -production
34) else if "%1"=="-quick" (
35    set ARGS=%ARGS% -quick
36) else if "%1"=="-Q" (
37    set ARGS=%ARGS% -quick
38) else if "%1"=="-h" (
39    set ARGS=%ARGS% -h
40) else (
41    set MODE=%1
42)
43
44shift
45goto scan_args
46
47:args_end
48
49cafex setbootmode %ARGS% %MODE%
50
51if "%errorlevel%"=="0" (
52    set CAFE_BOOT_MODE=%MODE%
53)
54
55set MODE=
56set ARGS=
57