Difference between revisions of "Mega CD Docs:Memory Map"

From MegaDrive Wiki
Jump to: navigation, search
(Created page.)
 
(Added a bit of the register map.)
Line 76: Line 76:
 
|-
 
|-
 
| -- || $FF8000 || G/A Register
 
| -- || $FF8000 || G/A Register
 +
|}
 +
 +
== Register Map ==
 +
The table below is a rough overview of the Mega CD's register map. If a memory space is listed as "N/A," it should not be accessed from the CPU specified, or the behaviour resulting may be undefined.
 +
{| class="wikitable"
 +
|-
 +
! !! Sub CPU ($FF8000) !! Main CPU ($A12000)
 +
|-
 +
| $00 || Version, Reset, LED || N/A
 +
|-
 +
| $02 || Memory Mode, Write Protect || Reset, Int2, Memory mode, Write Protect
 +
|-
 +
| $04|| CDC Mode, CDC RSO || CDC Mode
 +
|-
 +
| $06 || CDC RS1 || H-Int Vector
 +
|-
 +
| $08 || CDC Host Data || CDC Host Data
 +
|-
 +
| $0A || CDC DMA Address || N/A
 +
|-
 +
| $0C || Stopwatch Timer || Stopwatch Timer
 +
|-
 +
| $0E || Communication Flag || Communication Flag
 +
|-
 +
| $10 || Communication RAM (Read Only) || Communication RAM (Read/Write)
 +
|-
 +
| $20 || Communication RAM (Read/Write) || Communication RAM (Read Only)
 +
|-
 +
| $30 || Interrupt Timer || N/A
 
|}
 
|}
  
 
[[Category:Mega CD Documentation]]
 
[[Category:Mega CD Documentation]]

Revision as of 16:10, 20 November 2012

The memory map on the Mega CD varies depending on the Word RAM mode selected, mainly affecting the location of where the banks of Word RAM are.

Memory Map

Main CPU

  • $000000 to $01FFFF: CD-ROM Boot Memory
  • $020000 to $03FFFF: Sub-CPU Program RAM. The Sub CPU must have a bus request to access.
  • $200000 to $23FFFF: Word RAM (Varies based on Word RAM mode)
  • $240000 to $7FFFFF: Reserved (Access prohibited, may hang machine)
  • $800000 to $A1FFFF: Same as in Cartridge mode
  • $A20000 to $A1202F: Mega CD Gate Array
  • $A12030 to $FFFFFF: See Mega Drive Manual

Sub CPU

  • $000000 to $01FFFF: Program ROM
  • $020000 to $07FFFF: Reserved (Access prohibited)
  • $080000 to $0BFFFF: Word RAM
  • $0C0000 to $0DFFFF: Word RAM (Access prohibited in 2M mode)
  • $0E0000 to $FDFFFF: Reserved (Access prohibited)
  • $FE0000 to $FE3FFF: Battery backed RAM, lower byte only.
  • $FE0400 to $FE7FFF: Image of battery backed RAM, should not be accessed.
  • $FF0000 to $FF7FFF: PCM chip area
  • $FF8000 to $FF81FF: Mega CD Gate Array
  • $FF8200 to $FFFFFF: Reserved (Access prohibited)

The imaged/mirrored areas should never be accessed, for their behaviour is undefined. Some hardware may have an imaged area there, while some hardware may not. It's therefore not safe to rely on it's existence for proper function of your programme.

2M Mode

Address
Main CPU Sub CPU Description
$000000 -- 1 MBit ROM (Main only)
$020000 $000000 4 MBit Program RAM
$200000 $080000 Word RAM (2 MBit)
$A00000 -- Z80/IO
$C00000 -- VDP
-- $FE0000 Backup RAM
$FF0000 -- Work RAM (64 KB)
-- $FF0000 5C164 PCM
-- $FF8000 G/A Register

1M Mode

Address
Main CPU Sub CPU Description
$000000 -- 1 MBit ROM (Main only)
$020000 $000000 4 MBit Program RAM
$200000 $0C0000 Word RAM (1 MBit)
$220000 $080000 Image of Word RAM (1 MBit)
$A00000 -- Z80/IO
$C00000 -- VDP
-- $FE0000 Backup RAM
$FF0000 -- Work RAM (64 KB)
-- $FF0000 5C164 PCM
-- $FF8000 G/A Register

Register Map

The table below is a rough overview of the Mega CD's register map. If a memory space is listed as "N/A," it should not be accessed from the CPU specified, or the behaviour resulting may be undefined.

Sub CPU ($FF8000) Main CPU ($A12000)
$00 Version, Reset, LED N/A
$02 Memory Mode, Write Protect Reset, Int2, Memory mode, Write Protect
$04 CDC Mode, CDC RSO CDC Mode
$06 CDC RS1 H-Int Vector
$08 CDC Host Data CDC Host Data
$0A CDC DMA Address N/A
$0C Stopwatch Timer Stopwatch Timer
$0E Communication Flag Communication Flag
$10 Communication RAM (Read Only) Communication RAM (Read/Write)
$20 Communication RAM (Read/Write) Communication RAM (Read Only)
$30 Interrupt Timer N/A