Jump to content

I/O: Difference between revisions

2,169 bytes added ,  1 year ago
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1:
'''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 betweenare allocated 0xFF00 to 0xFF70 on the memory map.
 
The Game Boy/Color will interact with various components on aan chipexternal Game Pak, such as the ROM, RAM, [[Memory Bank Controller]], [[realReal-timeTime clockClock]], 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, [http://lavacutcontent.com/sugimori-masuda-developer-interview/ 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.
Line 8:
 
==DMG mode==
*$FF00 - Joypad (also used for Super Game Boy command packets using P14 and P15 output lines)
*$FF00 - Joypad
*$FF01 - Serial transfer (used for the Link Cable, also used in the Turbo File GB's communication protocol)
*$FF02 - Serial control (used for the Link Cable, also used in the Mobile GB Adapter (64KB/s, bits 0 and 1 high), and the DMG-07 4-Player Adapter for "ping" packets)
*$FF04 $FF07 - Timer/divider
*$FF04 - Divider
*$FF10 $FF26 - Audio
*$FF05 - Timer counter
*$FF30 $FF3F - Wave pattern
*$FF06 - Timer modulo
*$FF40 $FF4B - LCD Control, Status, Position, Scrolling, Palettes
*$FF04 $FF07 - Timer/divider control
*$FF0F - Interrupt flag (interrupt vector 0058 is also requested after a Link Cable transfer{{elaborate}})
*$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 $FF55FF4F - VRAM DMAbank select
*$FF68 FF51-$FF69FF55 - BG/OBJVRAM DMA Palettes(HDMA)
**HDMA src hi
*$FF70 - WRAM Bank Select
**HDMA src low
**HDMA dest hi
**HDMA dest low
**HDMA count
*$FF56 - Infrared port RP Register (infrared is also used with the Pokémon Pikachu 2 virtual pet, Pocket Sakura, Full Changer, Chee-Chai Alien spectrum communicator)
**Bit 0: Is the Game Boy Color's infrared light on/off? (read/write)
**Bit 1: Infrared signal (0=receiving it, 1=normal/no signal) (read only)
**Bit 2-5: Unknown/unused?
**Bit 6-7: Enable signal read? (0=disable, 3=enable) (read/write). It is also capable of resetting bit 1 to 0 when disabled and re-enabled under certain conditions.
*$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 Bankbank Selectselect
*$FF74 - Unknown
 
==SpecificAlso gamesrelevant==
*$FFFF - Interrupt enable register (IE)
<ref>[https://gbdev.gg8.se/wiki/articles/CGB_Registers GB Dev wiki CGB Registers]</ref><ref>BGB emulator</ref>
==High RAM pertaining to I/O==
[[Pokémon Red and Blue]]:<!--Check Yellow-->
 
Cookies help us deliver our services. By using our services, you agree to our use of cookies.