famitec2.txt 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. Version 1.1
  2. Corrected an error in screen sizes and removed a quesry on sound registers.
  3. Corsair + Kari presents the first dox of Fami hardware register
  4. locations and brief explanation of them..
  5. If you would like to add any info found in this list please leave
  6. a mail message to Corsair or RamRaider on GRAVEYARD BBS +44-91-5160560
  7. or anything to do with the FAMICON/SNES..
  8. We have an INTERNET address if ya want it leave true e-mail!
  9. Or better still if ya can get the Programmers handbook (Both) please call
  10. and leave mail :) , or even the 100,000 quid SCSI SNASM board for FAMICON
  11. development :)
  12. Also if you want more info contact us the same way..
  13. We are esp looking for contacts to help get to grips with this new platform
  14. everybody welcome!
  15. Special greetings to Starr/QUARTEX and any other True Console Dude!
  16. coming soon is some sound chip info........
  17. Memory Map
  18. ~~~~~~~~~~
  19. Bank Address
  20. ~~~~ ~~~~~~~
  21. 00- 0000-1fff Lo RAM (same as at $7e0000-$7e1fff)
  22. 7d 2100-2142(?) Videochip Registers
  23. 4300-437f DMA Registers
  24. 8000-ffff ROM:This contains 32k block of game ROM.
  25. So, the games are divided to 32k chunks
  26. which locate always at address $8000-$ffff,
  27. but in different banks. This means that the first
  28. 32k of game is at $008000-$00ffff and next 32k
  29. is at $018000-$01ffff etc.
  30. 7e 0000-1fff Lo RAM (same as always at $0000-$1fff) \
  31. 2000-ffff RAM \ I'm not sure about } 128k RAM??
  32. 7f 0000-ffff RAM / this RAM /
  33. 7f-ff all Not used???
  34. $ffec($fffc) contains reset vector and $ffea($fffa) is NMI vector. The NMI is
  35. actually vertical blank interrupt.
  36. Video Chip
  37. ~~~~~~~~~~
  38. size loc.
  39. ~~~~ ~~~~
  40. B 2100 Screen fade x000bbbb x=screen on/off b=brightness(0-f)
  41. B 2106 Screen Pixelation xxxxbbbb x=pixel size b=planes to expand
  42. B 2107 Plane 0 location in vram xxxxxxab x=address ab=32/64 width xy
  43. B 2108 Plane 1 location in vram xxxxxxab as above
  44. B 2109 Plane 2 location in vram xxxxxxab as above
  45. B 210a Plane 3 location in vram xxxxxxab as above
  46. B 210b Tile VRAM address aaaabbbb a=Playfield 0 b=Playfield 1
  47. B 210c Tile VRAM address ccccdddd c=Playfield 2 d=Playfield 3
  48. 2B 210d Plane 0 scroll x 8+3 bits (0-7ff) put first 8 bits and then
  49. 2B 210e Plane 0 scroll y 8+3 bits (0-7ff) 3 highest bits
  50. 2B 210f Plane 1 scroll x as above
  51. 2B 2110 Plane 1 scroll y as above
  52. 2B 2111 Plane 2 scroll x as above
  53. 2B 2112 Plane 2 scroll y as above
  54. 2B 2113 Plane 3 scroll x as above
  55. 2B 2114 Plane 3 scroll y as above
  56. B 2115 Video port control
  57. W 2116 Video port address (lo-hi)
  58. W 2118 Video port data (lo-hi) (address is incremented by 2)
  59. B 2121 Palette color nr
  60. B 2122 Palette color data
  61. B 212C Playfield Enable xxxxabcd a-d = playfield number..
  62. B 2133 Screen mode 0000ab0c a=Interlace Y b=Overscan c=Interlace X??
  63. 2140-2142 Audio Registers
  64. I/O
  65. ~~~
  66. W B 420b Start dma (enable bits) bits: 76543210 = dma nr (8 DMA's)
  67. R B 4212 Pad ready to be read
  68. R W 4218 Pad 0 data 76543210 = A-B-Select-Start-U-D-L-R
  69. 4219 76543210 = X-Y-Top Left-Top Right-0000
  70. R W 421a Pad 1 data as above
  71. R W 421c Pad 2 data as above
  72. R W 421e Pad 3 data as above
  73. DMA registers ($4300-$437f)
  74. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  75. B 43X0 DMA control reg??(not sure!)
  76. B 43X1 DMA destination (Access only to some of the video chip
  77. registers ($2100-$21ff)
  78. $18=video port $22=color palette
  79. W 43X2 Source address lo-hi 16 lowest bits
  80. B 43X4 Source Bank addr. 8 highest bits
  81. W 43X5 Transfer size lo-hi
  82. X=dma number (0-7) DMA #0= 4300-4305
  83. DMA #1= 4310-4315 ...
  84. DMA #7= 4370-4375
  85. Symbols: size: B=byte long 2B=put 2 bytes W=word long
  86. R=read only W=write only
  87. Screen Details
  88. ~~~~~~~~~~~~~~
  89. Famicom Tile format is simple. Each Tile is 4 planes and 8x8 bits.
  90. 32 bytes are used per Tile .
  91. PLANES 1 & 2 PLANES 3 & 4
  92. byte0 byte1 byte 16 byte 17
  93. byte2 byte3 byte 18 byte 19
  94. byte4 byte5 byte 20 byte 21
  95. ..... .......
  96. byte14 byte15 byte 30 byte 31
  97. Screen Map
  98. ~~~~~~~~~~
  99. Famicom can use only Tiles $0-$3ff, max 1024 chars.
  100. 16 bits: YX?c ccNN NNNN NNNN
  101. fedc ba98 7654 3210
  102. Y = mirror y X = mirror x ?=unknown
  103. ccc = palette nr (8 palettes) NN.. = character number
  104. Screen Resolution is normally 32x32 chars but only the first 30 y blocks are
  105. visible (until scrolled) - 64 bytes / line
  106. Screen VRAM Location
  107. ~~~~~~~~~~~~~~~~~~~~
  108. Screen Width 32x32 offset for x,y 0,0 = 0
  109. Screen Width 64x32 offset for x,y 0,0 = 0
  110. 33,0 = $400
  111. Screen Width 32x64 offset for x,y 0,0 = 0
  112. 0,33 = $400
  113. Screen Width 64x64 offset for x,y 0,0 = 0
  114. 33,0 = $400
  115. 0,33 = $800
  116. 33,33 = $c00
  117. As can be seen if a wider mode is selected the extra height/width follow
  118. after the main screen in memory.
  119. =============================================================================