Commodore 64 Memory Maps (various authors)
March 4, 2017 | Author: Moe B. Us | Category: N/A
Short Description
The Project 64 etext of several Commodore 64 memory maps. Converted to etext by anonymous. The original etexts were tran...
Description
********* Welcome to Project 64! The goal of Project 64 is to preserve Commodore 64 related documents in electronic text format that might otherwise cease to exist with the rapid advancement of computer technology and declining interest in 8bit computers on the part of the general population. If you would like to help by converting C64 related hardcopy documents to electronic texts please contact the manager of Project 64, Cris Berneburg, at . Extensive efforts were made to preserve the contents of the original document. However, certain portions, such as diagrams, program listings, and indexes may have been either altered or sacrificed due to the limitations of plain vanilla text. Diagrams may have been eliminated where ASCII-art was not feasible. Program listings may be missing display codes where substitutions were not possible. Tables of contents and indexes may have been changed from page number references to section number references. Please accept our apologies for these limitations, alterations, and possible omissions. Document names are limited to the 8.3 file convention of DOS. The first characters of the file name are an abbreviation of the original document name. The version number of the etext follows next. After that a letter may appear to indicate the particular source of the document. Finally, the document is given a .TXT extension. The author(s) of the original document and members of Project 64 make no representations about the accuracy or suitability of this material for any purpose. This etext is provided "as-is". Please refer to the warantee of the original document, if any, that may included in this etext. No other warantees, express or implied, are made to you as to the etext or any medium it may be on. Neither the author(s) nor the members of Project 64 will assume liability for damages either from the direct or indirect use of this etext or from the distribution of or modification to this etext. ********* The Project 64 etext of several Commodore 64 memory maps. Converted to etext by anonymous. The original etexts were transferred from ftp://arnold.hiof.no/programs and concatenated into one document. Commodore_64_IO_Maps.doc Commodore_64_Memory_Maps.txt Commodore_64_RAM_Memory_Map.doc Commodore_64_ROM_Memory_Map.doc Commodore_64_ROM_Memory_Map.txt 64MAP10.TXT, June 1996, etext #41. ********* The Project 64 etext of Commodore_64_IO_Maps.doc *********
; ;
Commodore 64 I/O Map V1.1 1 Jun 1994 COMMODORE 64 INPUT/OUTPUT ASSIGNMENTS
HEX
DECIMAL
0000
0
0001
1
BITS 7-0
0 1 2 3 4 5 6-7
DESCRIPTION
MOS 6510 Data Direction Register (xx101111) Bit= 1: Output, Bit=0: Input, x=Don't Care MOS 6510 Micro-Processor On-Chip I/O Port /LORAM Signal (0=Switch BASIC ROM Out) /HIRAM Signal (0=Switch Kernal ROM Out) /CHAREN Signal (0=Swith Char. ROM In) Cassette Data Output Line Cassette Switch Sense: 1 = Switch Closed Cassette Motor Control O = ON, 1 = OFF Undefined
D000-D02E
53248-54271 MOS 6566 VIDEO INTERFACE CONTROLLER (VIC)
D000 D001 D002 D003 D004 D005 D006 D007 D008 D009 D00A D00B D00C D00D D00E D00F D010
53248 53249 53250 53251 53252 53253 53254 53255 53256 53257 53258 53259 53260 53261 53262 53263 53264
D011
53265
Sprite 0 X Pos Sprite 0 Y Pos Sprite 1 X Pos Sprite 1 Y Pos Sprite 2 X Pos Sprite 2 Y Pos Sprite 3 X Pos Sprite 3 Y Pos Sprite 4 X Pos Sprite 4 Y Pos Sprite 5 X Pos Sprite 5 Y Pos Sprite 6 X Pos Sprite 6 Y Pos Sprite 7 X Pos Sprite 7 Y Pos Sprites 0-7 X Pos (msb of X coord.) 7 6 5 4 3 2-0
D012
53266
D013 D014
53267 53268
VIC Control Register Raster Compare: (Bit 8) See 53266 Extended Color Text Mode 1 = Enable Bit Map Mode. 1 = Enable Blank Screen to Border Color: 0 = Blank Select 24/25 Row Text Display: 1 = 25 Rows Smooth Scroll to Y Dot-Position (0-7) Read Raster / Write Raster Value for Compare IRQ Light-Pen Latch X Pos Light-Pen Latch Y Pos
D015
53269
D016
53270
Sprite display Enable: 1 = Enable 7-6 5 4 3 2-0
D017
53271
D018
53272
D019
VIC Control Register Unused ALWAYS SET THIS BIT TO 0 ! Multi-Color Mode: 1 = Enable (Text or Bit-Map) Select 38/40 Column Text Display: 1 = 40 Cols Smooth Scroll to X Pos Sprites 0-7 Expand 2x Vertical (Y)
7-4 3-1 0
VIC Memory Control Register Video Matrix Base Address (inside VIC) Character Dot-Data Base Address (inside VIC) Select upper/lower Character Set
7 3 2 1 0
VIC Interrupt Flag Register (Bit = 1: IRQ Occurred) Set on Any Enabled VIC IRQ Condition Light-Pen Triggered IRQ Flag Sprite to Sprite Collision IRQ Flag Sprite to Background Collision IRQ Flag Raster Compare IRQ Flag
53273
D01A D01B
53274 53275
D01C
53276
D01D
53277
IRQ Mask Register: 1 = Interrupt Enabled Sprite to Background Display Priority: 1 = Sprite Sprites 0-7 Multi-Color Mode Select: 1 = M.C.M. Sprites 0-7 Expand 2x Horizontal (X)
D01E D01F D020 D021 D022 D023 D024 D025 D026
53278 53279 53280 53281 53282 53283 53284 53285 53286
Sprite to Sprite Collision Detect Sprite to Background Collision Detect Border Color Background Color 0 Background Color 1 Background Color 2 Background Color 3 Sprite Multi-Color Register 0 Sprite Multi-Color Register 1
D027 D028 D029 D02A D02B D02C D02D D02E
53287 53288 53289 53290 53291 53292 53293 53294
Sprite Sprite Sprite Sprite Sprite Sprite Sprite Sprite
D400-D7FF D400 D401 D402 D403
54272 54273 54274 54275
0 1 2 3 4 5 6 7
Color Color Color Color Color Color Color Color
54272-55295 MOS 6581 SOUND INTERFACE DEVICE (SID)
7-4 3-0
Voice 1: Voice 1: Voice 1: Unused Voice 1:
Frequency Control - Low-Byte Frequency Control - High-Byte Pulse Waveform Width - Low-Byte Pulse Waveform Width - High-Nybble
D404
54276 7 6 5 4 3 2 1 0
D405
54277 3-0
Voice 1: Control Register Select Random Noise Waveform, 1 = On Select Pulse Waveform, 1 = On Select Sawtooth Waveform, 1 = On Select Triangle Waveform, 1 = On Test Bit: 1 = Disable Oscillator 1 Ring Modulate Osc. 1 with Osc. 3 Output, 1 = On Synchronize Osc. 1 with Osc. 3 Frequency, 1 = On Gate Bit: 1 = Start Att/Dec/Sus, 0 = Start Release Envelope Generator 1: Attack / Decay Cycle Control 7-4 Select Attack Cycle Duration: 0-15 Select Decay Cycle Duration: 0-15
D406
54278
Envelope Generator 1: Sustain / Release Cycle Control 7-4 Select Sustain Cycle Duration: 0-15 3-0 Select Release Cycle Duration: 0-15
D407 D408 D409
54279 54280 54281
Voice 2: Frequency Control - Low-Byte Voice 2: Frequency Control - High-Byte Voice 2: Pulse Waveform Width - Low-Byte
D40A
54282
D40B
54283
7-4 3-0 7 6 5 4 3 2 1 0
D40C
D40D
D40E D40F D410 D411
54284
Voice 2: Control Register Select Random Noise Waveform, 1 = On Select Pulse Waveform, 1 = On Select Sawtooth Waveform, 1 = On Select Triangle Waveform, 1 = On Test Bit: 1 = Disable Oscillator 1 Ring Modulate Osc. 2 with Osc. 1 Output, 1 = On Synchronize Osc. 2 with Osc. 1 Frequency, 1 = On Gate Bit: 1 = Start Att/Dec/Sus, 0 = Start Release
7-4 3-0
Envelope Generator 2: Attack / Decay Cycle Control Select Attack Cycle Duration: O-15 Select Decay Cycle Duration: 0-15
7-4 3-0
Envelope Generator 2: Sustain / Release Cycle Control Select Sustain Cycle Duration: O-15 Select Release Cycle Duration: O-15
7-4 3-0
Voice 3: Voice 3: Voice 3: Unused Voice 3:
54285
54286 54287 54288 54289
Unused Voice 2: Pulse Waveform Width - High-Nybble
Frequency Control - Low-Byte Frequency Control - High-Byte Pulse Waveform Width - Low-Byte Pulse Waveform Width - High-Nybble
D412
54290 7 6 5 4 3 2 1 0
D413
54291
D414
54285
Envelope Generator 3: Attac/Decay Cycle Control 7-4 Select Attack Cycle Duration: 0-15 3-0 Select Decay Cycle Duration: 0-15
7-4 3-0 D415
54293
D416 D417
54294 54295
0 7
Select Filter Mode and Volume Cut-Off Voice 3 Output: 1 = Off, 0 = On
6 5 4 3-0
Select Select Select Select
54296
D419
54297
D41A
54298
D41B D41C
54299 54230
Envelope Generator 3: Sustain / Release Cycle Control Select Sustain Cycle Duration: 0-15 Select Release Cycle Duration: 0-15 Filter Cutoff Frequency: (Bits 2-0) Filter Cutoff Frequency: Filter Resonance Control Control Select Filter Resonance: Filter External Input: 1 Filter Voice 3 Output: 1 Filter Voice 2 Output: 1 Filter Voice 1 Output: 1
7-4 3 2
D418
Voice 3: Control Register Select Random Noise Waveform, 1 = On Select Pulse Waveform, 1 = On Select Sawtooth Waveform, 1 = On Select Triangle Waveform, 1 = On Test Bit: 1 = Disable Oscillator 1 Ring Modulate Osc. 3 with Osc. 2 Output, 1 = On Synchronize Osc. 3 with Osc. 2 Frequency, 1 = On Gate Bit: 1 = Start Att/Dec/Sus, 0 = Start Release
Filter Filter Filter Output
Low-Nybble High-Byte / Voice Input 0-15 = Yes, = Yes, = Yes, = Yes,
0 0 0 0
= = = =
No No No No
High-Pass Mode: 1 = On Band-Pass Mode: 1 = On Low-Pass Mode: 1 = On Volume: 0-15
Analog/Digital Converter: Game Paddle 1 (0-255) Analog/Digital Converter Game Paddle 2 (0-255) Oscillator 3 Random Number Generator Envelope Generator 3 Output
D500-D7FF D800-DBFF
54528-55295 SID IMAGES 55296-56319 Color RAM (Nybbles)
DC00-DCFF
56320-56575 MOS 6526 Complex Interface Adapter (CIA) #1
DC00
56320
Data Port A (Keyboard, Joystick, Paddles, Light-Pen) 7-0
Write Keyboard Column Values for Keyboard
4 3-2 3-0
Scan Read Paddles on Port A / B (01 = Port A, 10 = Port B) Joystick A Fire Button: 1 = Fire Paddle Fire Buttons Joystick A Direction (0-15)
7-0
Data Port B (Keyboard, Joystick, Paddles): Game Port 1 Read Keyboard Row Values for Keyboard Scan
7 6
Timer B Toggle/Pulse Output Timer A: Toggle/Pulse Output
4 3-2 3-0
Joystick 1 Fire Button: 1 = Fire Paddle Fire Buttons Joystick 1 Direction
7-6
DC01
56321
DC02 DC03 DC04 DC05 DC06 DC07
56322 56323 56324 56325 56326 56327
Data Direction Register - Port A (56320) Data Direction Register - Port B (56321) Timer A: Low-Byte Timer A: High-Byte Timer B: Low-Byte Timer B: High-Byte
DC08 DC09 DC0A DC0B
56328 56329 56330 56331
Time-of-Day Time-of-Day Time-of-Day Time-of-Day
DC0C DC0D
56332 56333
Synchronous Serial I/O Data Buffer CIA Interrupt Control Register (Read IRQs/Write Mask) 7 4 3 2 1 0
DC0E
56334 7 6 5 4 3 2 1 0
DC0F
56335
Clock: Clock: Clock: Clock:
1/10 Seconds Seconds Minutes Hours + AM/PM Flag (Bit 7)
IRQ Flag (1 = IRQ Occurred) / Set-Clear Flag FLAG1 IRQ (Cassette Read / Serial Bus SRQ Input) Serial Port Interrupt Time-of-Day Clock Alarm Interrupt Timer B Interrupt Timer A Interrupt CIA Control Register A Time-of-Day Clock Frequency: 1 = 50 Hz, 0 = 60 Hz Serial Port I/O Mode Output, 0 = Input Timer A Counts: 1 = CNT Signals, 0 = System 02 Clock Force Load Timer A: 1 = Yes Timer A Run Mode: 1 = One-Shot, 0 = Continuous Timer A Output Mode to PB6: 1 = Toggle, 0 = Pulse Timer A Output on PB6: 1 = Yes, 0 = No Start/Stop Timer A: 1 = Start, 0 = Stop CIA Control Register B
7 6-5
4-0 DD00-DDFF DD00
56576-56831
56576 7 6 5 4 3 2 1-0
Set Alarm/TOD-Clock: 1 = Alarm, 0 = Clock Timer B Mode Select: 00 = Count System 02 Clock Pulses 01 = Count Positive CNT Transitions 10 = Count Timer A Underflow Pulses 11 = Count Timer A Underflows While CNT Positive Same as CIA Control Reg. A - for Timer B MOS 6526 Complex Interface Adapter (CIA) #2 Data Port A (Serial Bus, RS-232, VIC Memory Control) Serial Bus Data Input Serial Bus Clock Pulse Input Serial Bus Data Output Serial Bus Clock Pulse Output Serial Bus ATN Signal Output RS-232 Data Output (User Port) VIC Chip System Memory Bank Select (Default = 11)
DD01
56577
DD02 DD03 DD04 DD05 DD06 DD07
56578 56579 56580 56581 56582 56583
Data Direction Register - Port A Data Direction Register - Port B Timer A: Low-Byte Timer A: High-Byte Timer B: Low-Byte Timer B: High-Byte
DD08 DD09 DD0A DD0B DD0C DD0D
56584 56585 56586 56587 56588 56589 7 4 3
Time-of-Day Clock: 1/10 Seconds Time-of-Day Clock: Seconds Time-of-Day Clock: Minutes Time-of-Day Clock: Hours + AM/PM Flag (Bit 7) Synchronous Serial I/O Data Buffer CIA Interrupt Control Register (Read NMls/Write Mask) NMI Flag (1 = NMI Occurred) / Set-Clear Flag FLAG1 NMI (User/RS-232 Received Data Input) Serial Port Interrupt
1 0
Timer B Interrupt Timer A Interrupt
DD0E
Data Port B (User Port, RS-232) 7 User / RS-232 Data Set Ready 6 User / RS-232 Clear to Send 5 User 4 User / RS-232 Carrier Detect 3 User / RS-232 Ring Indicator 2 User / RS-232 Data Terminal Ready 1 User / RS-232 Request to Send 0 User / RS-232 Received Data
56590
CIA Control Register A 7
Time-of-Day Clock Frequency: 1 = 50 Hz, 0 = 60 Hz
6 5 4 3 2 1 0 DD0F
56591
7 6-5
4-0 DE00-DEFF DF00-DFFF
Serial Port I/O Mode Output, 0 = Input Timer A Counts: 1 = CNT Signals, 0 = System 02 Clock Force Load Timer A: 1 = Yes Timer A Run Mode: 1 = One-Shot, 0 = Continuous Timer A Output Mode to PB6: 1 = Toggle, 0 = Pulse Timer A Output on PB6: 1 = Yes, 0 = No Start/Stop Timer A: 1 = Start, 0 = Stop CIA Control Register B Set Alarm/TOD-Clock: 1 = Alarm, 0 = Clock Timer B Mode Select: 00 = Count System 02 Clock Pulses 01 = Count Positive CNT Transitions 10 = Count Timer A Underflow Pulses 11 = Count Timer A Underflows While CNT Positive Same as CIA Control Reg. A - for Timer B
56832-57087 Reserved for Future I/O Expansion 57088-57343 Reserved for Future I/O Expansion
********* End of the Project 64 etext of Commodore_64_IO_Maps.doc ********* The Project 64 etext of Commodore_64_Memory_Maps.txt ********* COMMODORE 64
MEMORY MAPS
ADDRESS LABEL HEX DEC DESCRIPTION ---------------------------------------------------------------------------D6510 0000 0 6510 On-chip Data Direction Register. R6510 0001 1 6510 On-chip 8-bit Input/Output Register. TEMP 0002 2 Unused. Free for user programs. ADRAY1 0003-0004 3 Jump Vector: Convert FAC to Integer in (A/Y) ($B1AA). ADRAY2 0005-0006 5 Jump Vector: Convert Integer in (A/Y) to Floating point in (FAC); ($B391). CHARAC 0007 7 Search Character/Temporary Integer during INT. ENDCHR 0008 8 Flag: Scan for Quote at end of String. INTEGR 0007-0008 7 Temporary Integer during OR/AND. TRMPOS 0009 9 Screen Column for last TAB. VERCK 000A 10 Flag: 0 = Load, 1 = Verify. COUNT 000B 11 Input Buffer Pointer/Number of Subscripts. DIMFLG 000C 12 Flag: Default Array dimension. VALTYP 000D 13 Data type Flag: $00 = Numeric, $FF = String. INTFLG 000E 14 Data type Flag: $00 = Floating point, $80 = Integer.
GARBFL SUBFLG INPFLG
000F 0010 0011
15 16 17
TANSGN CHANNL LINNUM TEMPPT LASTPT TEMPST INDEX INDEX1 INDEX2 RESHO
0012 0013 0014-0015 0016 0017-0018 0019-0021 0022-0025 0022-0023 0024-0025 0026-002A
18 19 20 22 23 25 34 34 36 38
TXTTAB VARTAB ARYTAB STREND FRETOP FRESPC MEMSIZ
002B-002C 002D-002E 002F-0030 0031-0032 0033-0034 0035-0036 0037-0038
43 45 47 49 51 53 55
CURLIN OLDLIN OLDTXT DATLIN DATPTR
0039-003A 003B-003C 003D-003E 003F-0040 0041-0042
57 59 61 63 65
INPPTR
0043-0044
67
VARNAM
0045-0046
69
VARPNT
0047-0048
71
FORPNT VARTXT
0049-004A 004B-004C
73 75
OPMASK TEMPF3 FOUR6
004D 004E-0052 0053
77 78 83
JMPER
0054-0056
84
TEMPF1 TEMPF2 FAC FACEXP FACHO FACSGN SGNFLG BITS
0057-005B 005C-0060 0061-0066 0061 0062-0065 0066 0067 0068
87 92 97 97 98 102 103 104
AFAC ARGEXP ARGHO ARGSGN ARISGN
0069-006E 0069 006A-006D 006E 006F
105 105 106 110 111
Flag: DATA scan/List Quote/Garbage collection. Flag: Subscript reference/User Function call. Input Flag: $00 = INPUT, $40 = GET, $98 = READ. Flag: TAN sign/Comparative result. File number of current Input Device. Temporary: Integer value. Pointer: Temporary String Stack. Last temporary String Address. Stack for temporary Strings. Utility Pointer Area. First Utility Pointer. Secong Utility Pointer. Floating point product of Multiply and Divide. Pointer: Start of BASIC Text Area ($0801). Pointer: Start of BASIC Variables. Pointer: Start of BASIC Arrays. Pointer: End of BASIC Arrays + 1. Pointer: Bottom of String space. Utility String Pointer. Pointer: Highest Address available to BASIC ($A000). Current BASIC Line number. Previous BASIC Line number. Pointer: BASIC Statement for CONT. Current DATA Line number. Pointer: Used by READ - current DATA Item Address. Pointer: Temporary storage of Pointer during INPUT Routine. Name of Variable being sought in Variable Table. Pointer: to value of (VARNAM) if Integer, to descriptor if String. Pointer: Index Variable for FOR/NEXT loop. Temporary storage for TXTPTR during READ, INPUT and GET. Mask used during FRMEVL. Temporary storage for FLPT value. Length of String Variable during Garbege collection. Jump Vector used in Function Evaluation JMP followed by Address ($4C,$LB,$MB). Temporary storage for FLPT value. Temporary storage for FLPT value. Main Floating point Accumulator. FAC Exponent. FAC Mantissa. FAC Sign. Pointer: Series Evaluation Constant. Bit Overflow Area during normalisation Routine. Auxiliary Floating point Accumulator. AFAC Exponent. AFAC Mantissa. AFAC Sign. Sign of result of Arithmetic Evaluation.
FACOV FBUFPT CHRGET
CHRGOT TXTPTR RNDX STATUS STKEY SVXT VERCKK C3PO BSOUR SYNO TEMPX TEMPY
0070 112 0071-0072 113 0073-008A 115 ,0073 INC $7A ,0075 BNE $0079 ,0077 INC $7B ! ,0079 LDA $0801 ,007C CMP #$3A ,007E BCS $008A ,0080 CMP #$20 0079 121 007A-007B 122 008B-008F 139 0090 144 0091 145 0092 146 0093 147 0094 148 0095 149 0096 150 0097 151 0097 151
LDTND DFLTN DFLTO PRTY DPSW MSGFLG
0098 0099 009A 009B 009C 009D
152 153 154 155 156 157
FNMIDX
009E
158
PTR1 PTR2 TIME
009E 009F 00A0-00A2
158 159 160
TSFCNT
00A3
163
TBTCNT
00A4
164
CNTDN BUFPNT INBIT
00A5 00A6 00A7
165 166 167
BITC1 RINONE RIDATA RIPRTY SAL EAL CMPO TAPE1 BITTS NXTBIT
00A8 00A9 00AA 00AB 00AC-00AD 00AE-00AF 00B0-00B1 00B2-00B3 00B4 00B5
168 169 170 171 172 174 176 178 180 181
RODATA
00B6
182
FAC low-order rounding. Pointer: Used during CRUNCH/ASCII conversion. Subroutine: Get next Byte of BASIC Text. ,0082 BEQ $0073 ,0084 SEC ,0085 SBC #$30 ,0087 SEC ,0088 SBC #$D0 ,008A RTS Entry to Get same Byte again. Pointer: Current Byte of BASIC Text. Floating RND Function Seed Value. Kernal I/O Status Word ST. Flag: $7F = STOP key. Timing Constant for Tape. Flag: 0 = Load, 1 = Verify. Flag: Serial Bus - Output Character buffered. Buffered Character for Serial Bus. Cassette Sync. number. Temporary storage of X Register during CHRIN. Temporary storage of Y Register during RS232 fetch. Number of Open Files/Index to File Table. Default Input Device (0). Default Output Device (3). Parity of Byte Output to Tape. Flag: Byte received from Tape. Flag: $00 = Program mode: Suppress Error Messages, $40 = Kernal Error Messages only, $80 = Direct mode: Full Error Messages. Index to Cassette File name/Header ID for Tape write. Tape Error log pass 1. Tape Error log pass 2. Real-time jiffy Clock (Updated by IRQ Interrupt approx. every 1/60 of Second); Update Routine: UDTIMK ($F69B). Bit Counter Tape Read or Write/Serial Bus EOI (End Of Input) Flag. Pulse Counter Tape Read or Write/Serial Bus shift Counter. Tape Synchronising count down. Pointer: Tape I/O buffer. RS232 temporary for received Bit/Tape temporary. RS232 Input Bit count/Tape temporary. RS232 Flag: Start Bit check/Tape temporary. RS232 Input Byte Buffer/Tape temporary. RS232 Input parity/Tape temporary. Pointer: Tape Buffer/Screen scrolling. Tape End Address/End of Program. Tape timing Constants. Pointer: Start Address of Tape Buffer ($033C). RS232 Write bit count/Tape Read timing Flag. RS232 Next Bit to send/Tape Read - End of Tape. RS232 Output Byte Buffer/Tape Read Error Flag.
FNLEN LA SA FA
00B7 00B8 00B9 00BA
183 184 185 186
FNADR ROPRTY
00BB-00BC 00BD
187 189
FSBLK MYCH CAS1 STAL MEMUSS LSTX NDX
00BE 00BF 00C0 00C1-00C2 00C3-00C4 00C5 00C6
190 191 192 193 195 197 198
RVS INDX
00C7 00C8
199 200
LXSP
00C9-00CA
201
SFDX BLNSW
00CB 00CC
203 204
BLNCT GDBLN BLNON CRSW
00CD 00CE 00CF 00D0
205 206 207 208
PNT PNTR
00D1-00D2 00D3
209 211
QTSW LNMX TBLX SCHAR
00D4 00D5 00D6 00D7
212 213 214 215
INSRT LDTB1
00D8 00D9-00F2
216 217
USER KEYTAB
00F3-00F4 00F5-00F6
243 245
RIBUF ROBUF FREKZP BASZPT ASCWRK
00F7-00F8 00F9-00FA 00FB-00FE 00FF 00FF-010A
247 249 251 255 255
BAD STACK BSTACK BUF LAT FAT
0100-013E 0100-01FF 013F-01FF 0200-0258 0259-0262 0263-026C
256 256 319 512 601 611
SAT
026D-0276
621
Number of Characters in Filename. Current File - Logical File number. Current File - Secondary Address. Current File - First Address (Device number). OPEN LA,FA,SA; OPEN 1,8,15,"I0":CLOSE 1 Pointer: Current File name Address. RS232 Output Parity/Tape Byte to be Input or Output. Tape Input/Output Block count. Serial Word Buffer. Tape Motor Switch. Start Address for LOAD and Cassette Write. Pointer: Type 3 Tape LOAD and general use. Matrix value of last Key pressed; No Key = $40. Number of Characters in Keyboard Buffer queue. Flag: Reverse On/Off; On = $01, Off = $00. Pointer: End of Line for Input (Used to suppress trailing spaces). Cursor X/Y (Line/Column) position at start of Input. Flag: Print shifted Characters. Flag: Cursor blink; $00 = Enabled, $01 = Disabled. Timer: Count down for Cursor blink toggle. Character under Cursor while Cursor Inverted. Flag: Cursor Status; $00 = Off, $01 = On. Flag: Input from Screen = $03, or Keyboard = $00. Pointer: Current Screen Line Address. Cursor Column on current Line, including Wrap-round Line, if any. Flag: Editor in Quote Mode; $00 = Not. Current logical Line length: 39 or 79. Current Screen Line number of Cursor. Screen value of current Input Character/Last Character Output. Count of number of inserts outstanding. Screen Line link Table/Editor temporaries. High Byte of Line Screen Memory Location. Pointer: Current Colour RAM Location. Vector: Current Keyboard decoding Table. ($EB81) RS232 Input Buffer Pointer. RS232 Output Buffer Pointer. Free Zero Page space for User Programs. BASIC temporary Data Area. Assembly Area for Floating point to ASCII conversion. Tape Input Error log. 6510 Hardware Stack Area. BASIC Stack Area. BASIC Input Buffer (Input Line from Screen). Kernal Table: Active logical File numbers. Kernal Table: Active File First Addresses (Device numbers). Kernal Table: Active File Secondary Addresses.
KEYD MEMSTR
0277-0280 0281-0282
631 641
MEMSIZ
0283-0284
643
TIMOUT COLOR GDCOL HIBASE XMAX
0285 0286 0287 0288 0289
645 646 647 648 649
RPTFLG
028A
650
KOUNT DELAY SHFLAG
028B 028C 028D
651 652 653
LSTSHF KEYLOG
028E 028F-0290
654 655
MODE
0291
657
AUTODN M51CTR M51CDR M51AJB RSSTAT BITNUM BAUDOF RIDBE RIDBS
0292 0293 0294 0295-0296 0297 0298 0299-029A 029B 029C
658 659 660 661 663 664 665 667 668
RODBS
029D
669
RODBE IRQTMP
029E 029F-02A0
670 671
ENABL TODSNS TRDTMP TD1IRQ TLNIDX TVSFLG TEMP SPR11
02A1 02A2 02A3 02A4 02A5 02A6 02A7-02FF 02C0-02FE
673 674 675 676 677 678 679 704
IERROR
0300-0301
768
IMAIN
0302-0303
770
ICRNCH
0304-0305
772
IQPLOP
0306-0307
774
IGONE
0308-0309
776
Keyboard Buffer Queue (FIFO). Pointer: Bottom of Memory for Operating System ($0800). Pointer: Top of Memory for Operating System ($A000). Serial IEEE Bus timeout defeat Flag. Current Character Colour code. Background Colour under Cursor. High Byte of Screen Memory Address ($04). Maximum number of Bytes in Keyboard Buffer ($0A). Flag: Repeat keys; $00 = Cursors, INST/DEL & Space repeat, $40 no Keys repeat, $80 all Keys repeat ($00). Repeat Key: Speed Counter ($04). Repeat Key: First repeat delay Counter ($10). Flag: Shift Keys: Bit 1 = Shift, Bit 2 = CBM, Bit 3 = CTRL; ($00 = None, $01 = Shift, etc.). Last Shift Key used for debouncing. Vector: Routine to determine Keyboard table to use based on Shift Key Pattern ($EB48). Flag: Upper/Lower Case change: $00 = Disabled, $80 = Enabled ($00). Flag: Auto scroll down: $00 = Disabled ($00). RS232 Pseudo 6551 control Register Image. RS232 Pseudo 6551 command Register Image. RS232 Non-standard Bits/Second. RS232 Pseudo 6551 Status Register Image. RS232 Number of Bits left to send. RS232 Baud Rate; Full Bit time microseconds. RS232 Index to End of Input Buffer. RS232 Pointer: High Byte of Address of Input Buffer. RS232 Pointer: High Byte of Address of Output Buffer. RS232 Index to End of Output Buffer. Temporary store for IRQ Vector during Tape operations. RS232 Enables. TOD sense during Tape I/O. Temporary storage during Tape READ. Temporary D1IRQ Indicator during Tape READ. Temporary for Line Index. Flag: TV Standard: $00 = NTSC, $01 = PAL. Unused. Sprite #11 Data Area. (SCREEN + $03F8 + SPR number) POKE 1024+1016+0,11 to use Sprite#0 DATA from ($02C0-$02FE). Vector: Indirect entry to BASIC Error Message, (X) points to Message ($E38B). Vector: Indirect entry to BASIC Input Line and Decode ($A483). Vector: Indirect entry to BASIC Tokenise Routine ($A57C). Vector: Indirect entry to BASIC LIST Routine ($A71A). Vector: Indirect entry to BASIC Character
IEVAL
030A-030B
778
SAREG SXREG SYREG SPREG USRPOK USRADD TEMP CINV CNBINV
030C 030D 030E 030F 0310 0311-0312 0313 0314-0315 0316-0317
780 781 782 783 784 785 787 788 790
NMINV IOPEN
0318-0319 031A-031B
792 794
ICLOSE
031C-031D
796
ICHKIN
031E-031F
798
ICKOUT
0320-0321
800
ICLRCH
0322-0323
802
IBASIN
0324-0325
804
IBSOUT
0326-0327
806
ISTOP
0328-0329
808
IGETIN
032A-032B
810
ICLALL
032C-032D
812
USRCMD ILOAD
032E-032F 0330-0331
814 816
ISAVE
0332-0333
818
TEMP TBUFFR SPR13 SPR14 SPR15 TEMP VICSCN TEMP SPNTRS
0334-033B 033C-03FB 0340-037E 0380-03BE 03C0-03FE 03FC-03FF 0400-07E7 07E8-07F7 07F8-07FF
820 828 832 896 960 1020 1024 2024 2040
0800-9FFF 8000-9FFF A000-BFFF C000-CFFF D000-DFFF
2048 32768 40960 49152 53248
D000-D02E D400-D41C
53248 54272
dispatch Routine ($A7E4). Vector: Indirect entry to BASIC Token evaluation ($AE86). Storage for 6510 Accumulator during SYS. Storage for 6510 X-Register during SYS. Storage for 6510 Y-Register during SYS. Storage for 6510 Status Register during SYS. USR Function JMP Instruction ($4C). USR Address ($LB,$MB). Unused. Vector: Hardware IRQ Interrupt Address ($EA31). Vector: BRK Instruction Interrupt Address ($FE66). Vector: Hardware NMI Interrupt Address ($FE47). Vector: Indirect entry to Kernal OPEN Routine ($F34A). Vector: Indirect entry to Kernal CLOSE Routine ($F291). Vector: Indirect entry to Kernal CHKIN Routine ($F20E). Vector: Indirect entry to Kernal CHKOUT Routine ($F250). Vector: Indirect entry to Kernal CLRCHN Routine ($F333). Vector: Indirect entry to Kernal CHRIN Routine ($F157). Vector: Indirect entry to Kernal CHROUT Routine ($F1CA). Vector: Indirect entry to Kernal STOP Routine ($F6ED). Vector: Indirect entry to Kernal GETIN Routine ($F13E). Vector: Indirect entry to Kernal CLALL Routine ($F32F). User Defined Vector ($FE66). Vector: Indirect entry to Kernal LOAD Routine ($F4A5). Vector: Indirect entry to Kernal SAVE Routine ($F5ED). Unused. Tape I/O Buffer. Sprite #13. Sprite #14. Sprite #15. Unused. Default Screen Video Matrix. Unused. Default Sprite Data Pointers. Normal BASIC Program space. Optional Cartridge ROM space. BASIC ROM (Part) or 8 KB RAM. 4 KB RAM. Input/Output Devices and Colour RAM or 4 KB RAM or Character ROM. 6566 Video Interface Chip, VIC II. 6581 Sound Interface Device, SID.
D500-D7FF D800-DBE7 DBE8-DBFF DC00-DC0F DD00-DD0F E000-FFFF E000-E4FF E500-FFFF
54528 55296 56296 56320 56576 57344 57344 58624
SID Images. Colour RAM (Nybbles = 4 Bit RAM, LSB). Unused Nybbles. 6526 Complex Interface Adaptor, CIA. 6526 Complex Interface Adaptor, CIA. BASIC (Part)/Kernal ROM or 8 KB RAM. BASIC ROM (Part) or RAM. Kernal ROM or RAM.
COMMODORE 64 INPUT/OUTPUT ASSIGNMENTS HEX
DECIMAL
0000
0
0001
1
BITS 7-0
0 1 2 3 4 5 6-7
DESCRIPTION
MOS 6510 Data Direction Register (xx101111) Bit= 1: Output, Bit=0: Input, x=Don't Care MOS 6510 Micro-Processor On-Chip I/O Port /LORAM Signal (0=Switch BASIC ROM Out) /HIRAM Signal (0=Switch Kernal ROM Out) /CHAREN Signal (O=Swith Char. ROM In) Cassette Data Output Line Cassette Switch Sense: 1 = Switch Closed Cassette Motor Control O = ON, 1 = OFF Undefined
D000-D02E
53248-54271 MOS 6566 VIDEO INTERFACE CONTROLLER (VIC)
D000 D001 D002 D003 D004 D005 D006 D007 D008 D009 D00A D00B D00C D00D D00E D00F D010
53248 53249 53250 53251 53252 53253 53254 53255 53256 53257 53258 53259 53260 53261 53262 53263 53264
D011
53265
Sprite 0 X Pos Sprite 0 Y Pos Sprite 1 X Pos Sprite 1 Y Pos Sprite 2 X Pos Sprite 2 Y Pos Sprite 3 X Pos Sprite 3 Y Pos Sprite 4 X Pos Sprite 4 Y Pos Sprite 5 X Pos Sprite 5 Y Pos Sprite 6 X Pos Sprite 6 Y Pos Sprite 7 X Pos Sprite 7 Y Pos Sprites 0-7 X Pos (msb of X coord.) 7 6 5 4
VIC Control Register Raster Compare: (Bit 8) See 53266 Extended Color Text Mode 1 = Enable Bit Map Mode. 1 = Enable Blank Screen to Border Color: 0 = Blank
3 2-0 D012
53266
D013 D014 D015
53267 53268 53269
D016
53270
Read Raster / Write Raster Value for Compare IRQ Light-Pen Latch X Pos Light-Pen Latch Y Pos Sprite display Enable: 1 = Enable 7-6 5 4 3 2-0
D017
53271
D018
53272
D019
53273
Select 24/25 Row Text Display: 1 = 25 Rows Smooth Scroll to Y Dot-Position (0-7)
VIC Control Register Unused ALWAYS SET THIS BIT TO 0 ! Multi-Color Mode: 1 = Enable (Text or Bit-Map) Select 38/40 Column Text Display: 1 = 40 Cols Smooth Scroll to X Pos Sprites O-7 Expand 2x Vertical (Y)
7-4 3-1 0
VIC Memory Control Register Video Matrix Base Address (inside VIC) Character Dot-Data Base Address (inside VIC) Select upper/lower Character Set
7 3 2 1 0
VIC Interrupt Flag Register (Bit = 1: IRQ Occurred) Set on Any Enabled VIC IRQ Condition Light-Pen Triggered IRQ Flag Sprite to Sprite Collision IRQ Flag Sprite to Background Collision IRQ Flag Raster Compare IRQ Flag
D01A D01B
53274 53275
D01C
53276
D01D
53277
IRQ Mask Register: 1 = Interrupt Enabled Sprite to Background Display Priority: 1 = Sprite Sprites O-7 Multi-Color Mode Select: 1 = M.C.M. Sprites 0-7 Expand 2x Horizontal (X)
D01E D01F D020 D021 D022 D023 D024 D025 D026
53278 53279 53280 53281 53282 53283 53284 53285 53286
Sprite to Sprite Collision Detect Sprite to Background Collision Detect Border Color Background Color 0 Background Color 1 Background Color 2 Background Color 3 Sprite Multi-Color Register 0 Sprite Multi-Color Register 1
D027 D028 D029 D02A D02B D02C D02D D02E
53287 53288 53289 53290 53291 53292 53293 53294
Sprite Sprite Sprite Sprite Sprite Sprite Sprite
1 2 3 4 5 6 7
Sprite 0 Color Color Color Color Color Color Color Color
D400-D7FF D400 D401 D402 D403
54272 54273 54274 54275
D404
54276
54272-55295 MOS 6581 SOUND INTERFACE DEVICE (SID)
7-4 3-0 7 6 5 4 3 2 1 0
D405
D406
54277 3-0
Envelope Generator 1: Attack / Decay Cycle Control 7-4 Select Attack Cycle Duration: 0-15 Select Decay Cycle Duration: 0-15
7-4 3-0
Envelope Generator 1: Sustain / Release Cycle Control Select Sustain Cycle Duration: 0-15 Select Release Cycle Duration: 0-15
54278
D407 D408 D409
54279 54280 54281
D40A
54282
D40B
54283
Voice 2: Frequency Control - Low-Byte Voice 2: Frequency Control - High-Byte Voice 2: Pulse Waveform Width - Low-Byte 7-4 3-0 7 6 5 4 3 2 1 0
D40C
D40D
54284
54285
Voice 1: Frequency Control - Low-Byte Voice 1: Frequency Control - High-Byte Voice 1: Pulse Waveform Width - Low-Byte Unused Voice 1: Pulse Waveform Width - High-Nybble Voice 1: Control Register Select Random Noise Waveform, 1 = On Select Pulse Waveform, 1 = On Select Sawtooth Waveform, 1 = On Select Triangle Waveform, 1 = On Test Bit: 1 = Disable Oscillator 1 Ring Modulate Osc. 1 with Osc. 3 Output, 1 = On Synchronize Osc. 1 with Osc. 3 Frequency, 1 = On Gate Bit: 1 = Start Att/Dec/Sus, 0 = Start Release
Unused Voice 2: Pulse Waveform Width - High-Nybble Voice 2: Control Register Select Random Noise Waveform, 1 = On Select Pulse Waveform, 1 = On Select Sawtooth Waveform, 1 = On Select Triangle Waveform, 1 = On Test Bit: 1 = Disable Oscillator 1 Ring Modulate Osc. 2 with Osc. 1 Output, 1 = On Synchronize Osc. 2 with Osc. 1 Frequency, 1 = On Gate Bit: 1 = Start Att/Dec/Sus, 0 = Start Release
7-4 3-0
Envelope Generator 2: Attack / Decay Cycle Control Select Attack Cycle Duration: 0-15 Select Decay Cycle Duration: 0-15
7-4 3-0
Envelope Generator 2: Sustain / Release Cycle Control Select Sustain Cycle Duration: O-15 Select Release Cycle Duration: O-15
D40E D40F D410 D411
54286 54287 54288 54289
D412
54290
7-4 3-0 7 6 5 4 3 2 1 0
D413
54291
D414
54285
D415
54293
D416 D417
54294 54295
Envelope Generator 3: Attac/Decay Cycle Control 7-4 Select Attack Cycle Duration: 0-15 3-0 Select Decay Cycle Duration: 0-15 7-4 3-0
54296
D419
54297
D41A
54298
D41B D41C
54299 54230
Envelope Generator 3: Sustain / Release Cycle Control Select Sustain Cycle Duration: 0-15 Select Release Cycle Duration: 0-15
0
Filter Cutoff Frequency: (Bits 2-0) Filter Cutoff Frequency: Filter Resonance Control Control Select Filter Resonance: Filter External Input: 1 Filter Voice 3 Output: 1 Filter Voice 2 Output: 1 Filter Voice 1 Output: 1
7
Select Filter Mode and Volume Cut-Off Voice 3 Output: 1 = Off, O = On
6 5 4 3-0
Select Select Select Select
7-4 3 2
D418
Voice 3: Frequency Control - Low-Byte Voice 3: Frequency Control - High-Byte Voice 3: Pulse Waveform Width - Low-Byte Unused Voice 3: Pulse Waveform Width - High-Nybble Voice 3: Control Register Select Random Noise Waveform, 1 = On Select Pulse Waveform, 1 = On Select Sawtooth Waveform, 1 = On Select Triangle Waveform, 1 = On Test Bit: 1 = Disable Oscillator 1 Ring Modulate Osc. 3 with Osc. 2 Output, 1 = On Synchronize Osc. 3 with Osc. 2 Frequency, 1 = On Gate Bit: 1 = Start Att/Dec/Sus, 0 = Start Release
Filter Filter Filter Output
Low-Nybble High-Byte / Voice Input 0-15 = Yes, = Yes, = Yes, = Yes,
0 0 0 0
= = = =
No No No No
High-Pass Mode: 1 = On Band-Pass Mode: 1 = On Low-Pass Mode: 1 = On Volume: 0-15
Analog/Digital Converter: Game Paddle 1 (0-255) Analog/Digital Converter Game Paddle 2 (0-255) Oscillator 3 Random Number Generator Envelope Generator 3 Output
D500-D7FF D800-DBFF
54528-55295 SID IMAGES 55296-56319 Color RAM (Nybbles)
DC00-DCFF
56320-56575 MOS 6526 Complex Interface Adapter (CIA) #1
DC00
56320
Data Port A (Keyboard, Joystick, Paddles, Light-Pen) 7-0
4 3-2 3-0
Write Keyboard Column Values for Keyboard Scan Read Paddles on Port A / B (01 = Port A, 10 = Port B) Joystick A Fire Button: 1 = Fire Paddle Fire Buttons Joystick A Direction (0-15)
7-0
Data Port B (Keyboard, Joystick, Paddles): Game Port 1 Read Keyboard Row Values for Keyboard Scan
7 6
Timer B Toggle/Pulse Output Timer A: Toggle/Pulse Output
4 3-2 3-0
Joystick 1 Fire Button: 1 = Fire Paddle Fire Buttons Joystick 1 Direction
7-6
DC01
56321
DC02 DC03 DC04 DC05 DC06 DC07
56322 56323 56324 56325 56326 56327
Data Direction Register - Port A (56320) Data Direction Register - Port B (56321) Timer A: Low-Byte Timer A: High-Byte Timer B: Low-Byte Timer B: High-Byte
DC08 DC09 DC0A DC0B
56328 56329 56330 56331
Time-of-Day Time-of-Day Time-of-Day Time-of-Day
DC0C DC0D
56332 56333
Synchronous Serial I/O Data Buffer CIA Interrupt Control Register (Read IRQs/Write Mask) 7 4 3 2 1 0
DC0E
56334
7 6 5 4 3 2
Clock: Clock: Clock: Clock:
1/10 Seconds Seconds Minutes Hours + AM/PM Flag (Bit 7)
IRQ Flag (1 = IRQ Occurred) / Set-Clear Flag FLAG1 IRQ (Cassette Read / Serial Bus SRQ Input) Serial Port Interrupt Time-of-Day Clock Alarm Interrupt Timer B Interrupt Timer A Interrupt CIA Control Register A Time-of-Day Clock Frequency: 1 = 50 Hz, 0 = 60 Hz Serial Port I/O Mode Output, 0 = Input Timer A Counts: 1 = CNT Signals, 0 = System 02 Clock Force Load Timer A: 1 = Yes Timer A Run Mode: 1 = One-Shot, 0 = Continuous Timer A Output Mode to PB6: 1 = Toggle,
1 0 DC0F
56335 7 6-5
4-0 DD00-DDFF DD00
0 = Pulse Timer A Output on PB6: 1 = Yes, 0 = No Start/Stop Timer A: 1 = Start, 0 = Stop CIA Control Register B Set Alarm/TOD-Clock: 1 = Alarm, 0 = Clock Timer B Mode Select: 00 = Count System 02 Clock Pulses 01 = Count Positive CNT Transitions 10 = Count Timer A Underflow Pulses 11 = Count Timer A Underflows While CNT Positive Same as CIA Control Reg. A - for Timer B
56576-56831 MOS 6526 Complex Interface Adapter (CIA) #2
56576 7 6 5 4 3 2 1-0
Data Port A (Serial Bus, RS-232, VIC Memory Control) Serial Bus Data Input Serial Bus Clock Pulse Input Serial Bus Data Output Serial Bus Clock Pulse Output Serial Bus ATN Signal Output RS-232 Data Output (User Port) VIC Chip System Memory Bank Select (Default = 11)
DD01
56577
Data Port B (User Port, RS-232) 7 User / RS-232 Data Set Ready 6 User / RS-232 Clear to Send 5 User 4 User / RS-232 Carrier Detect 3 User / RS-232 Ring Indicator 2 User / RS-232 Data Terminal Ready 1 User / RS-232 Request to Send 0 User / RS-232 Received Data
DD02 DD03 DD04 DD05 DD06 DD07
56578 56579 56580 56581 56582 56583
Data Direction Register - Port A Data Direction Register - Port B Timer A: Low-Byte Timer A: High-Byte Timer B: Low-Byte Timer B: High-Byte
DD08 DD09 DD0A DD0B DD0C DD0D
56584 56585 56586 56587 56588 56589 7 4 3
Time-of-Day Clock: 1/10 Seconds Time-of-Day Clock: Seconds Time-of-Day Clock: Minutes Time-of-Day Clock: Hours + AM/PM Flag (Bit 7) Synchronous Serial I/O Data Buffer CIA Interrupt Control Register (Read NMls/Write Mask) NMI Flag (1 = NMI Occurred) / Set-Clear Flag FLAG1 NMI (User/RS-232 Received Data Input) Serial Port Interrupt
1 0
Timer B Interrupt Timer A Interrupt
DD0E
56590
CIA Control Register A 7 6 5 4 3 2 1 0
DD0F
56591
7 6-5
4-0 DE00-DEFF DF00-DFFF
Time-of-Day Clock Frequency: 1 = 50 Hz, 0 = 60 Hz Serial Port I/O Mode Output, 0 = Input Timer A Counts: 1 = CNT Signals, 0 = System 02 Clock Force Load Timer A: 1 = Yes Timer A Run Mode: 1 = One-Shot, 0 = Continuous Timer A Output Mode to PB6: 1 = Toggle, 0 = Pulse Timer A Output on PB6: 1 = Yes, 0 = No Start/Stop Timer A: 1 = Start, 0 = Stop CIA Control Register B Set Alarm/TOD-Clock: 1 = Alarm, 0 = Clock Timer B Mode Select: 00 = Count System 02 Clock Pulses 01 = Count Positive CNT Transitions 10 = Count Timer A Underflow Pulses 11 = Count Timer A Underflows While CNT Positive Same as CIA Control Reg. A - for Timer B
56832-57087 Reserved for Future I/O Expansion 57088-57343 Reserved for Future I/O Expansion
********* End of the Project 64 etext of Commodore_64_Memory_Maps.txt ********* The Project 64 etext of Commodore_64_RAM_Memory_Map.doc ********* ; ;
Commodore 64 RAM Memory Map V1.2 1 sep 1994
LABEL HEX ADDRESS ADRAY2 CHARAC ENDCHR TRMPOS VERCK 000A COUNT 000B DIMFLG VAUYP 000D INTFLG GARBFL SUBFLG
DECIMAL LOCATION
0005-0006 0007 0008 0009 10 11 000C 13 000E 000F 0010
DESCRIPTION
5-6 Jump Vector: Convert Integer--Floating 7 Search Character 8 Flag: Scan for Quote at End of String 9 Screen Column From Last TAB Flag: 0 = Load, 1 = Verify Input Buffer Pointer / No. of Subscripts 12 Flag: Default Array DiMension Data Type: $FF = String, $00 = Numeric 14 Data Type: $80 = Integer, $00 = Floating 15 Flag: DATA scan/LlST quote/Garbage Coll 16 Flag: Subscript Ref / User Function Call
INPFLG 0011 TANSGN 0012 0013 19 LINNUM 0014-0015 TEMPPT 0016 LASTPT 0017-0018 TEMPST 0019-0021 INDEX 0022-002S 34-37 RESHO 0026-002A 38-42 TXTTAB 002B-002C VARTAB 002D-002E ARYTAB 002F-0030 STREND 0031-0032
17 Flag: $00 = INPUT, $40 = GET, $98 = READ 18 Flag TAN sign / Comparison Result Flag: INPUT Prompt 20-21 Temp: Integer Value 22 Pointer Temporary String 23-24 Last Temp String Address 25-33 Stack for Temporary Strings Utility Pointer Area Floating-Point Product of Multiply 43-44 Pointer: Start of BASIC Text 45-46 Pointer: Start of BASIC Variables 47-48 Pointer: Start of BASIC Arrays 49-50 Pointer End of BASIC Arrays (+1)
FRETOP 0033-0034 51-52 Pointer: Bottom of String Storage FRESPC 0035-0036 53-54 Utility String Pointer MEMSIZ 0037-0038 55-56 Pointer: Highest Address Used by BASIC CURLIN 0039-003A 57-58 Current BASIC Line Number OLDLIN 003B-003C 59-60 Previous BASIC Line Number OLDTXT 003D-003E 61-62 Pointer: BASIC Statement for CONT DATLIN 003F-0040 63-64 Current DATA Line Number DATPTR 0041-0042 65-66 Pointer: Current DATA Item Address INPPTR 0043-0044 67-68 Vector: INPUT Routine VARNAM 0045-0046 69-70 Current BASIC Variable Name VARPNT 0047-0048 71-72 Pointer: Current BASIC Variable Data FORPNT 0049-004A 73-74 Pointer: Index Variable for FOR/NEXT 004B-0060 75-96 Temp Pointer / Data Area FACEXP 0061 97 Floating-Point Accumulator #1: Exponent FACHO 0062-0065 98-101 Floating Accum. #1: Mantissa FACSGN 0066 102 Floating Accum. #1: Sign SGNFLG 0067 103 Pointer: Series Evaluation Constant BITS 0068 104 Floating -accum. #1: Overflow Digit ARGEXP 0069 105 Floating-Point Accumulator #2: Exponent ARGHO 006A-006D 106-109 Floating Accum. #2: Mantissa ARGSGN 006E 110 Floating Accum. #2: Sign ARISGN 006F 111 Sign Comparison Result: Accum. # 1 vs #2 FACOV 0070 112 Floating Accum. #1. Low-Order (Rounding) FBUFPT 0071-0072 113-114 Pointer: Cassette Buffer CHRGET 0073-008A 115-138 Subroutine: Get Next Byte of BASIC Text CHRGOT 0079 121 Entry to Get Same Byte of Text Again TXTPTR 007A-007B 122-123 Pointer: Current Byte of BASIC Text RNDX 008B-008F 139-143 Floating RND Function Seed Value STATUS 0090 144 Kernal l/O Status Word: ST STKEY 0091 145 Flag: STOP key / RVS key SVXT 0092 146 Timing Constant for Tape VERCK 0093 147 Flag: 0 = Load, 1 = Verify C3PO 0094 148 Flag: Serial Bus-Output Char. Buffered BSOUR 0095 149 Buffered Character for Serial Bus SYNO 0096 150 Cassette Sync No. 0097 151 Temp Data Area LDTND 0098 152 No. of Open Files / Index to File Table DFLTN 0099 153 Default Input Device (0) DFLTO 009A 154 Default Output (CMD) Device (3) PRTY PSW
009B 009C
155 156
Tape Character Parity Flag: Tape Byte-Received
MSGFLG 009D PTR1 009E PTR2 009F TIME 00A0-00A2 00A3-00A4 CNTDN 00A5 BUFPNT 00A6 INBIT 00A7 BITCI 00A8 RINONE 00A9 RIDATA 00AA RIPRTY 00AB SAL 00AC-00AD EAL 00AE-00AF CMP0 00B0-00B1 TAPE1 00B2-00B3 BITTS 00B4 NXTBIT 00B5 RODATA 00B6 FNLEN 00B7 LA 00B8
157 Flag: $80 = Direct Mode, $00 = Program 158 Tape Pass 1 Error Log 159 Tape Pass 2 Error Log 160-162 Real-Time Jiffy Clock (approx) 1/60 Sec 163-164 Temp Data Area 165 Cassette Sync Countdown 166 Pointer: Tape l/O Buffer 167 RS-232 Input Bits / Cassette Temp 168 RS-232 Input Bit Count / Cassette Temp 169 RS-232 Flag: Check for Start Bit 170 RS-232 Input Byte Buffer/Cassette Temp 171 RS-232 Input Parity / Cassette Short Cnt 172-173 Pointer: Tape Buffer/ Screen Scrolling 174-175 Tape End Addresses/End of Program 176-177 Tape Timing Constants 178-179 Pointer: Start of Tape Buffer 180 RS-232 Out Bit Count / Cassette Temp 181 RS-232 Next Bit to Send/ Tape EOT Flag 182 RS-232 Out Byte Buffer 183 Length of Current File Name 184 Current Logical File Number
FA 00BA 186 Current Device Number FNADR 00BB-00BC 187-188 Pointer: Current File Name ROPRTY 00BD 189 RS-232 Out Parity / Cassette Temp FSBLK 00BE 190 Cassette Read / Write Block Count MYCH 00BF 191 Serial Word Buffer CAS1 00C0 192 Tape Motor Interlock STAL 00C1-00C2 193-194 I/O Start Address MEMUSS 00C3-00C4 195-196 Tape Load Temps LSTX 00C5 197 Current Key Pressed: CHR$(n) 0 = No Key NDX 00C6 198 No. of Chars. in Keyboard Buffer (Queue) RVS 00C7 199 Flag: Print Reverse Chars. -1=Yes, 0=No Used INDX 00C8 200 Pointer: End of Logical Line for INPUT LXSP 00C9-00CA 201-202 Cursor X-Y Pos. at Start of INPUT SFDX 00CB 203 Flag: Print Shifted Chars. BLNSW 00CC 204 Cursor Blink enable: 0 = Flash Cursor BLNCT 00CD 205 Timer: Countdown to Toggle Cursor GDBLN 00CE 206 Character Under Cursor BLNON 00CF 207 Flag: Last Cursor Blink On/Off CRSW 00D0 208 Flag: INPUT or GET from Keyboard PNT 00D1-00D2 209-210 Pointer: Current Screen Line Address PNTR QTSW LNMX TBLX
00D3 211 Cursor Column on Current Line 00D4 212 Flag: Editor in Quote Mode, $00 = NO 00D5 213 Physical Screen Line Length 00D6 214 Current Cursor Physical Line Number 00D7 215 Temp Data Area INSRT 00D8 216 Flag: Insert Mode, >0 = # INSTs LDTB1 00D9-00F2 217-242 Screen Line Link Table / Editor Temps USER 00F3-00F4 243-244 Pointer: Current Screen Color RAM loc. KEYTAB 00F5-00F6 24S-246 Vector Keyboard Decode Table RIBUF 00F7-00F8
247-248
RS-232 Input Buffer Pointer
ROBUF 00F9-00FA 249-250 RS-232 Output Buffer Pointer FREKZP 00FB-00FE 251-254 Free 0-Page Space for User Programs BASZPT 00FF 255 BASIC Temp Data Area
BAD BUF LAT FAT SAT KEYD
0100-01FF 0100-010A 0100-013E 0200-02S8 0259-0262 0263-026C 026D-0276 0277-0280
256-511 256-266 256-318 512-600 601-610 611-620 621-630 631-640
MEMSTR MEMSIZ TIMOUT COLOR 0286 GDCOL 0287 HIBASE XMAX 0289 RPTFLG KOUNT 028B DELAY 028C SHFLAG LSTSHF KEYLOG MODE 0291
0281-0282 0283-0284 0285 646 647 0288 649 028A 651 652 028D 028E 028F-0290 657
AUTODN M51CTR MS1CDR M51AJB RSSTAT BITNUM
0292 0293 0294 0295-0296 0297 0298
Micro-Processor System Stack Floating to String Work Area Tape Input Error Log System INPUT Buffer KERNAL Table: Active Logical KERNAL Table: Device No. for KERNAL Table: Second Address Keyboard Buffer Queue (FIFO)
Area
File No's. Each File Each File
641-642 Pointer: Bottom of Memory for O.S. 643-644 Pointer: Top of Memory for O.S. 645 Flag: Kernal Variable for IEEE Timeout Current Character Color Code Background Color Under Cursor 648 Top of Screen Memory (Page) Size of Keyboard Buffer 650 Flag: REPEAT Key Used, $80 = Repeat Repeat Speed Counter Repeat Delay Counter 653 Flag: Keyb'rd SHIFT Key/CTRL Key/C= Key 654 Last Keyboard Shift Pattern 655-656 Vector: Keyboard Table Setup Flag: $00=Disable SHIFT Keys, $80 = Enable SHIFT Keys 658 Flag: Auto Scroll Down, 0 = ON 659 RS-232: 6551 Control Register Image 660 RS-232: 6551 Command Register Image 661-662 RS-232 Non-Standard BPS (Time/2-100) USA 663 RS-232: 6551 Status Register Image 664 RS-232 Number of Bits Left to Send
BAUDOF 0299-029A 665-666 RS-232 Baud Rate: Full Bit Time (us) RIDBE 029B 667 RS-232 Index to End of Input Buffer RIDBS 029C 668 RS-232 Start of Input Buffer (Page) RODBS 029D 669 RS-232 Start of Output Buffer (Page) RODBE 029E 670 RS-232 Index to End of Output Buffer IRQTMP 029F-02A0 671-672 Holds IRQ Vector During Tape I/O ENABL 02A1 673 RS-232 Enables 02A2 674 TOD Sense During Cassette I/O 02A3 675 Temp Storage For Cassette Read 02A4 676 Temp D1 IRQ Indicator For Cassette Read 02A5 677 Temp For Line Index 02A6 678 PAL/NTSC Flag, O= NTSC, 1 = PAL 02A7-02FF 679-767 Unused IERROR 0300-0301 768-769 Vector: Print BASIC Error Message IMAIN 0302-0303 770-771 Vector: BASIC Warm Start ICRNCH 0304-0305 772-773 Vector: Tokenize BASIC Text IQPLOP 0306-0307 774-775 Vector: BASIC Text LIST IGONE 0308-0309 776-777 Vector: BASIC Char. Dispatch IEVAL 030A-030B 778-779 Vector: BASIC Token Evaluation SAREG 030C 780 Storage for 6502 .A Register SXREG 030D 781 Storage for 5502 .X Register SYREG 030E SPREG 030F USRPOK USRADD
782 783
0310 0311-0312
Storage for 6502 .Y Register Storage for 6502 .SP Register 784 USR Function Jump Instr (4C) 785-786 USR Address Low Byte / High Byte
0313 787 Unused CINV 0314-0315 788-789 Vector: Hardware Interrupt CBINV 0316-0317 790-791 Vector: BRK Instr. Interrupt NMINV 0318-0319 792-793 Vector: Non-Maskable Interrupt IOPEN 031A-031B 794-795 KERNAL OPEN Routine Vector ICLOSE 031C-031D 796-797 KERNAL CLOSE Routine Vector ICHKIN 031E-031F 798-799 KERNAL CHKIN Routine ICKOUT 0320-0321 800-801 KERNAL CHKOUT Routine ICLRCH 0322-0323 802-803 KERNAL CLRCHN Routine Vector IBASIN 0324-0325 804-805 KERNAL CHRIN Routine IBSOUT 0326-0327 806-807 KERNAL CHROUT Routine ISTOP 0328-0329 808-809 KERNAL STOP Routine Vector IGETIN 032A-032B 810-811 KERNAL GETIN Routine ICLALL 032C-032D 812-813 KERNAL CLALL Routine Vector USRCMD 032E-032F 814-815 User-Defined Vector ILOAD 0330 0331 813 817 KERNAL LOAD Routine ISAVE 0332-0333 818-819 KERNAL SAVE Routine Vector 0334-033B 820-827 Unused TBUFFR 033C-03FB 828-1019 Tape l/O Buffer 03FC-03FF 1020-1023 Unused VICSCN 0400-07FF 1024-2047 1024 Byte Screen Memory Area 0400-07E7 1024-2023 Video Matrix: 25 Lines X 40 Columns 07F8-07FF 2040-2047 Sprite Data Pointers 0800-9FFF 2048-40959 Normal BASIC Program Space 8000-9FFF 32768-40959 VSP Cartridge ROM -- 8192 Bytes A000-BFFF 40960-49151 BASIC ROM-8192 Bytes (or 8K RAM) C000-CFFF 49152-53247 RAM-4096 Bytes D000-DFFF 53248-57343 Input/Output Devices and Color RAM or Character Generator ROM or RAM-4096 Bytes E000-FFFF 57344-65535 KERNAL ROM -- 8192 Bytes (or 8K RAM) ********* End of the Project 64 etext of Commodore_64_RAM_Memory_Map.doc ********* The Project 64 etext of Commodore_64_ROM_Memory_Map.doc ********* ; ;
Commodore 64 ROM Memory Map V1.2 1 Sep 1994
; ; Data types in headers (for reassembler): ; ; DATA Misc data ; TEXT String terminated with 00 ; WORD Vectors in LO/HI byte pairs ; CHIP I/O Area ; EMPTY ROM containing FF's or AA's ; ; ; BASIC interpreter ROM ($A000 - $BFFF)
; a000 a00c a052 a080 a09e a129 a140 a14d a19e a328 a364 a38a a3b8 a3fb a408 a435 a437 a469 a474 a480 a49c a4a2 a533 a560 a579 a613 a642 a65e a68e a69c a717 a742 a7ae a7c4 a7e1 a7ed a81d a82c a857 a871 a883 a8a0 a8d2 a8f8 a906 a928 a93b a94b a96b a9a5 a9c4 a9d6 a9d9 a9e3 aa2c aa80
40960 40972 41042 41088 41118 41257 41280 41293 41374 41768 41828 41866 41912 41979 41992 42037 42039 42089 42100 42112 42140 42146 42291 42336 42361 42515 42562 42590 42638 42652 42775 42818 42926 42948 42977 42989 43037 43052 43095 43121 43139 43168 43218 43256 43270 43304 43323 43339 43371 43429 43460 43478 43481 43491 43564 43648
Restart Vectors WORD stmdsp BASIC Command Vectors fundsp BASIC Function Vectors optab BASIC Operator Vectors WORD reslst BASIC Command Keyword Table msclst BASIC Misc. Keyword Table oplist BASIC Operator Keyword Table funlst BASIC Function Keyword Table errtab Error Message Table errptr Error Message Pointers okk Misc. Messages TEXT fndfor Find FOR/GOSUB Entry on Stack bltu Open Space in Memory getstk Check Stack Depth reason Check Memory Overlap omerr Output ?OUT OF MEMORY Error error Error Routine errfin Break Entry ready Restart BASIC main Input & Identify BASIC Line main1 Get Line Number & Tokenise Text inslin Insert BASIC Text linkprg Rechain Lines inlin Input Line Into Buffer crunch Tokenise Input Buffer fndlin Search for Line Number scrtch Perform [new] clear Perform [clr] stxpt Reset TXTPTR list Perform [list] qplop Handle LIST Character for Perform [for] newstt BASIC Warm Start ckeol Check End of Program gone Prepare to execute statement gone3 Perform BASIC Keyword restor Perform [restore] stop Perform [stop], [end], break cont Perform [cont] run Perform [run] gosub Perform [gosub] goto Perform [goto] return Perform [return] data Perform [data] datan Search for Next Statement / Line if Perform [if] rem Perform [rem] ongoto Perform [on] linget Fetch linnum From BASIC let Perform [let] putint Assign Integer ptflpt Assign Floating Point putstr Assign String puttim Assign TI$ getspt Add Digit to FAC#1 printn Perform [print]#
WORD WORD DATA DATA DATA DATA DATA WORD
aa86 aa9a aaa0 aab8 aad7 aae8 ab1e ab3b ab4d ab7b aba5 abbf abea abf9 ac06 ac35 acfc ad1e ad61 ad8a ad9e ae83 aea8 aead aef1 aef7 aef7 aefa aefd af08 af0d af14 af28 af48 afa7 afb1 afd1 afe6 b016 b01b b02e b07e b08b b0e7 b11d b128 b194 b1a5 b1aa b1b2 b1bf b1d1 b218 b245 b261 b30e b34c b37d
43654 43674 43680 43704 43735 43752 43806 43835 43853 43899 43941 43967 44010 44025 44038 44085 44284 44318 44385 44426 44446 44675 44712 44717 44785 44791 44791 44794 44797 44808 44813 44820 44840 44872 44967 44977 45009 45030 45078 45083 45102 45182 45195 45287 45341 45352 45460 45477 45482 45490 45503 45521 45592 45637 45665 45838 45900 45949
cmd Perform [cmd] strdon Print String From Memory print Perform [print] varop Output Variable crdo Output CR/LF comprt Handle comma, TAB(, SPC( strout Output String outspc Output Format Character doagin Handle Bad Data get Perform [get] inputn Perform [input#] input Perform [input] bufful Read Input Buffer qinlin Do Input Prompt read Perform [read] rdget General Purpose Read Routine exint Input Error Messages TEXT next Perform [next] donext Check Valid Loop frmnum Confirm Result frmevl Evaluate Expression in Text eval Evaluate Single Term pival Constant - pi DATA qdot Continue Expression parchk Expression in Brackets chkcls Confirm Character -test ')'-test '('-test commasynerr Output ?SYNTAX Error domin Set up NOT Function rsvvar Identify Reserved Variable isvar Search for Variable tisasc Convert TI to ASCII String isfun Identify Function Type strfun Evaluate String Function numfun Evaluate Numeric Function orop Perform [or], [and] dorel Perform numrel Numeric Comparison strrel String Comparison dim Perform [dim] ptrget Identify Variable ordvar Locate Ordinary Variable notfns Create New Variable notevl Create Variable aryget Allocate Array Pointer Space n32768 Constant 32768 in Flpt facinx FAC#1 to Integer in (AC/YR) intidx Evaluate Text for Integer ayint FAC#1 to Positive Integer isary Get Array Parameters fndary Find Array bserr ?BAD SUBSCRIPT/?ILLEGAL QUANTITY notfdd Create Array inlpn2 Locate Element in Array umult Number of Bytes in Subscript fre Perform [fre]
DATA
b391 b39e b3a6 b3e1 b3f4 b465 b487 b4d5 b4f4 b526 b5bd b606 b63d b67a b6a3 b6db b6ec b700 b72c b737 b761 b77c b782 b78b b79b b7ad b7b5 b7eb b7f7 b80d b824 b82d b849 b850 b862 b867 b947 b97e b983 b9bc b9ea ba28 ba59 ba8c bab7 bad4 bae2 baf9 bafe bb07 bb0f bba2 bbc7 bbfc bc0c bc1b bc2b bc39
45969 45982 45990 46049 46068 46181 46215 46293 46324 46374 46525 46598 46653 46714 46755 46811 46828 46848 46892 46903 46945 46972 46978 46987 47003 47021 47029 47083 47095 47117 47140 47149 47177 47184 47202 47207 47431 47486 47491 47548 47594 47656 47705 47756 47799 47828 47842 47865 47870 47879 47887 48034 48071 48124 48140 48155 48171 48185
givayf Convert Integer in (AC/YR) to Flpt pos Perform [pos] errdir Confirm Program Mode getfnm Check Syntax of FN fndoer Perform [fn] strd Perform [str$] strlit Set Up String putnw1 Save String Descriptor getspa Allocate Space for String garbag Garbage Collection dvars Search for Next String grbpas Collect a String cat Concatenate Two Strings movins Store String in High RAM frestr Perform String Housekeeping frefac Clean Descriptor Stack chrd Perform [chr$] leftd Perform [left$] rightd Perform [right$] midd Perform [mid$] pream Pull sTring Parameters len Perform [len] len1 Exit String Mode asc Perform [asc] gtbytc Evaluate Text to 1 Byte in XR val Perform [val] strval Convert ASCII String to Flpt getnum Get parameters for POKE/WAIT getadr Convert FAC#1 to Integer in LINNUM peek Perform [peek] poke Perform [poke] wait Perform [wait] faddh Add 0.5 to FAC#1 fsub Perform Subtraction fadd5 Normalise Addition fadd Perform Addition negfac 2's Complement FAC#1 overr Output ?OVERFLOW Error mulshf Multiply by Zero Byte fone Table of Flpt Constants DATA log Perform [log] fmult Perform Multiply mulply Multiply by a Byte conupk Load FAC#2 From Memory muldiv Test Both Accumulators mldvex Overflow / Underflow mul10 Multiply FAC#1 by 10 tenc Constant 10 in Flpt DATA div10 Divide FAC#1 by 10 fdiv Divide FAC#2 by Flpt at (AC/YR) fdivt Divide FAC#2 by FAC#1 movfm Load FAC#1 From Memory mov2f Store FAC#1 in Memory movfa Copy FAC#2 into FAC#1 movaf Copy FAC#1 into FAC#2 round Round FAC#1 sign Check Sign of FAC#1 sgn Perform [sgn]
bc58 bc5b bc9b bccc bcf3 bdb3 bdc2 bddd be68 bf11 bf71 bf7b bfb4 bfbf bfed ; ; ; ; e000 e043 e08d e097 e0f9 e10c e112 e118 e11e e124 e12a e156 e165 e1be e1c7 e1d4 e200 e206 e20e e219 e264 e26b e2b4 e2e0
48216 48219 48283 48332 48371 48563 48578 48605 48744 48913 49009 49019 49076 49087 49133
abs Perform [abs] fcomp Compare FAC#1 With Memory qint Convert FAC#1 to Integer int Perform [int] fin Convert ASCII String to a Number in FAC#1 n0999 String Conversion Constants DATA inprt Output 'IN' and Line Number fout Convert FAC#1 to ASCII String foutim Convert TI to String fhalf Table of Constants DATA sqr Perform [sqr] fpwrt Perform power ($) negop Negate FAC#1 logeb2 Table of Constants DATA exp Perform [exp]
C64 Kernal ROM 57344 57411 57485 57495 57593 57612 57618 57624 57630 57636 57642 57686 57701 57790 57799 57812 57856 57862 57870 57881 57956 57963 58036 58080
(exp continues) EXP continued From BASIC ROM polyx Series Evaluation rmulc Constants for RND DATA rnd Perform [rnd] bioerr Handle I/O Error in BASIC bchout Output Character bchin Input Character bckout Set Up For Output bckin Set Up For Input bgetin Get One Character sys Perform [sys] savet Perform [save] verfyt Perform [verify / load] opent Perform [open] closet Perform [close] slpara Get Parameters For LOAD/SAVE combyt Get Next One Byte Parameter deflt Check Default Parameters cmmerr Check For Comma ocpara Get Parameters For OPEN/CLOSE cos Perform [cos] sin Perform [sin] tan Perform [tan] pi2 Table of Trig Constants DATA
;e2e0 1.570796327 pi/2 ;e2e5 6.28318531 pi*2 ;e2ea 0.25 ;e2ef ;e2f0 ;e2f5 ;e2fa ;e2ff ;e304 ;e309
#05 (counter) -14.3813907 42.0077971 -76.7041703 81.6052237 -41.3417021 6.28318531
e30e e33e
58126 atn Perform [atn] 58174 atncon Table of ATN Constants
DATA
;e33e ;e3ef ;e344 ;e349 ;e34e ;e353 ;e358 ;e35d ;e362 ;e367 ;e36c ;e371 ;e376
#0b (counter) -0.000684793912 0.00485094216 -0.161117018 0.034209638 -0.0542791328 0.0724571965 -0.0898023954 0.110932413 -0.142839808 0.19999912 -0.333333316 1.00
e37b e394 e3a2 e3ba ;e3b2 e3bf e422 e447 e453 e45f e4ad e4b7 e4da e4e0 e4ec e500 e505 e50a e518 e544 e566 e56c e59a e5a0 e5b4 e5ca e632 e684 e691 e6b6 e6ed e701 e716 e72a e7d4 e87c e891 e8a1 e8b3 e8cb e8da e8ea e965
58235 bassft BASIC Warm Start [RUNSTOP-RESTORE] 58260 init BASIC Cold Start 58274 initat CHRGET For Zero-page 58298 rndsed RND Seed For zero-page DATA 0.811635157 58303 initcz Initialize BASIC RAM 58402 initms Output Power-Up Message 58439 bvtrs Table of BASIC Vectors (for 0300) WORD 58451 initv Initialize Vectors 58463 words Power-Up Message DATA 58541 Patch for BASIC Call to CHKOUT 58551 Unused Bytes For Future Patches EMPTY 58586 Reset Character Colour 58592 Pause After Finding Tape File 58604 RS-232 Timing Table -- PAL DATA 58624 iobase Get I/O Address 58629 screen Get Screen Size 58634 plot Put / Get Row And Column 58648 cint1 Initialize I/O 58692 Clear Screen 58726 Home Cursor 58732 Set Screen Pointers 58778 Set I/O Defaults (Unused Entry) 58784 Set I/O Defaults 58804 lp2 Get Character From Keyboard Buffer 58826 Input From Keyboard 58930 Input From Screen or Keyboard 59012 Quotes Test 59025 Set Up Screen Print 59062 Advance Cursor 59117 Retreat Cursor 59137 Back on to Previous Line 59158 Output to Screen 59178 -unshifted characters59348 -shifted characters59516 Go to Next Line 59537 Output 59553 Check Line Decrement 59571 Check Line Increment 59595 Set Colour Code 59610 Colour Code Table 59626 Scroll Screen 59749 Open A Space On The Screen
e9c8 e9e0 e9f0 e9ff ea13 ea24 ea31 ea87 eadd eb79 eb81 ebc2 ec03 ec44 ec78 ecb9 ece7 ecf0 ed09 ed0c ed40 edad edad edb0 edb9 edbe edc7 edcc eddd edef ee13 ee85 ee8e ee97 eea0 eea9 eeb3 eebb ef06 ef2e ef39 ef4a ef59 ef7e ef90 efe1 f00d f017 f04d f086 f0a4 f0bd f12b f12f f13e f157 f199 f1ca
59848 59872 59888 59903 59923 59940 59953 60039 60125 60281 60289 60354 60419 60484 60536 60601 60647 60656 60681 60684 60736 60845 60845 60848 60857 60862 60871 60876 60893 60911 60947 61061 61070 61079 61088 61097 61107 61115 61190 61230 61241 61258 61273 61310 61328 61409 61453 61463 61517 61574 61604 61629 61739 61743 61758 61783 61849 61898
Move A Screen Line Syncronise Colour Transfer Set Start of Line Clear Screen Line Print To Screen Syncronise Colour Pointer Main IRQ Entry Point scnkey Scan Keyboard Process Key Image Pointers to Keyboard decoding tables Keyboard 1 -- unshifted DATA Keyboard 2 -- Shifted DATA Keyboard 3 -- Commodore DATA Graphics/Text Control Keyboard 4 -- Control DATA Video Chip Setup Table DATA Shift-Run Equivalent Low Byte Screen Line Addresses talk Send TALK Command on Serial Bus listn Send LISTEN Command on Serial Bus Send Data On Serial Bus Flag Errors Status #80 - device not present Status #03 - write timeout second Send LISTEN Secondary Address Clear ATN tksa Send TALK Secondary Address Wait For Clock ciout Send Serial Deferred untlk Send UNTALK / UNLISTEN acptr Receive From Serial Bus Serial Clock On Serial Clock Off Serial Output 1 Serial Output 0 Get Serial Data And Clock In Delay 1 ms RS-232 Send Send New RS-232 Byte 'No DSR' / 'No CTS' Error Disable Timer Compute Bit Count RS-232 Receive Set Up To Receive Process RS-232 Byte Submit to RS-232 No DSR (Data Set Ready) Error Send to RS-232 Buffer Input From RS-232 Get From RS-232 Serial Bus Idle Table of Kernal I/O Messages DATA Print Message if Direct Print Message getin Get a byte chrin Input a byte Get From Tape / Serial / RS-232 chrout Output One Character
WORD
DATA
f20e f250 f291 f30f f31f f32f f333 f34a f3d5 f409 f49e f4b8 f533 f5af f5c1 f5d2 f5dd f5fa f659 f68f f69b f6dd f6e4 f6ed f6fb f6fb f6fe f701 f704 f707 f70a f70d f710 f713 f72d f76a f7d0 f7d7 f7ea f80d f817 f82e f838 f841 f864 f875 f8d0 f8e2 f92c fa60 fb8e fb97 fba6 fbc8 fbcd fc57 fc93 fcb8
61966 62032 62097 62223 62239 62255 62259 62282 62421 62473 62622 62648 62771 62927 62913 62930 62941 62970 63065 63119 63131 63197 63204 63213 63227 63227 63230 63233 63236 63239 63242 63245 63248 63251 63277 63338 63440 63447 63466 63501 63511 63534 63544 63553 63588 63605 63696 63714 63788 64096 64398 64407 64422 64456 64461 64599 64659 64696
chkin Set Input Device chkout Set Output Device close Close File Find File Set File values clall Abort All Files clrchn Restore Default I/O open Open File Send Secondary Address Open RS-232 load Load RAM Load File From Serial Bus Load File From Tape Print "SEARCHING" Print Filename Print "LOADING / VERIFYING" save Save RAM Save to Serial Bus Save to Tape Print "SAVING" udtim Bump Clock rdtim Get Time settim Set Time stop Check STOP Key Output I/O Error Messages 'too many files' 'file open' 'file not open' 'file not found' 'device not present' 'not input file' 'not output file' 'missing filename' 'illegal device number' Find Any Tape Header Write Tape Header Get Buffer Address Set Buffer Stat / End Pointers Find Specific Tape Header Bump Tape Pointer Print "PRESS PLAY ON TAPE" Check Tape Status Print "PRESS RECORD..." Initiate Tape Read Initiate Tape Write Common Tape Code Check Tape Stop Set Read Timing Read Tape Bits Store Tape Characters Reset Tape Pointer New Character Setup Send Tone to Tape Write Data to Tape IRQ Entry Point Write Tape Leader Restore Normal IRQ Set IRQ Vector
fcca fcd1 fcdb fce2 fd02 fd12 fd15 fd1a fd30 fd50 fd9b fda3 fddd fdf9 fe00 fe07 fe18 fe21 fe25 fe34 fe43 fe66 febc fec2 fed6 ff07 ff43 ff48 ff5b ff80 ; ; C64 ; ff81 ff84 ff87 ff8a ff8d ff90 ff93 ff96 ff99 ff9c ff9f ffa2 ffa5 ffa8 ffab ffae ffb1 ffb4 ffb7 ffba ffbd ffc0 ffc3 ffc6 ffc9
64714 64721 64731 64738 64770 64786 64789 64794 64816 64848 64923 64931 64989 65017 65024 65031 65048 65057 65061 65076 65091 65126 65212 65218 65238 65287 65347 65352 65371 65408
Kill Tape Motor Check Read / Write Pointer Bump Read / Write Pointer Power-Up RESET Entry Check For 8-ROM 8-ROM Mask '80CBM' DATA restor Restore Kernal Vectors (at 0314) vector Change Vectors For User Kernal Reset Vectors WORD ramtas Initialise System Constants IRQ Vectors For Tape I/O WORD ioinit Initialise I/O Enable Timer setnam Set Filename setlfs Set Logical File Parameters readst Get I/O Status Word setmsg Control OS Messages settmo Set IEEE Timeout memtop Read / Set Top of Memory membot Read / Set Bottom of Memory NMI Transfer Entry Warm Start Basic [BRK] Exit Interrupt RS-232 Timing Table - NTSC DATA NMI RS-232 In NMI RS-232 Out Fake IRQ Entry IRQ Entry cint Initialize screen editor Kernal Version Number [03] DATA
Kernal Jump Table jmp jmp jmp jmp jmp jmp jmp jmp jmp jmp jmp jmp jmp jmp jmp jmp jmp jmp jmp jmp jmp jmp jmp jmp jmp
$ff5b $fd23 $fd50 $fd15 $fd1a $fe18 $edb9 $edc7 $fe25 $fe34 $ea87 $fe21 $ee13 $eddd $edef $edfe $ed0c $ed09 $fe07 $fe00 $fdf9 ($031a) ($031c) ($031e) ($0320)
cint ioinit ramtas restor vector setmsg secnd tksa memtop membot scnkey settmo acptr ciout untalk unlsn listn talk readss setlfs setnam (iopen) (iclose) (ichkin) (ichkout)
Init Editor & Video Chips Init I/O Devices, Ports & Timers Init Ram & Buffers Restore Vectors Change Vectors For User Control OS Messages Send SA After Listen Send SA After Talk Set/Read System RAM Top Set/Read System RAM Bottom Scan Keyboard Set Timeout In IEEE Handshake Serial Byte In Handshake Serial Byte Out Command Serial Bus UNTALK Command Serial Bus UNLISTEN Command Serial Bus LISTEN Command Serial Bus TALK Read I/O Status Word Set Logical File Parameters Set Filename Open Vector [f34a] Close Vector [f291] Set Input [f20e] Set Output [f250]
ffcc ffcf ffd2 ffd5 ffd8 ffdb ffde ffe1 ffe4 ffe7 ffea ffed fff0 fff3
jmp jmp jmp jmp jmp jmp jmp jmp jmp jmp jmp jmp jmp jmp
($0322) ($0324) ($0326) $f49e $f5dd $f6e4 $f6dd ($0328) ($032a) ($032c) $f69b $e505 $e50a $e500
(iclrch) (ichrin) (ichrout) load save settim rdtim (istop) (igetin) (iclall) udtim screen plot iobase
Restore I/O Vector [f333] Input Vector, chrin [f157] Output Vector, chrout [f1ca] Load RAM From Device Save RAM To Device Set Real-Time Clock Read Real-Time Clock Test-Stop Vector [f6ed] Get From Keyboad [f13e] Close All Channels And Files [f32f] Increment Real-Time Clock Return Screen Organization Read / Set Cursor X/Y Position Return I/O Base Address
;fff6 Vectors fff6 fff8
[5252] [5942]
SYSTEM
;fffa fffa fffc fffe
Transfer Vectors [fe43] [fce2] [ff48]
NMI RESET IRQ
********* End of the Project 64 etext of Commodore_64_ROM_Memory_Map.doc ********* The Project 64 etext of Commodore_64_ROM_Memory_Map.txt ********* ; -----; ; Commodore 64 ROM Memory Map ; ; BASIC interpreter ROM ($A000 - $BFFF) ; ; label address type comments restart = $a000 stmdsp = $a00c fundsp = $a052 optab = $a080 reslst = $a09e msclst = $a129 oplist = $a140 funlst = $a14d errtab = $a19e errptr = $a328 okk = $a364 fndfor = $a38a bltu = $a3b8 getstk = $a3fb reason = $a408
omerr = error = errfin ready = main = main1 = inslin linkprg inlin = crunch fndlin scrtch clear = stxpt = list = qplop = for = newstt ckeol = gone = gone3 = restor stop = cont = run = gosub = goto = return data = datan = if = rem = ongoto linget let = putint ptflpt putstr puttim getspt printn cmd = strdon print = varop = crdo = comprt strout outspc doagin get = inputn input = bufful qinlin read = rdget = exint =
$a435 $a437 = $a474 $a480 $a49c = = $a560 = = = $a65e $a68e $a69c $a717 $a742 = $a7c4 $a7e1 $a7ed = $a82c $a857 $a871 $a883 $a8a0 = $a8f8 $a906 $a928 $a93b = = $a9a5 = = = = = = $aa86 = $aaa0 $aab8 $aad7 = = = = $ab7b = $abbf = = $ac06 $ac35 $acfc
$a469
$a4a2 $a533 $a579 $a613 $a642
$a7ae
$a81d
$a8d2
$a94b $a96b $a9c4 $a9d6 $a9d9 $a9e3 $aa2c $aa80 $aa9a
$aae8 $ab1e $ab3b $ab4d $aba5 $abea $abf9
next = donext frmnum frmevl eval = pival = qdot = parchk chkcls synerr domin = rsvvar isvar = tisasc isfun = strfun numfun orop = dorel = numrel strrel dim = ptrget ordvar isletc notfns notevl aryget n32768 facinx intidx ayint = isary = fndary bserr = notfdd inlpn2 umult = fre = givayf pos = errdir def = getfnm fndoer strd = strlit putnw1 getspa garbag dvars = grbpas cat = movins frestr frefac chrd = leftd =
$ad1e = = = $ae83 $aea8 $aead = = = $af0d = $af28 = $afa7 = = $afe6 $b016 = = $b07e = = = = = = = = = $b1bf $b1d1 = $b245 = = $b34c $b37d = $b39e = $b3b3 = = $b465 = = = = $b5bd = $b63d = = = $b6ec $b700
$ad61 $ad8a $ad9e
$aef1 $aef7 $af08 $af14 $af48 $afb1 $afd1 $b01b $b02e $b08b $b0e7 $b113 $b11d $b128 $b194 $b1a5 $b1aa $b1b2 $b218 $b261 $b30e $b391 $b3a6 $b3e1 $b3f4 $b487 $b4d5 $b4f4 $b526 $b606 $b67a $b6a3 $b6db
data
rightd = $b72c midd = $b737 pream = $b761 len = $b77c len1 = $b782 asc = $b78b gtbytc = $b79b val = $b7ad strval = $b7b5 getnum = $b7eb getadr = $b7f7 peek = $b80d poke = $b824 wait = $b82d faddh = $b849 fsub = $b850 fadd5 = $b862 fadd = $b867 negfac = $b947 overr = $b97e mulshf = $b983 fone = $b9bc log = $b9ea fmult = $ba28 mulply = $ba59 conupk = $ba8c muldiv = $bab7 mldvex = $bad4 mul10 = $bae2 tenc = $baf9 div10 = $bafe fdiv = $bb07 fdivt = $bb0f movfm = $bba2 mov2f = $bbc7 movfa = $bbfc movaf = $bc0c round = $bc1b sign = $bc2b sgn = $bc39 abs = $bc58 fcomp = $bc5b qint = $bc9b int = $bccc fin = $bcf3 n0999 = $bdb3 inprt = $bdc2 fout = $bddd foutim = $be68 fhalf = $bf11 sqr = $bf71 fpwrt = $bf7b negop = $bfb4 logeb2 = $bfbf exp = $bfed ; ; ; C64 KERNEL ROM
data
data
data
data
data
; (exp = polyx = rmulc = rnd = bioerr bchout bchin = bckout bckin = bgetin sys = savet = verfyt opent = closet slpara combyt deflt = cmmerr ocpara cos = sin = tan = pi2 = atn = atncon bassft init = initat rndsed initcz initms bvtrs = initv = words = = = = = = iobase screen plot = cint1 = = = = = = lp2 = = = = = = = =
$e000 $e043 $e08d $e097 = = $e112 = $e11e = $e12a $e156 = $e1be = = = $e206 = = $e264 $e26b $e2b4 $e2e0 $e30e = = $e394 = = = = $e447 $e453 $e45f $e4ad $e4b7 $e4da $e4e0 $e4ec = = $e50a $e518 $e544 $e566 $e56c ; $e59a $e5b4 $e5ca $e632 $e684 $e691 $e6b6 $e6ed $e701
data $e0f9 $e10c $e118 $e124 $e165 $e1c7 $e1d4 $e200 $e20e $e219
data $e33e $e37b
data
$e3a2 $e3ba $e3bf $e422 data
illegal data $e500 $e505
= = = = = = = = = = = = = = = scnkey = = = = = = = = = = talk = = = second = tksa = = ciout = untlk = acptr = = = = = = = = = = = = = = = = = = = = = = =
$e716 $e87c $e891 $e8a1 $eacb $e8da $e8ea $e965 $e9c8 $e9e0 $e9f0 $e9ff $ea13 $ea24 $ea31 = $ea87 $eadd $eb79 $eb81 $ebc2 $ec03 $ec44 $ec78 $ecb9 $ece7 $ecf0 $ed09 $ed40 $edad = $edb9 $edbe $edc7 $edcc $eddd $edef $ee13 $ee85 $ee8e $ee97 $eea0 $eea9 $eeb3 $eebb $ef06 $ef2e $ef39 $ef4a $ef59 $ef7e $ef90 $efe1 $f00d $f017 $f04d $f086 $f0a4 $f0bd $f128
data data data data data data data
getin = $f13e chrin = $f157 = $f199 chrout = $f1ca chkin = $f20e chkout = $f250 close = $f291 = $f30f = $f31f clall = $f32f clrchn = $f333 open = $f34a = $f3d5 = $f409 load = $f49e ; ;-------------; save = $f5dd udtim = $f69b rdtim = $f6dd settim = $f6e4 stop = $f6ed restor = $fd15 vector = $fd1a ramtas = $fd50 ioinit = $fda3 setnam = $fdf9 setlfs = $fe00 readst = $fe07 setmsg = $fe18 settmo = $fe21 memtop = $fe25 membot = $fe34 cint = $fe58 ; ; ; C64 KERNEL call addresses ; acptr = $ffa5 chkin = $ffc6 chkout = $ffc9 chrin = $ffcf chrout = $ffd2 ciout = $ffa8 cint = $ff81 clall = $ffe7 close = $ffc3 clrchn = $ffcc getin = $ffe4 iobase = $fff3 ioinit = $ff84 listen = $ffb1 load = $ffd5 membot = $ff9c memtop = $ff99 open = $ffc0 plot = $fff0
ramtas rdtim = readst restor save = scnkey screen second setlfs setmsg setnam settim settmo stop = talk = tksa = udtim = unlsn = untlk = vector ;
= $ffde = = $ffd8 = = = = = = = = $ffe1 $ffb4 $ff96 $ffea $ffae $ffab =
$ff87 $ffb7 $ff8a $ff9f $ffed $ff93 $ffba $ff90 $ffbd $ffdb $ffa2
$ff8d
********* End of the Project 64 etext of Commodore_64_ROM_Memory_Map.txt ********* End of the Project 64 etext 64MAP10.TXT, several Commodore 64 memory maps. *********
View more...
Comments