Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Platform:Sega Game Gear

From ReverseEngineering.wiki
Platform
Developer Sega
Versions Game Gear (1990, JP/NA/EU)
Endianness little
Website https://www.smspower.org/
On this wiki Facts · Code · Notes · Topics

Sega's 1990 8-bit handheld: the Master System hardware (Z80, SMS-compatible VDP with 12-bit colour, PSG with stereo) with a 160x144 window of the 256x192 image, start button at an I/O port and its own region codes in the TMR SEGA header.

Overview

The Game Gear shares the architecture of Platform:Sega Master System: Z80 CPU, the same memory map and mapper registers at 0xFFFC-0xFFFF, same cartridge slots. Differences relevant to reversing:

  • Games are .gg files; Mesen2 selects the Game Gear model purely from the file extension (Core/SMS/SmsConsole.cpp).
  • The header at 0x7FF0 uses region codes 5 (GG Japan), 6 (GG Export), 7 (GG International); see Format:Sega Master System ROM image. The Game Gear BIOS does not check the header.
  • Mesen2 keeps two Game Gear-only state values, GgExtConfig and GgExtData (the link/extension port registers), initialised to 0x7F and 0xFF and marked there as unverified power-on values (SmsMemoryManager.cpp).
  • Checked in Genesis Plus GX (commit 49c5847648): the Game Gear shows a reduced 160x144 area of the SMS image (core/vdp_ctrl.c sets the viewport for SYSTEM_GG, core/vdp_render.c blanks the lines and columns outside it); palette entries are 12-bit BBBBGGGGRRRR read as 16-bit words from CRAM (color_update_m4, SYSTEM_GG case); and Start is bit 7 (INPUT_START = 0x0080) of I/O port 0x00, the mode register: io_gg_read(0) returns the register with that bit cleared while the button is pressed, so it reads 0 when pressed (core/io_ctrl.c, core/memz80.c decodes ports below 0x07 for the Game Gear I/O chip).

Related

Platform:Sega Master System, Format:Sega Master System ROM image.

Code & repositories

  • https://github.com/SourMesen/Mesen2 @ b9fa69ddc6d0a331fb103fdb5eef6904305703c2 · license: GPL-3.0 (declared by the contributor; GitHub's detector did not recognize LICENSE)
    Multi-system emulator with debugger; Core/SMS (Sega mapper, Codemasters), Core/PCE (MPR banking, SF2 mapper, CD-ROM), Core/WS (cart footer parsing)
    Tested on: source read, not run: read the source, not built · checked 2026-10-18
  • https://github.com/ekeeke/Genesis-Plus-GX @ 49c584764893b0505ac7f768a754f97330fa4392 · license: NOASSERTION (declared by the contributor for the files used; GitHub reports Zlib (read from LICENSE.txt; GitHub's API was busy) for the repository)
    Genesis Plus GX: core/cart_hw/sms_cart.c implements the Sega mapper and many variants (Codemasters, Korean, EEPROM)
    Tested on: source read, not run: read the source, not built · checked 2026-10-18