Can you make a DOS version?
Sorry, I can't produce a DOS version. If you want something similar to a DOS version, try the SDL version which can be faster depending on the machine and hardware.
You have to fix it because "XXX" doesn't work?
If you really want to play "XXX", buy yourself a GBA and "XXX" and play it.
The emulator may never emulate the GBA perfectly, so some stuff may never work.
You can then double-click the file to import the settings again.
If you are using the GUI version of regedit, just find the VisualBoyAdvance node HKEY_CURRENT_USERSoftwareEmulatorsVisualBoyAdvance, select it and choose Export from the menu.
On newer versions, you can also export your settings to an INI file and use it instead of the registry. Just look at the File->Export menu and Options->Emulator menu.
Can you port VBA to XXX?
No. I am not responsible for ports. The source is available, so anyone can try to port it. The SDL version should compile on most computers and run.
The emulator starts and closes right away
If you are using the SDL version, it requires you to pass the ROM file to be emulated. You may also want to use a frontend, which you can find links to in the Links section of the website.
If you are using the Windows version, it is possible that your computer is infected by a virus.
How do I report a crash?
Note: by crash I mean the program closes itself and a operating system message is shown saying that the program performed some illegal operation.
This information is available on the readme. Please note that this is a crash of the emulator program and not the emulated ROM!
If VisualBoyAdvance crashes, please do the following:
Win 95/98/ME: start DrWatson (drwatson.exe) and reproduce the crash. DrWatson will capture the crash information in a log file (.wlg) file that needs to be sent to me.
Win NT/2000/XP: make sure DrWatson is the default debugger by executing drwtsn32.exe -i and then recreate the crash. DrWatson will generate a log file that needs to be sent to me (usually in c:Documents and SettingsAll Users DocumentsDrWatson). Depending on your system configuration, you may be asked if you want to generate a log file. If so, please click on yes.
Linux and BeOS: if you get a core file, please compress it and send it to me for investigation.
How can I use the cheat search function?
The cheat search can only be used to search and modify values in the RAM areas, i.e., you can change your number of lives, money and life bar and you can freeze the value to get "infinite" result.
To use it, enter the cheat search dialog and start a new search (or reset any previous search). If you have 5 lives, select equal on the comparison type, make sure Specific value is selected, click on entered value, type 5 on the value to search and then click search. This will find all locations where the number 5 is present.
Return to the game and lose a life. Once you lost a life, go back to the search dialog, click on less than compare type, select old value and click on search. This will search the previous found locations for values less then the previous value. You should now be able to identify the location that contains the number of lives. You can write it down and change its value by selecting it and clicking on add cheat button. If there are still too many options, continue loosing a life and refining the search.
Some cheats will require you to use a different size for the data. For example, life bars are usually represented in 16 bits. Number of lifes is usually 8-bits. Score is usually represented in 32 bits.
Depending on the game, it is possible that values are kept in BCD format (Binary Coded Decimal), so you may need to do all the searches in hex instead of decimal format.
Cheats are saved with the emulator save states and can also be disabled.
Where do I enter cheat codes?
Under the Cheats menu, go to the Cheat List... option. This will bring up the list of cheats and it will let you add new codes, remove and disable codes.
Why some cheats never work?
Cheats are very dependant on the game where they were hacked. For example, a Japanese version will most likely have a different address for the number of lives than the English version.
If you are using the import Code file function, it will try to make sure that the codes are for the correct game and warn you if not. This is only true for GameboyAdvance code files.
Also, GamesharkAdvance (and CodeBreaker) Must be On codes enable the emulator to tell if the game being emulated is the same as the game used to hack the codes and it will warn the user if not.
NOTE: not all codes supported by the cheat devices are supported by the emulator.
Gameshark: adds a Gameshark code. Format is XXYYAAAA
GameGenie: adds a GameGenie code. Format is XXX-XXX, XXX-XXX-XX
For Gameboy Advance:
cheat: adds a cheat described by address, value and size
cheat code: a string version of a cheat in the format XXXXXXXX:YYYYYYYY where XXXXXXXX is the address and YYYYYYYY is the value (length of YYYYYYYY determines the length of the write - YY means 8 bit, YYYY means 16-bit and YYYYYYYY means 32-bit)
Gameshark: adds a Gameshark Advance code. Format is XXXXXXXXYYYYYYYY
CodeBreaker: adds a CodeBreaker Advance code. Format is XXXXXXXX YYYY
CodeBreaker codes don't work!
CodeBreaker codes have a separate encryption for every game, so you need to input the Must Be On codes in order to have them properly decoded by the emulator.
Action Replay is the European version of the Gameshark. Codes are usually listed in 8 character pieces. Just enter every two codes together as a Gameshark code.
Sometimes I get a black screen. What's wrong?
Black screens on some ROMs only may indicate that there is a problem with the emulation of that ROM or that you have an old version of the emulator. Please verify if a newer version exists and, if not, please contact the author.
The bullets, missiles or sprite blinks or disappears. Can you fix it?
Some games will blink the sprites in order to obtain some effects that are only possible on the actual hardware display. On the emulator, change the frameskip setting to the next or previous value and verify if the problem disappears. If not, try setting it to 0. If it still persists, please contact the author.
Why if I select a graphic filter, the emulation speed decreases?
The graphic filters modify the image that will be displayed after the emulator has completely drawn it. Depending on the filter, it can a CPU intensive process which will reduce performance. There is nothing that can be done other than disable the filter if you want faster performance.
One way to avoid the problem is to use one of the graphic filters.
Another option is to set the DDraw Emulation only mode in the Video options. This will make DirectX emulate some hardware features and the blurring will disappear.
My sound is terrible. What can I do?
Sound quality cannot be guaranteed if the emulation speed is not at full speed (99% or 100% on the title bar).
If you own a SBLive card, make sure you have updated drivers as they are really buggy. Also, if the emulator is not running at 99% or 100%, sound may not be perfect.
Also, you may want to experiment with different settings like frame skip, vsync, synchronize, sound quality and priority to find the settings that work best on your computer.
Why some games have no sound? (message about BIOS function)
Some games use the BIOS sound driver instead of placing it on their cartridge. VisualBoyAdvance does not emulate those BIOS functions, so no sound will be produced in those cases.
Why is the emulator running too fast?
If the emulator is running too fast, make sure that the Synchronize... option is checked on the Options->Emulator menu and that Sound is on. If sound is off, there will be no synchronization and the emulator will run at maximum speed. This should change in the future.
If you want no sound, mute the sound instead of turning it off.
Why doesn't vsync work to synchronize the emulator?
Vsync is implemented by calling DirectDraw and asking it to wait for the next vertical blank interval before drawing the next frame. Unfortunately, this doesn't always work depending on the video card.
These are the different kind of game loops that may be used:
CPU Loop: usually keeps checking on a flag in a loop until it changes (usually changes in an interrupt) - this makes emulation slow and it could have been acomplished with the Halt/IntrWait/VBlankWait BIOS calls before checking the flag each time
Halt/IntrWait/VBlankWait BIOS calls - these BIOS calls put the CPU in a HALT state where the emulator will speed up as there are no instructions to emulate. Usually a flag will be checked once the call returns from the BIOS in order to continue the game loop
The difference between the fist and second approach are enourmous when emulating. Unless a program needs all the cycles on a frame, it should always try to use the BIOS calls which put the CPU in the HALT state.
Why can't I change the filter anymore?
The filters only work in 16-bit modes (full screen mode is always in 16-bit mode). In any other mode (24 or 32 bits), the filters are disabled by default. The menu will reflect this by graying out the filter choices if the emulator is running in 16-bit mode.
What does the percentage on the top mean?
The percentage on the title bar measures the speed of the emulator when compared to what should be normal. For example, 99% or 100% mean emulation at normal speed. 50% means you are running 50% slower than normal. 150% means you are running 50% faster than normal.
Other emulators prefer to show FPS (frames per second) instead. That works ok as long as there is no frame skipping. When frame skipping is in use, normal speed can be achieved with less frames. For example, with a frame skip setting of 1, normal speed will be achieved if you are getting 30 FPS (compared to 60 FPS with no frame skipping).
For this reason, VisualBoyAdvance sticks with the speed percentage instead of showing frames per second.
How do I install/load a translation?
Translations are decoupled from VisualBoyAdvance so that the emulator doesn't need to be changed in order to add a new translation.
Translation files are Windows DLLs with the name convention: vba_XXX.dll where XXX is the language name abbreviation as defined by Windows (refer to the how to translation question if you want to make a translation).
To load a translation, there are two possible ways, from the Options->Language menu:
select System to have the emulator try to use the system language
if the previous option does not work or if your system is running on a language other than the one you want to use, select the Other... option. On the dialog that appears, type XXX (from the translation file name as described above) and click Ok
Please be aware that the author is not responsible for the translations (other than Brazilian Portuguese) and will not understand emails in another language. The English (default) language is always the most up to date and has all features enabled. Report any translation problems to the respective translators as found in the Help->About menu when using the translation.
You don't support joystick xxxx!
All joysticks supported by DirectInput are supported by VisualBoyAdvance. Some joysticks may behave badly under CPU intense operations, so you may need to change the emulator priority on the menu.
The Windows version (as of version 0.9) supports 8 axis, 32 buttons and POV/HAT controllers.
The SDL version supports up to 8 axis, all buttons (as understood by SDL) and HAT/POV.
When I try to configure the joypad VBA fills all entries with the same value!
On version 0.9a, VBA for Windows now supports more axis and HAT controllers. On some joysticks, there is throttle or wheel button which works like an axis. If the button is not centered, VBA will think it is moving and it will use it for the current input being configured.
Center the wheel or throttle button and the problem should disappear. It only happens when configuring the joypad and has no influence during emuation.
remove your SDL library from your system, download the sources from www.libsdl.org, compile it correctly and install it
try using the SDL_VIDEODRIVER environment variable and choose one of the following options until it works:
x11 (this is the default which fails)
dga
nanox
fbcon
directfb
svgalib
The complete list can be found at ftp://ptah.lnf.kth.se/pub/misc/sdl-env-vars
build a private SDL library and work with LD flags in order to get it working.
Please note that VisualBoyAdvance only uses the SDL library. If the SDL library is not correctly built for your system, it is not VisualBoyAdvance's fault that it doesn't run.
What is SDL?
SDL stands for Simple DirectMedia Layer. It is a cross platform library for graphics, input, audio, threading, etc... that can be used for games, emulators, etc.
VisualBoyAdvance has a special version that uses the SDL library and that provides the same behaviour on the different systems it as been ported to.
To some people, the SDL version on Windows may be faster than the DirectX version.
The main difference with the Windows version is that it is command line driven, meaning you have to type arguments at the command line in order to run. Configuration is archieved by editing a text file.
Another big difference is that the SDL version has built-in debugging features (ARM/THUMB debugger, multiple breakpoints, RAM write breakpoints, etc...)
More debugging features will be available on upcoming versions.
How do I configure the keys?
Use the SDL Configurator program that can be found on the downloads page. It will give you the code you need to enter in the configuration file for the pressed key or the joystick button/axis being used.
Why don't you add link?
Link sounds great but it is far more difficult than most people think.
Often users will mention that Snes9x (or other emulators) have link support, so it shouldn't be hard to add it to the emulator.
Truth is that SNES (and any other console) are completely different than handhelds. Let's compare:
console - a console normally supports multiplayer by nature: you can plug multiple controllers and have several people share the same console and play together. One console, one cartridge, multiple players.
handheld - handhelds are designed for single player on a single unit. To achieve multiplayer, a link cable is needed. This allows the different units to communicate and achieve the multiplayer effect. Multiple units linked together, multiple players.
On the console case, it is easier to add multiplayer because you can just link two instances of the emulator and only send the keys of each player. They don't have any communications feature by nature.
Handhelds on the other hand have built-in communication features which allow full speed communication between units. This is a lot harder to emulate: it requires a full connection between two emulators which need to be correctly synchronized or nothing works. It is a lot harder to achieve.
Will link ever be supported?
For the time being, I've decided not to add link support. The reason is that link would increase the interest in the emulator by users using illegal copies of software.
Why don't you use Kaillera or look at TGB Dual?
Kaillera is used for machines that support multiple players in one machine, for example normal consoles like Playstation, N64, GameCube, Genesis, etc... It works by connecting the players through the Internet and only exchanging their joypad movements. That makes your computer think there is another person playing with you locally.
TGB Dual emulates two CPUs to get linking working: one where you actually see the screen and a hidden one used to communicate with the remote player. The data transmitted is in the same way as in Kaillera. Some other steps are taken to transfer save states, etc but it is not a true GB Link cable emulation.
The GBA Link cable can send data up to 2Mb/s which is really a lot of data and considering how the GBA emulation requires a fast computer, it would require a really fast computer to achieve a decent emulation. It would be possible to take the TGB Dual approach but that would require a really fast computer.
For the time being, I will not add link as mentioned a million times.
GDB support
VisualBoyAdvance now provides GDB remote debugging support. This gives
developers the full power of GDB to debug GBA applications.
In order to use this, you will need a cross-compiled GDB for either the arm-elf
or arm-thumb-elf target (used for the --target= option of GDB configure
script).
You can also use GDB frontends like DDD, CodeMedic, etc... or even GDB/Insight
for GUI debugger (if using anything other than GDB/Insight, please make sure
to point to the right GDB executable).
The emulator provides two transport protocols for remote debugging:
TCP: allows debugging through TCP using port 55555 (or any specified) port. The advantage of using TCP is that it allows true remote debugging but it is slower compared to the pipe method (pipe method does not work on Windows - probably a restriction imposed by the CYGWIN port of GDB).
PIPE: allows debugging through a PIPE between the emulator and GDB. This is a lot faster than TCP and recommened on Unix systems.
Using the TCP transport
To use the TCP transport, use the flag -Gtcp[:portnum] where portnum is an optional port number to be used instead of 55555. VBA will wait for a GDB connection on the specified port (printed on screen). Start GDB by passing the .elf file, then connect to the emulator by using the command:
target remote <hostname>:<port number>
where hostname is the host where the emulator is running and port number is the printed port number.
Using the PIPE transport
To use the PIPE transport, start GDB with the .elf file to be debugged. Connect to the emulator by using the command:
target remote |<full path to VBA>/VisualBoyAdvance -Gpipe
Debugging with GDB
Once you connected to the emulator, you can set breakpoints and debug the
application. But before doing that, you will need to issue the loda command on GDB to load the code into the emulator. Optionally, you can pass the ELF file on the emulator's command line (along with the -N option to not parse the debug information in the emulator) instead of issuing the load command.
After connecting and optionally loading the file into the debugger, you can start debugging: add breakpoints, step, etc...
While using GDB, any console output will show up in GDB's console.
If you want to break into the GDB, press F11 and it will give you full command in GDB again. Pressing ESC will terminate emulation.
You can also detach GDB from the emulator and the emulator will continue to run with the internal debugger enabled.
Note: pressing Run on Insight/GDB will cause GDB to send a kill command to VBA, which will stop emulation. Use the continue button instead after connecting.
Resets the GBA and runs the code at address 0x2000000 or 0x8000000 depending on the contents of 0x3007ffa (0 means 0x8000000 and anything else means 0x2000000).
0x01
RegisterRamReset
Performs a selective reset of memory and I/O registers.
Input: R0=reset flags
0x02
Halt
Halts CPU execution until an interrupt occurs.
0x03
Stop
Stops the CPU and LCD until the enabled interrupt (keypad, cartridge or serial) occurs.
0x04
IntrWait
Waits for the given interrupt to happen.
Input: R0=initial flag clear, R1=interrupt to wait
0x05
VBlankIntrWait
Waits for the VBLANK interrupt. Equivalent of calling IntrWait with R0=1 and R1=1.
0x06
Div
Calculates the division of R0/R1.
Input: R0=dividend, R1=divisor
Result: R0=n/d,R1=n%d,R3=|n/d|
0x07
DivARM
Same as Div but with arguments reversed.
0x08
Sqrt
Calculates the square root of R0.
Input: R0=number
Result: R0=sqrt(number)
0x09
ArcTan
Calculates the arctangent of R0.
Input: R0=number (signed 16-bit)
Result: R0=arctan(number)
0x0A
ArcTan2
Calculates the arctangent of the given point.
Input: R0=X (signed 16-bit), R1=Y (signed 16-bit)
Result: R0=arctan
0x0B
CpuSet
Copies memory from source to destination (like DMA).
Input: R0=source, R1=dest, R2=count and flags
0x0C
CpuFastSet
Copies memory from source to destination (like DMA) in 32-bit blocks.
Input: R0=source, R1=dest, R2=count and flags
0x0D
BiosChecksum
Calculates the checksum of the whole BIOS by adding every 32-bit word from the BIOS.
Result: R0=BIOS checksum
NOTE: this seems to only be present in the release version of the BIOS
0x0E
BgAffineSet
Calculates the affine parameters for the BG.
Input: R0=source, R1=dest, R2=number of calculations
0x0F
ObjAffineSet
Calculates the affine parameters for sprites (rotation and scaling).
Input: R0=source, R1=dest, R2=number of calculations, R3=offset between calculations
0x10
BitUnPack
Unpacks bit packed data.
Input: R0=source, R1=dest, R2=unpack parameters
0x11
LZ77UnCompWram
Unpacks data compressed with LZ77 and writes it 8-bits at a time suitable for WRAM decompression.
Input: R0=source, R1=dest
0x12
LZ77UnCompVram
Unpacks data compressed with LZ77 and writes it 16-bits at a time suitable for VRAM decompression.
Input: R0=source, R1=dest
0x13
HuffUnComp
Unpacks data compressed with Huffman and writes it 32-bits at a time.
Input: R0=source, R1=dest
0x14
RLUnCompWram
Unpacks data compressed with RLE and writes it 8-bits at a time suitable for WRAM decompression.
Input: R0=source, R1=dest
0x15
RLUnCompVram
Unpacks data compressed with RLE and writes it 16-bits at a time suitable for VRAM decompression.
Input: R0=source, R1=dest
0x16
Diff8bitUnFilterWram
Unpacks data filtered with 8-bit difference and writes it 8-bits at a time suitable for WRAM decompression.
Input: R0=source, R1=dest
0x17
Diff8bitUnFilterVram
Unpacks data filtered with 8-bit difference and writes it 16-bits at a time suitable for VRAM decompression.
Input: R0=source, R1=dest
0x18
Diff16bitUnFilter
Unpacks data filtered with 16-bit difference and writes it 16-bits at a time.
Input: R0=source, R1=dest
0x19
SoundBiasSet
Sets the sound bias from 0 to 0x200 or from 0x200 to 0 depending on the value of R0.
Input: R0=0 to set it to 0, other values to set it to 0x200
0x1A
SoundDriverInit
Initializes the built in sound driver.
Input: R0=SoundArea
0x1B
SoundDriveMode
Sets the operation of the built in sound driver.
Input: R0=operation mode
0x1C
SoundDriveMain
Main function of the built in sound driver that is called by applications every VBLANK period to render the sound.