SD2IEC Kernal 2.2 2017/09/24 by Claus eload1 code based on EasyProg with friendly permission from Thomas Giesel (skoe) Introduction ============ This is a modification of the Commodore 64 kernal with improved support for the wonderful SD2IEC device by Ingo Korb. Either burn the 8K kernal file to an EPROM and replace the original kernal ROM chip of your C64, or use a device that can override the kernal ROM (e.g. 1541 Ultimate, Turbo Chameleon 64, EasyFlash³). Changes since 2.1: - the logic for skipping module autostart was reversed: now holding RUN/STOP during reset actually prevents the autostart and does not enable it anymore Changes since 2.0: - the list and run command mapped to F1 and F3 is followed by a colon now Changes since 1.0: - the browser is started with F7 instead of SHIFT-RUN/STOP - the browser can be quit using F7 - the browser starts with font 2 (can be changed at any time using SHIFT-COMMODORE) - swap lists can be activated from the browser - SHIFT-RETURN autoruns loaded programs from the browser - the browser will search the bus for sd2iec devices during start and select that if it found any - a simple DOS wedge has been added (read error channel, send command, change device) - F1, F3, F5 function keys are mapped to commands in direct mode - the default device for load and save is the last used device instead of 1, so typing ",8" is not needed Features ======== File Browser ------------ A simple file browser is included that can be started with F7. It uses the RAM behind I/O and kernal ROM as directory buffer, as well as a couple of zeropage addresses and parts of the cassette buffer (more details are provided in the section "Memory Locations"). Up to 426 directory entries are supported. If there are more, they will simply not be displayed and "break" displayed at the end of the directory will signal this. Loading of such large directories can take some time, so it can be cancelled at any time with RUN/STOP. Arbitrary long and weird file and directory names should be handled well. The browser will search the existing devices for an sd2iec or uiec device during startup and will switch to that. If no compatible device can be found, the fallback is device number 8. Swap lists can be activated from the browser that allow to cycle around a given set of disk images using the buttons on the sd2iec device. Swap lists are detected by the file extension ".lst". Please refer to the SD2IEC documentation for details on how to define swap lists. Key Mapping: - CRSR navigates in directory (up/down for slow, left/right for fast movement) - RETURN enters directories or disk images, activates a swap list, or loads programs to their specific start address (LOAD"...",8,1) - SHIFT-RETURN loads a program to the Basic start (LOAD"...",8) and runs it immediately - DEL navigates one folder up - INS navigates to root folder - HOME refreshes the display of the current directory - +/- changes the selected device number in the range between 8 and 15 - RUN/STOP interrupts loading of the directory - F7 exits the browser safely, when no file shall be loaded Fast Loader ----------- Loading from SD2IEC or UIEC devices is accelerated with the eload1 fast loader, resulting in about 10x faster loading than the original kernal routines. Only normal loading is accelerated from both the browser as well as in direct mode. All other file operations are performed with the original kernal routines. DOS Wedge --------- A simple wedge has been added to simplify access to serial devices. Please note that the wedge commands only work in direct mode, not from a Basic program. - "@" prints the error channel of the currently selected device - "@command" sends the specified command to the curently selected device - "@#num" changes the selected device to num (in the range of 8...15) Function Key Mapping -------------------- The function keys have been mapped to commonly used commands to save some typing work in direct mode: - hit F1 to list the currently loaded program - hit F3 to run the currently loaded program - hit F5 to print the error channel of the current device - hit F7 to start the browser Cartridge Autostart Override ---------------------------- Hold RUN/STOP during machine power-up or reset to disable the autostart for cartridges using the CBM80 signature. Shortcomings Compared to Original Kernal ======================================== There ain't no such thing as a free lunch, so support for Tape and RS-232 I/O had to go to make room for above features. Any access to those devices results in a "ILLEGAL DEVICE NUMBER" error. Memory Locations ================ The fast loader uses the following RAM locations: - $b0...$b3 - $02a7...$02ae The browser uses the following RAM locations in addition: - $fb...$fe - $033c...$3af - $d000...$ff1b Bugs ==== Seems not to work with the Final Cartridge 3 (but who would want to combine these two anyway?) Please direct any further bug reports or improvement ideas to: Have fun! Claus