I/O

From Glitch City Wiki
Jump to navigation Jump to search

I/O (input/output) refers to how a computer communicates with the outside world. In the Game Boy/Color's Z80-based processor, registers for the input/output range are allocated 0xFF00 to 0xFF70 on the memory map.

The Game Boy/Color will interact with various components on an external Game Pak, such as the ROM, RAM, Memory Bank Controller, real-time clock, while I/O is also used for details independent of the Game Pak, such as the sound, speaker, internal infrared port (Game Boy Color only). There is also an I/O register for OAM DMA, represented by FF46 on the memory map.

The Game Boy/Color has included a huge amount of communication peripherals. One of the most commonly used is the Link Cable; which inspired the Pokémon concept as Satoshi Tajiri was a bug catcher during his childhood, and there were also inspirations from Menko card games, and kaijuu media such as Kamen Rider, Ultraman. Additionally, the Game Boy Color (but not the Game Boy Advance) included a built-in infrared port.

The Japanese version of Pokémon Crystal communicated over the Internet using a mobile phone and the Mobile GB Adapter, but the Mobile GB Adapter fell into relative obscurity and never left Japan.

DMG mode

  • $FF00 - Joypad
  • $FF01 - Serial transfer
  • $FF04 $FF07 - Timer/divider
  • $FF10 $FF26 - Audio
  • $FF30 $FF3F - Wave pattern
  • $FF40 $FF4B - LCD Control, Status, Position, Scrolling, Palettes
  • $FF50 - Is boot ROM disabled? (non-zero if true)

CGB mode

  • $FF4F - VRAM Bank Select
  • $FF51 $FF55 - VRAM DMA
  • $FF68 $FF69 - BG/OBJ Palettes
  • $FF70 - WRAM Bank Select

Specific games

Pokémon Red and Blue:

In the High RAM (HRAM) (FF80-FFFE):

  • FFB1 - Previous frame's joypad input
  • FFB2 - Which buttons were released on this frame?
  • FFB3 - Which buttons were pressed on this frame?
  • FFB4 - Which buttons were held on this frame?
  • FFB5 - Low sensitivity joypad output. (This is controlled by FFB6 and FFB7)
  • FFB6 - Nothing if zero and A or B is held, else buttons held for more than half a second are pressed twelve times/s. No influence if FFB7 is zero.
  • FFB7 - (If zero): Newly-pressed buttons are contained in FFB5.
  • FFF8 - Input for joypad
  • FFF9 - Is joypad polling disabled?

[1]


External links

References

This article or section is a stub. You can help Glitch City Wiki by expanding it.