-nocrc
option.
I am mainly releasing this version of VGBA for game developers and demo programmers who would like to start coding for GBA but cannot afford to buy an official development kit from Nintendo. VGBA is not a replacement for the real development kit though, as it does not emulate all GBA features. I hope that the number of supported features will increase with time and your help.
VGBA8.EXE
uses 320x200x8bit screen mode supported by
the standard VGA BIOS. It should run on any computer, but is limited
to 256 colors. Thus, the colors may sometimes look incorrect.
VGBA16.EXE
uses 320x200x16bit VESA screen mode.
Therefore, the VESA drivers are necessary to run this
version of VGBA. It will fail on your computer if you do not
have VESA drivers that support the 320x200x16bit screen mode.
VGBA.EXE [-option1 [-option2...]] [FILENAME.GBA]
FILENAME.GBA
at address 0x08000000
and start execution. You can exit the emulator by pressing ESCAPE
or F12
keys. To break execution and drop into the debugger
press F1
key. To make VGBA break when execution reaches some
address, use the -trap <address>
option, where
address
is a hexadecimal number. To make VGBA go into
debugger right away, use -trap now
option.
If you run VGBA.EXE
without any arguments, it will show
the list of all available options and key assignments:
Options:
-uperiod <period> - Number of interrupts per screen update [1]
-verbose <level> - Select debugging messages [1]
0 - Silent 1 - Startup messages
2 - I/O accesses 4 - Illegal memory accesses
8 - DMA transfers 16 - Illegal CPU ops
32 - SWI calls 64 - FlashROM accesses
-crc/-nocrc - Check cartridge CRC/CMP [-crc]
-logsnd <filename> - Write soundtrack to a MIDI file [LOG.MID]
-sound [<quality>] - Sound emulation quality [44100]
0 - Off 1 - Adlib (MSDOS)
Values >8191 are treated as wave synthesis
frequencies. Default frequency is 44kHz.
-nosound - Same as '-sound 0'
-trap <address> - Trap execution when PC reaches address [FFFFh]
When a keyword 'now' is used in place of the
<address>, execution will trap immediately.
-vsync - Sync screen updates to VBlank [-nosync]
-sync <frequency> - Sync screen updates to <frequency> [-nosync]
(<frequency> must be in 20Hz..100Hz range)
-nosync - Do not sync screen updates
Keyboard Bindings:
[SPACE] - A button (also: [LALT],A,S,D,F,G,H,J,K,L)
[LCONTROL] - B button (also: Z,X,C,V,B,N,M)
[Q] - LEFT button (also: E,T,U,O)
[W] - RIGHT button (also: R,Y,I,P)
[TAB] - SELECT button
[ENTER] - START button
[ESC] - Quit emulation (also: [F12])
[F1] - Go into the built-in debugger
[F2] - Turn soundtrack logging on/off
[F3] - Turn A button autofire on/off
[F4] - Turn B button autofire on/off
[F5] - Turn LEFT button autofire on/off
[F6] - Turn RIGHT button autofire on/off
[F11] - Reset GBA hardware
[F12] - Quit emulation (also: [ESC])
[0] - Turn all sound on/off
[1]-[4] - Turn sound channels on/off
[5]-[8] - Turn backgrounds display on/off
[9] - Turn sprites display on/off
0x03000000
(32kB) and
0x02000000
(256kB).
0x08000000
mirrored at
0x09000000
and 0x0A000000
.
0x0E000000
(64kB).
0x0E000000
(64kB).
Feature | Text BGs | Rotation BGs | MODE 3 | MODE 4 | MODE 5 | Sprites |
Variable Size | YES | YES | N/A | N/A | N/A | YES |
Tile Flipping | YES | N/A | N/A | N/A | N/A | YES |
16/256-Color Tiles | YES | N/A | N/A | N/A | N/A | YES |
Scrolling | YES | N/A | N/A | N/A | N/A | N/A |
Mosaic | YES | YES | YES | YES | YES | rotated sprites only |
Rotation | N/A | YES | YES | YES | YES | YES |
Window | NO | NO | N/A | N/A | N/A | NO |
Color Effects | YES | YES | YES | YES | YES | YES |
GBA BIOS is partly emulated. Including the real Nintendo BIOS with the
emulator would be clearly illegal. Therefore, I have tried to simulate GBA
BIOS routines by trapping and handling ARM SWI
opcodes. Here
is the correspondence between BIOS call names and SWI
numbers:
Function | SWI # | Supported |
BIOS_SoftReset | 0x00 | Yes |
BIOS_RegisterRAMReset | 0x01 | Yes |
BIOS_Halt | 0x02 | Yes |
BIOS_Stop | 0x03 | Yes |
BIOS_IntrWait | 0x04 | Yes |
BIOS_VBlankIntrWait | 0x05 | Yes |
BIOS_Div | 0x06 | Yes |
BIOS_DivARM | 0x07 | Yes |
BIOS_Sqrt | 0x08 | Yes |
BIOS_ArcTan | 0x09 | Yes |
BIOS_ArcTan2 | 0x0A | Yes |
BIOS_CPUSet | 0x0B | Yes |
BIOS_CPUFastSet | 0x0C | Yes |
BIOS_BgAffineSet | 0x0E | No |
BIOS_ObjAffineSet | 0x0F | Yes |
BIOS_BitUnPack | 0x10 | No |
BIOS_LZ77UnCompWRAM | 0x11 | Yes |
BIOS_LZ77UnCompVRAM | 0x12 | Yes |
BIOS_HuffUnComp | 0x13 | No |
BIOS_RLUnCompWRAM | 0x14 | Yes |
BIOS_RLUnCompVRAM | 0x15 | Yes |
BIOS_Diff8bitUnFilterWRAM | 0x16 | No |
BIOS_Diff8bitUnFilterVRAM | 0x17 | No |
BIOS_Diff16bitUnFilter | 0x18 | No |
BIOS_SoundBiasChange | 0x19 | No |
BIOS_SoundDriverInit | 0x1A | No |
BIOS_SoundDriverMode | 0x1B | No |
BIOS_SoundDriverMain | 0x1C | No |
BIOS_SoundDriverVSync | 0x1D | No |
BIOS_SoundChannelClear | 0x1E | No |
BIOS_MIDIKey2Freq | 0x1F | No |
BIOS_MusicPlayerOpen | 0x20 | No |
BIOS_MusicPlayerStart | 0x21 | No |
BIOS_MusicPlayerStop | 0x22 | No |
BIOS_MusicPlayerContinue | 0x23 | No |
BIOS_MusicPlayerFadeOut | 0x24 | No |
BIOS_MultiBoot | 0x25 | No |
BIOS_SoundDriverVSyncOff | 0x28 | No |
BIOS_SoundDriverVSyncOn | 0x29 | No |
0x03000000
(32kB) and
0x02000000
(256kB). Use only this memory.
0x08000000
and
up) as RAM. This is not correct as cartridge ROM is not
writable. Please, use RAM areas described above.
DISPCONT
and set
appropriate bits in BG2CONT
.
S
flag in the opcode. In fact, ARM7TDMI programming
manual explicitely requires this.