home *** CD-ROM | disk | FTP | other *** search
/ Der Mediaplex Sampler - Die 6 von Plex / 6_v_plex.zip / 6_v_plex / DISK3 / DFUE_100 / FAMITXT.ZIP / SNESDOC.ZIP / FAMITECH.TXT < prev    next >
Text File  |  1993-07-15  |  6KB  |  148 lines

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