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 / RAM.TXT < prev    next >
Internet Message Format  |  1994-02-07  |  2KB

  1. From:     vic@physci.psu.edu (Vic Ricker)
  2. To:       "Super Famicom Development Group" <famidev@busop.cit.wayne.edu>
  3. Subject:  Re:  some programming questions
  4. Date:     Tue, 9 Nov 93 20:20:35 EST
  5. Reply-to: famidev@busop.cit.wayne.edu
  6. Sender:   Listserv@busop.cit.wayne.edu
  7. X-Mailer: Mercury MTA v1.0.
  8.  
  9. >Hi Folks.
  10.  
  11. >I need help with a few SNES programming questions... 
  12.  
  13. >(1) Can anyone tell me how to make noises come out of my SNES?
  14.  
  15. Insert your favorite cart, power up the TV, switch the snes power to
  16. ON.. :-)
  17.  
  18. >(3) Is the sprite position table held in RAM or VRAM? And how
  19. >    do the 5 address bits in $2101 relate to this location?
  20.  
  21. The sprite images are stored in VRAM.  The palettes for the sprites
  22. are stored in CGRAM.  The coordinates and char attributes are stored
  23. in OAM.
  24.  
  25. The format of each OBJ is:
  26.  
  27. OBJ H position: 8 bits
  28. OBJ V position: 8 bits
  29. V flip: 1 bit
  30. H flip: 1 bit
  31. OBJ priority: 2 bits
  32. color palette: 3 bits
  33. character name: 9 bits
  34.  
  35. there are 128 of these in sequence making 512 bytes then 32 bytes
  36. follow in the format:
  37. size: 1 bit
  38. x msb: 1 bit
  39.  
  40. there are 128 of these (one for every OBJ) making 32 more bytes.
  41.  
  42. $2101 is OBJSEL
  43.  
  44. it chooses the size of sprites to use and also sets the address of the
  45. images in VRAM.  the top 3 bits chose the size:
  46.  
  47. 000 means 8x8 and 16x16 sprites
  48. 001 8x8 and 32x32
  49. 010 8x8 and 64x64
  50. 011 16x16 and 32x32
  51. 100 16x16 and 64x64
  52. 101 32x32 and 64x64
  53.  
  54. the other bits are the address in vram of the sprite images.
  55.  
  56.  
  57. $2102-$2103 is OAMADDL/H
  58. the lower 9 bits are the address for accessing the OAM. (like $2116
  59. for VRAM)
  60. the high bit (15) enables priority rotation (causes OBJ's to change
  61. priority as to keep them from disappearing totally when time out and range
  62. over occur.)
  63.  
  64. $2104 is OAMDATA
  65.  
  66. it is the write register for the OAM. (like $2118-$2119 for VRAM)
  67.  
  68.  
  69. $2138 is *OAMDATA
  70.  
  71. it is the read register for the OAM.
  72.  
  73.  
  74. Hope this gives you enough to play with.  Most is from memory, I hope
  75. its all correct. :-)
  76.  
  77. Lemme know if you have questions.
  78.  
  79.