wiki:TBR/BSP/Gba

GameBoyAdvance?

GameBoyAdvanceSP information.

imported from the old wiki


Game Boy Advance SP is a foldable version of the GBA.

GBA SP uses the same set of chips as GBAdvance so its fully software compatible with all older GB, SuperGB, GB Pocket, Game Boy Color and Gameboy Advance.

GBA SP data:

  • CPU: 32-Bit ARM7 CPU with embedded memory
  • BIOS ROM 16kByte, IWRAM(in-chip) 32kByte, EWRAM(on-board) 256kByte, Palette RAM 1kByte, VRAM 96kByte and OAM 1kByte
  • Cart FlashROM max 32MByte
  • Screen: 2.9-inch reflective TFT color LCD
  • Resolution: 240x160 pixels (identical to the Game Boy Advance)
  • Color: Simultaneously displays more than 32,000 colors (identical to the Game Boy Advance)
  • Weight: Approximately 5 ounces
  • Power Supply: Rechargeable lithium-ion battery
  • Battery Life: 10 hours; 18 hours with light function disabled

GAMEBOY Advance and Advance SP BSP

Infobox BSP
BSP_name GBA, Game Boy Advance
Manufacturer Nintendo
image
caption
Board_URL http://en.wikipedia.org/wiki/Game_Boy_Advance
Architecture ARM
CPU_model ARM7TDMI
Monitor none
Simulator VisualBoyAdvance, NO$GBA
Aliases
RAM 32 kilobyte + 96 kilobyte VRAM (internal to the CPU), 256 kilobyte WRAM (outside the CPU).
NVMEM Flash cartridges ranges from 64 Mbit up to 8 Gbit (Commercial carts range from 32 Mbit to 256 Mbit).
Serial
NICs none
Other

This is start page of Game Boy Advance BSP

Features in GBA BSP:

Basic polled console device

  • LCD 60x26(3x5 font), very small fonts but still readable.
  • simple 'getch' keypad/contolpad input
  • simple 'one screen' output= Multiboot support in linkcmds =
  • can be used to load small (up to 2Mbit ~256Kbyte) programs directly to the GBA EWRAM memory.
  • Iwram support in linkcmds
  • data and bss sections can be located in IWRAM .

How to run Multi-boot programs

You need linker cable(serial/parallel/USB) that support Multi-boot (in this example: Win2000 and EZF-Advance USB-2-GBA Cable):

  • First You have to compile program with MULTIBOOT (MultiBootAndIwramExample?).
  • Connect USB2 cable.
  • Start EZFA_Client.
  • Press GBA Select+Start buttons and turn on GBA power.
  • Select in EZFA_Client 'Load a ROM less...' button.
  • Select program that You have been compiled with MULTIBOOT define.

And thats all, You program should start in GBA as soon as its loaded.

How to Flash programs

There is many different types of Flash Linkers. With EZF-Advance you:

  • First select progrmas that You want to program into flash-card. After that its like in multi-boot case
  • Connect USB2 cable.
  • Start EZFA_Client.
  • Press GBA Select+Start button and turn on GBA power.
  • And select in EZFA_Client 'Burn all...' button.

How to use Keypad

Character input is done with GBA buttons, up-down-left-right/A/B/R/L/Select/Start

  • Select-button accept selected character
  • Start-button read CR (Enter)
  • A-button select 'A' character
  • B-button select 'Z' character
  • R-button select '1' character
  • L-button select '9' character
  • up-button increment character ('A'->'B')
  • down-button decrement character ('B'-'A')
  • left-button change set of character ('!'->'A'->'a')
  • right-button change set of character ('a'->'A'->'!')

A Tip For Loading A RTEMS Program

The following is based on a tip that was given by Alan Cudmore on the rtems-users mailing list with some additions and changes made by Micronian:
The emulator and real GBA don't use the EXE image, they run a .GBA image. You can use the objcopy command to convert your EXE to a GBA image:

arm-rtems-objcopy -O binary --remove-section=.comment --remove-section=.note --strip-unneeded foo.exe foo.gba

Notes:
# Even if your EXE does not have the .exe extension (e.g. an ELF file called foo), a command similar to the one above can be used.
# If you use VisualBoyAdvanced, it is important that the final program have the .gba extension, otherwise you will get an "Unknown file type" error.

Note2:
# And we could include it directly to the Makefile. It's already a part of BSP's Makefile.in file, so we get both .exe and .gba file from RTEMS example files.

Miscellaneous

Screenshot from real GbaSP

Time checker screenshot

Screenshots from VBA-emulator ticker http://www.kopteri.net/koti/markku.puro/files/ticker.jpg and fileio http://www.kopteri.net/koti/markku.puro/files/fileio.jpg


Patch file for rtems-4.6.2 can be found here: http://www.kopteri.net/koti/markku.puro/files/rtems-4.6.2.diff.gz

Doxygen GBA BSP Pdf-reference manual can be found here: http://www.kopteri.net/koti/markku.puro/files/RTEMS_GBA_refman.pdf

Here is compiled, ready to run RTEMS ticker example http://www.kopteri.net/koti/markku.puro/files/ticker.gba
and Multiboot version of Hello example http://www.kopteri.net/koti/markku.puro/files/hello.gba

Compiled *.gba(=exe) files can be programmed in Flash or run in GBA(max.256Kbyte) with FlashLinker.

Or You can use GBA emulators in Windows or Linux. Such as: http://vba.ngemu.com/index.shtml

TODO list (some nice to have features:)

UART compatible serial device
MBV2 serial device
LCD device
better console screen, virtual screen 80x24
GBA BIOS library wrappers

More information

Test Reports

4.6.99.2: [[User:MarkkuPuro]] reports that it runs fine on the GBASP. Reboot dont work.

4.6.99.4: 2006-11-19 [[User:MarkkuPuro]] reports that it runs(most of the tests/samples) on the GBASP and VBA emulator. Reboot dont work.

Last modified on Nov 10, 2018 at 6:41:34 PM Last modified on Nov 10, 2018, 6:41:34 PM

Attachments (2)

Download all attachments as: .zip