I/O: Difference between revisions

From Glitch City Wiki
Jump to navigation Jump to search
Content added Content deleted
No edit summary
Line 10: Line 10:
*$FF00 - Joypad
*$FF00 - Joypad
*$FF01 - Serial transfer
*$FF01 - Serial transfer
*$FF02 - Serial control
*$FF02 - Serial control (also used in DMG-07 4-Player Adapter for "ping" packets)
*$FF04 - Divider
*$FF04 - Divider
*$FF05 - Timer counter
*$FF05 - Timer counter

Revision as of 15:47, 8 November 2022

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
  • $FF02 - Serial control (also used in DMG-07 4-Player Adapter for "ping" packets)
  • $FF04 - Divider
  • $FF05 - Timer counter
  • $FF06 - Timer modulo
  • $FF07 - Timer control
  • $FF0F - Interrupt flag
  • $FF10-$FF26 - Audio
    • $FF10-$FF14 - NR10-NR14
    • $FF16-$FF1E - NR21-NR34
    • $FF20-$FF23 - NR41-NR44
    • $FF24-$FF26 - NR50-NR52
  • $FF30-$FF3F - Wave pattern
  • $FF40 - LCD control
  • $FF41 - LCD stat
  • $FF42 - Scroll y
  • $FF43 - Scroll x
  • $FF44 - LY
  • $FF45 - LYC
  • $FF46 - OAM DMA
  • $FF47 - Bg pal
  • $FF48 - Obj pal 0
  • $FF49 - Obj pal 1
  • $FF4A - Win y
  • $FF4B - Win x
  • $FF50 - Is boot ROM disabled? (non-zero if true)
  • $FF72 - Unknown
  • $FF73 - Unknown
  • $FF75 - Unknown (only bits 4-6 are read/write enabled)
  • $FF76 - PCM12 - PCM amplitudes 1 & 2 (Read Only) (low nybble: copy of sound channel #1's PCM amplitude, high: copy of sound channel #2's)
  • $FF77 - PCM34 - PCM amplitudes 3 & 4 (Read Only) (same as $FF76 but with channels 3/4)

CGB mode

  • $FF4D - CGB Double Speed Mode/Normal Speed Mode switch
  • $FF4F - VRAM bank select
  • $FF51-$FF55 - VRAM DMA (HDMA)
    • HDMA src hi
    • HDMA src low
    • HDMA dest hi
    • HDMA dest low
    • HDMA count
  • $FF56 - Infrared port
  • $FF68-$FF69 - BG/OBJ palettes
    • $FF68 - Bg pal sel
    • $FF69 - Bg pal data
    • $FF6A - Obj pal sel
    • $FF6B - Obj pal data
    • $FF6C - Unknown
  • $FF70 - WRAM bank select
  • $FF74 - Unknown

Also relevant

  • $FFFF - Interrupt enable register (IE)

[1][2]

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?

[3]


External links

References

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