! ----------------- ! C-128 ROM-I/O-MAP ! ----------------- ! ! By James Hermann ! 74576.711 ! !With Help From- ! Allen Yoder/SCOPE-Texas ! Dave Haynie/Commodore ! 76703.2047 ! !0000* 8502 On-Chip D-D Register !0001* 8502 On-Chip I/O Register !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !4000-7FFF BASIC Low ROM or ! Internal Low ROM or ! External Low ROM. ! 4000- BASIC Power-up JMP $4023 ! 4003- BASIC RESET JMP $4009 ! 4023-4044 BASIC Power-up ! 4045-410F Init. BASIC registers ! 4112-4179 Init. BASIC Abs. Var. ! 417A-418C Initalize D501-4 ! 419B-41BA Print RESET Screen ! 41BB-4250 RESET Screen Header Char. ! 4251-4278 Init. 0300-11;02FC ! 4279-43DD BASIC CHRGET ML ! 430D- Tokenize BASIC Text ! 4417-4515 BASIC 2.0 Keywords ! 4516-46F8 BASIC 7.0 Keywords ! 484B-4A81 BASIC Error Meassages ! 4AA2- BASIC Char. Dispatch ! 4D3F- Print BASIC Message ! 4DC6- BASIC Warm Start ! 5151- BASIC Text LIST ! 51D9-5261 Init. BASIC Pgm vectors ! 6EB2-6EDA Init. BASIC Abs. Var. ! 78DA- BASIC Token Eval. ! 7E82-7FFD Blank !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !8000-BFFF BASIC Mid ROM or ! Internal ROM or ! External ROM. ! 9251-9298 BASIC to KERNAL JMP Table ! A845-A84C To BANK(15) ! AA6E-AE62 Blank ! AFA8-AFFF Blank ! B000-BFFF Moniter ROM ! BOOO- Moniter RST code ! B003- BRK ! BB72-BFFD Blank !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !C000-CFFF Editor High ROM or ! Internal ROM or ! External ROM. ! C000- CINT -JMP $C07B ! C00F- SCREEN ! C012- SCNKEY ! C018- PLOT ! C07B- CINT ! CEA8-CEF4 Function Key Init. values ! CEF5-CFFD Blank !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !D000-DFFF I/O Space ! D500-D50B MMU I/O chip(switchable) ! D500 MMU Config. Reg. ($FF00) ! D501-D504 MMU Preconfig. Registers ! D505 bit 7 - 40/80 switch 1=40 ! bit 6 - 128/64 mode 1=64 ! bit 5 - GAME line; bi-dir ! bit 4 - EXROM line; bi-d ! bit 3 - Fast Serial I/O ! bit 1-2 - reserved ! bit 0 -8502/Z80 CPU 0=Z80 ! D506 RAM Config. Register ! bits 0-1 -K of Common RAM ! 00-1K 01-4K ! 10-8K 11-16K ! bits 2-3 -Loc./Common RAM ! 00-none 01-Bottom ! 10-Top 11-Both ! bits 4-5 -reserved ! bit 6 -RAM # used by VIC ! bit 7 -reserved ! D507 Page for CPU Zero Page ! D508 LSB-RAM # for CPU ZP ! D509 Page for CPU stack ! D50A LSB-RAM # for CPU stack ! D50B System Version Register ! bits 0-3 -MMU chip vers. ! bits 4-7 -Code for K/RAM ! 0010- 128K ! 0000- 256K ! D50C-D5FF Blank ! D600-D601 Access to 16K display RAM ! D600 Register addresses ! D601 Data ! DC00-DCFF CIA #1 (Keyboard; etc.) ! DD00-DDFF CIA #2 (Serial; etc.) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !E000-FFFF KERNAL High ROM ! E000- KERNAL ROM Code ! E000-E048 RST Code ! E04B-E055 $D500 Init. values ! E056- RESTORE ! E05B- VECTOR ! E093- RAMTAS ! E0CD-E108 Init.$FF05- on RAM(0-3) & ! KERNAL RAM Code on RAM(0) ! E109-E1EF IOINIT routine ! E1F0-E223 If $FFF5-9 on RAM(1)=cbm, ! then JMP ($FFF8);else... ! E224-E241 Init. $FFF5-9 on RAM(1) ! E242-E2BF Switch to 64 mode if D505 ! bits 4-5 not set; check ! Int./Ext. ROM and JMP ! E24B-E26A Switch to 64 mode ! E33B- TALK ! E33E- LISTEN ! E43E- ACPTR ! E4D2- SECOND ! E4E0- TKSA ! E503- CIOUT ! E515- UNTLK ! E526- UNLSN ! F23D-F264 Close all files on dev=ac ! F265- LOAD ! F53E- SAVE ! F5F8- UDTIM ! F63D-F65D Check for CTRL R/S or C= ! F65E- RDTIM ! F665- SETTIM ! F6B1-F71D KERNAL Messages ! F731- SETNAM ! F738- SETLFS ! F744- READST ! F75C- SETMSG ! F75F- SETTMO ! F763- MEMTOP ! F772- MEMBOT ! F781- IOBASE ! F7D0-F7D9 Call KERNAL RAM Code 02A2 ! to LDA byte from addr;y ! at Zero-Page vector in ! acc for BANK(x) ! F7EC-F7EF LDA MMU value for BANK(x) ! F7F0-F7FF MMU values for BANK(0-15) ! F800-F859 KERNAL RAM Code $02A2-FB ! F85A-F866 KERNAL RAM Code $03F0-FC ! F867-F988 Check for ROM not used on RST ; Load Boot Page and execute ! F9D5-F9FA Load page and STA($ACC) ! FA00- Editor Tables ! FA17-FA3F Print bytes after JSR ! FA40- NMI ! FA65- IRQ ! FC3B-FC7F Blank ! FC80-FEFF Foreign Lang. Sys.-Blank !FF00* MMU Config. Register !FF01-FF04* MMU Load Config. Regs. ! FF05-FF44 KERNAL Int. Dispatch Code ! FF3D-FF44 RST Code JMP $E000 ! FF47-FF80 KERNAL Hardware JMP Table ! FF81-FFF5 KERNAL User Jump Table ! FFFA-FFFF NMI;RST; and IRQ vectors !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !* These are I/O registers and take the ! place of RAM or ROM always. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !MMU Configuration Register $D500/FF00 ! bits values purpose ! 6-7 RAM control- ! 00 RAM(0) ! 01 RAM(1) ! 10 RAM(2)-not present ! 11 RAM(3)-not present ! 4-5 ROM control- ! 00 KERNAL and EDIT ROM ! 01 Internal High ROM ! 10 External High ROM ! 11 None ! 2-3 Mid ROM control- $8000-BFFF ! 00 BASIC ROM ! 01 Internal ROM ! 10 External ROM ! 11 None ! 1 Low ROM Control- $4000-7FFF ! 0=ROM 1=RAM ! 0 I/O-ROM Control- $D000-DFFF ! 0=I/O 1=CHAR-ROM Å