GCNrd GUI basic manual :


7th Septembre 2004 : Beta 1.1 (WIP)
-----------------------------------

Additions :

+ Added a FST Browser/Editor Tab.

+ Added a 'log steps' option in the Breakpoint Tab.

+ Added a 'displayed on start up' settings window.

+ Added a 'Convert dec to hex' button in the Code Search Tab.

+ Added the 'Load search' and 'Save search' buttons in the 'Code Search' Tab.

+ Added a 'Hook' command in the Disassembler's Popup menu.

+ Added a 'NEXT speed' choice in the 'About' tab.

+ Added support for the custom UDP Port settings (gcnrd 1.10).

+ Added a 'Safe mode' option (for WinXP only).
  Use it if the GUI has troubles sending commands to gcnrd.
  Put 'safemode = 1' to enable it in gcnrd.exe, or 'safemode = 0'
  to disable it. You can also use the 'Safe mode' button in the
  'About' Tab.

+ Added the 'Assembler' feature on the 'Disassembler' Tab.
  You must have the files 'powerpc-eabi-elf-as.exe', 'powerpc-eabi-elf-ld.exe',
  'powerpc-eabi-elf-objcopy.exe', 'cygwin1.dll' and 'vdappc.exe' to access it.
  These files can be found on the Devkit Cube (www.gcdev.com/downloads.shtml).

+ Added the 'Do not break on...' and 'Break only if...' features.
  They both work for the breakpoint and the step feature.

+ Added a 'Multipoke' feature. Use it to poke different results found by the code
  search very fast.

+ Added partial support for the PAR 1.00 (ie. the Japanese AR, that to Y.S.!).

+ Added support for the AR v1.09S (thanks to Xand !) and 1.12 U (thanks to
  Lorenzo Lamas).

+ Made that the GUI handles the screen captures itself on Win98/ME. Which means
  no more crashes on Win98/ME. Big thanks to Parasyte for his help. Win9X users
  might encounter some strange colors on the preview window of the GUI (I've
  witnessed it, but the GUI was running on a very crappy PC). If that happens,
  don't worry, the saved image will be perfect.

+ Added support for changing GCNrd's debug mode for Win98/ME (using GCNrdGUI's

+ Added support for loading Loader.dol from the memcard.
  Put "load=1" in gcnrdgui.cfg if you are loading Loader.dol from the memcard,
  else put "load=0". If nothing is put in gcnrdgui.cfg, it will be defaulted to
  "load=1".
  If you want to know how to install/load a .dol from the memcard, go there :
  http://www.dextrose.com/_forum/forumdisplay.php?s=&forumid=68
  It should be 100% compatible with Datel's "MAX Drive Pro".

+ Added a "Move to code name" option in the AR Manager, so you can move the code's
  name from the code window to the code name edit box (in a right click menu).

+ Added a "AR automatic hook code creator", which should create hook codes and
  store them in gcnrdgui.cfg and ar.cfg for any (known, and hopefuly unknown)
  version of the AR, so the debugger will work with any AR.
  'debug mode..' button).

+ Made that the GUI will automatically recognize any new AR, and find all the
  hooks for it.
  Added a "ar.cfg" file, in which the data for the AR manager are stored. Don't
  edit these values yourself ! They will be automatically added by the GUI. If it
  doesn't work with your AR, contact me.

+ Added a "hook code search" that will lists all the ahook results found by gcnrd.

+ Removed the hidden "codehandler.bin" loader.

+ Added a PAL/NTSC code selection support.


Corrections :

- Corrected the 16/32bits search bug on start up.
- Upgraded the ICS component to their latest (beta) version. It might fix the
  WinSocket bugs some people were encountering...
- Corrected some cosmetic bugs in the "Load search" function.
- Corrected a bug in the "Undo" feature of the code search.
- Corrected a display bug in the "Restart"'s code search feature.
- Corrected a bug in the disassembler tab that could crash the GC.
- Corrected a bug in which when GCNrdGUI was launching the AR, that could lead to
  crashes/hangs.
- Corrected a (newly created?) bug with the 'Amplify' button (screnshots tab)
  under Win9X.
- Corrected a bug with the disassembly in win98.
- Corrected the screenshot browsing feature.
- Made it that the GUI removes (or tries to remove) all the temporary files it
  creates.
- Corrected the 'too many codes' bug in the AR Codes tab.
- Corrected some single precision floating point conversion.
- Change the way the GUI interacted with GCNrd. It should improve the compatibility
  under Win98/ME, and the speed under WinXP.
- Changed the way the GUI handles the AR name to allow the recognization of the PAR.
- Made it that the GUI reacts correctly if the image captured is corrupted.
- Made it that the GUI always creates the debug.log file. Don't use debuglog.bat
  anymore.
- Changed the way the GUI's debug mode works. Now, all options are accessible when
  the debug mode is off. Only difference is that you can only access 80003100~817F8000
  when it is off, and any memory 
  range when it's on. Beware, accessing an unallowed area will crash the GC.
- Improved the speed of the GUI. Searches time should be now almost 2 time faster.
- Changed the way the GUI handles the 'Step' buttons to avoid random crashing.
- Removed the Scrollbar from the Disassembler Tab.
- Some other minor fixes/changes...



31 March 2004 : Beta 1.0
------------------------

- Initial Release.


Misc. :
-------

GCNrd GUI was written in Borland's Delphi V6 by kenobi.
It uses the great ICS compoment from Franois Piette (www.overbyte.be).
Its only purpose is to send commands to gcnrd.exe (the remote debugger created
by Parasyte), by either using createprocess or sending keyboards events, and to
analyse the files created by gcnrd.exe.

If you use a firewall, you might need to allow the GUI to act as a server.
That's because the GUI listens the UDP port 9405 (or any custom UDPDebugPort) port
on which loader.dol will send data as soon as a game is introduced (this is needed
to be able to "autorun" games).

If you have any problem with it, you can try to contact me using www.gscentral.com 's
message board.



Intro :
-------

Place GCNRD.EXE, GCNRD.CFG, GCNrdGUI.EXE, GCNRDGUI.CFG, LOADER.DOL and VDAPPC.EXE
in the same directory. You might also want to add "powerpc-eabi-elf-as.exe",
"powerpc-eabi-elf-ld.exe", "powerpc-eabi-elf-objcopy.exe" and "cygwin1.dll" if
you want to have access to the assembler (you can find these files in DevKit Cube,
downloadable at www.gcdev.com).
Copy PSOLOAD.EXE / PSUL.EXE in this same directory, and rename it to 'LOADER.EXE'.
You must have configured your PSO to commicate with your PC. Read PSOLOAD/PSUL
manual to find out how to do it.

Start GCNrdGUI.EXE. Be sure to configure your firewall to let GCNRD/GCNrdGUI to
communicate with the NGC.

When you launch (or restart) GCNrdGUI, it'll ask you if you want to launch LOADER.EXE.

- If you choose to do so, GCNrdGUI will ask LOADER.EXE to send LOADER.DOL to PSO.
  You'll have to launch PSO and start an online game.
  Once LOADER.DOL has been loaded, it'll ask you to enter your GCN and PC IP addresses.
  This is a one time thing : once you've entered both addresses correctly, LOADER.DOL
  will save them in the NGC SRAM.
  After that press Start, and LOADER.DOL will ask you to insert a new game. Once you've
  done it, GCNrdGUI should automatically launch the game.

- If you don't choose to load LOADER.EXE, you MUST have a game running in the NGC,
  and LOADER.DOL loaded. If this isn't the case, GCNrdGUI will report a time out.

- When the GUI starts, it will create three sub-directories : SCREENS, CODES and SAVES.

- You can place "custom loading commands" in GCNRDGUI.CFG (only do it if you know what
  you are doing), that will be send before the game is run.

- Changing the value of "reportlog" if gcnrdgui.cfg to "reportlog=1" will auto-launch
  reportlog.bat before the game is launched. It is used for debugging purpose, so only
  do it if Parasyte asks you to do it.

- Changing the value of "autolaunch" if gcnrdgui.cfg to "autolaunch=0" will prevent
  the GUI from auto-launching the game. It can be used to send custom commands before
  launching the game, but you should let it set to "autolaunch=1" unless you know
  what you are doing.

- If you set "debugmode=1" in gcnrd.cfg, the GUI's debug mode will also be set to 1.

- Add/Set "load=1" in gcnrdgui.cfg if you are loading loader.dol from the memcard.
  If "load" hasn't been set, it will default to "load=0", and use loader.exe to send
  loader.dol.

- You have to set 'pal=0' if your console is NTSC, else use 'pal=1'.
  If 'pal' isn't set, it will default to 'pal=0'.

- If you want the GUI to use the createprocess to launch gcnrd.exe, set 'safemode=1'.
  If you want the GUI to send keyboard commands to gcnrd.exe (WinXP only), set 'safemode=0'.
  If 'safe' isn't set, it will default to 'safemode=1'.

- If you change the debug port used by gcnrd (1.10b of higher), set the 'UDPDebugPort'
  to that port number in gcnrdgui.cfg.
  If 'UDPDebugPort' isn't set, it will default to 'UDPDebugPort = 9405'.




**********************************************
!!! ALL NUMBERS IN THE GUI ARE HEXADECIMAL !!!
**********************************************





Common Buttons :
----------------

'Pause' will pause the game, 'Step' will advance one frame, 'Run' will unpause
the game. Be aware that 'Step' might not work properly for all the game.

The 'hook' addresses will list all the ahook places found by gcnrd. It will
automatically find them when loading loader.dol. To make the GUI search them
manually, press the 'Search hooks' button in the 'About' tab of the GUI.

If you set the GUI's debug mode on, you'll have a 'Show GCNRD'/'Hide GCNRD' button.
It can be used for debugging purpose (see if anything is going wrong in gcnrd), or
to send custom commands when a game is running.



Code Search Tab :
-----------------

- If you want to search the RAM for a specific area, change the 'Start' and 'End'
  addresses.
  You can also select a pre-configured 'bank' by changing the number in the combobox
  located to the left of the 'Start' address. The default bank is 'all', which
  will cover all the mrmory used by GCN Games (0x80003100-0x817F800).

- After that, you have to select the 'Data Size'. 8, 16 and 32 bits values are allowed.

- Now you have to select if you want to search for a specific (= known) or unknown value.
  If you choose to choose a specific value, you have to enter it in the 'Value' editbox.
  You can also use '?' as wilcard. For exemple, choosing the value '?5' will find
  '15', '25', ..., 'F5'. If the GUI's debug mode is on, you can also search for
  floating point values. To do that, enter a decimal value (for exemple '1.5'),
  then right-click on it, and choose 'Convert to Float'. You can also convert 'Pi'
  easily by entering 'pi' in the value and convert it to float.
  Finally, if you don't like Hex numbers, you can input decimals numbers and press the
  'Convert Dec to Hex' button.

- Finally, you must select the 'Compare Type'. The 'Flag type' will keep the
  values if they are only 1 bit different. It can be useful to find the places
  where the game stores the pad's value, or to find some 'event' codes.

- Once you're done, you just have to press 'Start'. The GUI will then dump the RAM.
  If you choosed 'Specific value', it'll use the 'Compare type' to compare the
  dump with the value you entered, and will show the results in the GUI.
  If you choosed 'Unknown value' nothing will happen after the dump. You'll have
  to play the game a bit (and loose a life, take an object... Make anything to
  make the value you're looking for change), then push 'Search' button. The GUI
  will then compare the 2 dumps it has made, and will display the result of the search.

- To keep searching for your code, only use the 'Search' button. Pressing the
  'Start' (or 'Restart') button will start a brand new search, and erase all your progress.

- If you do a mistake while searching (wrong 'Compare type', press 'Restart',
  change the 'Data size'), you can press the 'Esc' key to undo your last move.

- Once you've found a code, you can right click on it to pop-up a menu that will allow
  you to send it to the different area of the GUI (Poke, Memory Viewer, Breakpoint...).
  You can also double-click it to send it directly to the 'Code List' tab.
  Moreover, if you select a range of results, click "-> Poke" in the right-click menu,
  and then click the 'Poke' button, the poke will be applied to all the selected
  addresses (ie. it's a "multipoke").

* On the Code Search Tab, under the list of value found you can also find a pannel
  with the 'Poke' and 'Dump' buttons.

- If you want to 'Poke' (= write to ram) a value, you have to enter the address,
  and the value you want to write. Be sure to select the good 'Data Size', else
  you can encounter strange results/crash. Then press the 'Poke' button.

- You can save/load your search by righ-click on the 'Search' tab (a save/load menu
  will appear). Only ONE save is authorized (that's because a save can eat up to
  27 megs, allowing more than one save could end up eating all your HDD space).
  You can also use the 'Load search' and 'Save search' buttons for that purpose.

ONLY FOR ADVANCED USERS (appears when 'Debug Mode' is on) :
- If you want to 'Dump' (=save to a file) a part of the RAM, you have to enter
  the start address of the dump, and the SIZE of the dump. Then press the 'Dump'
  button, and the data will be saved in the 'ram.bin' file, in the GCNrdGUI folder.



Breakpoints Tab :
-----------------

- You can set a Breakpoint on Read, Write, Read/Write and Execute. When the BP is hit,
  the GUI will asks VDAPPC to dissassemble the game, and will display the results
  along with the register values dumped by GCNRD. The disassembled address will
  also be send to the 'Disassembler' tab. Be aware that breakpoints might sometime
  crash the game.

- Once a Breakpoint has been hit, you can 'trace' the code by clicking the 'Step'
  button.

- If you don't want the debugger to break on an given address, you have to enter
  it in the 'Do not break on...' place, then click enter. To delete an address
  from the 'Do not break on' list, just select it, rigth-click on it, and choose
  'Delete'.

- If you want the debugger to break only if a given register (or any register) is
  equal/different/less than... a precise value, use the 'Break only if...' place.
  ('01' means 'flag search', ie. the bp will only happen if there is a one bit
  difference between the register value and the value you entered).

- Please note that the 'Do not break on...' and 'Break only if...' will slow down
  the game a lot.

- The 'Instructions skipped :' message will display the number of instruction
  skipped by the GUI.

- You can save the instructions executed during the step process by checking the 'log
  steps' checkbox. You can also delete that file by clicking the 'Clear Log' button.
  The instructions will be saved in a file named 'step.txt', created in GCNrdGUI's folder.


Memory Viewer Tab :
-------------------

- This let you peek at the NGC RAM. Just enter the address you wanna spy, and press
  'Display' (or the 'Return' keyboard's key). You can also check the 'Auto-Update'
  to have the GUI display the RAM values "in real time".

- You can 'trace' the code by clicking on the 'Step' button.

- You can jump to an address by double-clicking a value that IS an address
  (in the 80003100-817F8000 range). Then you can go back by selecting this option
  in the right-click menu. (The GUI will keep an history of 20 jumps).

- Right-click on any address to send it, along with its value, to any allowed tab.

- You can take a snapshot of a memory area by clicking the 'Take Snapshot' button.
  Then, you can show/hide the snapshot by clicking the 'Show Snapshot'/'Hide Snapshot'
  button.
  You can also double click/right click on the snapshot, which has the same options
  than the 'normal' memory viewer window.

- You can search the memory for a particular value or text, depending on the
  selected 'display type'. The text search is kinda slow. It will do a byte per
  byte search, which mean it'll report any matching value, whatever its alignement
  is. If you uncheck the 'Case sensitive' box, searching for 'Debug', 'debug' or
  'DEBUG' will find the same results.

- The Memory Viewer Tab will also show you Floating Value conversion of any selected
  memory viever's value.



Disassembler Tab :
------------------

- This let you see the dissassembly of the NGC RAM. Just enter the address you wanna
  disassemble, and validate the addres by pressing the keyboard's 'Return' key.

- You can 'trace' the code by clicking on the 'Step' button.

- You can also double-click on any "branch" (with the exception of the 'blr')
  to jump to the branch's target address. Then, if you right-click on the dissassembly,
  you can go back to the last addres you were. (The GUI will keep an history of 20
  "branch" jump).

- Right-click on any address to send it, along with its value, to any allowed tab.

- If you choose the 'Hook' option in the right-click menu, the GUI will send a hook
  command for that address to gcnrd. Use it only if you know what you're doing.

- If you want to edit a asm line, select it, then modify it in the 'Assembly' box,
  and finally click 'Update'. If the GUI reports an error, that means the line you
  typed is wrong.

- Some branch instructions, which cover a large area of the RAM, might take some
  time to compute. Everything else should be computed in an eye blink.



AR Codes Tab :
--------------

- To use this feature, you must follow this loading sequence :
  PSO->loader.dol->AR.

- Then, choose the game you wanna hack in the AR list, and uncheck ALL THE CODES.
  Then press the start button on the GCN pad, and insert the game.

- After that, you'll have to CLOSE AND RELOAD THE GUI. Failing to do that will make
  the GUI save your code in the wrong file.

- From this point, you can add/remove any code from the AR code handler. It actually
  means you can test the codes you find in real time, and that you can cheat while hacking.

- When you enter the 'AR Codes' Tab, the GUI will automatically pause the game.
  This has been done purposely : don't try to unpause the game, or you might end up
  crashing the Game. The GUI will unpause the game as soon as you select a new tab.

- The GUI will automatically load all the codes you created (and saved) when you
  enter the 'AR codes' tab.

- To add a code, right-click on the left memo, and choose 'add code'. Then enter
  the code in the top-right editbox, and click 'Add codes'. CODES MUST BE UNENCRYPTED
  AR CODES. Failing to enter unencrypted AR codes will likely crash the game.

- To send the codes you entered, and that are enabled, to the GCN, click the 'Apply Codes'
  button.

- To save the codes you entered, click the 'Save Codes' button.

- To reload the codes list, click the 'Load Codes' button.

- You can enabled/disable a line of code by clicking in the 1st column (just before
  the code). ' ' means disabled, '*' means enabled.

- You can edit a line of code by clicking on the address or the value.

- You can add/remove a line of code by right-clicking on it.

- You can enabled/disable/add/delete a whole code by right-clicking on its name on
  the left memo.

- DON'T FORGET TO SAVE YOUR CODES BEFORE QUITTING THE GUI.

- You can also edit the files in the 'codes' folder to manually add all the codes
  you need. These files will be named by the name of the internal game you're playing,
  so be sure to look for it in the GUI. (it can be seen above the left memo of the
  'AR Codes' tab). If no files have been created, just use the GUI 'Save Codes' button
  to create a dummy file, and edit it.



AR Manager Tab :
----------------

- It allows you to send/receive codes directly to the AR in a matter of seconds.

- To use it, you must go on the ActionReplay Codes menu of the AR, and select
  (or create) a code. The GUI will only be able to send/receive codes when you
  see the AR Virtual Keyboard on the TV screen.

- To send a game name, you must be in the game name edition/creation on the AR.

- To send a code name, you must be in the code name edition/creation on the AR.

- To send the codes, you must be in the codes edition/creation on the AR.

- The codes must be encrypted (in this form : AAAA-BBBB-CCCCCC).

- There might be some bugs with 1.07 and/or 1.09-1.10 Action Replay.

- Added a "Move to code name" option. If you copy a whole code in the "Codes" edit box,
  and have the name of the code in the first line, use this option to make the GUI
  cut & paste this line in the code name edit box.

- You can also paste a copied code in the "Codes" edit box by right-clicking it,
  and choosing 'Paste Clipboard'.



Screenshots Tab :
-----------------

- It will allow you to take screenshots of the game you're playing.
  The screenshots will be saved in the "screens" folder.

- To actually take and save a picture, you have to click the 'Screen Capture' button.
  The 'Preview' button will create a 'preview.tmp' file in the "screens" folder,
  which will be deleted when you close the GUI.

- You can browse your pictures by using the '<' and '>' pictures. If you want to
  take a new picture, you have to push the '>' buton until it disables itself.
  If you don't do it, the current picture displayed will be overwritten.

- If the pictures are too dark, use the 'Amplify' panel. It won't actually change
  the picture, just the way it is displayed on the monitor.

- If you have already taken pictures, the GUI will jump to the very last picture + 1
  on startup. (ie. : you'll be able to take new screenshots right out of the bat,
  without overwriting the old ones).



FST :
-----

- It will allow you to see the file that are on the GC disc which is running.

- You can also edit a filename, which can be useful to create 'file swapping' codes.

- If you are trying to create 'file swapping' codes, keep in mind that the position of
  the FST when GCNrd is running is different than the position of the FST when GCNrd
  isn't running. The difference might be 0x8000 (ie. you have to add 0x8000 to the
  file's address), but there is no guarantee it'll work...

- You CAN NOT extract a file with this tool.



About Tab :
-------------

- Pressing the 'Show Settings' brings out the starting settings window.

- Pressing the 'Reset GCNrd' button (only avaible under WinXP) will close/relaunch
  GCNrd.exe. Use it if you have a timeout/bad packet message in GCNrd.

- Pressing the 'Debug is off'/'Debug is on' button will trigger the GCNrdGUI.EXE
  & GCNRD.EXE's debug mode on/off.

- Debug Mode allows you to access any memory range. It's useful if you want to
  gain access to the Virtual Memory. But be aware that accessing a unallowed
  memory range would crash the GC.

- Pressing the 'Search hooks' button will make the GUI lists all the ahook result
  found by gcnrd.

- Pressing the 'Upload Breakpoints' will upload the files bprw.bin, step.bin and
  bpx.bin to the RAM. (Can be useful if a game doesn't support breakpoints).

- WinXP Only : Pressing the 'Safe mode is on'/'Safe mode is off' button disables/enables
  the safe mode.
  Safe mode on : the GUI will use createprocess to send commands to gcnrd.
  PROS : "bug free".
  CONS : You won't be able to send command manually to gcnrd using the 'Show GCNrd' button.

  Safe mode off : the GUI will send keystrokes to gcnrd.
  PROS : Sometimes faster than safe mode off ; let you send commands manually
         using the 'Show GCNrd' button.
  CONS : It can creates problem if the timing if out of sync, if the user uses the
         keyboard while the GUI is sending keystrokes, or if the langage is set to
         japanese on a EU/US windows. These problems will likely confuse the GUI,
         and might even crash the GC.

- Changing the value of the 'NEXT speed' will send a run/pause command with the
  timing of the selected FPS.
  Use it if the 'NEXT' command doesn't seem to do anything when set to auto.
  AFAP means "As Fast As Possible". It'll send a run/pause command very fast,
  which should make the debugger pause on the next hook encountered.






--------------------
KNOWN BUGS/PROBLEMS :
--------------------

- Hex-editing a file used by the GUI when it is running can lead to errors.

- Try to not overload you PC with other programs when using the GUI, especially
  when safe mode is off. In that case, as the GUI needs to send keystrokes to
  gcnrd to work, slowing down the PC could lead to trashed commands, and could
  crash the games. Also, when safemode is off, try to not use the Keyboard when
  GCNrdGUI is processing, else it'll send trashed command (which would likely
  crash the GC).

- There seem to be a very rare bug that shows up during some search, and that
  could crash the GUI. If you experience this problem, try to reproduce it and
  contact me.

- If you changed your windows fonts size, some parts of the GUI layout might now
  display correctly. You might want to set your windows font size to '96 DPI' to
  avoid this "bug". To change it, right-click on your desktop, choose 'Property'.
  Then select the 'Parameter' Tab, click 'Advanced'. Now go on the 'General' Tab.
  You'll be able to change your windows font size there (you might have to reboot
  windows for the changes to take effect).






