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

  1. From:     Jeremy Chadwick <yoshi@CSOS.ORST.EDU>
  2. To:       "Super Famicom Development Group" <famidev@busop.cit.wayne.edu>
  3. Subject:  SNES Document v1.2
  4. Date:     Mon, 15 Nov 1993 15:52:14 -0800
  5. Reply-to: famidev@busop.cit.wayne.edu
  6. Sender:   Listserv@busop.cit.wayne.edu
  7. X-Mailer: Mercury MTA v1.0.
  8.  
  9. Well, after demand, here's v1.2 of the SNES Document I wrote. It fixes
  10. a few bugs; you'll also notice that it's about 10k shorter: I removed
  11. Section 0 (the "Why" Section) to save room. Enjoy, dudez.
  12.  
  13.  
  14. =-=-=
  15. SNES Documentation v1.2: Written by Yoshi of Digital Exodus. 
  16. =-=-=
  17. 1)    Memory Map.
  18.      i) "Main" memory map.
  19.     ii) Additional info.
  20. 2)    SNES Color explaination.
  21. 3)    SNES DMA Memory Map and explaination.
  22. 4)    SNES Graphics (tiles) explaination.
  23. 5)    SNES Screen mode definitions.
  24. 6)    SNES OAM/Sprite explaination.
  25. 7)    Magicom Disk registers and Memory controller locations.
  26. 69)   About the author...
  27. FF)   Greetings, Thanx, etc...
  28. =-=-=
  29. 1)    Memory Map.
  30.      i) "Main" memory map.
  31. -----------                              
  32.     Just so you know... the R and/or W's on the left side before the             
  33.     memory location mean [R]eadable and/or [W]riteable. I don't know
  34.     what happens if you try to read from the write-only registers:
  35.     I think you get bogus data, but that's about it.
  36. -----------                              
  37.  W   |$2100: Screen display register.
  38.             x000bbbb
  39.                     x: 0 = Screen on.
  40.                        1 = Screen off.
  41.                    bbbb: 0-$F = Brightness of screen.
  42.  
  43.             *** If you increment $2100 so the register goes up
  44.                 to $xF (x being whatever), you can make the
  45.                 screen "fade in". Make -SURE- you do this only
  46.                 during the VBlank period! If you don't, the screen
  47.                 goes totally wacko! The 'GS programmers like myself
  48.                 call it "Syncing to the VBL". 
  49. -----------                              
  50.  W   |$2101: OAM (Sprite) sizes.
  51.             sssnnbbb
  52.                     s: Size. 
  53.                     n: Name selection (upper 4k word address).
  54.                     b: Base selection (8k word segment address).
  55.  
  56.             *** The sizes are defined as follows:
  57.                     000: 8x8 or 16x16
  58.                     001: 8x8 or 32x32
  59.  
  60.             *** I've never used this register, nor sprites.
  61.                 Check Section 6 for information
  62.                 which was not done by me: If you understand
  63.                 it better than I do, good deal.
  64. -----------                              
  65.  W   |$2102: Address of OAM (Sprites).
  66.             ???????? | ????????  
  67.             
  68.             *** This register i've never used. All I know is
  69.                 that it's a -WORD- in length, not a byte.
  70. -----------                              
  71.  W   |$2104: Data for OAM (Sprites).
  72.             ????????
  73.  
  74.             *** I've never used this register. It's like $210D:
  75.                 You have to store a value in it twice.
  76. -----------                              
  77.  W   |$2105: Screen mode.
  78.             abcdfeee
  79.                     a: Plane 3 tile size.
  80.                     b: Plane 2 tile size.
  81.                     c: Plane 1 tile size.
  82.                     d: Plane 0 tile size.
  83.                         0 = 8x8 tiles.
  84.                         1 = 16x16 tiles.
  85.                     e: MODE definition. 
  86.                     f: Make Plane 2 take highest priority.
  87. -----------                              
  88.  W   |$2106: Screen pixelation (aka. MOSAIC) register.
  89.             xxxxabcd
  90.                     x: 0-$F = Pixel size.
  91.                     a: Affect plane 3.
  92.                     b: Affect plane 2.
  93.                     c: Affect plane 1.
  94.                     d: Affect plane 0.
  95.  
  96.             *** Just like $2100, this only works during VBlank.
  97.                 I recommend you setup what planes you want to
  98.                 affect at the start of the program, then to
  99.                 make them change, do the following:
  100.                     LDA #$03    ; Affect planes 0 and 1.
  101.                     STA TempReg1
  102.                     STA $2106
  103.                     JSR WaitVBlank
  104.                     LDA TempReg1
  105.                  Loop STA $2106
  106.                     CLC
  107.                     ADC #$10
  108.                     CMP #$F3
  109.                     BNE Loop
  110. -----------                              
  111.  W   |$2107: Plane 0 VRAM location register.
  112.             xxxxxxab
  113.                     x: Address of VRAM location.
  114.                      ab: Virtual screen size selection.
  115.  
  116.           *** The virtual screen size dealy goes like this:
  117.             32x32 to 32x64 to 64x32 to 64x64. Visually,
  118.             you only see 32x32(x25) at once unless you
  119.             change the ACTUAL screen size.
  120.  
  121.             *** The way I use this register is pretty simple.
  122.                 Lets say the VRAM is in $2000... Therefore,
  123.                 we'd go like this:
  124.                     LDA #$20
  125.                     STA $2107
  126. -----------                              
  127.  W   |$2108: Plane 1 VRAM location register.
  128.  W   |$2109: Plane 2 VRAM location register.
  129.  W   |$210A: Plane 3 VRAM location register.
  130.             *** All of these follow the same definition as $2107.
  131. -----------                              
  132.  W   |$210B: Tile VRAM location register.
  133.             aaaabbbb
  134.                     a: Location of tiles for Plane 1.
  135.                     b: Location of tiles for Plane 0.
  136.  
  137.             ***  The way you use this register is fairly neat.
  138.                  Since you only have a nybble to work with (which
  139.                  ranges from $0-F only) your Tile location can
  140.                  only be $0000 to $F000. You can't have an address
  141.                  such as $5F91 or $1C4A which holds your tile
  142.                  data. You just can't have it. :-)
  143.  
  144. -----------                              
  145.  W   |$210C: Tile VRAM location register.
  146.             ccccdddd
  147.                     c: Location of tiles for Plane 3.
  148.                     d: Location of tiles for Plane 2.
  149.  
  150.             *** Same stats for $210B go for this one; 'cept the
  151.                 plane registers are different.
  152. -----------                              
  153.  W   |$210D: Plane 0 X-scroll register.
  154.             *** This register is really funky. You have to write
  155.                 to it twice in a row (each piece of data being
  156.                 1 byte). The register is setup as the following:
  157.                 - You store the first 8 bits (the first byte) which
  158.                 ranges from $00 to $FF. After you store this
  159.                 value, you have to store the next 3 bits in the
  160.                 same register.
  161.             *** The following code demonstrates how to move plane 0
  162.                 left:
  163.                     LDA Plane0X
  164.                     DEC
  165.                     STA Plane0X
  166.                     STA $210D
  167.                     STZ $210D
  168.                 If you make that into a loop by itself, the result
  169.                 is the plane keeps scrolling left forever; it even
  170.                 wraps around back to the start.
  171.  
  172.           *** Note: I've been told this is a nasty way to do it
  173.                 because MODE 7 uses 13 bits of the above,
  174.                 while the rest use 10. I'm not taking care of
  175.                 the MSB. :-(
  176.  
  177. -----------                              
  178.  W   |$210E: Plane 0 Y-Scroll register.
  179.  W   |$210F: Plane 1 X-Scroll register.
  180.  W   |$2110: Plane 1 Y-Scroll register.
  181.  W   |$2111: Plane 2 X-Scroll register.
  182.  W   |$2112: Plane 2 Y-Scroll register.
  183.  W   |$2113: Plane 3 X-Scroll register.
  184.  W   |$2114: Plane 3 Y-Scroll register.
  185.             *** All of these follow the same definition as $210D.
  186. -----------                              
  187.  W   |$2115: Video port control.
  188.           *** If you store the following listed values in this register,
  189.             the following happens:
  190.  
  191.         $80: H/L increment which determines if the address will be
  192.              incremented after it reads/writes to/from $2118 and
  193.              $2139, or $2119 and $213A.
  194.  
  195.  W   |$2116: Video port address. 
  196.             *** 16 bit VRAM address.
  197.     $2117: Video port address (continued, due to 16 bits).
  198.  W   |$2118: Video port data. 
  199.             *** Data register for writing VRAM data.
  200.     $2119: Video port data.
  201.           *** Same as above.
  202. -----------                              
  203.  W   |$211A: MODE 7 Information register.
  204.             xy????ab
  205.                     a: Horizontal or Vertical flip. 
  206.                     b: Horizontal or Vertical flip.
  207.                     x: Landscape repeat type.
  208.                     y: Landscape repeat type.
  209.  
  210.             *** I have not the SLIGHTEST idea what the hell
  211.                 the original author means by this. If someone
  212.                 can explain it, tell me.
  213. -----------                              
  214.  W   |$211B: COS (COSIN) rotate angle / X Expansion.
  215.  W   |$211C: SIN (SIN) rotate angle / X Expansion.
  216.  W   |$211D: SIN (SIN) rotate angle / Y Expansion.
  217.  W   |$211E: COS (COSIN) rotate angle / Y Expansion.
  218.  W   |$211F: 13 bit address for the center of Rotate X.
  219.  W   |$2120: 13 bit address for the center of Rotate Y.
  220.  
  221.             *** All above things i've never used, nor do I
  222.                 have any explainations on them. Use them at
  223.                 your own risk, or until I get info on 'em.
  224.  
  225.             *** $211F and $2120 are like $210D: You have to
  226.                 write a byte to them twice.
  227. -----------                              
  228.  W   |$2121: Color # (or pallete) selection register.
  229.             xxxxxxxx
  230.                     x: Color # ($00-$FF).
  231.  
  232.             *** This register is probably one of the most simple
  233.                 registers I know of to use. You simply store the
  234.                 # of the color you want to modify before writing
  235.                 to $2122. This register is autoincrementing, so
  236.                 you don't have to "LDA #$01, STA $2121, LDA #$02,
  237.                 STA $2121, LDA #$03..." and so on...
  238.                 Code is as follows:
  239.                     STZ $2121   ; Start at color 0.
  240.                     STZ $2122   ; Color #0 = 00 00
  241.                     STZ $2122
  242.                     LDA #$FF    ; Color #1 = 7F FF (white).
  243.                     STA $2122
  244.                     LDA #$7F
  245.                     STA $2122
  246.                     LDA #$1F    ; Color #2 = 00 1F (red).
  247.                     STA $2122
  248.                     STZ $2122
  249. -----------                              
  250.  W   |$2122: Color data register.
  251.             xxxxxxxx
  252.                     x: Value of color.
  253.  
  254.             *** Color on the SNES is trippy; it's 15 bit. Check
  255.                 Section 2 on how the SNES colors are setup. Some
  256.                 example code I listed for $2121... Anyways, this
  257.                 register is like $210D (plane X-scroll) and those
  258.                 types: You have to store the value in it twice.
  259.                 For instance: If you wanted the color white (which
  260.                 is $7FFF in SNES-color), you would have to do the
  261.                 following:
  262.                     LDA [whatever color #]
  263.                     STA $2121
  264.                     LDA #$FF    ; We first store the "lower half"
  265.                     STA $2122
  266.                     LDA #$7F    ; Then the upper...
  267.                     STA $2122
  268.                 It's really not that hard, but it'll take some
  269.                 getting used to :-) Remember, check Section 2 on
  270.                 how the SNES does it's color, and for tile-setup,
  271.                 check Section 4.
  272. -----------                              
  273.  W   |$212C: Playfield/Sprite-enable register.
  274.             abcdefgh
  275.                     a: Plane 3 enable (for Sprites).
  276.                     b: Plane 2 enable (for Sprites).
  277.                     c: Plane 1 enable (for Sprites).
  278.                     d: Plane 0 enable (for Sprites).
  279.                     e: Enable plane 3.
  280.                     f: Enable plane 2.
  281.                     g: Enable plane 1.
  282.                     h: Enable plane 0.
  283.             *** This register allows you to enable which planes
  284.                 you want to put sprites on (to move or etc.) and
  285.                 to scroll, or other neato things. If you wanna
  286.                 use all 4 planes, but no sprites, shove $0F into
  287.                 this register. If you want to use all the planes,
  288.                 but want sprites on planes 1 and 3, you would shove
  289.                 $AF into this register. It's very easy to do.
  290. -----------                              
  291.  W   |$2133: Screen mode register. 
  292.             ????ab?c
  293.                     a: Interlace Y.
  294.                     b: Overscan.
  295.                     c: Interlace X.
  296.  
  297.             *** To be blatently honest, I have -NO IDEA- what
  298.                 this register does; I don't understand what
  299.                 Corsair & Dax meant by Interlace and Overscan.
  300.                 If someone can explain this register to me, i'd
  301.                 be very grateful :-).
  302. -----------                              
  303.  R   |$2139: VRAM port data (reading).
  304.     $213A: "                       "
  305. ----------- 
  306. ??   |$2140       *** These are the audio registers. 'never used 'em.
  307. ??   |$2141           Try shoving data into them; who knows, if you get
  308. ??   |$2142           music sometime, then you know you're on the right
  309. ??   |$2143           track. :-)
  310. -----------                              
  311. ??   |$4200: Counter Enable.
  312.             ??yx???a
  313.                     a: Joypad-read Enable (1 = Readable).
  314.                     x: Horizontal Counter Enable.
  315.                     y: Vertical Counter Enable.
  316. -----------                              
  317. ??   |$4201: 8 bit parallel data.
  318.  
  319.             *** This is the expansion bus for the Famicom.
  320. -----------                              
  321. RW   |$420B: DMA enable register.
  322.             abcdefgh
  323.                     a: DMA #7.
  324.                     b: DMA #6.
  325.                     c: DMA #5.
  326.                     d: DMA #4.
  327.                     e: DMA #3.
  328.                     f: DMA #2.
  329.                     g: DMA #1.
  330.                     h: DMA #0.
  331.  
  332.             *** I've personally never used DMA for anything. I hope
  333.                 someone out there has, and can tell me how to use
  334.                 it. :-)
  335. -----------                              
  336. ??   |$420D: Memory select.
  337.             ???????x
  338.                     x: Fast/Normal ROM flip.
  339.                   0 = Normal.
  340.                   1 = Fast.
  341. -----------                              
  342. ??   |$4211: ?????.
  343.             x???????
  344.                     x: IRQ Enable flag (1: Enabled).
  345.  
  346.             *** I don't even know the DESCRIPTION of the reg-
  347.                 ister! :-)
  348. -----------                              
  349. RW   |$4212: Joypad-ready register.
  350.             ???????x
  351.                     x: Ready-state bit (1: Ready).
  352.  
  353.             *** I'm not sure how this register is setup; all I know
  354.                 is how to use it. Code is as follows:
  355.                     PadLoop LDA $4212
  356.                           AND #$01
  357.                           BNE PadLoop
  358.                 This waits for the joypad to become ready to read.
  359. -----------                              
  360. RW   |$4218: Joypad #0 register (1 out of 2).
  361.             abcd0000
  362.                     a:    0 = A button not pressed.
  363.                         1 = A button pressed.
  364.                     b:    0 = X button not pressed.
  365.                         1 = X button pressed.
  366.                     c:    0 = Top-left button not pressed.
  367.                         1 = Top-left button pressed.
  368.                     d:    0 = Top-right button not pressed.
  369.                         1 = Top-right button pressed.
  370.             *** These are self-explainitory. To find out the
  371.                 status of each bit, just AND #$ for that bit...
  372.                 The code for checking is the following:
  373.                     LDA $4218
  374.                     AND #$80    ; Is the A button pressed?
  375.                     BNE YesA    ; Button pressed (bit is 1).
  376.                     LDA $4218
  377.                     AND #$40    ; Is button X pressed?
  378.                     BNE YesX    ; Button pressed (bit is 1).
  379.                     LDA $4218
  380.                     AND #$10    ; Is the top-right button pressed?
  381.                     BNE YesTopR ; Button pressed (bit is 1).
  382.                 ...and so on. It's very simple.
  383.             *** Note: The Corsair & Dax document was -WRONG-.
  384.                     It took me a good hour or two to find this
  385.                     out, so I decided i'd better write down the
  386.                     CORRECT way to do things).
  387. -----------                              
  388. RW   |$4219: Joypad #0 register (2 out of 2).
  389.             abcdefgh
  390.                     a:    0 = B button not pressed.
  391.                         1 = B button pressed.
  392.                     b:    0 = Y button not pressed.
  393.                         1 = Y button pressed.
  394.                     c:    0 = Select button not pressed.
  395.                         1 = Select button pressed.
  396.                     d:    0 = Start button not pressed.
  397.                         1 = Start button pressed.
  398.                     e:    0 = Up not pressed.
  399.                         1 = Up pressed.
  400.                     f:    0 = Down not pressed.
  401.                         1 = Down pressed.
  402.                     g:    0 = Left not pressed.
  403.                         1 = Left pressed.
  404.                     h:    0 = Right not pressed.
  405.                         1 = Right pressed.
  406.             *** Same as $4218... Some demo code follows:
  407.                     LDA $4219
  408.                     AND #$80    ; Is the B button pressed?
  409.                     BNE YesB    ; Button pressed (bit is 1).
  410.                     LDA $4219
  411.                     AND #$04    ; Is Down pressed?
  412.                     BNE YesDown ; Button pressed (bit is 1).
  413.                     LDA $4219
  414.                     AND #$02    ; Is Left pressed?
  415.                     BNE YesLeft ; Button pressed (bit is 1).
  416. -----------                              
  417. RW   |$421A: Joypad #1 register (1 out of 2).
  418. RW   |$421B: Joypad #1 register (2 out of 2).
  419. RW   |$421C: Joypad #2 register (1 out of 2).
  420. RW   |$421D: Joypad #2 register (2 out of 2).
  421. RW   |$421E: Joypad #3 register (2 out of 2).
  422. RW   |$421F: Joypad #3 register (2 out of 2).
  423.                 *** Setup is the same as $4218 and $4219.
  424. =-=-=
  425. 1)    Memory Map
  426.     ii) Additional info.
  427. -----------                              
  428. RW   |$FFC0: Cartridge title.
  429. RW   |$FFD6: ROM/RAM Info on cart..
  430. RW   |$FFD7: ROM Size.
  431. RW   |$FFD8: RAM Size.
  432. RW   |$FFD9: Maker ID Code.
  433. RW   |$FFDB: Version #.
  434. RW   |$FFDC: Checksum complement.
  435. RW   |$FFDE: Checksum.
  436. RW   |$FFEA: NMI vector/VBL Interrupt.
  437. RW   |$FFEC: Reset vector.
  438.  
  439.             *** With SMC (Magicom) files the offset is $7e00 less
  440.                 than above.
  441.             *** I've never actually used this information before:
  442.                 This could be SMC header only; but then why would
  443.                 there be memory locations for such? Strange. I'll
  444.                 leave the information I put in up to SNESASM v1.05.
  445.                 I use the psuedo-ops NAM, VER, and other things.
  446.  
  447. =-=-=
  448. 2)    SNES Color explaination.
  449. -----------                              
  450.     Oh BOY! So you're interested in finding out how the SNES does
  451.     it's color (via $2122), right? Well here ya go...
  452.  
  453.     The SNES has a strange way of doing color (atleast that i've
  454.     seen in my lifetime). Color is 15 bit; each "RGB" value (red,
  455.     green, and blue) has 5 bits a piece.
  456.  
  457.     When it comes to putting data into $2122, the format (in binary)
  458.     is the following (I put them into each byte):
  459.                 0bbbbbgg gggrrrrr
  460.                 |
  461.                 |_ Someone needs to tell me what this bit
  462.                    -REALLY- is. I've just been told to set
  463.                    it to 0...
  464.     We guess that the Japanese didn't like the idea of putting them
  465.     in the "standard" order of R, G, then B: but instead wanted them
  466.     in alphabetical order. Silly! :-).
  467.  
  468.     The way -I- do my color conversions is on a calculator... Just
  469.     plug in the bits you want to set in binary, then let the calc.
  470.     convert it into hexadecimal. It's pretty easy; or you can be
  471.     a Studly Programmer (hehehe) and do it in your head.
  472.  
  473.     A quick color chart:          $7FFF: White  (0111 1111 1111 1111)
  474.                         $001F: Red    (0000 0000 0001 1111)
  475.                         $03E0: Green  (0000 0011 1110 0000)
  476.                         $7C00: Blue   (0111 1100 0000 0000)
  477.                         $7C1F: Purple (0111 1100 0001 1111)
  478.                         $7FE0: Aqua   (0111 1111 1110 0000)
  479.                         $03FF: Yellow (0000 0011 1111 1111);
  480.     Well there you have it. It's pretty simple after you get the hang
  481.     of it; when using the SNES, you get REALLY good with binary math:
  482.     You'll find this out after working with the machine for awhile.
  483.  
  484. =-=-=
  485. 3)    DMA Memory Map and explaination.
  486. -----------                              
  487. ??   |$43x0: DMA Control register (??? Not sure ???).
  488.  W   |$43x1: DMA Destination register.
  489.             $18 = Video Port access.
  490.             $22 = Color pallete access.
  491.  
  492.             *** This gives access to only some of the video chip.
  493.                 registers. Hell if I know which ones.
  494. -----------                              
  495.  W   |$43x2: Source address.
  496.             *** THIS REGISTER IS A WORD IN LENGTH ***
  497.             *** The document I have says:
  498.                 "lo-hi  16 lowest bits". Who knows... 
  499. -----------                              
  500.  W   |$43x4: Source bank address.
  501.             *** The document I have says:
  502.                 "8 highest bits". 
  503. -----------                              
  504.  W   |$43x5: Transfer size register.
  505.             *** Same as above:
  506.                 "lo-hi". 
  507. -----------                              
  508.     All the "x"s represent the DMA # (ranging from 0 to 7).
  509.     DMA #0: $4300-$4305.
  510.     DMA #1: $4310-$4315.
  511.     ......
  512.     DMA #7: $4370-$4375.
  513. =-=-=
  514. 4)    SNES Graphics (tiles) explaination.
  515. -----------                              
  516.     This is probably the most requested section of the document for
  517.     people whom are starting out on the SNES and want to learn just
  518.     how in the hell the SNES -DOES- do it's graphics.
  519.  
  520.     There's so much to explain!!!
  521.  
  522.     The SNES does it's graphics in tiles (surprise surprise!).
  523.  
  524.     There are different MODEs on the SNES; the most famous being
  525.     is MODE 7. Alas: Most people think using $2106 is MODE 7 ($2106
  526.     is for screen pixelation: Where the pixels get "larger". Look 
  527.     in Section 1 for an explaination of this register).
  528.                 *** THIS IS NOT MODE 7!!! ***. 
  529.     So the next time the pixels get really "big" (almost making them
  530.     look like IBM PC 320x200x256 mode :-)), and your friend says "WOW!
  531.     MODE 7 is COOL," punch 'em in the nose for me. Just kidding.
  532.  
  533.     Also, another thing I should mention: Bitplanes are NOT THE SAME
  534.     AS PLANES. Planes are like "screens." You can scroll a plane, but
  535.     not a bitplane. Bitplanes are put ONTO a plane, which can be
  536.     scrolled any direction.
  537.  
  538.     I'll be explaining MODE 1. MODE 7 is too tough for me to
  539.     explain, since you end up losing colors and other screwy things...
  540.     Check Section-5 for a mode-# list.
  541.     
  542. MODE   #/Playfields    MaxColor/Tile   Palettes        Colors
  543. ---------------------------------------------------------------------------
  544. 0      4               4               8               16
  545. 1      3               16/16/4 (HUH?)  8               128
  546.     
  547.     MODE 0 is good for geometric shapes (if you were going to rotate
  548.     a wireframe cube), basic star scrolls, or a very "bland" text
  549.     scroller.
  550.  
  551.     Let's start with MODE 1.
  552.  
  553.     MODE 1 is best for really basic things: Star scrollers, text
  554.     scrolls, geometric (non detailed) art, or line drawings; it's
  555.     only 16 colors/bitplane, and there's only 4 bitplanes to play
  556.     with.
  557.  
  558.     What you need is 4 bitplanes of data. You don't -HAVE- to
  559.     use 4 bitplanes... You can use 1 bitplane if you want, but
  560.     you only get 16 colors (NO!!! :-)).
  561.  
  562.     You also need a plane map: You can't just have the predefined
  563.     graphics data and thats it: You have to "setup the plane" to
  564.     tell it what tile goes where.
  565.     
  566.     For demonstration purposes, i'll use code to explain it.
  567.  
  568. -----------                              
  569.     The "lda #$0000" "tcd" transfers the DP location pointer to
  570.     where the scratchpad RAM is. This makes things go much faster,
  571.     because DP is always faster than normal RAM (yay for DP!!!)
  572.     
  573.     The other part puts where the location of the data in the
  574.     binary/image is into two DP locations: font and font2.
  575.  
  576. font  equ $00     ; Direct page equates.
  577. font2 equ font+1
  578.     
  579.     sei
  580.     phk          
  581.     plb          
  582.     clc
  583.     xce
  584.     rep #$30     
  585.     lda #$0000   
  586.     tcd
  587.     lda #charset
  588.     sta font
  589.     lda #charset2
  590.     sta font2
  591. -----------                              
  592.     The following code tells the SNES where the actual data
  593.     is in VRAM memory.
  594.                      
  595.     lda #$10                ; Plane 0 text @ VRAM $1000. 
  596.     sta $2107               
  597.     
  598.     lda #$02                ; Tiles for Plane 0 @ VRAM $2000.
  599.     sta $210b               
  600. -----------                              
  601.     The following code actually MOVES the data in the binary/image
  602.     into the SNES's VRAM.
  603.  
  604.     sep #$20
  605.     ldx #$2000              ; This puts the data sent thru $2118 and 
  606.                     ; $2119 into VRAM $2000.
  607.     stx $2116
  608.     ldy #$0000
  609. -     lda (font),y            ; Get bitplane 0 data (font)
  610.     sta $2118               ; ... and store it in bitplane 0.
  611.     lda (font2),y           ; Get bitplane 1 data (font2)
  612.     sta $2119               ; ... and store it in bitplane 1...
  613.     stz $2118               ; I don't want to use bitplane 2 and 3,
  614.     stz $2119               ; so I store zeros here. You could put
  615.                     ; more font data in there if you wanted.
  616.     iny
  617.     cpy #$0200        
  618.     bne -
  619.     
  620.     ldx #$1000              ; This puts the data sent thru $2118 and              
  621.     stx $2116               ; $2119 into VRAM $1000.
  622.     ldx #$0000
  623. -     lda TEXT,x              ; Get the character from TEXT...
  624.     and #$3f                ; AND #$3F because we only want the first
  625.                     ; 64 characters in the font.
  626.     sta $2118               ; 
  627.     stz $2119               ; Check near the end of this Section for
  628.                     ; an explaination on what the actual bits
  629.                     ; do instead of just storing 0 there all
  630.                     ; the time.
  631.     inx
  632.     cpx #$0400
  633.     bne -            
  634. -----------                              
  635.     Here's the actual data names (charset, charset2, and TEXT).
  636.     My new source has them in dcb % statements to make the font
  637.     more readable: The first time I did this, I had to convert
  638.     the binary stuff I wrote on paper into hex, then put them
  639.     into decent hex statements in an orderly fashion.
  640.  
  641. charset 
  642.     dcb     $00,$00,$00,$00,$00,$00,$00,$00 ;'@'  
  643.     dcb     $00,$3c,$66,$7e,$66,$66,$66,$00 ;'A'
  644.     dcb     $00,$7c,$66,$7c,$66,$66,$7c,$00 ;'B'
  645.     dcb     $00,$3c,$66,$60,$60,$66,$3c,$00 ;'C'
  646.     dcb     $00,$78,$6c,$66,$66,$6c,$78,$00 ;'D'
  647.     dcb     $00,$7e,$60,$78,$60,$60,$7e,$00 ;'E'
  648.     dcb     $00,$7e,$60,$78,$60,$60,$60,$00 ;'F'
  649.     dcb     $00,$3c,$66,$60,$6e,$66,$3c,$00 ;'G'
  650.     dcb     $00,$66,$66,$7e,$66,$66,$66,$00 ;'H'
  651.     dcb     $00,$3c,$18,$18,$18,$18,$3c,$00 ;'I'
  652.     dcb     $00,$1e,$0c,$0c,$0c,$6c,$38,$00 ;'J'
  653.     dcb     $00,$6c,$78,$70,$78,$6c,$66,$00 ;'K'
  654.     dcb     $00,$60,$60,$60,$60,$60,$7e,$00 ;'L'
  655.     dcb     $00,$63,$77,$7f,$6b,$63,$63,$00 ;'M'
  656.     dcb     $00,$66,$76,$7e,$7e,$6e,$66,$00 ;'N'
  657.     dcb     $00,$3c,$66,$66,$66,$66,$3c,$00 ;'O'
  658.     dcb     $00,$7c,$66,$66,$7c,$60,$60,$00 ;'P'
  659.     dcb     $00,$3c,$66,$66,$66,$3c,$0e,$00 ;'Q'
  660.     dcb     $00,$7c,$66,$66,$7c,$6c,$66,$00 ;'R'
  661.     dcb     $00,$3e,$60,$3c,$06,$66,$3c,$00 ;'S'
  662.     dcb     $00,$7e,$18,$18,$18,$18,$18,$00 ;'T'
  663.     dcb     $00,$66,$66,$66,$66,$66,$3c,$00 ;'U'
  664.     dcb     $00,$66,$66,$66,$66,$3c,$18,$00 ;'V'
  665.     dcb     $00,$63,$63,$6b,$7f,$77,$63,$00 ;'W'
  666.     dcb     $00,$66,$3c,$18,$3c,$66,$66,$00 ;'X'
  667.     dcb     $00,$66,$66,$3c,$18,$18,$18,$00 ;'Y'
  668.     dcb     $00,$7e,$0c,$18,$30,$60,$7e,$00 ;'Z'
  669.     dcb     $08,$00,$00,$00,$00,$00,$00,$00 ;'['    
  670.     dcb     $00,$00,$00,$00,$00,$00,$00,$00 ;'\'
  671.     dcb     $00,$00,$00,$00,$00,$00,$00,$00 ;']'
  672.     dcb     $00,$00,$00,$00,$00,$00,$00,$00 ;'^'
  673.     dcb     $00,$08,$00,$00,$00,$00,$00,$00 ;'_'  
  674.     dcb     $00,$00,$00,$00,$00,$00,$00,$00 ;' '  
  675.     dcb     $00,$7E,$7E,$3C,$18,$00,$18,$00 ;'!'
  676.     dcb     $00,$00,$00,$00,$00,$00,$00,$00 ;'"'
  677.     dcb     $80,$80,$80,$80,$80,$80,$80,$80 ;'#'
  678.     dcb     $FC,$FE,$FF,$F7,$F7,$FF,$FE,$FC ;'$'
  679.     dcb     $3E,$42,$4E,$5C,$5C,$4E,$42,$3E ;'%'
  680.     dcb     $00,$00,$00,$00,$00,$00,$00,$01 ;'&'
  681.     dcb     $00,$00,$00,$07,$00,$00,$00,$00 ;'''
  682.     dcb     $00,$04,$08,$08,$08,$08,$04,$00 ;'('
  683.     dcb     $00,$20,$10,$10,$10,$10,$20,$00 ;')'
  684.     dcb     $08,$08,$08,$F8,$08,$08,$08,$08 ;'*'
  685.     dcb     $10,$10,$10,$1F,$10,$10,$10,$10 ;'+'
  686.     dcb     $10,$10,$20,$C0,$00,$00,$00,$00 ;','
  687.     dcb     $00,$00,$00,$FF,$00,$00,$00,$00 ;'-'
  688.     dcb     $00,$00,$00,$00,$00,$18,$18,$00 ;'.'
  689.     dcb     $00,$00,$00,$FF,$80,$80,$80,$80 ;'/'  
  690.     dcb     $00,$3c,$66,$6e,$76,$66,$3c,$00 ;'0'
  691.     dcb     $00,$18,$38,$18,$18,$18,$7e,$00 ;'1'
  692.     dcb     $00,$7c,$06,$0c,$30,$60,$7e,$00 ;'2'
  693.     dcb     $00,$7e,$06,$1c,$06,$66,$3c,$00 ;'3'
  694.     dcb     $00,$0e,$1e,$36,$7f,$06,$06,$00 ;'4'
  695.     dcb     $00,$7e,$60,$7c,$06,$66,$3c,$00 ;'5'
  696.     dcb     $00,$3e,$60,$7c,$66,$66,$3c,$00 ;'6'
  697.     dcb     $00,$7e,$06,$0c,$0c,$0c,$0c,$00 ;'7'
  698.     dcb     $00,$3c,$66,$3c,$66,$66,$3c,$00 ;'8'
  699.     dcb     $00,$3c,$66,$3e,$06,$66,$3c,$00 ;'9'
  700.     dcb     $00,$00,$00,$03,$04,$08,$08,$08 ;':' 
  701.     dcb     $00,$80,$80,$F0,$80,$80,$00,$00 ;';'
  702.     dcb     $80,$80,$80,$FF,$00,$00,$00,$00 ;'<'
  703.     dcb     $00,$00,$00,$C0,$20,$10,$10,$10 ;'='
  704.     dcb     $08,$08,$04,$03,$00,$00,$00,$00 ;'>'
  705.     dcb     $00,$00,$00,$00,$00,$00,$00,$00 ;'?'
  706.  
  707. charset2 
  708.     dcb     $00,$3C,$4E,$5E,$5E,$40,$3C,$00 ;'@'  
  709.     dcb     $00,$3c,$66,$7e,$66,$66,$66,$00 ;'A'
  710.     dcb     $00,$7c,$66,$7c,$66,$66,$7c,$00 ;'B'
  711.     dcb     $00,$3c,$66,$60,$60,$66,$3c,$00 ;'C'
  712.     dcb     $00,$78,$6c,$66,$66,$6c,$78,$00 ;'D'
  713.     dcb     $00,$7e,$60,$78,$60,$60,$7e,$00 ;'E'
  714.     dcb     $00,$7e,$60,$78,$60,$60,$60,$00 ;'F'
  715.     dcb     $00,$3c,$66,$60,$6e,$66,$3c,$00 ;'G'
  716.     dcb     $00,$66,$66,$7e,$66,$66,$66,$00 ;'H'
  717.     dcb     $00,$3c,$18,$18,$18,$18,$3c,$00 ;'I'
  718.     dcb     $00,$1e,$0c,$0c,$0c,$6c,$38,$00 ;'J'
  719.     dcb     $00,$6c,$78,$70,$78,$6c,$66,$00 ;'K'
  720.     dcb     $00,$60,$60,$60,$60,$60,$7e,$00 ;'L'
  721.     dcb     $00,$63,$77,$7f,$6b,$63,$63,$00 ;'M'
  722.     dcb     $00,$66,$76,$7e,$7e,$6e,$66,$00 ;'N'
  723.     dcb     $00,$3c,$66,$66,$66,$66,$3c,$00 ;'O'
  724.     dcb     $00,$7c,$66,$66,$7c,$60,$60,$00 ;'P'
  725.     dcb     $00,$3c,$66,$66,$66,$3c,$0e,$00 ;'Q'
  726.     dcb     $00,$7c,$66,$66,$7c,$6c,$66,$00 ;'R'
  727.     dcb     $00,$3e,$60,$3c,$06,$66,$3c,$00 ;'S'
  728.     dcb     $00,$7e,$18,$18,$18,$18,$18,$00 ;'T'
  729.     dcb     $00,$66,$66,$66,$66,$66,$3c,$00 ;'U'
  730.     dcb     $00,$66,$66,$66,$66,$3c,$18,$00 ;'V'
  731.     dcb     $00,$63,$63,$6b,$7f,$77,$63,$00 ;'W'
  732.     dcb     $00,$66,$3c,$18,$3c,$66,$66,$00 ;'X'
  733.     dcb     $00,$66,$66,$3c,$18,$18,$18,$00 ;'Y'
  734.     dcb     $00,$7e,$0c,$18,$30,$60,$7e,$00 ;'Z'
  735.     dcb     $00,$00,$00,$00,$00,$00,$00,$00 ;'[' 
  736.     dcb     $09,$09,$00,$00,$00,$00,$00,$00 ;'\'
  737.     dcb     $00,$00,$00,$00,$00,$00,$00,$00 ;']'
  738.     dcb     $00,$00,$00,$00,$00,$00,$00,$00 ;'^'
  739.     dcb     $00,$08,$00,$00,$00,$00,$00,$00 ;'_'  
  740.     dcb     $00,$00,$00,$00,$00,$00,$00,$00 ;' '  
  741.     dcb     $00,$7E,$7E,$3C,$18,$00,$18,$00 ;'!'
  742.     dcb     $00,$00,$00,$00,$00,$00,$00,$00 ;'"'
  743.     dcb     $80,$80,$80,$80,$80,$80,$80,$80 ;'#'
  744.     dcb     $FC,$FE,$FF,$F7,$F7,$FF,$FE,$FC ;'$'
  745.     dcb     $3E,$42,$4E,$5C,$5C,$4E,$42,$3E ;'%'
  746.     dcb     $00,$00,$00,$00,$00,$00,$00,$01 ;'&'
  747.     dcb     $00,$00,$00,$07,$00,$00,$00,$00 ;'''
  748.     dcb     $00,$04,$08,$08,$08,$08,$04,$00 ;'('
  749.     dcb     $00,$20,$10,$10,$10,$10,$20,$00 ;')'
  750.     dcb     $08,$08,$08,$F8,$08,$08,$08,$08 ;'*'
  751.     dcb     $10,$10,$10,$1F,$10,$10,$10,$10 ;'+'
  752.     dcb     $10,$10,$20,$C0,$00,$00,$00,$00 ;','
  753.     dcb     $00,$00,$00,$FF,$00,$00,$00,$00 ;'-'
  754.     dcb     $00,$00,$00,$00,$00,$18,$18,$00 ;'.'
  755.     dcb     $00,$00,$00,$FF,$80,$80,$80,$80 ;'/'  
  756.     dcb     $00,$3c,$66,$6e,$76,$66,$3c,$00 ;'0'
  757.     dcb     $00,$18,$38,$18,$18,$18,$7e,$00 ;'1'
  758.     dcb     $00,$7c,$06,$0c,$30,$60,$7e,$00 ;'2'
  759.     dcb     $00,$7e,$06,$1c,$06,$66,$3c,$00 ;'3'
  760.     dcb     $00,$0e,$1e,$36,$7f,$06,$06,$00 ;'4'
  761.     dcb     $00,$7e,$60,$7c,$06,$66,$3c,$00 ;'5'
  762.     dcb     $00,$3e,$60,$7c,$66,$66,$3c,$00 ;'6'
  763.     dcb     $00,$7e,$06,$0c,$0c,$0c,$0c,$00 ;'7'
  764.     dcb     $00,$3c,$66,$3c,$66,$66,$3c,$00 ;'8'
  765.     dcb     $00,$3c,$66,$3e,$06,$66,$3c,$00 ;'9'
  766.     dcb     $00,$00,$00,$03,$04,$08,$08,$08 ;':' 
  767.     dcb     $00,$80,$80,$F0,$80,$80,$00,$00 ;';'
  768.     dcb     $80,$80,$80,$FF,$00,$00,$00,$00 ;'<'
  769.     dcb     $00,$00,$00,$C0,$20,$10,$10,$10 ;'='
  770.     dcb     $08,$08,$04,$03,$00,$00,$00,$00 ;'>'
  771.     dcb     $00,$00,$00,$00,$00,$00,$00,$00 ;'?'
  772.  
  773. TEXT  dcb     " THIS IS YOUR ENTIRE SCREEN     "
  774.     dcb     " HERE... IF YOU REMOVE ONE OF   "
  775.     dcb     " THE LINES WHICH IS BLANK, THE  "
  776.     dcb     " SCREEN ENDS UP BEING FUNKY     "
  777.     dcb     " DOWN AT THE BOTTOM OF THE      "
  778.     dcb     " SCREEN.                        "
  779.     dcb     "                                "
  780.     dcb     " SO MAKE SURE YOU ALWAYS LEAVE  "
  781.     dcb     " ALL OF THIS TEXT THINGS IN!    "
  782.     dcb     "                                "
  783.     dcb     "                                "
  784.     dcb     "                                "
  785.     dcb     "         YOSHI THE DINO         "
  786.     dcb     "                                "
  787.     dcb     "                                "
  788.     dcb     "                                "
  789.     dcb     "                                "
  790.     dcb     "                                "
  791.     dcb     "                                "
  792.     dcb     "                                "
  793.     dcb     "                                "
  794.     dcb     "                                "
  795.     dcb     "                                "
  796.     dcb     "                                "
  797.     dcb     "                                "
  798.     dcb     "                                "
  799.     dcb     "                                "
  800.     dcb     "                                "
  801.     dcb     "                                "
  802.     dcb     "********************************"
  803.     dcb     "                                "
  804.     dcb     "                                "
  805. -----------                              
  806.     Well there's some code for those whom want to rip it :-).
  807.     
  808.     I hope I haven't confused you yet: If I have, go back and re-read
  809.     the code. I've been working with the SNES for awhile, so I under-
  810.     stand a little more than a beginner.
  811.  
  812.     You're probably wondering how the heck the following line ends
  813.     up being an "@" on your TV, or whatever you have your SNES
  814.     hooked up to.
  815.  
  816.     Lets look at charset and charset2.
  817.  
  818. charset 
  819.     dcb     $00,$00,$00,$00,$00,$00,$00,$00 ;'@'  
  820.  
  821. charset2 
  822.     dcb     $00,$3C,$4E,$5E,$5E,$40,$3C,$00 ;'@'  
  823.  
  824.     Convert charsets hex-statements into binary. Consider each
  825.     new "$xx" statement a new pixel line. Tile size is 8x8.
  826.  
  827.     00000000          = $00
  828.     00000000          = $00
  829.     00000000          = $00
  830.     00000000          = $00
  831.     00000000          = $00
  832.     00000000          = $00
  833.     00000000          = $00
  834.     00000000          = $00
  835.  
  836.     Convert charset2s hex-statements into binary. 
  837.  
  838.     00000000          = $00
  839.     00111100          = $3C
  840.     01001110          = $4E
  841.     01011110          = $5E
  842.     01011110          = $5E
  843.     01000000          = $40
  844.     00111100          = $3C
  845.     00000000          = $00
  846.  
  847.     *NOW* do you see the at-symbol? (and yes, I -DID- draw all
  848.     of the font by hand. It took me HOURS, but I did it).
  849.  
  850.     You're probably now asking: "Well, that tells me how to define
  851.     where a pixel IS: but how do I define it's color?"
  852.  
  853.     This is the fun part. It's sort-of hard to explain:
  854.     If you have a 0 for bitplane 0, a 0 for bitplane 1, a 0 for
  855.     bitplane 2, and a 0 for bitplane 3, you get the color 0.
  856.         i.e.: 0000 = Color #0
  857.             ||||___________Bitplane 0
  858.             |||__________Bitplane 1
  859.             ||_________Bitplane 2
  860.             |________Bitplane 3
  861.  
  862.     So, think about a 0 for bitplane 0, a 1 for bitplane 1 & 2
  863.     and a 0 for bitplane 3.
  864.         i.e.: 0110 = Color #6
  865.             ||||___________Bitplane 0
  866.             |||__________Bitplane 1
  867.             ||_________Bitplane 2
  868.             |________Bitplane 3
  869.  
  870.     This is probably the best explaination i've ever seen done about
  871.     SNES pixel-color definition, so don't plan on seeing one any
  872.     better anytime soon :-).
  873.  
  874.     Anyway, the result above gives you the color # per pixel; it's
  875.     fairly interesting... it's like an "overlay" type of method.
  876.  
  877.     I mentioned in the source above that you should check near the
  878.     end of the Section for info on why I "stz $2119". Well, here's
  879.     why: The bits in the tile-data are fairly "silly": The tile
  880.     "character" itself is 10 bits, while the other 6 are "fun bits,"
  881.     as I call them. Here's the explaination:
  882.             yx?cccNN | NNNNNNNN
  883.                         y: Flip the tile vertically.
  884.                         x: Flip the tile horiztonally.
  885.                         ?: Dunno! Set it to 1 and find out. 
  886.                         c: Pallete # (0-7).
  887.                         N: Character itself.
  888.                         
  889.     So, I STZ there: Yes, I leave the top bits "unset," which means
  890.     you could get messed up data, but as far as I have checked, the
  891.     SNES has "clear memory" when you start it up: So the bits I don't
  892.     zero-out should be zeros anyways! :-) If you want to set them,
  893.     feel free to do so! The results of flipping Y and X are sortof
  894.     fun to play with. "To read this scrolly, you must stand on your
  895.     head" :-)
  896. =-=-=
  897. 5)    SNES Screen mode definitions.
  898. -----------                              
  899. MODE   # of bitplanes  Colors per plane  Palletes      Max. # of colors
  900. ---------------------------------------------------------------------------
  901. 0      2               4               8               32
  902. 1      4               16              8               128
  903. 2      ?               ???             ?               ??? 
  904. 3      8               256             1               256
  905. 4      ?               ???             ?               ??? 
  906. 5      ?               ???             ?               ??? 
  907. 6      ?               16              8               128 (Interlaced mode)
  908. 7      ?               256             1               256 (Yes, MODE 7)
  909. ---------------------------------------------------------------------------
  910.  
  911.     The parms which have "?" or "???" mean I don't know what they REALLY
  912.     are: I got a document which explained them, but it was bogus: It
  913.     said a 16 color mode had -1- bitplane. Weird... I'm not even sure
  914.     about MODE 6. But, we know what MODE 7 is, even if I'm not sure how
  915.     many bitplanes it DOES use (the doc says 1, I say 8).
  916.  
  917.     I've tested MODE 0 and 1 myself. MODE 3 I might test in the future,
  918.     but i've never had the desire to draw up 8 bitplanes of data by
  919.     hand ( I don't have a SNES-graphics-generator for the PC! :-( ).
  920. =-=-=
  921. 6)    SNES OAM/Sprite explaination.
  922. -----------                              
  923.     The sprites use a lookup table that contains info on their X and
  924.     Y position on the screen, their size, if they're flipped horizontally
  925.     or vertically, their color, and the actual character.
  926.  
  927.     The format you need to make the table in is as follows:
  928.  
  929. Size  Address/Offset          Explaination
  930. ---------------------------------------------------------------------------
  931. *** SPRITE 0 ***
  932. BYTE  0                      
  933.                     xxxxxxxx
  934.                             x: X location.
  935. BYTE  1                       
  936.                     yyyyyyyy
  937.                             y: Y location.
  938. WORD  2+3         
  939.                   abcdeeex | xxxxxxxx
  940.                             a: Vertical flip.
  941.                             b: Horizontal flip.
  942.                             c: Playfield priority.
  943.                             d: Playfield priority.
  944.                             e: Pallete #.
  945.                             x: Character #.
  946. *** SPRITE 0 ***
  947. BYTE  4                       
  948.                     xxxxxxxx
  949.                             x: X location.
  950. BYTE  5                       
  951.                     yyyyyyyy
  952.                             y: Y location.
  953. ....... and so on .......
  954. ---------------------------------------------------------------------------
  955.     Continue this table all the way down to sprite #127 (the 128th
  956.     sprite).
  957.     
  958.     Don't think you're finished yet: There is another table of data
  959.     you have to make.
  960.     2 bits are defined for each sprite (ie. Byte #0 holds the info for
  961.     Sprite #0, #1, #2, and #3). Therefore, 128/4 = 32 bytes of data for
  962.     this table.
  963.  
  964.     The bit-definitions follow ("x" is which bit i'm speaking about).
  965.     
  966.     Bit 0 is the MSB of X position bit (0x)
  967.     Bit 1 is the size-toggle bit (x0). 
  968.  
  969.     So the 4 bytes/sprites + the block are put into the OAM table
  970.     by consecutive writes to the OAM data register. You first should
  971.     set the OAM address to $0, then shove your data thru it.
  972.  
  973.     *** REMEMBER ***. If you don't set the block after the OAM as
  974.     well, the results can be nasty: All the data for the MSB stuff
  975.     wouldn't be defined correctly, which would result in your entire
  976.     sprite-table being silly :-). Have atleast some 0's there or
  977.     a table which you really want to use in the longrun.
  978. =-=-=
  979. 9)    Magicom Disk registers and Memory controller locations.
  980. -----------                              
  981.     Do note that i've never used a Magicomm before, and I would
  982.     strongly recommend not using these unless you know what each 
  983.     one does for 100% sure. If you're going to write an OS for
  984.     the SNES, i'll be at your door worshipping you when it
  985.     comes out :-)
  986.  
  987.     The below registers i've never tested, or had tested. If you
  988.     end up messin' up your drive, it's not my fault. Someone
  989.     could remap the $C007 Disk Control Register to the +5V pin on the
  990.     SNES, and you could end up with a fried Magicomm (maybe. I'm not
  991.     into Electrical Engineering, so i'm probably wrong, but it'd
  992.     be funny to see what it did :-)).
  993.  
  994. Disk Registers:
  995.  
  996. Location    Value returned when read         Value inputted when written
  997. ---------------------------------------------------------------------------
  998. $C000:      Input Register                          
  999. $C002:                                       Digital Output Register
  1000. $C004:      Main Status Register                
  1001. $C005:      Data Register                    Data Register
  1002. $C007:      Digital Input Register           Disk Control Register
  1003. $C008:      Parallel Data                    Parallel Data
  1004. $C009:      Parallel Status
  1005. ---------------------------------------------------------------------------
  1006. Memory Controller: $E000 to $E00D (maybe?).
  1007. =-=-=
  1008. 69)   About the author...
  1009. -----------                              
  1010.     How come everyone goes here LAST :-)
  1011.  
  1012.     I'm 16 years old; blonde hair, blue eyes, 5'10" tall, 145
  1013.     pounds. I currently am attending Corvallis High School in
  1014.     Corvallis, Oregon (I'm a Senior, believe it or not). I work
  1015.     at the University (Oregon State, not University of Oregon)
  1016.     as a Computer Science apprentice (volunteer work).
  1017.     
  1018.     In my spare time, I enjoy writing 1000+ lines of SNES doc-
  1019.     umentation (just kidding), programming, biking, sleeping,
  1020.     composing music, drawing (freehand and via mouse), spending
  1021.     time on IRC (YAY!!!), taking care of our CS users, and just
  1022.     being myself. And for those who REALLY care, i'm single (for
  1023.     females; i've already got a boyfriend: I luv ya, Chris!!!).
  1024.     No, i'm not female, so, if you have a problem with it, take
  1025.     your homophobia someplace else: Like to Mars. Flames will
  1026.     be redirected to /dev/null, with a cc to your administrator.
  1027.  
  1028.     I've been programming in assembly for, oh, 4 years or so now.
  1029.     I also know BASIC, Pascal, a very little C, and some 80x86asm.
  1030.     (Remember: $40:$17 is -NOT- good for a night light!).
  1031.  
  1032.     You can reach me many ways:
  1033.         InterNET: yoshi@CSOS.ORST.EDU
  1034.                 yoshi@rush.cc.edu
  1035.            Phone: (503)753-2431
  1036.          SnailMail: Digital Exodus               * All mail bombs will
  1037.                 c/o Jeremy Chadwick          * be returned.
  1038.                 ATTN: SNES DIVISION          * Money is gladly
  1039.                 33811 Twin Maple Lane        * accepted. :-)
  1040.                 Corvallis, OR, 97333   
  1041.            BBS's: Yoshi, Sonic, FTA, or Ryu...
  1042. =-=-=
  1043. FF)   Greetings, Thanx, etc...
  1044. -----------                              
  1045.     Greetings/Comments go out to the following people:
  1046.  
  1047.    *    Maxx Headroom: Heh heh. Does this make me the OFFICIAL SNES
  1048.                  department for Digital Exodus?
  1049.    *              med: Well, here's our document for starting out via
  1050.                  SNES assembly programming. 
  1051.    *          TheJazz: A document this is: Maybe NOW you'll move to
  1052.                  California with med and I?
  1053.    *           IRSMan: About time someone wrote a CORRECT SNES document,
  1054.                  and this time it was me.
  1055.    *               tm: Shush about me not being able to hack the SNES,
  1056.                  you, you, you programmer-with-documentation! :-)
  1057.    *            drees: I removed all of the foul language: You're right,
  1058.                  it makes the document "more nice". Thanx, and sorry
  1059.                  for chewing you out. :~-(.
  1060.    *    FAMIDEV group: Enjoy the document, guys. Thanx for all the support
  1061.                  you've given me!
  1062. ---
  1063.    Big thanx to the following people for helping me work out bugs, plus
  1064.    give me documentation on registers and other info:
  1065.  
  1066.     vic@physci.psu.edu                  cujrc@uxa.ecn.bgu.edu
  1067. ---
  1068. 1 exodus% cd /
  1069. 2 exodus% ls -Rl|wall &
  1070. [1] ls -Rl|wall
  1071. 3 exodus%
  1072.         *** System Broadcast message by yoshi at 12:45 ***
  1073.  
  1074. Message from root on ttyco...
  1075. I think not.
  1076. EOF
  1077. Killed
  1078.  
  1079. NO CARRIER
  1080.  
  1081.  
  1082. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1083. Jeremy "Yoshi" Chadwick           |Internet: yoshi@CSOS.ORST.EDU
  1084. LocalSupport-Apprentice for       |Phone: (503) 753-2431
  1085. Computer Science Outreach Services|IRC & UNiX Support (Yoshi on IRC)
  1086. at Oregon State University        |65c816 programmer (IIGS/SNES)
  1087. Opinions expressed may not be those of Oregon State University.
  1088.