home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / genie-commodore-file-library / Information / C64.MEMORYMAP < prev    next >
Encoding:
Text File  |  2019-04-13  |  30.4 KB  |  651 lines

  1.  
  2. COMMODORE 64  MEMORY MAPS
  3.  
  4.           ADDRESS
  5. LABEL     HEX         DEC     DESCRIPTION
  6. -----------------------------------------------------------------------------
  7. D6510     0000        0       6510 On-chip Data Direction Register.
  8. R6510     0001        1       6510 On-chip 8-bit Input/Output Register.
  9. TEMP      0002        2       Unused. Free for user programs.
  10. ADRAY1    0003-0004   3       Jump Vector: Convert FAC to Integer in (A/Y)
  11.                               ($B1AA).
  12. ADRAY2    0005-0006   5       Jump Vector: Convert Integer in (A/Y) to
  13.                               Floating point in (FAC); ($B391).
  14. CHARAC    0007        7       Search Character/Temporary Integer during INT.
  15. ENDCHR    0008        8       Flag: Scan for Quote at end of String.
  16. INTEGR    0007-0008   7       Temporary Integer during OR/AND.
  17. TRMPOS    0009        9       Screen Column for last TAB.
  18. VERCK     000A        10      Flag: 0 = Load, 1 = Verify.
  19. COUNT     000B        11      Input Buffer Pointer/Number of Subscripts.
  20. DIMFLG    000C        12      Flag: Default Array dimension.
  21. VALTYP    000D        13      Data type Flag: $00 = Numeric, $FF = String.
  22. INTFLG    000E        14      Data type Flag: $00 = Floating point, $80 =
  23.                               Integer.
  24. GARBFL    000F        15      Flag: DATA scan/List Quote/Garbage collection.
  25. SUBFLG    0010        16      Flag: Subscript reference/User Function call.
  26. INPFLG    0011        17      Input Flag: $00 = INPUT, $40 = GET, $98 =
  27.                               READ.
  28. TANSGN    0012        18      Flag: TAN sign/Comparative result.
  29. CHANNL    0013        19      File number of current Input Device.
  30. LINNUM    0014-0015   20      Temporary: Integer value.
  31. TEMPPT    0016        22      Pointer: Temporary String Stack.
  32. LASTPT    0017-0018   23      Last temporary String Address.
  33. TEMPST    0019-0021   25      Stack for temporary Strings.
  34. INDEX     0022-0025   34      Utility Pointer Area.
  35. INDEX1    0022-0023   34      First Utility Pointer.
  36. INDEX2    0024-0025   36      Secong Utility Pointer.
  37. RESHO     0026-002A   38      Floating point product of Multiply and
  38.                               Divide.
  39. TXTTAB    002B-002C   43      Pointer: Start of BASIC Text Area ($0801).
  40. VARTAB    002D-002E   45      Pointer: Start of BASIC Variables.
  41. ARYTAB    002F-0030   47      Pointer: Start of BASIC Arrays.
  42. STREND    0031-0032   49      Pointer: End of BASIC Arrays + 1.
  43. FRETOP    0033-0034   51      Pointer: Bottom of String space.
  44. FRESPC    0035-0036   53      Utility String Pointer.
  45. MEMSIZ    0037-0038   55      Pointer: Highest Address available to BASIC
  46.                               ($A000).
  47. CURLIN    0039-003A   57      Current BASIC Line number.
  48. OLDLIN    003B-003C   59      Previous BASIC Line number.
  49. OLDTXT    003D-003E   61      Pointer: BASIC Statement for CONT.
  50. DATLIN    003F-0040   63      Current DATA Line number.
  51. DATPTR    0041-0042   65      Pointer: Used by READ - current DATA Item
  52.                               Address.
  53. INPPTR    0043-0044   67      Pointer: Temporary storage of Pointer during
  54.                               INPUT Routine.
  55. VARNAM    0045-0046   69      Name of Variable being sought in Variable
  56.                               Table.
  57. VARPNT    0047-0048   71      Pointer: to value of (VARNAM) if Integer, to
  58.                               descriptor if String.
  59. FORPNT    0049-004A   73      Pointer: Index Variable for FOR/NEXT loop.
  60. VARTXT    004B-004C   75      Temporary storage for TXTPTR during READ,
  61.                               INPUT and GET.
  62. OPMASK    004D        77      Mask used during FRMEVL.
  63. TEMPF3    004E-0052   78      Temporary storage for FLPT value.
  64. FOUR6     0053        83      Length of String Variable during Garbege
  65.                               collection.
  66. JMPER     0054-0056   84      Jump Vector used in Function Evaluation -
  67.                               JMP followed by Address ($4C,$LB,$MB).
  68. TEMPF1    0057-005B   87      Temporary storage for FLPT value.
  69. TEMPF2    005C-0060   92      Temporary storage for FLPT value.
  70. FAC       0061-0066   97      Main Floating point Accumulator.
  71. FACEXP    0061        97      FAC Exponent.
  72. FACHO     0062-0065   98      FAC Mantissa.
  73. FACSGN    0066        102     FAC Sign.
  74. SGNFLG    0067        103     Pointer: Series Evaluation Constant.
  75. BITS      0068        104     Bit Overflow Area during normalisation
  76.                               Routine.
  77. AFAC      0069-006E   105     Auxiliary Floating point Accumulator.
  78. ARGEXP    0069        105     AFAC Exponent.
  79. ARGHO     006A-006D   106     AFAC Mantissa.
  80. ARGSGN    006E        110     AFAC Sign.
  81. ARISGN    006F        111     Sign of result of Arithmetic Evaluation.
  82. FACOV     0070        112     FAC low-order rounding.
  83. FBUFPT    0071-0072   113     Pointer: Used during CRUNCH/ASCII conversion.
  84. CHRGET    0073-008A   115     Subroutine: Get next Byte of BASIC Text.
  85.             ,0073  INC $7A       ,0082  BEQ $0073
  86.             ,0075  BNE $0079     ,0084  SEC
  87.             ,0077  INC $7B       ,0085  SBC #$30
  88.           ! ,0079  LDA $0801     ,0087  SEC
  89.             ,007C  CMP #$3A      ,0088  SBC #$D0
  90.             ,007E  BCS $008A     ,008A  RTS
  91.             ,0080  CMP #$20
  92. CHRGOT    0079        121     Entry to Get same Byte again.
  93. TXTPTR    007A-007B   122     Pointer: Current Byte of BASIC Text.
  94. RNDX      008B-008F   139     Floating RND Function Seed Value.
  95. STATUS    0090        144     Kernal I/O Status Word  ST.
  96. STKEY     0091        145     Flag: $7F = STOP key.
  97. SVXT      0092        146     Timing Constant for Tape.
  98. VERCKK    0093        147     Flag: 0 = Load, 1 = Verify.
  99. C3PO      0094        148     Flag: Serial Bus - Output Character buffered.
  100. BSOUR     0095        149     Buffered Character for Serial Bus.
  101. SYNO      0096        150     Cassette Sync. number.
  102. TEMPX     0097        151     Temporary storage of X Register during CHRIN.
  103. TEMPY     0097        151     Temporary storage of Y Register during RS232
  104.                               fetch.
  105. LDTND     0098        152     Number of Open Files/Index to File Table.
  106. DFLTN     0099        153     Default Input Device (0).
  107. DFLTO     009A        154     Default Output Device (3).
  108. PRTY      009B        155     Parity of Byte Output to Tape.
  109. DPSW      009C        156     Flag: Byte received from Tape.
  110. MSGFLG    009D        157     Flag: $00 = Program mode: Suppress Error
  111.                               Messages, $40 = Kernal Error Messages only,
  112.                               $80 = Direct mode: Full Error Messages.
  113. FNMIDX    009E        158     Index to Cassette File name/Header ID for
  114.                               Tape write.
  115. PTR1      009E        158     Tape Error log pass 1.
  116. PTR2      009F        159     Tape Error log pass 2.
  117. TIME      00A0-00A2   160     Real-time jiffy Clock (Updated by IRQ
  118.                               Interrupt approx. every 1/60 of Second);
  119.                               Update Routine: UDTIMK ($F69B).
  120. TSFCNT    00A3        163     Bit Counter Tape Read or Write/Serial Bus
  121.                               EOI (End Of Input) Flag.
  122. TBTCNT    00A4        164     Pulse Counter Tape Read or Write/Serial Bus
  123.                               shift Counter.
  124. CNTDN     00A5        165     Tape Synchronising count down.
  125. BUFPNT    00A6        166     Pointer: Tape I/O buffer.
  126. INBIT     00A7        167     RS232 temporary for received Bit/Tape
  127.                               temporary.
  128. BITC1     00A8        168     RS232 Input Bit count/Tape temporary.
  129. RINONE    00A9        169     RS232 Flag: Start Bit check/Tape temporary.
  130. RIDATA    00AA        170     RS232 Input Byte Buffer/Tape temporary.
  131. RIPRTY    00AB        171     RS232 Input parity/Tape temporary.
  132. SAL       00AC-00AD   172     Pointer: Tape Buffer/Screen scrolling.
  133. EAL       00AE-00AF   174     Tape End Address/End of Program.
  134. CMPO      00B0-00B1   176     Tape timing Constants.
  135. TAPE1     00B2-00B3   178     Pointer: Start Address of Tape Buffer ($033C).
  136. BITTS     00B4        180     RS232 Write bit count/Tape Read timing Flag.
  137. NXTBIT    00B5        181     RS232 Next Bit to send/Tape Read - End of
  138.                               Tape.
  139. RODATA    00B6        182     RS232 Output Byte Buffer/Tape Read Error Flag.
  140. FNLEN     00B7        183     Number of Characters in Filename.
  141. LA        00B8        184     Current File - Logical File number.
  142. SA        00B9        185     Current File - Secondary Address.
  143. FA        00BA        186     Current File - First Address (Device number).
  144.                                 OPEN LA,FA,SA;  OPEN 1,8,15,"I0":CLOSE 1
  145. FNADR     00BB-00BC   187     Pointer: Current File name Address.
  146. ROPRTY    00BD        189     RS232 Output Parity/Tape Byte to be Input or
  147.                               Output.
  148. FSBLK     00BE        190     Tape Input/Output Block count.
  149. MYCH      00BF        191     Serial Word Buffer.
  150. CAS1      00C0        192     Tape Motor Switch.
  151. STAL      00C1-00C2   193     Start Address for LOAD and Cassette Write.
  152. MEMUSS    00C3-00C4   195     Pointer: Type 3 Tape LOAD and general use.
  153. LSTX      00C5        197     Matrix value of last Key pressed; No Key = $40.
  154. NDX       00C6        198     Number of Characters in Keyboard Buffer
  155.                               queue.
  156. RVS       00C7        199     Flag: Reverse On/Off; On = $01, Off = $00.
  157. INDX      00C8        200     Pointer: End of Line for Input (Used to
  158.                               suppress trailing spaces).
  159. LXSP      00C9-00CA   201     Cursor X/Y (Line/Column) position at start of
  160.                               Input.
  161. SFDX      00CB        203     Flag: Print shifted Characters.
  162. BLNSW     00CC        204     Flag: Cursor blink; $00 = Enabled, $01 =
  163.                               Disabled.
  164. BLNCT     00CD        205     Timer: Count down for Cursor blink toggle.
  165. GDBLN     00CE        206     Character under Cursor while Cursor Inverted.
  166. BLNON     00CF        207     Flag: Cursor Status; $00 = Off, $01 = On.
  167. CRSW      00D0        208     Flag: Input from Screen = $03, or Keyboard =
  168.                               $00.
  169. PNT       00D1-00D2   209     Pointer: Current Screen Line Address.
  170. PNTR      00D3        211     Cursor Column on current Line, including
  171.                               Wrap-round Line, if any.
  172. QTSW      00D4        212     Flag: Editor in Quote Mode; $00 = Not.
  173. LNMX      00D5        213     Current logical Line length: 39 or 79.
  174. TBLX      00D6        214     Current Screen Line number of Cursor.
  175. SCHAR     00D7        215     Screen value of current Input Character/Last
  176.                               Character Output.
  177. INSRT     00D8        216     Count of number of inserts outstanding.
  178. LDTB1     00D9-00F2   217     Screen Line link Table/Editor temporaries.
  179.                               High Byte of Line Screen Memory Location.
  180. USER      00F3-00F4   243     Pointer: Current Colour RAM Location.
  181. KEYTAB    00F5-00F6   245     Vector: Current Keyboard decoding Table.
  182.                               ($EB81)
  183. RIBUF     00F7-00F8   247     RS232 Input Buffer Pointer.
  184. ROBUF     00F9-00FA   249     RS232 Output Buffer Pointer.
  185. FREKZP    00FB-00FE   251     Free Zero Page space for User Programs.
  186. BASZPT    00FF        255     BASIC temporary Data Area.
  187. ASCWRK    00FF-010A   255     Assembly Area for Floating point to ASCII
  188.                               conversion.
  189. BAD       0100-013E   256     Tape Input Error log.
  190. STACK     0100-01FF   256     6510 Hardware Stack Area.
  191. BSTACK    013F-01FF   319     BASIC Stack Area.
  192. BUF       0200-0258   512     BASIC Input Buffer (Input Line from Screen).
  193. LAT       0259-0262   601     Kernal Table: Active logical File numbers.
  194. FAT       0263-026C   611     Kernal Table: Active File First Addresses
  195.                               (Device numbers).
  196. SAT       026D-0276   621     Kernal Table: Active File Secondary
  197.                               Addresses.
  198. KEYD      0277-0280   631     Keyboard Buffer Queue (FIFO).
  199. MEMSTR    0281-0282   641     Pointer: Bottom of Memory for Operating
  200.                               System ($0800).
  201. MEMSIZ    0283-0284   643     Pointer: Top of Memory for Operating
  202.                               System ($A000).
  203. TIMOUT    0285        645     Serial IEEE Bus timeout defeat Flag.
  204. COLOR     0286        646     Current Character Colour code.
  205. GDCOL     0287        647     Background Colour under Cursor.
  206. HIBASE    0288        648     High Byte of Screen Memory Address ($04).
  207. XMAX      0289        649     Maximum number of Bytes in Keyboard
  208.                               Buffer ($0A).
  209. RPTFLG    028A        650     Flag: Repeat keys; $00 = Cursors, INST/DEL &
  210.                               Space repeat, $40 no Keys repeat, $80 all
  211.                               Keys repeat ($00).
  212. KOUNT     028B        651     Repeat Key: Speed Counter ($04).
  213. DELAY     028C        652     Repeat Key: First repeat delay Counter ($10).
  214. SHFLAG    028D        653     Flag: Shift Keys: Bit 1 = Shift, Bit 2 = CBM,
  215.                               Bit 3 = CTRL; ($00 = None, $01 = Shift, etc.).
  216. LSTSHF    028E        654     Last Shift Key used for debouncing.
  217. KEYLOG    028F-0290   655     Vector: Routine to determine Keyboard table
  218.                               to use based on Shift Key Pattern ($EB48).
  219. MODE      0291        657     Flag: Upper/Lower Case change: $00 = Disabled,
  220.                               $80 = Enabled ($00).
  221. AUTODN    0292        658     Flag: Auto scroll down: $00 = Disabled ($00).
  222. M51CTR    0293        659     RS232 Pseudo 6551 control Register Image.
  223. M51CDR    0294        660     RS232 Pseudo 6551 command Register Image.
  224. M51AJB    0295-0296   661     RS232 Non-standard Bits/Second.
  225. RSSTAT    0297        663     RS232 Pseudo 6551 Status Register Image.
  226. BITNUM    0298        664     RS232 Number of Bits left to send.
  227. BAUDOF    0299-029A   665     RS232 Baud Rate; Full Bit time microseconds.
  228. RIDBE     029B        667     RS232 Index to End of Input Buffer.
  229. RIDBS     029C        668     RS232 Pointer: High Byte of Address of Input
  230.                               Buffer.
  231. RODBS     029D        669     RS232 Pointer: High Byte of Address of Output
  232.                               Buffer.
  233. RODBE     029E        670     RS232 Index to End of Output Buffer.
  234. IRQTMP    029F-02A0   671     Temporary store for IRQ Vector during Tape
  235.                               operations.
  236. ENABL     02A1        673     RS232 Enables.
  237. TODSNS    02A2        674     TOD sense during Tape I/O.
  238. TRDTMP    02A3        675     Temporary storage during Tape READ.
  239. TD1IRQ    02A4        676     Temporary D1IRQ Indicator during Tape READ.
  240. TLNIDX    02A5        677     Temporary for Line Index.
  241. TVSFLG    02A6        678     Flag: TV Standard: $00 = NTSC, $01 = PAL.
  242. TEMP      02A7-02FF   679     Unused.
  243. SPR11     02C0-02FE   704     Sprite #11 Data Area.
  244.                                 (SCREEN + $03F8 + SPR number)
  245.                                 POKE 1024+1016+0,11  to use Sprite#0 DATA
  246.                                 from ($02C0-$02FE).
  247. IERROR    0300-0301   768     Vector: Indirect entry to BASIC Error
  248.                               Message, (X) points to Message ($E38B).
  249. IMAIN     0302-0303   770     Vector: Indirect entry to BASIC Input Line
  250.                               and Decode ($A483).
  251. ICRNCH    0304-0305   772     Vector: Indirect entry to BASIC Tokenise
  252.                               Routine ($A57C).
  253. IQPLOP    0306-0307   774     Vector: Indirect entry to BASIC LIST
  254.                               Routine ($A71A).
  255. IGONE     0308-0309   776     Vector: Indirect entry to BASIC Character
  256.                               dispatch Routine ($A7E4).
  257. IEVAL     030A-030B   778     Vector: Indirect entry to BASIC Token
  258.                               evaluation ($AE86).
  259. SAREG     030C        780     Storage for 6510 Accumulator during SYS.
  260. SXREG     030D        781     Storage for 6510 X-Register during SYS.
  261. SYREG     030E        782     Storage for 6510 Y-Register during SYS.
  262. SPREG     030F        783     Storage for 6510 Status Register during SYS.
  263. USRPOK    0310        784     USR Function JMP Instruction ($4C).
  264. USRADD    0311-0312   785     USR Address ($LB,$MB).
  265. TEMP      0313        787     Unused.
  266. CINV      0314-0315   788     Vector: Hardware IRQ Interrupt Address ($EA31).
  267. CNBINV    0316-0317   790     Vector: BRK Instruction Interrupt Address
  268.                               ($FE66).
  269. NMINV     0318-0319   792     Vector: Hardware NMI Interrupt Address ($FE47).
  270. IOPEN     031A-031B   794     Vector: Indirect entry to Kernal OPEN
  271.                               Routine ($F34A).
  272. ICLOSE    031C-031D   796     Vector: Indirect entry to Kernal CLOSE
  273.                               Routine ($F291).
  274. ICHKIN    031E-031F   798     Vector: Indirect entry to Kernal CHKIN
  275.                               Routine ($F20E).
  276. ICKOUT    0320-0321   800     Vector: Indirect entry to Kernal CHKOUT
  277.                               Routine ($F250).
  278. ICLRCH    0322-0323   802     Vector: Indirect entry to Kernal CLRCHN
  279.                               Routine ($F333).
  280. IBASIN    0324-0325   804     Vector: Indirect entry to Kernal CHRIN
  281.                               Routine ($F157).
  282. IBSOUT    0326-0327   806     Vector: Indirect entry to Kernal CHROUT
  283.                               Routine ($F1CA).
  284. ISTOP     0328-0329   808     Vector: Indirect entry to Kernal STOP
  285.                               Routine ($F6ED).
  286. IGETIN    032A-032B   810     Vector: Indirect entry to Kernal GETIN
  287.                               Routine ($F13E).
  288. ICLALL    032C-032D   812     Vector: Indirect entry to Kernal CLALL
  289.                               Routine ($F32F).
  290. USRCMD    032E-032F   814     User Defined Vector ($FE66).
  291. ILOAD     0330-0331   816     Vector: Indirect entry to Kernal LOAD
  292.                               Routine ($F4A5).
  293. ISAVE     0332-0333   818     Vector: Indirect entry to Kernal SAVE
  294.                               Routine ($F5ED).
  295. TEMP      0334-033B   820     Unused.
  296. TBUFFR    033C-03FB   828     Tape I/O Buffer.
  297. SPR13     0340-037E   832     Sprite #13.
  298. SPR14     0380-03BE   896     Sprite #14.
  299. SPR15     03C0-03FE   960     Sprite #15.
  300. TEMP      03FC-03FF   1020    Unused.
  301. VICSCN    0400-07E7   1024    Default Screen Video Matrix.
  302. TEMP      07E8-07F7   2024    Unused.
  303. SPNTRS    07F8-07FF   2040    Default Sprite Data Pointers.
  304.  
  305.  
  306.           0800-9FFF   2048    Normal BASIC Program space.
  307.           8000-9FFF   32768   Optional Cartridge ROM space.
  308.           A000-BFFF   40960   BASIC ROM (Part) or 8 KB RAM.
  309.           C000-CFFF   49152   4 KB RAM.
  310.           D000-DFFF   53248   Input/Output Devices and Colour RAM or
  311.                               4 KB RAM or Character ROM.
  312.           D000-D02E   53248   6566 Video Interface Chip, VIC II.
  313.           D400-D41C   54272   6581 Sound Interface Device, SID.
  314.           D500-D7FF   54528   SID Images.
  315.           D800-DBE7   55296   Colour RAM (Nybbles = 4 Bit RAM, LSB).
  316.           DBE8-DBFF   56296   Unused Nybbles.
  317.           DC00-DC0F   56320   6526 Complex Interface Adaptor, CIA.
  318.           DD00-DD0F   56576   6526 Complex Interface Adaptor, CIA.
  319.           E000-FFFF   57344   BASIC (Part)/Kernal ROM or 8 KB RAM.
  320.           E000-E4FF   57344   BASIC ROM (Part) or RAM.
  321.           E500-FFFF   58624   Kernal ROM or RAM.
  322.  
  323.  
  324.  
  325.     COMMODORE 64 INPUT/OUTPUT ASSIGNMENTS
  326.  
  327.  
  328. HEX    DECIMAL        BITS    DESCRIPTION
  329.  
  330. 0000    0        7-0    MOS 6510 Data Direction    
  331.                     Register (xx101111)
  332.                     Bit= 1: Output, Bit=0:    
  333.                     Input, x=Don't Care    
  334.  
  335. 0001    1            MOS 6510 Micro-Processor
  336.                     On-Chip I/O Port    
  337.             0    /LORAM Signal (0=Switch    BASIC ROM Out)
  338.             1    /HIRAM Signal (0=Switch Kernal ROM Out)
  339.             2    /CHAREN Signal (O=Swith Char. ROM In)
  340.             3    Cassette Data Output Line
  341.             4    Cassette Switch Sense: 1 = Switch Closed
  342.             5    Cassette Motor Control
  343.                 O = ON, 1 = OFF
  344.             6-7    Undefined
  345.  
  346.  
  347. D000-D02E    53248-54271    MOS 6566 VIDEO INTERFACE CONTROLLER (VIC)
  348.  
  349. D000        53248        Sprite O X Pos
  350. D001        53249        Sprite O Y Pos
  351. D002        53250        Sprite 1 X Pos        
  352. D003        53251        Sprite 1 Y Pos        
  353. D004        53252        Sprite 2 X Pos
  354. D005        53253        Sprite 2 Y Pos        
  355. D006        53254        Sprite 3 X Pos        
  356. D007        53255        Sprite 3 Y Pos
  357. D008        53256        Sprite 4 X Pos
  358. D009        53257        Sprite 4 Y Pos
  359. D00A        53258        Sprite 5 X Pos
  360. D00B        53259        Sprite 5 Y Pos
  361. D00C        53260        Sprite 6 X Pos
  362. D00D        53261        Sprite 6 Y Pos
  363. D00E        53262        Sprite 7 X Pos
  364. D00F        53263        Sprite 7 Y Pos
  365. D010        53264        Sprites 0-7 X Pos (msb of X coord.)
  366.  
  367. D011        53265        VIC Control Register
  368.             7    Raster Compare: (Bit 8)    See 53266
  369.             6    Extended Color Text Mode 1 = Enable    
  370.             5    Bit Map Mode. 1 = Enable
  371.             4    Blank Screen to Border Color: O = Blank
  372.             3    Select 24/25 Row Text Display: 1 = 25 Rows
  373.             2-0    Smooth Scroll to Y Dot-Position (0-7)
  374.  
  375. D012    53266            Read Raster / Write Raster Value for Compare IRQ
  376. D013    53267            Light-Pen Latch X Pos
  377. D014    53268            Light-Pen Latch Y Pos
  378. D015    53269            Sprite display Enable: 1 = Enable
  379.  
  380. D016    53270            VIC Control Register
  381.             7-6    Unused
  382.             5    ALWAYS SET THIS BIT TO 0 !
  383.             4    Multi-Color Mode: 1 = Enable (Text or Bit-Map)
  384.             3    Select 38/40 Column Text Display: 1 = 40 Cols
  385.             2-0    Smooth Scroll to X Pos
  386.  
  387. D017    53271            Sprites O-7 Expand 2x Vertical (Y)
  388.  
  389. D018    53272            VIC Memory Control Register
  390.             7-4    Video Matrix Base Address (inside VIC)
  391.             3-1    Character Dot-Data Base    Address (inside VIC)
  392.             0    Select upper/lower Character Set
  393.  
  394. D019    53273            VIC Interrupt Flag Register (Bit = 1: IRQ Occurred)
  395.             7    Set on Any Enabled VIC IRQ Condition
  396.             3    Light-Pen Triggered IRQ Flag
  397.             2    Sprite to Sprite Collision IRQ Flag
  398.             1    Sprite to Background Collision IRQ Flag
  399.             0    Raster Compare IRQ Flag
  400.  
  401. D01A    53274            IRQ Mask Register: 1 = Interrupt Enabled
  402. D01B    53275            Sprite to Background Display Priority: 1 = Sprite
  403. D01C    53276            Sprites O-7 Multi-Color Mode Select: 1 = M.C.M.
  404. D01D    53277            Sprites 0-7 Expand 2x Horizontal (X)
  405.  
  406. D01E    53278            Sprite to Sprite Collision Detect
  407. D01F    53279            Sprite to Background Collision Detect
  408. D020    53280            Border Color
  409. D021    53281            Background Color O
  410. D022    53282            Background Color 1
  411. D023    53283            Background Color 2
  412. D024    53284            Background Color 3
  413. D025    53285            Sprite Multi-Color Register 0
  414. D026    53286            Sprite Multi-Color Register 1
  415.  
  416. D027    53287            Sprite O Color
  417. D028    53288            Sprite 1 Color
  418. D029    53289            Sprite 2 Color
  419. D02A    53290            Sprite 3 Color
  420. D02B    53291            Sprite 4 Color
  421. D02C    53292            Sprite 5 Color
  422. D02D    53293            Sprite 6 Color
  423. D02E    53294            Sprite 7 Color
  424.  
  425. D400-D7FF    54272-55295    MOS 6581 SOUND INTERFACE DEVICE (SID)
  426.  
  427. D400    54272            Voice 1: Frequency Control - Low-Byte
  428. D401    54273            Voice 1: Frequency Control - High-Byte
  429. D402    54274            Voice 1: Pulse Waveform    Width - Low-Byte
  430. D403    54275        7-4    Unused
  431.             3-0    Voice 1: Pulse Waveform Width - High-Nybble
  432. D404    54276            Voice 1: Control Register
  433.             7    Select Random Noise Waveform, 1 = On
  434.             6    Select Pulse Waveform, 1 = On
  435.             5    Select Sawtooth Waveform, 1 = On
  436.             4    Select Triangle Waveform, 1 = On
  437.             3    Test Bit: 1 = Disable Oscillator 1
  438.             2    Ring Modulate Osc. 1 with Osc. 3 Output, 1 = On
  439.             1    Synchronize Osc. 1 with Osc. 3 Frequency, 1 = On
  440.             0    Gate Bit: 1 = Start Att/Dec/Sus, 0 = Start Release
  441.  
  442. D405    54277            Envelope Generator 1: Attack / Decay Cycle Control
  443.             7-4    Select Attack Cycle Duration: O-15
  444.             3-0    Select Decay Cycle Duration: 0-15
  445.  
  446. D406    54278            Envelope Generator 1: Sustain / Release Cycle Control
  447.             7-4    Select Sustain Cycle Duration: O-15
  448.             3-0    Select Release Cycle Duration: O-15
  449.  
  450. D407    54279            Voice 2: Frequency Control - Low-Byte
  451. D408    54280            Voice 2: Frequency Control - High-Byte
  452. D409    54281            Voice 2: Pulse Waveform Width - Low-Byte
  453.  
  454. D40A    54282        7-4    Unused
  455.             3-0    Voice 2: Pulse Waveform Width - High-Nybble
  456.  
  457. D40B    54283            Voice 2: Control Register
  458.             7    Select Random Noise Waveform, 1 = On
  459.             6    Select Pulse Waveform, 1 = On
  460.             5    Select Sawtooth Waveform, 1 = On
  461.             4    Select Triangle Waveform, 1 = On
  462.             3    Test Bit: 1 = Disable Oscillator 1
  463.             2    Ring Modulate Osc. 2 with Osc. 1 Output, 1 = On
  464.             1    Synchronize Osc. 2 with Osc. 1 Frequency, 1 = On
  465.             0    Gate Bit: 1 = Start Att/Dec/Sus, 0 = Start Release
  466.  
  467. D40C    54284            Envelope Generator 2: Attack / Decay Cycle Control
  468.             7-4    Select Attack Cycle Duration: O-15
  469.             3-0    Select Decay Cycle Duration: 0-15
  470.  
  471. D40D    54285            Envelope Generator 2: Sustain / Release Cycle Control
  472.             7-4    Select Sustain Cycle Duration: O-15
  473.             3-0    Select Release Cycle Duration: O-15
  474.  
  475. D40E    54286            Voice 3: Frequency Control - Low-Byte
  476. D40F    54287            Voice 3: Frequency Control - High-Byte
  477. D410    54288            Voice 3: Pulse Waveform Width - Low-Byte
  478. D411    54289        7-4    Unused
  479.             3-0    Voice 3: Pulse Waveform Width - High-Nybble
  480. D412    54290            Voice 3: Control Register
  481.             7    Select Random Noise Waveform, 1 = On
  482.             6    Select Pulse Waveform, 1 = On
  483.             5    Select Sawtooth Waveform, 1 = On
  484.             4    Select Triangle Waveform, 1 = On
  485.             3    Test Bit: 1 = Disable Oscillator 1
  486.             2    Ring Modulate Osc. 3 with Osc. 2 Output, 1 = On
  487.             1    Synchronize Osc. 3 with Osc. 2 Frequency, 1 = On
  488.             0    Gate Bit: 1 = Start Att/Dec/Sus, 0 = Start Release
  489.  
  490. D413    54291        Envelope Generator 3: Attac/Decay Cycle Control 
  491.             7-4    Select Attack Cycle Duration: O-15
  492.             3-0    Select Decay Cycle Duration: 0-15
  493.  
  494. D414    54285            Envelope Generator 3: Sustain / Release Cycle Control
  495.             7-4    Select Sustain Cycle Duration: O-15
  496.             3-0    Select Release Cycle Duration: O-15
  497.  
  498.  
  499. D415    54293            Filter Cutoff Frequency: Low-Nybble (Bits 2-O)
  500. D416    54294            Filter Cutoff Frequency: High-Byte
  501. D417    54295            Filter Resonance Control / Voice Input Control
  502.             7-4    Select Filter Resonance: 0-15
  503.             3    Filter External Input: 1 = Yes, 0 = No
  504.             2    Filter Voice 3 Output: 1 = Yes, 0 = No
  505.                 Filter Voice 2 Output: 1 = Yes, 0 = No
  506.             0    Filter Voice 1 Output: 1 = Yes, 0 = No
  507.  
  508. D418    54296            Select Filter Mode and Volume
  509.             7    Cut-Off Voice 3 Output: 1 = Off, O = On
  510.  
  511.             6    Select Filter High-Pass Mode: 1 = On
  512.             5    Select Filter Band-Pass Mode: 1 = On
  513.             4    Select Filter Low-Pass Mode: 1 = On
  514.             3-0    Select Output Volume: 0-15
  515.  
  516. D419    54297            Analog/Digital Converter: Game Paddle 1 (O-255)
  517. D41A    54298            Analog/Digital Converter Game Paddle 2 (O-255)
  518. D41B    54299            Oscillator 3 Random Number Generator
  519. D41C    54230            Envelope Generator 3 Output
  520.  
  521. D500-D7FF    54528-55295    SID IMAGES
  522. D800-DBFF    55296-56319    Color RAM (Nybbles)
  523.  
  524. DC00-DCFF    56320-56575    MOS 6526 Complex Interface Adapter (CIA) #1
  525.  
  526. DC00    56320            Data Port A (Keyboard, Joystick, Paddles, Light-Pen)
  527.  
  528.             7-0    Write Keyboard Column Values for Keyboard Scan
  529.             7-6    Read Paddles on Port A / B (01 = Port A, 10 = Port B)
  530.             4    Joystick A Fire Button: 1 = Fire
  531.             3-2    Paddle Fire Buttons
  532.             3-0    Joystick A Direction (0-15)
  533.  
  534. DC01    56321            Data Port B (Keyboard, Joystick, Paddles): Game Port 1
  535.             7-0    Read Keyboard Row Values for Keyboard Scan
  536.  
  537.             7    Timer B Toggle/Pulse Output
  538.             6    Timer A: Toggle/Pulse Output
  539.  
  540.             4    Joystick 1 Fire Button: 1 = Fire
  541.             3-2    Paddle Fire Buttons
  542.             3-0    Joystick 1 Direction
  543.  
  544. DC02    56322            Data Direction Register - Port A (56320)
  545. DC03    56323            Data Direction Register - Port B (56321)
  546. DC04    56324            Timer A: Low-Byte
  547. DC05    56325            Timer A: High-Byte
  548. DC06    56326            Timer B: Low-Byte
  549. DC07    56327            Timer B: High-Byte
  550.  
  551. DC08    56328            Time-of-Day Clock: 1/10 Seconds
  552. DC09    56329            Time-of-Day Clock: Seconds
  553. DC0A    56330            Time-of-Day Clock: Minutes
  554. DC0B    56331            Time-of-Day Clock: Hours + AM/PM Flag (Bit 7)
  555.  
  556. DC0C    56332            Synchronous Serial I/O Data Buffer
  557. DC0D    56333            CIA Interrupt Control Register (Read IRQs/Write Mask)
  558.  
  559.             7    IRQ Flag (1 = IRQ Occurred) / Set-Clear Flag
  560.             4    FLAG1 IRQ (Cassette Read / Serial Bus SRQ Input)
  561.             3    Serial Port Interrupt
  562.             2    Time-of-Day Clock Alarm Interrupt
  563.             1    Timer B Interrupt
  564.             0    Timer A Interrupt
  565.  
  566. DC0E    56334            CIA Control Register A
  567.             7    Time-of-Day Clock Frequency: 1 = 50 Hz, 0 = 60 Hz
  568.             6    Serial Port I/O Mode Output, 0 = Input
  569.             5    Timer A Counts: 1 = CNT Signals, 0 = System 02 Clock
  570.  
  571.             4    Force Load Timer A: 1 = Yes
  572.             3    Timer A Run Mode: 1 = One-Shot, 0 = Continuous
  573.             2    Timer A Output Mode to PB6: 1 = Toggle, 0 = Pulse
  574.             1    Timer A Output on PB6: 1 = Yes, 0 = No
  575.             0    Start/Stop Timer A: 1 = Start, 0 = Stop
  576.  
  577. DC0F    56335            CIA Control Register B
  578.             7    Set Alarm/TOD-Clock: 1 = Alarm, 0 = Clock
  579.             6-5    Timer B Mode Select:
  580.                     00 = Count System 02 Clock Pulses
  581.                     01 = Count Positive CNT Transitions
  582.                     10 = Count Timer A Underflow Pulses
  583.                     11 = Count Timer A Underflows While CNT Positive
  584.             4-0    Same as CIA Control Reg. A - for Timer B
  585.  
  586. DD00-DDFF    56576-56831        MOS 6526 Complex Interface Adapter (CIA) #2
  587.  
  588. DD00    56576            Data Port A (Serial Bus, RS-232, VIC Memory Control)
  589.             7    Serial Bus Data Input
  590.             6    Serial Bus Clock Pulse Input
  591.             5    Serial Bus Data Output
  592.             4    Serial Bus Clock Pulse Output
  593.             3    Serial Bus ATN Signal Output
  594.             2    RS-232 Data Output (User Port)
  595.             1-O    VIC Chip System Memory Bank Select (Default = 11)
  596.  
  597. DD01    56577        Data Port B (User Port, RS-232)
  598.             7    User / RS-232 Data Set Ready
  599.             6    User / RS-232 Clear to Send
  600.             5    User
  601.             4    User / RS-232 Carrier Detect
  602.             3    User / RS-232 Ring Indicator
  603.             2    User / RS-232 Data Terminal Ready
  604.             1    User / RS-232 Request to Send
  605.             0    User / RS-232 Received Data
  606.  
  607. DD02    56578            Data Direction Register - Port A
  608. DD03    56579            Data Direction Register - Port B
  609. DD04    56580            Timer A: Low-Byte
  610. DD05    56581            Timer A: High-Byte
  611. DD06    56582            Timer B: Low-Byte
  612. DD07    56583            Timer B: High-Byte
  613.  
  614. DD08    56584            Time-of-Day Clock: 1/10 Seconds
  615. DD09    56585            Time-of-Day Clock: Seconds
  616. DD0A    56586            Time-of-Day Clock: Minutes
  617. DD0B    56587            Time-of-Day Clock: Hours + AM/PM Flag (Bit 7)
  618. DD0C    56588            Synchronous Serial I/O Data Buffer
  619. DD0D    56589            CIA Interrupt Control Register (Read NMls/Write Mask)
  620.             7    NMI Flag (1 = NMI Occurred) / Set-Clear Flag
  621.             4    FLAG1 NMI (User/RS-232 Received Data Input)
  622.             3    Serial Port Interrupt
  623.  
  624.             1    Timer B Interrupt
  625.             0    Timer A Interrupt
  626.  
  627. DD0E    56590            CIA Control Register A
  628.  
  629.             7    Time-of-Day Clock Frequency: 1 = 50 Hz, 0 = 60 Hz
  630.             6    Serial Port I/O Mode Output, 0 = Input
  631.             5    Timer A Counts: 1 = CNT Signals, 0 = System 02 Clock
  632.             4    Force Load Timer A: 1 = Yes
  633.             3    Timer A Run Mode: 1 = One-Shot, 0 = Continuous
  634.             2    Timer A Output Mode to PB6: 1 = Toggle, 0 = Pulse
  635.             1    Timer A Output on PB6: 1 = Yes, 0 = No
  636.             0    Start/Stop Timer A: 1 = Start, 0 = Stop
  637.  
  638. DD0F    56591            CIA Control Register B
  639.             7    Set Alarm/TOD-Clock: 1 = Alarm, 0 = Clock
  640.             6-5    Timer B Mode Select:
  641.                     00 = Count System 02 Clock Pulses
  642.                     01 = Count Positive CNT Transitions
  643.                     10 = Count Timer A Underflow Pulses
  644.                     11 = Count Timer A Underflows While CNT Positive
  645.             4-0    Same as CIA Control Reg. A - for Timer B
  646.  
  647.  
  648. DEOO-DEFF    56832-57087    Reserved for Future I/O Expansion
  649. DFOO-DFFF    57088-57343    Reserved for Future I/O Expansion
  650.  
  651.