Guide to using cheats in Swiss

Game Hacks, Trainers, Cheats

Moderator: Ralf@gc-forever

User avatar
emu_kidid
Site Admin
Posts: 4927
Joined: Mon Mar 29, 2010 10:06 am
Location: Australia
Contact:

Guide to using cheats in Swiss

Post by emu_kidid » Thu Aug 27, 2015 1:00 pm

Note: This guide is somewhat outdated. Please seek help if something doesn't match up.

This guide applies to Swiss 0.4 r325 onwards.

Swiss supports WiiRD format cheats in text files stored on the configuration storage device (if you only have one device you boot games from, it's this one).

Cheats must live in a folder called "cheats" that is to be placed inside the system created folder "swiss". E.g., D:\swiss\cheats\

The files must be named by the 6 byte identifier that is inside the ISO, if you do not know this, open your ISO in GC-Tool or a HEX editor:
Image
Image

In this example, the for Metroid Prime NTSC the cheats file would need to be named GM8E01.txt and would need to be placed on the device as /swiss/cheats/GM8E01.txt

In Swiss, load the game from anywhere on the SD card and on the banner screen, hit Y to have Swiss try to find the cheats file. If the cheats file is not found, you will see something like this:
Image

If it is found, you will be able to select cheats and then return to the banner screen to boot the game:
Image

There's a limit on how many cheats will fit and the bar at the bottom of the screen will fill as you enable cheats.

A bit more on the cheats file format...

You can have cheats simply listed as such inside the txt files:

Code: Select all

[GMSE01] Super Mario Sunshine (NTSC-U)


16:9 Aspect Ratio (Widescreen) [Ralf]
04416B74 3F9A7643

Enable Map Select (Press RESET) [Ralf]
042A6788 3BC00009

Replace Episode Select With Map Select [Ralf]
C22A6654 00000003
547E063E 281E0008
40820008 3BC00009
60000000 00000000

etc...
If there are cheats with multiple values possible, you will need to pre-modify those in the txt file as the cheats parser will try to throw those out as they're not supported, example:

Code: Select all

Background Music Modifier [Ralf]
C2016994 00000002
3C608001 386300xx
3B830000 00000000

xx = Song ID


Song IDs

01 - Dolpic
02 - Bianco
03 - Manma
04 - Pinnapaco S
05 - Pinnapaco
06 - Mare Sea
07 - Montevillage
If you wanted to use one of these cheats, then I would recommend expanding them like this:

Code: Select all

Background Music Modifier 01 - Dolpic [Ralf]
C2016994 00000002
3C608001 38630001
3B830000 00000000

Background Music Modifier 02 - Bianco [Ralf]
C2016994 00000002
3C608001 38630002
3B830000 00000000

etc...
I've attached a WiiRD cheats collection provided by Ralf to get you started, extract it to the "cheats" folder on your device and grab the latest Nightly Build of Swiss (needs to be r325 or newer).
WiiRD_Codes_180815.zip
(590.52 KiB) Downloaded 12697 times
Enjoy!
Attachments
gctool.png
(52.5 KiB) Not downloaded yet
nocheats.png
(350.35 KiB) Not downloaded yet
cheats.png
(452.96 KiB) Not downloaded yet
hex.png
(88.71 KiB) Not downloaded yet
Image
User avatar
tesla246
Posts: 121
Joined: Tue Dec 11, 2012 1:48 pm

Re: Guide to using cheats in Swiss

Post by tesla246 » Thu Aug 27, 2015 7:01 pm

Eager to trying this out emu_kidid.
Will it be possible to auto-enable a (without going through the process of searching and subsequently selecting it every time) specific cheat every time on start-up? For example a cheat/code you always want (Ralph's widescreen code).
Dream mod: HI-speed port device utilizing 4:4:4 RGB 32 bit colour, 720p video and variable refresh rate. :shock:
Favourite mod: GC Loader flashed with latest swiss.
Eagerly awaiting a normal, form-factor wise, wireless controller with rumble. :)
marios92
Posts: 12
Joined: Sat Jul 18, 2015 3:56 pm

Re: Guide to using cheats in Swiss

Post by marios92 » Thu Aug 27, 2015 9:20 pm

Thanks for the guide, but i not understand last words:
"the latest Nightly Build of Swiss (needs to be r325 or newer)."
In Nightly Buil post the latest version are 321, not 325, and in 321 not work
User avatar
emu_kidid
Site Admin
Posts: 4927
Joined: Mon Mar 29, 2010 10:06 am
Location: Australia
Contact:

Re: Guide to using cheats in Swiss

Post by emu_kidid » Thu Aug 27, 2015 11:11 pm

Yes, it hasn't been built yet, wait.
Image
marios92
Posts: 12
Joined: Sat Jul 18, 2015 3:56 pm

Re: Guide to using cheats in Swiss

Post by marios92 » Fri Aug 28, 2015 8:38 pm

Ok, thanks, sorry if i seem fast.
Now cheat appear, but i dont know if is enabled, because after list show and select codes, cant press Start to launch, only B to return (and if open again the list, codes are not selected). Anyway i tried to launch a game but black screen (Super smash bros melee, that works perfectly on normal swiss so is in list of games that swiss can launch)
Diminuendo
Posts: 305
Joined: Tue Sep 18, 2012 12:32 am

Re: Guide to using cheats in Swiss

Post by Diminuendo » Sat Aug 29, 2015 3:55 am

great, I now need to remember how to re-flash Swiss to my WKF :)
User avatar
emu_kidid
Site Admin
Posts: 4927
Joined: Mon Mar 29, 2010 10:06 am
Location: Australia
Contact:

Re: Guide to using cheats in Swiss

Post by emu_kidid » Sat Aug 29, 2015 3:01 pm

marios92 wrote:Ok, thanks, sorry if i seem fast.
Now cheat appear, but i dont know if is enabled, because after list show and select codes, cant press Start to launch, only B to return (and if open again the list, codes are not selected). Anyway i tried to launch a game but black screen (Super smash bros melee, that works perfectly on normal swiss so is in list of games that swiss can launch)
Yeah, I'll make it remember the cheats until you return to the game list where they will be forgotten. I'll also make it display something like "X cheats enabled" when you're back at the banner screen. Cheats are still enabled when you press B, but when you enter the cheats list again you'll need to select them again. If your game is black screening the cheats may be incompatible with Swiss or may potentially break due to SD card based loading instead of disc? I've successfully used Ralf's cheats on SSBM and Mario Kart DD from SD Gecko (game was on SD gecko).
Image
Diminuendo
Posts: 305
Joined: Tue Sep 18, 2012 12:32 am

Re: Guide to using cheats in Swiss

Post by Diminuendo » Sat Aug 29, 2015 7:21 pm

will we be able to set cheats using the SD Gecko and then transfer the SD to WiiKey Fusion?
marios92
Posts: 12
Joined: Sat Jul 18, 2015 3:56 pm

Re: Guide to using cheats in Swiss

Post by marios92 » Sat Aug 29, 2015 8:52 pm

emu_kidid wrote:
marios92 wrote:Ok, thanks, sorry if i seem fast.
Now cheat appear, but i dont know if is enabled, because after list show and select codes, cant press Start to launch, only B to return (and if open again the list, codes are not selected). Anyway i tried to launch a game but black screen (Super smash bros melee, that works perfectly on normal swiss so is in list of games that swiss can launch)
Yeah, I'll make it remember the cheats until you return to the game list where they will be forgotten. I'll also make it display something like "X cheats enabled" when you're back at the banner screen. Cheats are still enabled when you press B, but when you enter the cheats list again you'll need to select them again. If your game is black screening the cheats may be incompatible with Swiss or may potentially break due to SD card based loading instead of disc? I've successfully used Ralf's cheats on SSBM and Mario Kart DD from SD Gecko (game was on SD gecko).
I dont know what you mean:
I put SD and laucnh swiss from them via Homebrew Launcher (SD media launcher), launch swiss_326.dol, select GeckoSD, select game, select codes, launch game, screen become green for one second and then black and nothing more.
If you mean about stop dvd motor, i tried both with enabled and disabled but nothing, and are not cheats, because i tried to launch without cheats but not work anyway (with the normal swiss.dol games works even with codes)
FishamanP
Posts: 25
Joined: Sat Sep 05, 2015 1:30 am

Re: Guide to using cheats in Swiss

Post by FishamanP » Sat Sep 05, 2015 1:35 am

Using Swiss 0.4 r326 (the latest as of this writing) and trying to load up cheat files, the cheat window never pops up.
Instead, the second line of the game's banner info disappears, and the rest of the app remains functional and responsive.

I have tried with both a custom cheat file for Super Smash Bros Melee v1.02 (using the filename from the cheats starter pack you provided), and the provided cheat file for Pokemon Colosseum.

Tested with my own clean builds of the standard DOL and the dollz compressed version. The DOL from the Nightlies thread gets stuck trying to read from my SD card.
User avatar
Kiara1970
Posts: 5
Joined: Sat Sep 05, 2015 1:34 pm
Location: Austria

Re: Guide to using cheats in Swiss

Post by Kiara1970 » Sat Sep 05, 2015 1:46 pm

FishamanP wrote:Using Swiss 0.4 r326 (the latest as of this writing) and trying to load up cheat files, the cheat window never pops up.
Instead, the second line of the game's banner info disappears, and the rest of the app remains functional and responsive.

I have tried with both a custom cheat file for Super Smash Bros Melee v1.02 (using the filename from the cheats starter pack you provided), and the provided cheat file for Pokemon Colosseum.

Tested with my own clean builds of the standard DOL and the dollz compressed version. The DOL from the Nightlies thread gets stuck trying to read from my SD card.
Me too.I´m using a Xeno GC modded Gamecube and a WiSD Memory Adapter (this one http://www.amazon.de/gp/product/B001AZI ... ge_o07_s00 )
Using Cheats:
In my Case i think its of using a Game on DVD not a Game from SD Card.From SD Card it works perfectly but i´m never been able to get some Games working (Yes i´ve read the SD Compatibility List :) ) The Games are starting and then Black Screen.....but never mind :D

In that Case i´ve a Question about the Swiss ISO/Swiss Boot DVD:
Is there a Possibility to add the "cheat" Folder to the SwissISO ?

Thank you ;)
FishamanP
Posts: 25
Joined: Sat Sep 05, 2015 1:30 am

Re: Guide to using cheats in Swiss

Post by FishamanP » Sat Sep 05, 2015 9:55 pm

Just reverted to r325 and built to test, same thing happens. I should add I'm trying to load games from their original discs; I haven't tried from SD.

Back to building r326, I should add that I get the following build warnings, they look like they may be relevant.

Code: Select all

c:/devkitPro/swiss-gc/cube/swiss/source/gcm.c: In function 'patch_gcm':
c:/devkitPro/swiss-gc/cube/swiss/source/gcm.c:381:3: warning: implicit declaration of function 'getEnabledCheatsSize' [-Wimplicit-function-declaration]
   if(swissSettings.wiirdDebug || getEnabledCheatsSize() > 0) {
   ^


c:/devkitPro/swiss-gc/cube/swiss/source/devices/dvd/deviceHandler-DVD.c: In function 'deviceHandler_DVD_setupFile':
c:/devkitPro/swiss-gc/cube/swiss/source/devices/dvd/deviceHandler-DVD.c:463:3: warning: implicit declaration of function 'sdgecko_getAddressingType' [-Wimplicit-function-declaration]
   *(volatile unsigned int*)VAR_SD_TYPE = sdgecko_getAddressingType(savePatchDevice);
   ^
Building r325 only shows the second error about sdgecko_getAddressingType(), which makes sense because the relevant code for the other warning was committed in r326.
User avatar
emu_kidid
Site Admin
Posts: 4927
Joined: Mon Mar 29, 2010 10:06 am
Location: Australia
Contact:

Re: Guide to using cheats in Swiss

Post by emu_kidid » Sun Sep 06, 2015 11:28 am

You're not putting the cheat files on the right spot
Image
FishamanP
Posts: 25
Joined: Sat Sep 05, 2015 1:30 am

Re: Guide to using cheats in Swiss

Post by FishamanP » Mon Sep 07, 2015 3:47 am

emu_kidid wrote:You're not putting the cheat files on the right spot
emu_kidid wrote:In this example, the for Metroid Prime NTSC the cheats file would need to be named GM8E01.txt and would need to be placed on the SD in /cheats/GM8E01.txt
I just quintuple-checked. sd:/cheats/GC6E01.txt is exactly how I have it for Pokemon Colosseum, and all the other cheat files are in there named the same way.
User avatar
emu_kidid
Site Admin
Posts: 4927
Joined: Mon Mar 29, 2010 10:06 am
Location: Australia
Contact:

Re: Guide to using cheats in Swiss

Post by emu_kidid » Mon Sep 07, 2015 6:01 am

I'll add support to tell you the name of the file it couldn't find, maybe your game ID was changed
Image
FishamanP
Posts: 25
Joined: Sat Sep 05, 2015 1:30 am

Re: Guide to using cheats in Swiss

Post by FishamanP » Tue Sep 08, 2015 11:56 pm

I made a small modification myself to show where the cheat file was looking.
There is a bug after all.

Code: Select all

Looking for cheats file @
\/cheats/GALE01.txt
So I guess the string isn't being stripped properly file handler is looking at the wrong device? Maybe has to do with loading from disc instead of SD Gecko?
If I get it working before you commit a fix, I'll make a pull request. But don't bet on it, I'm not familiar with Swiss's file handling code.

EDIT: Yep, I'm pretty sure that Swiss is assuming the current device is SD Gecko, specifically the same one the GCM is on. But I don't know a pretty way to force an SD Gecko read.
User avatar
emu_kidid
Site Admin
Posts: 4927
Joined: Mon Mar 29, 2010 10:06 am
Location: Australia
Contact:

Re: Guide to using cheats in Swiss

Post by emu_kidid » Wed Sep 09, 2015 7:25 am

ugh, yeah, I thought you were using SD Gecko all along, DVD support is non-existent at the moment :P
Image
novenary
Posts: 1754
Joined: Mon Dec 30, 2013 7:50 am

Re: Guide to using cheats in Swiss

Post by novenary » Wed Sep 09, 2015 11:00 am

Yeah, Swiss isn't really made for cross-device operation. It's feasible but it would need a few changes across the code base to make it work out nicely.
FishamanP
Posts: 25
Joined: Sat Sep 05, 2015 1:30 am

Re: Guide to using cheats in Swiss

Post by FishamanP » Wed Sep 09, 2015 8:02 pm

Is there a quick hack I can use on my end to make it work?
e.g. forcing the cheat files to always be read from the SD Gecko in Slot B?
I tried a rudimentary solution myself but haven't gotten it to work.

EDIT: WE DID IT BOIZ :o
Cheats stored on SD Gecko being applied to DVD games! (or IDE-EXI or whatever)
Time to learn how to fork projects in git.
In the meantime, if anyone wants my little mod, PM me and I'll upload a build.

emu_kidid, would you accept a PR that forces cheats to be read from SD Gecko, or is it too inelegant?


EDIT2: I think I've found a bug with the cheat parser.
Sometimes, especially with long codes (50+ lines) but not always (has happened to a 2-line code), Swiss misinterprets a line of code as a new line.
This triggers consistently on specific cheats, no matter if they shift up or down a few lines.
I've tried pinpointing it to lowercase hexadecimal characters or bugged line endings, but neither seem to be the case.
http://pastebin.com/kfiZFBmm
User avatar
emu_kidid
Site Admin
Posts: 4927
Joined: Mon Mar 29, 2010 10:06 am
Location: Australia
Contact:

Re: Guide to using cheats in Swiss

Post by emu_kidid » Thu Sep 10, 2015 5:20 am

It's those XX codes that cause it, I already mentioned that I try to filter them out but it's best to not have them in your cheats file.

Show me a .patch, if it's just going straight to fopen I probably won't accept the PR.
Image
FishamanP
Posts: 25
Joined: Sat Sep 05, 2015 1:30 am

Re: Guide to using cheats in Swiss

Post by FishamanP » Thu Sep 10, 2015 11:02 pm

Since I'm on Windows, I made a git patch instead of a UNIX one. I hope that's interchangeable enough.
http://pastebin.com/RTWNcbh7

Also, none of the codes in the bugged file I linked have blanks or XX's in them.
Each and every code line is 8 hex characters, a space, 8 more hex characters, and a newline.
Notably, the following excerpt will split into 2 codes:

Code: Select all

"Enable Taunt Cancelling [Dan Salvato]"
(good)

Code: Select all

"04036bb4 60000000"
(not so much)

Code: Select all

Enable Taunt Cancelling [Dan Salvato]
040DEE70 4BFA5411
040CA4CC 40820058

*Do not use with Taunt Battle

Stock Control - Crew Battle [Jorgasms]
04036bb4 60000000
C2266678 00000015
3DC0803F 61CEA3E6
89CE0000 2C0E0000
4182008C 3DC08045
39CE310E 3DE08048
39EF0828 3E008045
6210BF14 8A100000
2C100009 40810008
3A000009 8A2E0000
2C110000 4182000C
9A2F0000 48000008
9A0F0000 8A2E0E90
2C110000 4182000C
9A2F0024 48000008
9A0F0024 8A2E1D20
2C110000 4182000C
9A2F0048 48000008
9A0F0048 8A2E2BB0
2C110000 4182000C
9A2F006C 48000008
9A0F006C 3803FFFF
60000000 00000000
C21A57DC 00000005
3E008048 621006E0
3A200009 9A300000
9A300024 9A300048
9A30006C 38BEFFF8
60000000 00000000
C2230D54 00000006
88030005 3DC0803F
61CEA3E6 3DE08045
61EFBF15 3A000001
89CE0000 2C0E00FF
4082000C 9A0F0000
38000001 00000000
C222F76C 00000008
881C0004 3DC0803F
61CEA3E6 3E008045
6210BF15 8A300000
2C110001 40820014
38000002 39E000FF
99EE0000 4800000C
39E00000 99EE0000
60000000 00000000
C222F6BC 00000008
881C0004 3DC0803F
61CEA3E6 3E008045
6210BF15 8A300000
2C110001 40820014
38000002 39E000FF
99EE0000 4800000C
39E00000 99EE0000
60000000 00000000
C2033CC4 0000000A
3DC08045 61CEBF15
89CE0000 2C0E0002
40820038 3DC08045
39CE310E 3DE08048
39EF0828 8A4F0000
9A4E0000 8A4F0024
9A4E0E90 8A4F0048
9A4E1D20 8A4F006C
9A4E2BB0 48000008
98A3008E 00000000
I took a look at the cheat parser myself, but I couldn't find anything that would mess up like this.
This bug is gonna be a real thorn in my side.
FishamanP
Posts: 25
Joined: Sat Sep 05, 2015 1:30 am

Re: Guide to using cheats in Swiss

Post by FishamanP » Fri Sep 18, 2015 5:48 am

Any updates? Is my patch fine? Do those codes incorrectly split for you?
User avatar
emu_kidid
Site Admin
Posts: 4927
Joined: Mon Mar 29, 2010 10:06 am
Location: Australia
Contact:

Re: Guide to using cheats in Swiss

Post by emu_kidid » Fri Sep 18, 2015 8:57 am

Haven't even looked at it yet. Your patch breaks loading cheats from anything but SD Gecko, there's a few things I'd like to get in place first before putting this code in.
Image
FishamanP
Posts: 25
Joined: Sat Sep 05, 2015 1:30 am

Re: Guide to using cheats in Swiss

Post by FishamanP » Sat Sep 19, 2015 12:29 am

Ah, yep. It's not an ideal, extensible solution for codes, but it's better than what's there now.
But if the code there needs restructuring anyway, it would be foolish to commit this.
FishamanP
Posts: 25
Joined: Sat Sep 05, 2015 1:30 am

Re: Guide to using cheats in Swiss

Post by FishamanP » Mon Sep 28, 2015 6:00 pm

All right, multiple people have requested I post my modified build.
Therefore, I have created a proper fork of the project and committed my changes.
The fork can be found at https://github.com/FishamanP/swiss-gc

My fork can be built with the same setup as for the original, no modifications required.
I've built upstream r329 with my patches, download it here.
Post Reply