Guest User

SNES memmap.txt

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