RbVBA

Contents

Screenshots

Manual

Installation

VisualBoyAdvance Screenshots and Covers

VisualBoyAdvance README

QJoyPad

Interface Tips

Trainer and Cheats

Cheats

What Are Cheats?

The Cheat Code Format

A Typical Cheat List

Cheat Code Files

An Example Use of a Cheat Code

Cheat Code Tips

The Trainer

What is the Trainer?

The Two Types of Search

A Known Value Search Example

An Unknown Value Search Example

Trainer Tips

Compiling

FAQ

Downloads

Licence

Requirements

Binary Tarballs

Source Tarballs

RbVBA is a REALbasic interface (front-end) to your Gameboy ROM collection for use with the VisualBoyAdvance emulator. It supports gb, gbc, gba, gz and zip ROMs, can display screenshots taken with VisualBoyAdvance and additionally box art (covers) that you can download from the Internet. It now comes with a save state Trainer that enables the creation and application of cheat codes.

Features:

  • Save state Trainer for cheat code creation and application.
  • Up to four different ROM directories.
  • Up to four different covers directories.
  • Integration with QJoyPad for both RbVBA use and VisualBoyAdvance.
  • Recording of individual game usage.
  • Display and management of save states.
  • Easy navigable access to VisualBoyAdvance's README for reference.
  • Console output log for error tracing.
  • Intelligent interface with a strong focus on usability.
  • RbVBA integrates with your configuration.

Screenshots

Manual

Installation

There is only one file of importance, the binary RbVBA. You can place this anywhere but I will suggest /home/user/bin/. RbVBA will create two files in your home directory: .RbVBArc and .RbVBAXPlayed. It relies on the fact that you have VisualBoyAdvance and its configuration file installed somewhere, but where exactly is not important as it is configurable.

If you do not yet have VisualBoyAdvance installed, download it and extract it to somewhere like /home/user/bin/. The best place to store VisualBoyAdvance.cfg is with the VisualBoyAdvance binary.

Execute RbVBA. Click the RbVBArc tab to locate VisualBoyAdvance and VisualBoyAdvance.cfg. Then locate one ROM folder and press Save. If you already have VisualBoyAdvance and VisualBoyAdvance.cfg installed and setup then no further changes are necessary, otherwise click the VBA cfg tab and point to three folders for saveDir (save states), captureDir (screenshots) and batteryDir (game specific settings). I recommend using these folders although you can use whatever you like :-

saveDir /home/user/.VisualBoyAdvance/saves/
captureDir /home/user/.VisualBoyAdvance/snaps/
batteryDir /home/user/.VisualBoyAdvance/battery/

Click Save and configuration is complete.

VisualBoyAdvance Screenshots and Covers

When using VisualBoyAdvance, you can take screenshots via F12. These by default will be png and saved in captureDir, but jpg and bmp are also supported. When playing a game, the first screenshot you take will appear in the Title tab, the second in the Snap tab. For Covers (box art) you will need to supply these yourself (hint: Amazon). They can be jpg, png or bmp, are 300x300 pixels and stored in one of four folders. These folders need to be located and pointed to in the RbVBArc tab.

VisualBoyAdvance README

If you want to view the README file that comes with VisualBoyAdvance you must locate it and point to it in the RbVBArc tab. Then you can quickly navigate to key and command line settings via the links on the VBA README tab.

QJoyPad

You can specify QJoyPad layouts for use within RbVBA or VisualBoyAdvance. The layouts are not supplied but you can specify any existing layouts created with QJoyPad.

Interface Tips

  • While scrolling up and down the game list pressing ENTER will play the selected game.
  • Scroll up the game list with the up or left arrows, down with the down or right arrows. The game list wraps so if you press up at the top you'll reappear at the bottom.
  • Typing any alphanumeric character while in the the game list will take you to the first game in the list starting with that character. Typing it again will take you to the next etc.
  • Pressing ENTER inside the Command Line Arguments text box will play the currently selected game.
  • If you want to temporarily remove a ROM or Cover folder, don't delete the entire path, just add a character to the end to make it invalid (and press Save), then you will only need to remove that single character to reactivate it.
  • You don't have to mix up gba, gbc and gb ROMs. Put them in their own folders then you can include/exclude them from the game list by altering the ROM paths (see previous tip).
  • The VBA README tab that displays the VisualBoyAdvance README file can display any text file. Just change the path in the RbVBArc tab.
  • Images can be jpg, bmp or png.
  • ROMS in .gz files do not need to be scanned to identify their contents, but .zip do, so .gz ROMs list much faster.

Trainer and Cheats

Please note that cheats -- also referred to as cheat codes -- operate on the save state file that VisualBoyAdvance can create via Shift + F9 only. The ROMs or battery saves are NOT affected by the Trainer or cheat codes.

Cheats

What Are Cheats?

Cheats are codes that modify certain values within a game such as lives or ammo. Enter cheats into the Cheats tab. You can create your own cheats using the supplied Trainer or you can type them in from another source.

The Cheat Code Format

Address.Bytes.Value for example:-

FEB3B.1.63 would set a single byte at address FEB3B to hexadecimal 63 (decimal 99). It is also possible to have 2-byte cheat codes for example 33A8.2.7FFF would set a 2-byte word at address 33A8 to hexadecimal 7FFF (decimal 32767) in little-endian format i.e. actually stored within the save state file as FF7F.

A Typical Cheat List

* CT Special Forces 2 - Back to Hell *
-= Machine Gun Ammo =-
33AF.2.3E7
-= Grenades =-
33AB.2.63
-= Health =-
33A3.1.65
-= Grenade Launcher Ammo =-
33B5.2.3E7
-= Flame Thrower Ammo =-
33B1.2.3E7
-= Lives =-
332B.1.9

It is possible to enter anything into the cheat list and the above example is a format that I am content with, but you are free to design yours as you like. Only valid enabled cheats can be applied to the save state file which is always #9 i.e. the save state file that is created by pressing Shift + F9 from within VisualBoyAdvance. Cheats must be enabled (checked) before pressing the Apply button otherwise nothing will be applied.

Cheat Code Files

Cheats can be saved to their own game related file. The cheat codes will be saved to gamename.rcf in the folder specified in the RbVBArc tab under Cheats. I suggest setting this path to a similar place you will have already set the battery, saves, snaps and covers to for example /home/user/.VisualBoyAdvance/cheats/. Cheat codes are always referenced in hexadecimal format although it is possible to display their values in decimal within the cheat list. When they are saved to file they are always stored in hexadecimal format.

An Example Use of a Cheat Code

  • Select CT Special Forces 2 - Back to Hell in the game list.
  • Play the game, start a mission and then press Shift + F9 to save state #9. Quit back to RbVBA.
  • Select the Cheats tab, press New and type in 332B.1.9. Click the checkbox to enable it or press the space bar to toggle it on. Press Apply.
  • Play the game again and press F9 to load save state #9. Now you have 9 lives!

Thus the sequence is Play Shift + F9 Quit Apply Play F9. There is no realtime Gameboy memory hacking; this is a save state system.

Cheat Code Tips

  • For 4-byte codes use two 2-byte codes e.g. 2317B.2.F23F and 2317D.2.4 which would be 999999 decimal.
  • Pressing Enter or F2 with a selected cheat code will enter edit mode.
  • Clicking a selected cheat code will enter edit mode.
  • Pressing Delete with a selected cheat code will delete it.
  • Pressing Insert with the cheat list selected will Add a new cheat.
  • Pressing Space with a selected cheat code will toggle it enabled/disabled if it is valid.
  • Drag and release unselected cheat codes to move them within the list.

The Trainer

What is the Trainer?

The Trainer is a system to search for values that could represent number of lives, number of bullets, health, level etc. The Trainer within RbVBA is a save state Trainer, meaning it operates on save state files. This system is different to Trainers that operate persistently on memory.

The Two Types of Search

There are two different search methods depending on what you are searching for. One is the Known Value Search and the other the Unknown Value Search. Known values are values such as those that represent bullets or grenades, unknown values represent health bars.

A Known Value Search Example

Throughout use of the Trainer there are Context Sensitive Instructions at the top. Read them until you are familiar with the system.

  • Select Advance Wars in the game list.
  • Play the game, start the War Room level Spann Island using Andy and then press Shift + F9 to save state #9. Quit back to RbVBA.
  • You will notice you have 5000 funds. Select the Trainer tab, enter 5000 (decimal) in the Known Value text box and press Enter (or click Search). Play the game again (you can use the Play button on the Trainer tab) and reload save state #9 with F9.
  • Build one infantry unit for 1000 so that you have 4000 remaining. Save the state again with Shift + F9 and quit back to RbVBA.
  • In the Known Value text box enter 4000 and press Enter. This time you will see results in the Results list and you should only have one - 0002317B.2.0FA0. 0FA0 is 4000 in hexadecimal. Double-click this single result and it will be added to the cheat list on the Cheats tab which will be brought into view if not previously visible. We want more funds than 4000 so click the cheat code and edit it so that 0FA0 becomes FFFF then press Enter. It should now read 2317B.2.FFFF. Press Space to toggle the cheat code on and then click Apply. This will apply the cheat code to save state #9 only.
  • Press the Reset button on the Trainer tab as we have finished with the Trainer. Play the game again, reload save state #9 (F9) and now you have 65535 funds!
  • That's it.

Advanced: the funds value in Advance Wars is actually 4 bytes so you can manually create a new cheat code 2317D.2.E and apply that too which would give you 983039 funds; more than enough.

An Unknown Value Search Example

This system is quite difficult to explain using an example because it differs considerably depending on what game you are playing and what you are searching for, so I will just explain the process.

You want to search for the value that represents your characters health but you don't know what the value is as it's just a bar, no numbers. For this you can use the Unknown Value Search. The first time you use this method you simply press Search to initialise it. Thereafter you describe the difference between the previous value and the current value. Perhaps your health bar was full and you have taken damage so now your health is less than it previously was, so you click the less than button (<). Maybe your health has been increased by a power-up so now your health is greater than it previously was (>), maybe it's been the same for some time (=) or not the same (< >). The point is you must describe how the current value relates to the previous value and keep repeating this process until you have reduced the results to something useable. It is not uncommon to finish with 8 or so results after 10 iterations of the process. More so than the Known Value Search, this method relies on you understanding what you are looking for and being able to distinguish it.

I have used this method to search for the health bar in CT Special Forces 2 - Back to Hell. It took 11 iterations to get 6 results and I could see the result which would generate a cheat code because it was similar to others I had found and wildly different to the other 5 results. The code is 33A3.1.64 (64 hex is 100 decimal).

Trainer Tips

  • If you are using the Known Value Search and are searching for hex 7F (a single byte) but want to search for a 2-byte word then use leading zeros - 007F. Using decimal this would be equivalent to 127 (single byte) or 00127 (2 bytes).
  • Don't mix number formats i.e. search for decimal values but leave the results and cheats showing hexadecimal otherwise you will get confused. The ability to switch number formats should be used as an aid, but mostly it is best to use the default settings.
  • When using the Unknown Value Search, use as many different combinations of comparisons as possible. Don't just use less than, less than, less than, try to use it randomnly to reduce the search iterations.

Compiling

Download the latest source tarball from #Downloads, extract it and you will see a file called RbVBA.rbp. This is a REALbasic project file and you will need REALbasic Linux to open it. Compiling is a simple matter of selecting Build from the menu, although when you first open the project REALbasic may ask you to locate two graphics files. These files are included and you should simply point to them.

If you are experiencing difficulties with compiling or executing RbVBA you can always email me, or post on the project page at The Linux Game Tome .

FAQ

Why is Linux x86 a requirement?
Because REALbasic Linux compiles for x86. Actually REALbasic Linux (the non free version) will compile for Windows and MAC OSX but quite a few modifications would be needed in the RbVBA source for this to work; it could be done though.

Why aren't all the VisualBoyAdvance configuration options shown?
Only three VisualBoyAdvance configuration options need to be setup before use and I don't want to bloat out RbVBA with pages of controls that never get used; that is not the direction of this project. Click the VBA README tab, click Command Line Options and type the option into the additional Command Line Arguments text box. The contents of this text box are saved on exit and restored on startup.

In the Select Folder/File dialog, how do you show hidden folders and files?
Apparently all the functionality of the file selector is hidden in the text box. Type . and press TAB and then it shows all the hidden files.

Can using the Trainer and the cheat codes damage my ROMs?
NO. The Trainer and the cheat codes operate on one single save state file that you create within VisualBoyAdvance by pressing Shift + F9. Save state files are snapshots of the game's RAM and these snapshots are a feature of VisualBoyAdvance. You may already have save state files for the game you want to hack but it is unlikely they will occupy slot #9, so that is why I have chosen this particular slot.

Why can't cheat codes be 4 bytes, only 1 and 2?
I am using REALbasic2005 and it doesn't have unsigned integers, only signed 4 byte integers. I need unsigned 4 and 8 byte integers which are in REALbasic2006r1 and UInt64 is bugged in that release.

Downloads

Licence

GNU GENERAL PUBLIC LICENSE Version 2, June 1991

Requirements

Binary Tarballs

Source Tarballs