Computers Overview
Commodore PET
    Adverts
    Articles
    Documents
    Options
    Photos
    Projects
        Documents
        MemoPET
        PET ROMs
        petSD+
            Alternatives
            Assembly
            Feedback
            Firmware
            Hardware
            History
            IEC (for C64)
            News
            Order
            Parts List
            Revisions
            Software
            Testing
            Tooling
            User's Guide
    Repairs
    Software
Sinclair ZX80
Sinclair ZX81
BBC Micro
Commodore 64
Sinclair ZXSpectrum
Memotech MTX
Memotech CP/M
Tatung Einstein
Atari ST
Commodore Amiga
PDAs
DEC 3000 AXP
OpenVMS
Raspberry Pi

 

 
 
 

Commodore PET Projects - petSD+

petSD+ - Software

Introduction

This page gives an overview of the functions available in petSD+, these functions are executed from the microcontroller flash memory, so should more correctly referred to as Firmware. I have called this page "Software" to differentiate it from the Firmware programming page.

 

petSD+ Overview

The diagram below shows a simplified block diagram of a fully featured petSD+  

 

For a more comprehensive description of the individual components, see the hardware page.

For more details on Fuse Configuration and the Boot Loader, see the Firmware page.

 

petSD+ Application Code : NODISKEMU

Nils has named the application (firmware) program running in petSD+ "NODISKEMU", at first glance, this might seem to be an odd name for what appears to be a disk drive emulator for the PET. In fact, NODISKEMU does not emulate any particular vintage Commodore disk drives or their internals, including their inbuilt CPUs, not does it run any version of Commodore DOS.

It is just a storage solution that is capable of responding to low level Commodore BASIC functions such as OPEN or TALK and interprets commands sent to channel 15 in a way similar to other drives. The deeper meaning of this name is to clarify that there actually are, and always will be, some differences to real floppy drives.

The NODISKEMU firmware is based on sd2iec, created by Ingo Korb (et al.), the most common use for this firmware is in the emulation of a Commodore 1541 disk drive for the Commodore 64 computer, but Nils has added support for the parallel  IEEE-488 disk drives used with the PET/CBM range.

sd2iec is open source, released under the GNU GPL license and is available from the Git repository here. Unfortunately, there isn't a manual for sd2iec, although some information is available from the README file in the archive and some more "user friendly" information has been posted to the sd2iec page on the C64 wiki.

Quoting from the wiki, some features relevant to the PET are :

  • D64/D71/D80/D81/D82 image file support
  • PRG/P00 etc. support
  • Limited REL support
  • Supports FAT long file names
  • Supports FAT12/FAT16/FAT32 formatted SD and SDHC cards
  • Supports most typical IEC functions (LOAD, SAVE, OPEN, GET, PUT, CLOSE, ...)
  • Real Time Clock (RTC) support

In normal operation, petSD+ is mainly concerned with passing data between the host computer and the SD Memory card over the IEEE-488 bus under the control of the application code in the MCU Flash Memory. It is not necessary for the user to understand the processes going on to support these activities, but some awareness of the EEPROM storage area may be useful.

The EEPROM storage area has two uses in petSD+ :

  • Preserving the state of user configurable options, such as the IEEE-488 bus address
  • Providing a small, non-volatile file area for user file storage

Note: the Real Time Clock settings are preserved by the RTC itself, provided that the CMOS battery is present

User Settings

When the user elects to Save Settings from any of the LCD control screens, the EEPROM is updated with a new set of user configuration settings, it is not possible to update a single parameter.

 

EEPROM File System (From the NODISKEMU README)

*WARNING*: The EEPROM file system is a newly-implemented file system that may still contain bugs. Do not store data on it that you cannot afford to lose. Always make sure that you have a backup. Also, the format may change in later releases, so please expect that the partition may need to be erased in the future.

Devices running NODISKEMU always have an EEPROM to store the system configuration, but on some devices this EEPROM is much larger than required. To utilize the empty space on these devices (currently any microcontroller with at least 128K of flash), a special EEPROM file system has been implemented. This can for example be used to store a small file browser or fast loader so it can be used independent of the storage medium that is currently inserted.

The EEPROM file system does not support subdirectories. It can be formatted using the N: command as usual, but the disk name and ID are ignored. The capacity of the EEPROM file system varies between devices: On AVR devices, such as petSD+, it is 3.25 KBytes and at most 8 files can be stored on it. The actual number of files that can be stored depends on the length of the files, longer files need more than one directory entry.

 

 

 

 

mailto: Webmaster

 Terms & Conditions