Advertisement
Guest User

SNES memmap.txt

a guest
May 20th, 2014
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.54 KB | None | 0 0
  1. =============================================================================
  2. Anomie's SNES Memory Mapping Doc
  3. $Revision: 1160 $
  4. $Date: 2008-12-21 12:40:39 -0500 (Sun, 21 Dec 2008) $
  5. <anomie@users.sourceforge.net>
  6. =============================================================================
  7.  
  8. This is a document intended to describe the SNES memory map. It will NOT
  9. include information on the MAD-1 or any other address decoder.
  10.  
  11. HARDWARE
  12. ========
  13.  
  14. The SNES has one 8-bit data bus, two address busses typically known as
  15. "Address Bus A" and "Address Bus B".
  16.  
  17. Data Bus
  18. --------
  19.  
  20. The data bus is 8 bits. If nothing sets a value on the data bus for any
  21. particular read request, the last value placed on the bus is read instead
  22. (this is known as "Open Bus").
  23.  
  24. LINE | CART | EXPAND
  25. -----+------+--------
  26. D0 | 19 | 11
  27. D1 | 20 | 12
  28. D2 | 21 | 13
  29. D3 | 22 | 14
  30. D4 | 50 | 15
  31. D5 | 51 | 16
  32. D6 | 52 | 17
  33. D7 | 53 | 18
  34.  
  35. Address Bus A
  36. -------------
  37.  
  38. This address bus is 24 bits, along with read and write lines (/RD and /WR)
  39. and 2 auxiliary lines (/CART and /WRAM). WRAM is connected to this bus, as
  40. well as the cart connector.
  41.  
  42. LINE | CART LINE | CART
  43. -----+------ -------+------
  44. A0 | 17 A14 | 39
  45. A1 | 16 A15 | 40
  46. A2 | 15 A16 | 41
  47. A3 | 14 A17 | 42
  48. A4 | 13 A18 | 43
  49. A5 | 12 A19 | 44
  50. A6 | 11 A20 | 45
  51. A7 | 10 A21 | 46
  52. A8 | 9 A22 | 47
  53. A9 | 8 A23 | 48
  54. A10 | 7 /RD | 23
  55. A11 | 6 /WR | 54
  56. A12 | 37 /CART | 49
  57. A13 | 38 /WRAM | 32
  58.  
  59. Address Bus B
  60. -------------
  61.  
  62. This address bus is 8 bits, along with read and write lines (/RD and /WR).
  63. d /WRAM). WRAM, PPU1, PPU2, and APU are connected to this bus, as well as
  64. the cart and expansion ports.
  65.  
  66. LINE | CART | EXPAND
  67. -----+------+--------
  68. PA0 | 28 | 1
  69. PA1 | 59 | 2
  70. PA2 | 29 | 3
  71. PA3 | 60 | 4
  72. PA4 | 30 | 5
  73. PA5 | 61 | 6
  74. PA6 | 3 | 7
  75. PA7 | 34 | 8
  76. /PARD| 4 | 10
  77. /PAWR| 35 | 9
  78.  
  79.  
  80. MEMORY MAP
  81. ==========
  82.  
  83. As far as the SNES is concerned, this is the memory map. "LoROM", "HiROM",
  84. and anything else is just the cart responding differently to the addresses
  85. placed on Address Bus A.
  86.  
  87. WRAM responds to Address Bus A whenever /WRAM is active, and to registers
  88. $2180-$2183 on Address Bus B. APU responds to $40-$7F on Address Bus B. PPU1
  89. and PPU2 respond to $2100-$213F on Address Bus B. The cart is expected to
  90. respond when /CART is active, but it can respond to any address on either bus
  91. that is not otherwise mapped. Similarly, the device plugged into the expansion
  92. port may respond to any unmapped register on Address Bus B.
  93.  
  94. The 'Speed' column indicates the memory access speed for that area of memory.
  95. The SNES master clock runs at about 21MHz (probably as close to 1.89e9/88 Hz as
  96. possible). Internal operation CPU cycles always take 6 master cycles. Fast
  97. memory access cycles also take 6 master cycles, Slow memory access cycles take
  98. 8 master cycles, and XSlow memory access cycles take 12 master cycles.
  99.  
  100.  
  101. Banks | Addresses | Speed | Mapping
  102. ---------+-------------+-------+---------
  103. $00-$3F | $0000-$1FFF | Slow | Address Bus A + /WRAM (mirror $7E:0000-$1FFF)
  104. | $2000-$20FF | Fast | Address Bus A
  105. | $2100-$21FF | Fast | Address Bus B
  106. | $2200-$3FFF | Fast | Address Bus A
  107. | $4000-$41FF | XSlow | Internal CPU registers (see Note 1 below)
  108. | $4200-$43FF | Fast | Internal CPU registers (see Note 1 below)
  109. | $4400-$5FFF | Fast | Address Bus A
  110. | $6000-$7FFF | Slow | Address Bus A
  111. | $8000-$FFFF | Slow | Address Bus A + /CART
  112. ---------+-------------+-------+---------
  113. $40-$7D | $0000-$FFFF | Slow | Address Bus A + /CART
  114. ---------+-------------+-------+---------
  115. $7E-$7F | $0000-$FFFF | Slow | Address Bus A + /WRAM
  116. ---------+-------------+-------+---------
  117. $80-$BF | $0000-$1FFF | Slow | Address Bus A + /WRAM (mirror $7E:0000-$1FFF)
  118. | $2000-$20FF | Fast | Address Bus A
  119. | $2100-$21FF | Fast | Address Bus B
  120. | $2200-$3FFF | Fast | Address Bus A
  121. | $4000-$41FF | XSlow | Internal CPU registers (see Note 1 below)
  122. | $4200-$43FF | Fast | Internal CPU registers (see Note 1 below)
  123. | $4400-$5FFF | Fast | Address Bus A
  124. | $6000-$7FFF | Slow | Address Bus A
  125. | $8000-$FFFF | Note2 | Address Bus A + /CART
  126. ---------+-------------+-------+---------
  127. $C0-$FF | $0000-$FFFF | Note2 | Address Bus A + /CART
  128.  
  129. Note 1: The address for internal CPU registers may go out Address Bus A,
  130. however the CPU ignores the data bus. It is unknown whether the data bus
  131. is ignored for the whole memory region, or just for those addresses which
  132. are actually registers. It is also unknown whether CPU writes show up on
  133. the data bus or not. Current theory is that addresses and writes will show
  134. up, but reads may or may not, and the data bus is only ignored for those
  135. bits of those registers actually mapped (e.g., data bus is ignored for only
  136. bit 7 of $4211).
  137.  
  138. Note 2: If bit 0 of CPU register $420d is set, the speed is Fast, otherwise
  139. it is Slow.
  140.  
  141.  
  142.  
  143. =============================================================================
  144. HISTORY:
  145.  
  146. Version 1.1: Jun 18, 2003
  147. * Tested the memory access speed of all 256-byte memory blocks, and filled in
  148. the table with the findings.
  149.  
  150. Version 1.0:
  151. * Initial version.
  152. 5523
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement