diff --git a/README.md b/README.md index 278b4e3..3121492 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,8 @@ Function | Args | Description | Output `clearscreen()` | - | clears the screen | returns 0 `setColor(string arg1)` | arg1: color string. Valid args: `RED`, `ORANGE`, `YELLOW`, `GREEN`, `BLUE`, `VIOLET`, `WHITE` | Changes the color of the text printed | returns 0 `if(int arg1)` | arg1: checks if interger is true or false (not 0 or 0) | Part of flow control. Runs code inside {} | returns 0 -`goto(jmp arg1)` | arg1: marker written as `?JUMP` | jumps to the marker specified | returns 0 +`goto(int location)` | location: interger aquired by `getLocation()` | jumps to the character offset specified | returns 0 +`getLocation()` | - | Returns the current script location, for use with `goto()` | returns > 0 `math(int arg1, string arg2, int arg3)` | arg1 "operator arg2" arg3. Valid operators (arg2s): `"+"`, `"-"`, `"*"`, `"/"` | Does a math operation and returns the result | returns the result of the math operation `check(int arg1, string arg2, int arg3)` | arg1 "operator arg2" arg3. Valid operators (arg2s): `"=="`, `"!="`, `">="`, `"<="`, `">"`, `"<"` | Does a check and returns the result. result is either 0 or 1 | returns 0 or 1 `invert(int arg1)` | - | makes non 0 integers a 0, and vise versa | returns 0 or 1 @@ -42,12 +43,11 @@ Function | Args | Description | Output ## Variables -TegraScript has 3 kinds of variables, @ints, $strings, and ?marks. +TegraScript has 2 kinds of variables, @ints, $strings. - You can define @ints by writing `@variable = setInt(0);` (or any function for that matter). - You can define $strings with the use of `setString();`, `setStringIndex();` and `combineStrings();`. -- You can define ?marks by using them as a command, so just `?variable;` will work. -You can use these variables in place of int, string or jmp inputs respectively, so for example `@b = setInt(@a)` or `setString($a, $b)` +You can use these variables in place of int or string inputs, so for example `@b = setInt(@a)` or `setString($a, $b)` Note though that the int variables can't be assigned negative values @@ -65,34 +65,43 @@ There are some built in variables: ## Flow control -You can use `if()`, `goto()`, `check()` and `math()` functions to control the flow of your program. Example: +You can use `if()`, `goto()` and `math()` functions to control the flow of your program. Example: ``` -@i = setInt(0); -?LOOP; -@check = check(@i, "<=", 10); -if (@check){ - @i = math(@i, "+", 1); - printInt(@i); - goto (?LOOP); +@i = setInt(0) +@LOOP = getLocation() +if (@i, <= , 10){ + @i = math(@i, + , 1) + printInt(@i) + goto (@LOOP) } + +pause() ``` This will print numbers 0 to 10 as `@i: x` Another example: ``` -printf("Press a button"); +printf("Press a button") -pause(); +pause() if (@BTN_VOL+){ - printf("Vol+ has been pressed"); + printf("Vol+ has been pressed") } if (@BTN_VOL-){ - printf("Vol- has been pressed"); + printf("Vol- has been pressed") } if (@BTN_POWER){ - printf("Power has been pressed"); + printf("Power has been pressed") } +pause() ``` + +# Changelog + +#### 12/04/2020 +With the release of TegraExplorer v1.5.1, there has been some breaking changes. `?LOOP` and `goto(?LOOP)` is no longer valid syntax. Replace this with `@LOOP = getLocation()` and `goto(@LOOP)`. + +Other than this, `@check = check(1, "==", 1) if (@check) {}` can be simplified to `if (1, == , 1) {}`. For `math()` functions, you don't have to enclose operators in "" anymore (just like check/if), like `@math = math(1, + , 1)` diff --git a/scripts/FVI.te b/scripts/FVI.te index 642f680..6daf79d 100644 --- a/scripts/FVI.te +++ b/scripts/FVI.te @@ -1,161 +1,158 @@ -setString("a1b287e07f8455e8192f13d0e45a2aaf.nca", $100_chk); -setString("3b7cd379e18e2ee7e1c6d0449d540841.nca", $100_exfat); -setString("1.0.0", $100_version); -setString("7a1f79f8184d4b9bae1755090278f52c.nca", $200_chk); -setString("f55a04978465ebf5666ca93e21b26dd2.nca", $200_exfat); -setString("2.0.0", $200_version); -setString("e9b3e75fce00e52fe646156634d229b4.nca", $210_chk); -setString("4a94289d2400b301cbe393e64831f84c.nca", $210_exfat); -setString("2.1.0", $210_version); -setString("7f90353dff2d7ce69e19e07ebc0d5489.nca", $220_chk); -setString("4a94289d2400b301cbe393e64831f84c.nca", $220_exfat); -setString("2.2.0", $220_version); -setString("d1c991c53a8a9038f8c3157a553d876d.nca", $230_chk); -setString("4a94289d2400b301cbe393e64831f84c.nca", $230_exfat); -setString("2.3.0", $230_version); -setString("7bef244b45bf63efb4bf47a236975ec6.nca", $300_chk); -setString("9e5c73ec938f3e1e904a4031aa4240ed.nca", $300_exfat); -setString("3.0.0", $300_version); -setString("9a78e13d48ca44b1987412352a1183a1.nca", $301_chk); -setString("17f9864ce7fe3a35cbe3e3b9f6185ffb.nca", $301_exfat); -setString("3.0.1", $301_version); -setString("704129fc89e1fcb85c37b3112e51b0fc.nca", $302_chk); -setString("e7dd3c6cf68953e86cce54b69b333256.nca", $302_exfat); -setString("3.0.2", $302_version); -setString("f99ac61b17fdd5ae8e4dda7c0b55132a.nca", $400_chk); -setString("090b012b110973fbdc56a102456dc9c6.nca", $400_exfat); -setString("4.0.0", $400_version); -setString("d0e5d20e3260f3083bcc067483b71274.nca", $401_chk); -setString("090b012b110973fbdc56a102456dc9c6.nca", $401_exfat); -setString("4.0.1", $401_version); -setString("77e1ae7661ad8a718b9b13b70304aeea.nca", $410_chk); -setString("458a54253f9e49ddb044642286ca6485.nca", $410_exfat); -setString("4.1.0", $410_version); -setString("faa857ad6e82f472863e97f810de036a.nca", $500_chk); -setString("432f5cc48e6c1b88de2bc882204f03a1.nca", $500_exfat); -setString("5.0.0", $500_version); -setString("7f5529b7a092b77bf093bdf2f9a3bf96.nca", $501_chk); -setString("432f5cc48e6c1b88de2bc882204f03a1.nca", $501_exfat); -setString("5.0.1", $501_version); -setString("c5758b0cb8c6512e8967e38842d35016.nca", $502_chk); -setString("432f5cc48e6c1b88de2bc882204f03a1.nca", $502_exfat); -setString("5.0.2", $502_version); -setString("fce3b0ea366f9c95fe6498b69274b0e7.nca", $510_chk); -setString("c9e500edc7bb0fde52eab246028ef84c.nca", $510_exfat); -setString("5.1.0", $510_version); -setString("286e30bafd7e4197df6551ad802dd815.nca", $600pre_chk); -setString("711b5fc83a1f07d443dfc36ba606033b.nca", $600pre_exfat); -setString("6.0.0(pre-release)", $600pre_version); -setString("258c1786b0f6844250f34d9c6f66095b.nca", $600_chk); -setString("d5186022d6080577b13f7fd8bcba4dbb.nca", $600_exfat); -setString("6.0.0", $600_version); -setString("663e74e45ffc86fbbaeb98045feea315.nca", $601_chk); -setString("d5186022d6080577b13f7fd8bcba4dbb.nca", $601_exfat); -setString("6.0.1", $601_version); -setString("1d21680af5a034d626693674faf81b02.nca", $610_chk); -setString("d5186022d6080577b13f7fd8bcba4dbb.nca", $610_exfat); -setString("6.1.0", $610_version); -setString("6dfaaf1a3cebda6307aa770d9303d9b6.nca", $620_chk); -setString("97cb7dc89421decc0340aec7abf8e33b.nca", $620_exfat); -setString("6.2.0", $620_version); -setString("c613bd9660478de69bc8d0e2e7ea9949.nca", $700_chk); -setString("58c731cdacb330868057e71327bd343e.nca", $700_exfat); -setString("7.0.0", $700_version); -setString("e6b22c40bb4fa66a151f1dc8db5a7b5c.nca", $701_chk); -setString("02a2cbfd48b2f2f3a6cec378d20a5eff.nca", $701_exfat); -setString("7.0.1", $701_version); -setString("4fe7b4abcea4a0bcc50975c1a926efcb.nca", $800_chk); -setString("b2708136b24bbe206e502578000b1998.nca", $800_exfat); -setString("8.0.0", $800_version); -setString("6c5426d27c40288302ad616307867eba.nca", $801_chk); -setString("b2708136b24bbe206e502578000b1998.nca", $801_exfat); -setString("8.0.1", $801_version); -setString("7eedb7006ad855ec567114be601b2a9d.nca", $810_chk); -setString("96f4b8b729ade072cc661d9700955258.nca", $810_exfat); -setString("8.1.0", $810_version); -setString("a6af05b33f8f903aab90c8b0fcbcc6a4.nca", $900_chk); -setString("3b444768f8a36d0ddd85635199f9676f.nca", $900_exfat); -setString("9.0.0", $900_version); -setString("fd1ffb82dc1da76346343de22edbc97c.nca", $901_chk); -setString("3b444768f8a36d0ddd85635199f9676f.nca", $901_exfat); -setString("9.0.1", $901_version); -setString("c5fbb49f2e3648c8cfca758020c53ecb.nca", $910_chk); -setString("c9bd4eda34c91a676de09951bb8179ae.nca", $910_exfat); -setString("9.1.0", $910_version); -setString("09ef4d92bb47b33861e695ba524a2c17.nca", $920_chk); -setString("2416b3794964b3482c7bc506d12c44df.nca", $920_exfat); -setString("9.2.0", $920_version); +setString("a1b287e07f8455e8192f13d0e45a2aaf.nca", $100_chk) +setString("3b7cd379e18e2ee7e1c6d0449d540841.nca", $100_exfat) +setString("1.0.0", $100_version) +setString("7a1f79f8184d4b9bae1755090278f52c.nca", $200_chk) +setString("f55a04978465ebf5666ca93e21b26dd2.nca", $200_exfat) +setString("2.0.0", $200_version) +setString("e9b3e75fce00e52fe646156634d229b4.nca", $210_chk) +setString("4a94289d2400b301cbe393e64831f84c.nca", $210_exfat) +setString("2.1.0", $210_version) +setString("7f90353dff2d7ce69e19e07ebc0d5489.nca", $220_chk) +setString("4a94289d2400b301cbe393e64831f84c.nca", $220_exfat) +setString("2.2.0", $220_version) +setString("d1c991c53a8a9038f8c3157a553d876d.nca", $230_chk) +setString("4a94289d2400b301cbe393e64831f84c.nca", $230_exfat) +setString("2.3.0", $230_version) +setString("7bef244b45bf63efb4bf47a236975ec6.nca", $300_chk) +setString("9e5c73ec938f3e1e904a4031aa4240ed.nca", $300_exfat) +setString("3.0.0", $300_version) +setString("9a78e13d48ca44b1987412352a1183a1.nca", $301_chk) +setString("17f9864ce7fe3a35cbe3e3b9f6185ffb.nca", $301_exfat) +setString("3.0.1", $301_version) +setString("704129fc89e1fcb85c37b3112e51b0fc.nca", $302_chk) +setString("e7dd3c6cf68953e86cce54b69b333256.nca", $302_exfat) +setString("3.0.2", $302_version) +setString("f99ac61b17fdd5ae8e4dda7c0b55132a.nca", $400_chk) +setString("090b012b110973fbdc56a102456dc9c6.nca", $400_exfat) +setString("4.0.0", $400_version) +setString("d0e5d20e3260f3083bcc067483b71274.nca", $401_chk) +setString("090b012b110973fbdc56a102456dc9c6.nca", $401_exfat) +setString("4.0.1", $401_version) +setString("77e1ae7661ad8a718b9b13b70304aeea.nca", $410_chk) +setString("458a54253f9e49ddb044642286ca6485.nca", $410_exfat) +setString("4.1.0", $410_version) +setString("faa857ad6e82f472863e97f810de036a.nca", $500_chk) +setString("432f5cc48e6c1b88de2bc882204f03a1.nca", $500_exfat) +setString("5.0.0", $500_version) +setString("7f5529b7a092b77bf093bdf2f9a3bf96.nca", $501_chk) +setString("432f5cc48e6c1b88de2bc882204f03a1.nca", $501_exfat) +setString("5.0.1", $501_version) +setString("c5758b0cb8c6512e8967e38842d35016.nca", $502_chk) +setString("432f5cc48e6c1b88de2bc882204f03a1.nca", $502_exfat) +setString("5.0.2", $502_version) +setString("fce3b0ea366f9c95fe6498b69274b0e7.nca", $510_chk) +setString("c9e500edc7bb0fde52eab246028ef84c.nca", $510_exfat) +setString("5.1.0", $510_version) +setString("286e30bafd7e4197df6551ad802dd815.nca", $600pre_chk) +setString("711b5fc83a1f07d443dfc36ba606033b.nca", $600pre_exfat) +setString("6.0.0(pre-release)", $600pre_version) +setString("258c1786b0f6844250f34d9c6f66095b.nca", $600_chk) +setString("d5186022d6080577b13f7fd8bcba4dbb.nca", $600_exfat) +setString("6.0.0", $600_version) +setString("663e74e45ffc86fbbaeb98045feea315.nca", $601_chk) +setString("d5186022d6080577b13f7fd8bcba4dbb.nca", $601_exfat) +setString("6.0.1", $601_version) +setString("1d21680af5a034d626693674faf81b02.nca", $610_chk) +setString("d5186022d6080577b13f7fd8bcba4dbb.nca", $610_exfat) +setString("6.1.0", $610_version) +setString("6dfaaf1a3cebda6307aa770d9303d9b6.nca", $620_chk) +setString("97cb7dc89421decc0340aec7abf8e33b.nca", $620_exfat) +setString("6.2.0", $620_version) +setString("c613bd9660478de69bc8d0e2e7ea9949.nca", $700_chk) +setString("58c731cdacb330868057e71327bd343e.nca", $700_exfat) +setString("7.0.0", $700_version) +setString("e6b22c40bb4fa66a151f1dc8db5a7b5c.nca", $701_chk) +setString("02a2cbfd48b2f2f3a6cec378d20a5eff.nca", $701_exfat) +setString("7.0.1", $701_version) +setString("4fe7b4abcea4a0bcc50975c1a926efcb.nca", $800_chk) +setString("b2708136b24bbe206e502578000b1998.nca", $800_exfat) +setString("8.0.0", $800_version) +setString("6c5426d27c40288302ad616307867eba.nca", $801_chk) +setString("b2708136b24bbe206e502578000b1998.nca", $801_exfat) +setString("8.0.1", $801_version) +setString("7eedb7006ad855ec567114be601b2a9d.nca", $810_chk) +setString("96f4b8b729ade072cc661d9700955258.nca", $810_exfat) +setString("8.1.0", $810_version) +setString("a6af05b33f8f903aab90c8b0fcbcc6a4.nca", $900_chk) +setString("3b444768f8a36d0ddd85635199f9676f.nca", $900_exfat) +setString("9.0.0", $900_version) +setString("fd1ffb82dc1da76346343de22edbc97c.nca", $901_chk) +setString("3b444768f8a36d0ddd85635199f9676f.nca", $901_exfat) +setString("9.0.1", $901_version) +setString("c5fbb49f2e3648c8cfca758020c53ecb.nca", $910_chk) +setString("c9bd4eda34c91a676de09951bb8179ae.nca", $910_exfat) +setString("9.1.0", $910_version) +setString("09ef4d92bb47b33861e695ba524a2c17.nca", $920_chk) +setString("2416b3794964b3482c7bc506d12c44df.nca", $920_exfat) +setString("9.2.0", $920_version) -printf("FVI script edition"); -printf(""); -printf("Press vol+ to read from SYSMMC"); +printf("FVI script edition") +printf("") +printf("Press vol+ to read from SYSMMC") if (@EMUMMC){ - printf("Press vol- to read from EMUMMC"); + printf("Press vol- to read from EMUMMC") } -printf("Press power to exit"); -printf(""); +printf("Press power to exit") +printf("") -pause(); +pause() if (@BTN_VOL+){ - printf("Mounting SYSMMC..."); - mmc_connect("SYSMMC"); + printf("Mounting SYSMMC...") + mmc_connect("SYSMMC") } if (@BTN_VOL-){ - @noemu = invert(@EMUMMC); + @noemu = invert(@EMUMMC) if (@noemu){ - exit(); + exit() } - printf("Mounting EMUMMC..."); - mmc_connect("EMUMMC"); + printf("Mounting EMUMMC...") + mmc_connect("EMUMMC") } if (@BTN_POWER){ - exit(); + exit() } -mmc_mount("SYSTEM"); +mmc_mount("SYSTEM") -printf(""); +printf("") -@i = setInt(1); +@i = setInt(1) -?LOOP; -@checkoverflow = check(@i, ">=", 88); -if (@checkoverflow){ - printf("No firmware found"); - printf("Press any button to exit"); - pause(); - exit(); +@loop = getPosition() +if (@i, ">=", 88){ + printf("No firmware found") + printf("Press any button to exit") + pause() + exit() } -setStringIndex(@i, $nca); -combineStrings("emmc:/Contents/registered/", $nca, $path); -@check = fs_exists($path); -@checkinv = invert(@check); +setStringIndex(@i, $nca) +combineStrings("emmc:/Contents/registered/", $nca, $path) +@check = fs_exists($path) -if (@checkinv){ - @i = math(@i, "+", 3); - goto(?LOOP); +if (@check, "==", 0){ + @i = math(@i, "+", 3) + goto(@loop) } -@i = math(@i, "+", 1); -setStringIndex(@i, $nca); -combineStrings("emmc:/Contents/registered/", $nca, $path); -@checkexfat = fs_exists($path); -@checkexfatinv = invert(@checkexfat); +@i = math(@i, "+", 1) +setStringIndex(@i, $nca) +combineStrings("emmc:/Contents/registered/", $nca, $path) +@checkexfat = fs_exists($path) -@i = math(@i, "+", 1); -setStringIndex(@i, $version); +@i = math(@i, "+", 1) +setStringIndex(@i, $version) -printf("Firmware found:"); -printf($version); +printf("Firmware found:") +printf($version) if (@checkexfat){ - printf("Exfat edition"); + printf("Exfat edition") } -if (@checkexfatinv){ - printf("Non-Exfat edition); +if (@checkexfat, "==", 0){ + printf("Non-Exfat edition") } -pause(); -exit(); \ No newline at end of file +pause() +exit() \ No newline at end of file diff --git a/scripts/fwdump.te b/scripts/fwdump.te index ccfa939..7e2cfc0 100644 --- a/scripts/fwdump.te +++ b/scripts/fwdump.te @@ -1,200 +1,196 @@ -setString("a1b287e07f8455e8192f13d0e45a2aaf.nca", $100_chk); -setString("3b7cd379e18e2ee7e1c6d0449d540841.nca", $100_exfat); -setString("1.0.0", $100_version); -setString("7a1f79f8184d4b9bae1755090278f52c.nca", $200_chk); -setString("f55a04978465ebf5666ca93e21b26dd2.nca", $200_exfat); -setString("2.0.0", $200_version); -setString("e9b3e75fce00e52fe646156634d229b4.nca", $210_chk); -setString("4a94289d2400b301cbe393e64831f84c.nca", $210_exfat); -setString("2.1.0", $210_version); -setString("7f90353dff2d7ce69e19e07ebc0d5489.nca", $220_chk); -setString("4a94289d2400b301cbe393e64831f84c.nca", $220_exfat); -setString("2.2.0", $220_version); -setString("d1c991c53a8a9038f8c3157a553d876d.nca", $230_chk); -setString("4a94289d2400b301cbe393e64831f84c.nca", $230_exfat); -setString("2.3.0", $230_version); -setString("7bef244b45bf63efb4bf47a236975ec6.nca", $300_chk); -setString("9e5c73ec938f3e1e904a4031aa4240ed.nca", $300_exfat); -setString("3.0.0", $300_version); -setString("9a78e13d48ca44b1987412352a1183a1.nca", $301_chk); -setString("17f9864ce7fe3a35cbe3e3b9f6185ffb.nca", $301_exfat); -setString("3.0.1", $301_version); -setString("704129fc89e1fcb85c37b3112e51b0fc.nca", $302_chk); -setString("e7dd3c6cf68953e86cce54b69b333256.nca", $302_exfat); -setString("3.0.2", $302_version); -setString("f99ac61b17fdd5ae8e4dda7c0b55132a.nca", $400_chk); -setString("090b012b110973fbdc56a102456dc9c6.nca", $400_exfat); -setString("4.0.0", $400_version); -setString("d0e5d20e3260f3083bcc067483b71274.nca", $401_chk); -setString("090b012b110973fbdc56a102456dc9c6.nca", $401_exfat); -setString("4.0.1", $401_version); -setString("77e1ae7661ad8a718b9b13b70304aeea.nca", $410_chk); -setString("458a54253f9e49ddb044642286ca6485.nca", $410_exfat); -setString("4.1.0", $410_version); -setString("faa857ad6e82f472863e97f810de036a.nca", $500_chk); -setString("432f5cc48e6c1b88de2bc882204f03a1.nca", $500_exfat); -setString("5.0.0", $500_version); -setString("7f5529b7a092b77bf093bdf2f9a3bf96.nca", $501_chk); -setString("432f5cc48e6c1b88de2bc882204f03a1.nca", $501_exfat); -setString("5.0.1", $501_version); -setString("c5758b0cb8c6512e8967e38842d35016.nca", $502_chk); -setString("432f5cc48e6c1b88de2bc882204f03a1.nca", $502_exfat); -setString("5.0.2", $502_version); -setString("fce3b0ea366f9c95fe6498b69274b0e7.nca", $510_chk); -setString("c9e500edc7bb0fde52eab246028ef84c.nca", $510_exfat); -setString("5.1.0", $510_version); -setString("286e30bafd7e4197df6551ad802dd815.nca", $600pre_chk); -setString("711b5fc83a1f07d443dfc36ba606033b.nca", $600pre_exfat); -setString("6.0.0(pre-release)", $600pre_version); -setString("258c1786b0f6844250f34d9c6f66095b.nca", $600_chk); -setString("d5186022d6080577b13f7fd8bcba4dbb.nca", $600_exfat); -setString("6.0.0", $600_version); -setString("663e74e45ffc86fbbaeb98045feea315.nca", $601_chk); -setString("d5186022d6080577b13f7fd8bcba4dbb.nca", $601_exfat); -setString("6.0.1", $601_version); -setString("1d21680af5a034d626693674faf81b02.nca", $610_chk); -setString("d5186022d6080577b13f7fd8bcba4dbb.nca", $610_exfat); -setString("6.1.0", $610_version); -setString("6dfaaf1a3cebda6307aa770d9303d9b6.nca", $620_chk); -setString("97cb7dc89421decc0340aec7abf8e33b.nca", $620_exfat); -setString("6.2.0", $620_version); -setString("c613bd9660478de69bc8d0e2e7ea9949.nca", $700_chk); -setString("58c731cdacb330868057e71327bd343e.nca", $700_exfat); -setString("7.0.0", $700_version); -setString("e6b22c40bb4fa66a151f1dc8db5a7b5c.nca", $701_chk); -setString("02a2cbfd48b2f2f3a6cec378d20a5eff.nca", $701_exfat); -setString("7.0.1", $701_version); -setString("4fe7b4abcea4a0bcc50975c1a926efcb.nca", $800_chk); -setString("b2708136b24bbe206e502578000b1998.nca", $800_exfat); -setString("8.0.0", $800_version); -setString("6c5426d27c40288302ad616307867eba.nca", $801_chk); -setString("b2708136b24bbe206e502578000b1998.nca", $801_exfat); -setString("8.0.1", $801_version); -setString("7eedb7006ad855ec567114be601b2a9d.nca", $810_chk); -setString("96f4b8b729ade072cc661d9700955258.nca", $810_exfat); -setString("8.1.0", $810_version); -setString("a6af05b33f8f903aab90c8b0fcbcc6a4.nca", $900_chk); -setString("3b444768f8a36d0ddd85635199f9676f.nca", $900_exfat); -setString("9.0.0", $900_version); -setString("fd1ffb82dc1da76346343de22edbc97c.nca", $901_chk); -setString("3b444768f8a36d0ddd85635199f9676f.nca", $901_exfat); -setString("9.0.1", $901_version); -setString("c5fbb49f2e3648c8cfca758020c53ecb.nca", $910_chk); -setString("c9bd4eda34c91a676de09951bb8179ae.nca", $910_exfat); -setString("9.1.0", $910_version); -setString("09ef4d92bb47b33861e695ba524a2c17.nca", $920_chk); -setString("2416b3794964b3482c7bc506d12c44df.nca", $920_exfat); -setString("9.2.0", $920_version); +setString("a1b287e07f8455e8192f13d0e45a2aaf.nca", $100_chk) +setString("3b7cd379e18e2ee7e1c6d0449d540841.nca", $100_exfat) +setString("1.0.0", $100_version) +setString("7a1f79f8184d4b9bae1755090278f52c.nca", $200_chk) +setString("f55a04978465ebf5666ca93e21b26dd2.nca", $200_exfat) +setString("2.0.0", $200_version) +setString("e9b3e75fce00e52fe646156634d229b4.nca", $210_chk) +setString("4a94289d2400b301cbe393e64831f84c.nca", $210_exfat) +setString("2.1.0", $210_version) +setString("7f90353dff2d7ce69e19e07ebc0d5489.nca", $220_chk) +setString("4a94289d2400b301cbe393e64831f84c.nca", $220_exfat) +setString("2.2.0", $220_version) +setString("d1c991c53a8a9038f8c3157a553d876d.nca", $230_chk) +setString("4a94289d2400b301cbe393e64831f84c.nca", $230_exfat) +setString("2.3.0", $230_version) +setString("7bef244b45bf63efb4bf47a236975ec6.nca", $300_chk) +setString("9e5c73ec938f3e1e904a4031aa4240ed.nca", $300_exfat) +setString("3.0.0", $300_version) +setString("9a78e13d48ca44b1987412352a1183a1.nca", $301_chk) +setString("17f9864ce7fe3a35cbe3e3b9f6185ffb.nca", $301_exfat) +setString("3.0.1", $301_version) +setString("704129fc89e1fcb85c37b3112e51b0fc.nca", $302_chk) +setString("e7dd3c6cf68953e86cce54b69b333256.nca", $302_exfat) +setString("3.0.2", $302_version) +setString("f99ac61b17fdd5ae8e4dda7c0b55132a.nca", $400_chk) +setString("090b012b110973fbdc56a102456dc9c6.nca", $400_exfat) +setString("4.0.0", $400_version) +setString("d0e5d20e3260f3083bcc067483b71274.nca", $401_chk) +setString("090b012b110973fbdc56a102456dc9c6.nca", $401_exfat) +setString("4.0.1", $401_version) +setString("77e1ae7661ad8a718b9b13b70304aeea.nca", $410_chk) +setString("458a54253f9e49ddb044642286ca6485.nca", $410_exfat) +setString("4.1.0", $410_version) +setString("faa857ad6e82f472863e97f810de036a.nca", $500_chk) +setString("432f5cc48e6c1b88de2bc882204f03a1.nca", $500_exfat) +setString("5.0.0", $500_version) +setString("7f5529b7a092b77bf093bdf2f9a3bf96.nca", $501_chk) +setString("432f5cc48e6c1b88de2bc882204f03a1.nca", $501_exfat) +setString("5.0.1", $501_version) +setString("c5758b0cb8c6512e8967e38842d35016.nca", $502_chk) +setString("432f5cc48e6c1b88de2bc882204f03a1.nca", $502_exfat) +setString("5.0.2", $502_version) +setString("fce3b0ea366f9c95fe6498b69274b0e7.nca", $510_chk) +setString("c9e500edc7bb0fde52eab246028ef84c.nca", $510_exfat) +setString("5.1.0", $510_version) +setString("286e30bafd7e4197df6551ad802dd815.nca", $600pre_chk) +setString("711b5fc83a1f07d443dfc36ba606033b.nca", $600pre_exfat) +setString("6.0.0(pre-release)", $600pre_version) +setString("258c1786b0f6844250f34d9c6f66095b.nca", $600_chk) +setString("d5186022d6080577b13f7fd8bcba4dbb.nca", $600_exfat) +setString("6.0.0", $600_version) +setString("663e74e45ffc86fbbaeb98045feea315.nca", $601_chk) +setString("d5186022d6080577b13f7fd8bcba4dbb.nca", $601_exfat) +setString("6.0.1", $601_version) +setString("1d21680af5a034d626693674faf81b02.nca", $610_chk) +setString("d5186022d6080577b13f7fd8bcba4dbb.nca", $610_exfat) +setString("6.1.0", $610_version) +setString("6dfaaf1a3cebda6307aa770d9303d9b6.nca", $620_chk) +setString("97cb7dc89421decc0340aec7abf8e33b.nca", $620_exfat) +setString("6.2.0", $620_version) +setString("c613bd9660478de69bc8d0e2e7ea9949.nca", $700_chk) +setString("58c731cdacb330868057e71327bd343e.nca", $700_exfat) +setString("7.0.0", $700_version) +setString("e6b22c40bb4fa66a151f1dc8db5a7b5c.nca", $701_chk) +setString("02a2cbfd48b2f2f3a6cec378d20a5eff.nca", $701_exfat) +setString("7.0.1", $701_version) +setString("4fe7b4abcea4a0bcc50975c1a926efcb.nca", $800_chk) +setString("b2708136b24bbe206e502578000b1998.nca", $800_exfat) +setString("8.0.0", $800_version) +setString("6c5426d27c40288302ad616307867eba.nca", $801_chk) +setString("b2708136b24bbe206e502578000b1998.nca", $801_exfat) +setString("8.0.1", $801_version) +setString("7eedb7006ad855ec567114be601b2a9d.nca", $810_chk) +setString("96f4b8b729ade072cc661d9700955258.nca", $810_exfat) +setString("8.1.0", $810_version) +setString("a6af05b33f8f903aab90c8b0fcbcc6a4.nca", $900_chk) +setString("3b444768f8a36d0ddd85635199f9676f.nca", $900_exfat) +setString("9.0.0", $900_version) +setString("fd1ffb82dc1da76346343de22edbc97c.nca", $901_chk) +setString("3b444768f8a36d0ddd85635199f9676f.nca", $901_exfat) +setString("9.0.1", $901_version) +setString("c5fbb49f2e3648c8cfca758020c53ecb.nca", $910_chk) +setString("c9bd4eda34c91a676de09951bb8179ae.nca", $910_exfat) +setString("9.1.0", $910_version) +setString("09ef4d92bb47b33861e695ba524a2c17.nca", $920_chk) +setString("2416b3794964b3482c7bc506d12c44df.nca", $920_exfat) +setString("9.2.0", $920_version) -printf("TegraScript firmware dumper"); -printf(""); -printf("Press vol+ to dump from SYSMMC"); +printf("TegraScript firmware dumper") +printf("") +printf("Press vol+ to dump from SYSMMC") if (@EMUMMC){ - printf("Press vol- to dump from EMUMMC"); + printf("Press vol- to dump from EMUMMC") } -printf("Press power to exit"); -printf(""); +printf("Press power to exit") +printf("") -pause(); +pause() if (@BTN_VOL+){ - printf("Mounting SYSMMC..."); - mmc_connect("SYSMMC"); + printf("Mounting SYSMMC...") + mmc_connect("SYSMMC") } if (@BTN_VOL-){ - @noemu = invert(@EMUMMC); - if (@noemu){ - exit(); - } - printf("Mounting EMUMMC..."); - mmc_connect("EMUMMC"); + if (@EMUMMC, == , 0){ + exit() + } + printf("Mounting EMUMMC...") + mmc_connect("EMUMMC") } if (@BTN_POWER){ - exit(); + exit() } -mmc_mount("SYSTEM"); +mmc_mount("SYSTEM") -printf(""); +printf("") -@i = setInt(1); -setString("emmc:/Contents/registered/", $basePath); +@i = setInt(1) +setString("emmc:/Contents/registered/", $basePath) -?LOOP; -@checkoverflow = check(@i, ">=", 88); -if (@checkoverflow){ - printf("No valid firmware version found"); - printf("Press any button to exit"); - pause(); - exit(); +@LOOP = getPosition() +if (@i, ">=", 88){ + printf("No valid firmware version found") + printf("Press any button to exit") + pause() + exit() } -setStringIndex(@i, $nca); -combineStrings($basePath, $nca, $path); -@check = fs_exists($path); -@checkinv = invert(@check); +setStringIndex(@i, $nca) +combineStrings($basePath, $nca, $path) +@exists = fs_exists($path) -if (@checkinv){ - @i = math(@i, "+", 3); - goto(?LOOP); +if (@exists, == , 0){ + @i = math(@i, "+", 3) + goto(@LOOP) } -@i = math(@i, "+", 1); -setStringIndex(@i, $nca); -combineStrings($basePath, $nca, $path); -@checkexfat = fs_exists($path); +@i = math(@i, "+", 1) +setStringIndex(@i, $nca) +combineStrings($basePath, $nca, $path) +@checkexfat = fs_exists($path) -@i = math(@i, "+", 1); -setStringIndex(@i, $version); +@i = math(@i, "+", 1) +setStringIndex(@i, $version) if (@checkexfat){ - combineStrings($version, "_exFAT", $version); + combineStrings($version, "_exFAT", $version) } -printf("Firmware found:"); -printf($version); +printf("Firmware found:") +printf($version) -printf(""); -printf("Starting dump..."); +printf("") +printf("Starting dump...") -fs_mkdir("sd:/tegraexplorer"); -fs_mkdir("sd:/tegraexplorer/Firmware"); -combineStrings("sd:/tegraexplorer/Firmware/", $version, $sdBasePath); -fs_mkdir($sdBasePath); -combineStrings($sdBasePath, "/", $sdBasePath); +fs_mkdir("sd:/tegraexplorer") +fs_mkdir("sd:/tegraexplorer/Firmware") +combineStrings("sd:/tegraexplorer/Firmware/", $version, $sdBasePath) +fs_mkdir($sdBasePath) +combineStrings($sdBasePath, "/", $sdBasePath) -@count = setInt(1); +@count = setInt(1) -fs_openDir("emmc:/Contents/registered"); -setColor("GREEN"); -?LOOP; -fs_readDir(); +fs_openDir("emmc:/Contents/registered") +setColor("GREEN") +@LOOP = getPosition() +fs_readDir() if (@ISDIRVALID){ - @isnotdir = invert(@ISDIR); if (@ISDIR){ - combineStrings($basePath, $FILENAME, $path); - combineStrings($path, "/00", $path); + combineStrings($basePath, $FILENAME, $path) + combineStrings($path, "/00", $path) } - if (@isnotdir){ - combineStrings($basePath, $FILENAME, $path); + if (@ISDIR, == , 0){ + combineStrings($basePath, $FILENAME, $path) } - setPrintPos(0, 15); - printInt(@count); - @count = math(@count, "+", 1); - printf($FILENAME); + setPrintPos(0, 15) + printInt(@count) + @count = math(@count, "+", 1) + printf($FILENAME) - combineStrings($sdBasePath, $FILENAME, $sdPath); + combineStrings($sdBasePath, $FILENAME, $sdPath) - fs_copy($path, $sdPath); + fs_copy($path, $sdPath) - goto(?LOOP); + goto(@LOOP) } -setColor("WHITE"); -printf(""); -printf(""); -printf("Dump done! Press any key to exit"); +setColor("WHITE") +printf("") +printf("") +printf("Dump done! Press any key to exit") -pause(); -exit(); \ No newline at end of file +pause() +exit() \ No newline at end of file diff --git a/scripts/savedumper.te b/scripts/savedumper.te index 1fa589a..77ad9cd 100644 --- a/scripts/savedumper.te +++ b/scripts/savedumper.te @@ -1,50 +1,49 @@ -printf("Such save, many dump"); -printf("What mmc would you like to dump from"); -printf("Press + for sysnand"); +printf("TegraScript save dumper") +printf("What mmc would you like to dump from") +printf("Press + for sysnand") if (@EMUMMC) { - printf("Or press - for emummc"); + printf("Or press - for emummc") } -printf("Press power to cancel"); +printf("Press power to cancel") -pause(); +pause() if (@BTN_VOL+){ - printf("Mounting SYSMMC..."); - mmc_connect("SYSMMC"); + printf("Mounting SYSMMC...") + mmc_connect("SYSMMC") } if (@BTN_VOL-){ - @noemu = invert(@EMUMMC); - if (@noemu){ - exit(); + if (@EMUMMC, == , 0){ + exit() } - printf("Mounting EMUMMC..."); - mmc_connect("EMUMMC"); + printf("Mounting EMUMMC...") + mmc_connect("EMUMMC") } if (@BTN_POWER) { - exit(); + exit() } -printf("Which partition do you want to dump from? + for SYSTEM - for USER"); -pause(); +printf("Which partition do you want to dump from? + for SYSTEM - for USER") +pause() if (@BTN_VOL+) { - printf("Mounting SYSTEM..."); - mmc_mount("SYSTEM"); - setString("systemSaves", $folder); + printf("Mounting SYSTEM...") + mmc_mount("SYSTEM") + setString("systemSaves", $folder) } if (@BTN_VOL-) { - printf("Mounting USER...."); - mmc_mount("USER"); - setString("userSaves", $folder); + printf("Mounting USER....") + mmc_mount("USER") + setString("userSaves", $folder) } -combineStrings("sd:/tegraexplorer/", $folder, $path); -fs_mkdir($path); -combineStrings("Copying saves to ", $path, $out); -printf($out); -printf(""); -fs_copyRecursive("emmc:/save", $path); -printf(""); -printf("Done, press any button to exit"); -pause(); -exit(); \ No newline at end of file +combineStrings("sd:/tegraexplorer/", $folder, $path) +fs_mkdir($path) +combineStrings("Copying saves to ", $path, $out) +printf($out) +printf("") +fs_copyRecursive("emmc:/save", $path) +printf("") +printf("Done, press any button to exit") +pause() +exit() \ No newline at end of file diff --git a/scripts/systemRestore.te b/scripts/systemRestore.te index 8f63f40..56106c5 100644 --- a/scripts/systemRestore.te +++ b/scripts/systemRestore.te @@ -1,132 +1,233 @@ -setString("BOOT0.bin", $BOOT0Path); -setString("BOOT1.bin", $BOOT1Path); -setString("BCPKG2-1-Normal-Main", $BCPKG1_); -setString("BCPKG2-2-Normal-Sub", $BCPKG2_); -setString("BCPKG2-3-SafeMode-Main", $BCPKG3_); -setString("BCPKG2-4-SafeMode-Sub", $BCPKG4_); - -printf("System restore script"); -printf(""); -printf("Checking requirements..."); - -fs_combinePath($CURRENTPATH, "SYSTEM", $path); -@check = fs_exists($path); -@checkinv = invert(@check); -if (@checkinv){ - printf("System DIR not found!"); - printf("Press any button to exit"); - pause(); - exit(); -} - -fs_combinePath($CURRENTPATH, "boot.bis", $path); -@check = fs_exists($path); -@checkinv = invert(@check); -if (@checkinv){ - printf("boot.bis not found!"); - printf("Press any button to exit"); - pause(); - exit(); -} - -fs_mkdir("sd:/tegraexplorer"); -fs_mkdir("sd:/tegraexplorer/bisextract"); -fs_extractBisFile($path, "sd:/tegraexplorer/bisextract"); - -printf("Ready to restore!"); -printf(""); - -printf("Press vol+ to restore SYSMMC"); +setString("BOOT0.bin", $BOOT0Path) +setString("BOOT1.bin", $BOOT1Path) +setString("BCPKG2-1-Normal-Main", $BCPKG1) +setString("BCPKG2-2-Normal-Sub", $BCPKG2) +setString("BCPKG2-3-SafeMode-Main", $BCPKG3) +setString("BCPKG2-4-SafeMode-Sub", $BCPKG4) +setString("Exit +", $menuoption1) +setString("BOOT: ", $menuoption2) +setString("SYSTEM: ", $menuoption3) +setString(" +SYSMMC", $menuoption4) if (@EMUMMC){ - printf("Press vol- to restore EMUMMC"); + setString("EMUMMC", $menuoption5) } -printf("Press power to exit"); -printf(""); -pause(); +printf("System restore script") +printf("") +printf("Select what to restore") +printf("And where to restore to") + +@selection = setInt(7) +@restoreBOOT = setInt(1) +@restoreSYS = setInt(1) +@maxSelection = setInt(10) +if (@EMUMMC){ + @maxSelection = math(@maxSelection, "+", 1) +} + +@optionLoop = getPosition() +setPrintPos(0, 6) +@current = setInt(7) + +@drawLoop = getPosition() + +setColor("WHITE") +setStringIndex(@current, $toDraw) + +if (@current, "==", 8){ + if (@restoreBOOT){ + combineStrings($toDraw, "ON ", $toDraw) + } + if (@restoreBOOT, "==", 0){ + combineStrings($toDraw, "OFF", $toDraw) + } +} + +if (@current, "==", 9){ + if (@restoreSYS){ + combineStrings($toDraw, "ON " , $toDraw) + } + if (@restoreSYS, "==", 0){ + combineStrings($toDraw, "OFF", $toDraw) + } +} + +if (@selection, "==", @current){ + setColor("VIOLET") +} + +printf($toDraw) + +@current = math(@current, "+", 1) + +if (@current, "<=", @maxSelection){ + goto(@drawLoop) +} + +pause() + +if (@BTN_VOL-){ + if (@selection, "<", @maxSelection){ + @selection = math(@selection, "+", 1) + } +} if (@BTN_VOL+){ - printf("Mounting SYSMMC..."); - mmc_connect("SYSMMC"); + if (@selection, ">", 7){ + @selection = math(@selection, "-", 1) + } } -if (@BTN_VOL-){ - @noemu = invert(@EMUMMC); - if (@noemu){ - exit(); + +if (@BTN_POWER, "==", 0){ + goto(@optionLoop) +} + +if (@selection, "==", 7){ + exit() +} + +if (@selection, "==", 8){ + @restoreBOOT = invert(@restoreBOOT) + goto(@optionLoop) +} + +if (@selection, "==", 9){ + @restoreSYS = invert(@restoreSYS) + goto(@optionLoop) +} + +clearscreen() +setColor("WHITE") +printf("System restore script") +printf("") + +if (@restoreBOOT){ + printf("BOOT: ON") +} +if (@restoreBOOT, "==", 0){ + printf("BOOT: OFF") +} +if (@restoreSYS){ + printf("SYSTEM: ON") +} +if (@restoreSYS, "==", 0){ + printf("SYSTEM: OFF") +} + +printf("Checking requirements...") +printf("") + +if (@restoreSYS){ + fs_combinePath($CURRENTPATH, "SYSTEM", $path) + @check = fs_exists($path) + @checkinv = invert(@check) + if (@checkinv){ + printf("System DIR not found!") + printf("Press any button to exit") + pause() + exit() + } +} + +if (@restoreBOOT){ + fs_combinePath($CURRENTPATH, "boot.bis", $path) + @check = fs_exists($path) + if (@check, "==", 0){ + printf("boot.bis not found!") + printf("Press any button to exit") + pause() + exit() + } + + fs_mkdir("sd:/tegraexplorer") + fs_mkdir("sd:/tegraexplorer/bisextract") + fs_extractBisFile($path, "sd:/tegraexplorer/bisextract") +} + +if (@selection, "==", 10){ + printf("Mounting SYSMMC...") + mmc_connect("SYSMMC") +} +if (@selection, "==", 11){ + if (@EMUMMC, "==", 0){ + exit() } - printf("Mounting EMUMMC..."); - mmc_connect("EMUMMC"); -} -if (@BTN_POWER){ - exit(); + printf("Mounting EMUMMC...") + mmc_connect("EMUMMC") } -setColor("RED"); -printf(""); -printf("WARNING!!!"); -printf("If you do not know exactly what this does"); -printf(" STOP!"); -printf(""); -printf("This will fuck with your system!"); -printf("Only do this as"); -printf(" a last ditch recovery effort!"); -printf(""); -setColor("GREEN"); -printf("For help go here:"); -printf("https://discord.gg/C29hYvh"); -setColor("WHITE"); -printf(""); -wait(10); -printf("Vol+ to continue"); -printf("Vol- or power to exit"); +printf("Ready!") -pause(); +setColor("RED") +printf("") +printf("WARNING!!!") +printf("If you do not know exactly what this does") +printf(" STOP!") +printf("") +printf("This will fuck with your system!") +printf("Only do this as") +printf(" a last ditch recovery effort!") +printf("") +setColor("GREEN") +printf("For help go here:") +printf("https://discord.gg/C29hYvh") +setColor("WHITE") +printf("") +wait(10) +printf("Vol+ to continue") +printf("Vol- or power to exit") -@checkinv = invert(@BTN_VOL+); -if (@checkinv){ - exit(); +pause() + +if (@BTN_VOL+, "==", 0){ + exit() } -clearscreen(); +clearscreen() -printf("GO!"); -printf(""); -printf("Restoring BIS"); +printf("GO!") +if (@restoreBOOT){ + printf("") + printf("Restoring BIS") -@i = setInt(1); -?RESLOOP; -setStringIndex(@i, $part); -combineStrings("sd:/tegraexplorer/bisextract/", $part, $path); -mmc_restorePart($path); -if (@RESULT){ - setColor("RED"); - printf("Restoring went wrong!"); - printf("Part:"); - printf($part); - pause(); - exit(); -} -@i = math(@i, "+", 1); -@check = check(@i, "<", 7); -if (@check){ - goto(?RESLOOP); + @i = setInt(1) + @loop = getPosition() + setStringIndex(@i, $part) + combineStrings("sd:/tegraexplorer/bisextract/", $part, $path) + mmc_restorePart($path) + if (@RESULT){ + setColor("RED") + printf("Restoring went wrong!") + printf("Part:") + printf($part) + pause() + exit() + } + @i = math(@i, "+", 1) + if (@i, "<", 7){ + goto(@loop) + } } -printf(""); -printf("Restoring SYSTEM"); -mmc_mount("SYSTEM"); +if (@restoreSYS){ + printf("") + printf("Restoring SYSTEM") + mmc_mount("SYSTEM") -fs_combinePath($CURRENTPATH, "SYSTEM/Contents/registered", $path); + fs_combinePath($CURRENTPATH, "SYSTEM/Contents/registered", $path) -fs_delRecursive("emmc:/Contents/registered"); -fs_copyRecursive($path, "emmc:/Contents"); + fs_delRecursive("emmc:/Contents/registered") + fs_copyRecursive($path, "emmc:/Contents") -fs_combinePath($CURRENTPATH, "SYSTEM/save/8000000000000120", $path); + fs_combinePath($CURRENTPATH, "SYSTEM/save/8000000000000120", $path) -fs_copy($path, "emmc:/save/8000000000000120"); + fs_copy($path, "emmc:/save/8000000000000120") +} -printf(""); -printf("Done!"); -printf("Press any button to exit"); -pause(); -exit(); \ No newline at end of file +printf("") +printf("Done!") +printf("Press any button to exit") +pause() +exit() \ No newline at end of file diff --git a/scripts/systemwipe.te b/scripts/systemwipe.te index 537a2fa..eae7715 100644 --- a/scripts/systemwipe.te +++ b/scripts/systemwipe.te @@ -1,136 +1,135 @@ -printf("TegraScript system wiper"); -printf(""); -printf("Press vol+ to wipe from SYSMMC"); +printf("TegraScript system wiper") +printf("") +printf("Press vol+ to wipe from SYSMMC") if (@EMUMMC){ - printf("Press vol- to wipe from EMUMMC"); + printf("Press vol- to wipe from EMUMMC") } -printf("Press power to exit"); -printf(""); +printf("Press power to exit") +printf("") -pause(); +pause() if (@BTN_VOL+){ - printf("Mounting SYSMMC..."); - mmc_connect("SYSMMC"); + printf("Mounting SYSMMC...") + mmc_connect("SYSMMC") } if (@BTN_VOL-){ - @noemu = invert(@EMUMMC); - if (@noemu){ - exit(); + if (@EMUMMC, == , 0){ + exit() } - printf("Mounting EMUMMC..."); - mmc_connect("EMUMMC"); + printf("Mounting EMUMMC...") + mmc_connect("EMUMMC") } if (@BTN_POWER){ - exit(); + exit() } -mmc_mount("SYSTEM"); +mmc_mount("SYSTEM") if (@RESULT){ - printf("System failed to mount!"); - pause(); - exit(); + printf("System failed to mount!") + pause() + exit() } -setString("emmc:/save/", $basePath); +setString("emmc:/save/", $basePath) -setColor("RED"); -printf("Are you sure you want to wipe everything?"); -printf("This includes:"); -printf("- Saves"); -printf("- Game Data"); -printf("- All other data on the system"); -printf(""); -printf("Use this only as a last resort!"); -printf(""); +setColor("RED") +printf("Are you sure you want to wipe everything?") +printf("This includes:") +printf("- Saves") +printf("- Game Data") +printf("- All other data on the system") +printf("") +printf("Use this only as a last resort!") +printf("") -setColor("YELLOW"); -wait(10); +setColor("YELLOW") +wait(10) -printf("Press vol+ to continue"); -printf("Press vol- or power to exit"); +printf("Press vol+ to continue") +printf("Press vol- or power to exit") -pause(); +pause() if (@BTN_POWER){ - exit(); + exit() } if (@BTN_VOL-){ - exit(); + exit() } -@count = setInt(1); -printf("Deleting SYSTEM saves"); +@count = setInt(1) +printf("Deleting SYSTEM saves") -fs_openDir("emmc:/save"); -setColor("RED"); -?LOOP; -fs_readDir(); +fs_openDir("emmc:/save") +setColor("RED") +@LOOP = getPosition() +fs_readDir() if (@ISDIRVALID){ - combineStrings($basePath, $FILENAME, $path); + combineStrings($basePath, $FILENAME, $path) - setPrintPos(0, 20); - printInt(@count); - @count = math(@count, "+", 1); + setPrintPos(0, 20) + printInt(@count) + @count = math(@count, "+", 1) - @check = compareStrings($FILENAME, "8000000000000120"); + @check = compareStrings($FILENAME, "8000000000000120") if (@check){ - goto(?LOOP); + goto(@LOOP) } - @check = compareStrings($FILENAME, "80000000000000d1"); + @check = compareStrings($FILENAME, "80000000000000d1") if (@check){ - goto(?LOOP); + goto(@LOOP) } - @check = compareStrings($FILENAME, "8000000000000047"); + @check = compareStrings($FILENAME, "8000000000000047") if (@check){ - goto(?LOOP); + goto(@LOOP) } - printf($FILENAME); - fs_del($path); + printf($FILENAME) + fs_del($path) - goto(?LOOP); + goto(@LOOP) } -printf(""); -printf(""); -printf("Deleting USER"); +printf("") +printf("") +printf("Deleting USER") -mmc_mount("USER"); +mmc_mount("USER") if (@RESULT){ - printf("User failed to mount!"); - pause(); - exit(); + printf("User failed to mount!") + pause() + exit() } -fs_delRecursive("emmc:/Album"); -fs_mkdir("emmc:/Album"); +fs_delRecursive("emmc:/Album") +fs_mkdir("emmc:/Album") -fs_delRecursive("emmc:/Contents"); -fs_mkdir("emmc:/Contents"); -fs_mkdir("emmc:/Contents/placehld"); -fs_mkdir("emmc:/Contents/registered"); +fs_delRecursive("emmc:/Contents") +fs_mkdir("emmc:/Contents") +fs_mkdir("emmc:/Contents/placehld") +fs_mkdir("emmc:/Contents/registered") -fs_delRecursive("emmc:/save"); -fs_mkdir("emmc:/save"); +fs_delRecursive("emmc:/save") +fs_mkdir("emmc:/save") -fs_delRecursive("emmc:/saveMeta"); -fs_mkdir("emmc:/saveMeta"); +fs_delRecursive("emmc:/saveMeta") +fs_mkdir("emmc:/saveMeta") -fs_delRecursive("emmc:/temp"); -fs_mkdir("emmc:/temp"); +fs_delRecursive("emmc:/temp") +fs_mkdir("emmc:/temp") -setColor("GREEN"); -printf(""); -printf(""); -printf("Done! press any key to exit"); +setColor("GREEN") +printf("") +printf("") +printf("Done! press any key to exit") -pause(); -exit(); \ No newline at end of file +pause() +exit() \ No newline at end of file