This is an interface card for Commodore Plus/4 and C16 machines. It provides a DOS file system for your computer using a typical
micro SD card and FAT32. This card is NOT an IEC bus emulator. It does not work with the IEC channel, instead, it uses a new I/O
channel to commnicate with the MCU. All the logic is included into a CPLD chip, while the FAT handler firmware is in the STM32 MCU.
An 8K parallel ROM /EPROM or EEPROM or FLASH/ contains the 6510 /or 7501/ code, which provides some vector routines and a complete
file browser.
Preparations:
Format your Mikro SD card as FAT32. Sure you know how to do it on your PC or MAC, windows or linux, whatever.
There are some limitation due to the capacity of the MCU, like number of files and folders in a folder, file name length and
such things. See these below. Insert the card to the SD socket and keep it there while the computer is on.
I do not recommend removing or changing the card while your Commodore machine is operating.
The edge connetor in the Plus4/C16 is very strong. Carfully insert the card, push it, while it takes
its place. You'll see that the connector holds the card well. Also, be very careful when you remove your
card. Try to pull it towards the computer and not push it sideways. Without care you may damager the
parts on the printed circuit.
If there is no SD card in the socket - or there is another error, e.g. card does not have FAT -, the
MCU won't be able to read the content, so a diganostics screen will appear. It says "ERROR: SD CARD MOUNT FAILED"
Diagnostics screen in case of any error
When you turn on your computer, normally it starts the built in file browser app. This app shows
the root folder content of the SD card. As per definition, commodore file system uses
max. 16 chars for file names and folder names too.
The built in browser handles .PRG files only. Pressing HELP key will show a brief help screen.
You can move the selction with your cursor keys, and for bigger steps use keys F1 and F2.
As usual everywhere else, key Return will enter into the selected folder or load and start the
selected file immediately.
The content of my root folder
You can load a .PRG file some other ways, too. Just use the keys F3, Shift+Return, or Space .
Return - Like BASIC load, it loads the program to address $1001, then ''types'' RUN
Shift+Return - Loads to the address provided by the .PRG file, then ''types'' RUN
F3 - Like BASIC load, it loads the program to address $1001, then returns to BASIC
Space - Loads to the address provided by the .PRG file, goes to BASIC
HELP screen
Pressing key ESC will go back to normal BASIC immediately. Depending on the current configuration
the card will handle the basic commands LOAD and SAVE, and adds some commands to the Basic
prompt. The device number for the LOAD and SAVE can be reconfigured (8, 9, 10 or 11).
Prompt commands begin with character @. These extra feature can also be turned on or off
by the command @CONFIG. See later.
LOAD and SAVE:
For commands LOAD and SAVE the device number decides, whether it uses the SC card or the mormal IEC bus.
For SD card the default device number is 9, but this can be changed by the command @CONFIG.
Because the SD card uses FAT32, using extensions for the files is recommended. While the built in browser
handles .PRG files only, with LOAD/SAVE you can use other extensions, too. But whatever extension you choose,
the KERNAL will handle these files as .PRG file, so it will use the first two bytes in the file
as the start address. This is the normal Commodore KERNAL behavior.
When using LOAD, you can omit the extension, the card will assume the extension .PRG. For example you can load
the file TEST.PRG both ways:
LOAD "TEST.PRG",9
LOAD "TEST",9
I recommend using the extension, when you save something. If there is no extension provided, the card will add a .PRG to the
file name.
SAVE "TEST.PRG",9
Attention!
Since this card is not an IEC bus emulator, other IEC handler commands will not work! (Such as OPEN, CLOSE, PRINT#...)
If there is a game or app that uses multiple files, it may work, in case it uses the normal KERNAL load and save
routines.
DOS commands
@ commands
These extra commands are identified by the first character @. But keep in mind, these are not
BASIC instructions, they are immediate/prompt commands.
It means you can type them, but cannot use them in a BASIC program line.
Like for old PC DOS, commands work the same way. For these commands the separator character is the space!.
In case a file name or a folder name contains space, use the double quote (") chars.
@VOL
SD card volume information
@VER
Firmware version information
@, @DIR
Show the content of the current folder. Due to the limitations of the MCU, one folder can contain max. 340 files.
If there are more files, the rest won't be listed.
Output of the command @ (DIR)
Remark: the old-school command LOAD "$",device also works.
@PWD
Show the current path (print working directory).
Example:
@PWD (shows: /)
@CD folder
Change directory. Root folder is the / like in unix. Also character '/' is used
for separating path parts. If @CD is successful, it will show the current path as @PWD.
Examples:
@CD /
@CD GAMES
@CD "MY FOLDER"
@MKDIR folder
Create a folder. Examples:
@MKDIR FAVGAMES
@MKDIR "MISC FILES"
@DEL file/folder
Delete a file or a folder. Folder must be empty. Examples:
@DEL TEST.PRG
@DEL "OLD STUFF"
@RENAME oldname newname
Rename a file or a folder Examples:
@RENAME MM.PRG "MY MEMS.PRG"
@RENAME TEST.PRG OLDTEST.PRG
@CAT file
Show textual content of a file. Examples:
@CAT README.TXT
@CAT "INDEX FILE.TXT"
@DUMP file offset
Show content of the file as hexadecimal dump. An optional offset can be used /seek to that position in the file/. Examples:
@DUMP TEST.PRG
@DUMP MYDATA.BIN 512
@CONFIG
Configure card behavior. The following options can be set:
- start or not the built in browser when the computer starts
- should LOAD and SAVE be redirected to the SD cad or not
- should the @ commands be active or not
- device number for LOAD/SAVE redirection (8, 9, 10, 11)
First 3 options are given with a number 0 /false/ or 1 /true/, while the device number must be provided as a hexadecimal digit.
These forms a 4 character configuration word. See the examples.
Példák:
@CONFIG 1119 - all options are turned on, SD device number is 9 /default/
@CONFIG 0118 - file browser is not active, LOAD/SAVE redirected, DOS commands on, SD device number is 8
@CONFIG 010a - file browser is not active, LOAD/SAVE redirected, no DOS commands, SD device number is 10
@CONFIG 1008 - file browser is active, everything else is off. Device numner is irrelevant.
@CONFIG 0009 - everything is turned off. Device numner is irrelevant.
Atrention!
If you turn off the @ commands, the @CONFIG command will not work any longer. So then you will need a PC to activate them again.
Using the card with a C16 machine
With both Plus4 and C16 the card itself works fine, however it does not detect the amount of the available RAM.
Therefore, if your C16 has only 16K RAM, do not try to load a game or program that does not fit. It will
cause your system crash. I recommend using a C16 with 64K RAM extension.
The card inserted into a C16
Limitations
Due to the limited capacity of the MCU, please consider the following limitiation when using this card
- When using the built in browser, a folder with 700 files will be listed. More than that will be ignored.
- When using the built in browser, it uses .PRG files only and handler 16 chars from the file name. If a file
or folder name is longer than that, the browser will not be able to load or enter to that folder.
- DOS commands with @ can use 32 characters as file or folder name. Because the command DIR @ does
alphabetical ordering, for this the number of files in a folder is maximum 340. In case there are more files,
an error message will appear and the rest of the files won't be shown.
- The length of the PATH must be less than 128 letters. If the PATH would be longer than that, the
command @PWD will cat the end of the string.
In action
Some technical details:
MCU: STM32F103C8T6 3.3V
CPLD: XC9536XL 3.3V /5V toleráns lábakkal.
EPROM: 27C64, 28C64 or any common parallel storage, using the last 8K only.