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
                Start
                Controls
                Operation
                LCD
                Commands
                Error Codes
    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+ - User Guide

 

W A R N I N G S
 
Connection / Disconnection
* * * Power OFF the PET/CBM and petSD+ before connecting or disconnecting petSD+ from the computer * * *
 
SD Card Insertion / Removal
* * Ensure that the Card Access LED (see below) is OFF before installing or removing the SD Card * *

petSD+ Operation

Both the internal and external versions of petSD+ can be controlled from the PET/CBM using native DOS (4.0) commands, but usage is much easier if a DOS Wedge is loaded. (DOS 2.0 can also be used, but I have not done this as I only have a DOS 4.0 machine available.) For the additional features available if the LCD option is fitted, see the next page.

At its simplest, petSD+ acts like a Commodore floppy disk system with a single drive installed, it can be used instead of, and alongside, vintage floppy disk drives. A complete description of how to use a Commodore disk is beyond the scope of this page, for full details, see the Commodore Disk System manuals on my PET Documents page.

This page gives brief summary of the most common BASIC commands used to save and load programs and files from petSD+. Commands shown on this page are compatible with Commodore BASIC 4, the corresponding DOS wedge commands are also given. In many cases, there is more than one way to achieve the same result. The petSD+ firmware (NODISKEMU) also includes enhancements from sd2iec which provide a number of features beyond those present in Commodore DOS (see this page for details).

As noted on my Disk Commands page, at the lowest level, the syntax used to communicate with a disk device is very much like file I/O operations used in other systems, e.g., "opening" the device, doing some operation and "closing" the device. By the time that BASIC 4.0 was released, many of the low level operations were available using BASIC keywords such as DLOAD, but sending other low level commands from the computer to the Disk Controller was still performed using the Command Channel (#15).

In the examples shown, the default petSD+ device address (#8) is assumed and the text is in lower case mode as used on my CBM 8096.

BASIC 4.0 DOS wedge Comments
print ds$   @ Get the status of the last disk command
directory   @$ Get a directory of the current disk (non-destructive)
load "$", 8   (Pre-BASIC4, destroys the program currently in memory)
     
load "*", 8   Load the first BASIC program found on the disk
dload "filename"   /filename Load the named BASIC program
load "filename", 8   /filename Load the named BASIC program (pre-BASIC 4)
  (n/a)   ↑filename Load the named BASIC program and run it
      
dsave "filename" Save the named BASIC program
save "filename", 8   Save the named BASIC program (pre-BASIC 4)
     
  (n/a)   #  Display the current device number *
  (n/a)   #9  Change the device number (8-11) *
 * These commands set/display the target device for the Wedge commands, they do not change petSD+ 

 

petSD+ Enhancements

Significant enhancements available from sd2iec based devices such as petSD+ include :

  • support for sub-directories

  • support for disk images formats, including .D64, .D41, .D71 and .D81.

Access to these features is done using the Command Channel (#15)

BASIC 4.0 DOS wedge Comments
open 1,8,15,"cd:dir" : close 1 @cd:dir Change to directory called "dir"
open 1,8,15,"cd←" : close 1 @cd← Change back to the parent directory
open 1,8,15,"cd:image.d64" : close 1 @cd:image.d64 Load the image file called "image.d64"
open 1,8,15,"cd←" : close 1 @cd← Close an open disk image file

To reiterate : instructions from the PET to petSD+ takes place over the Command Channel and require that you enter a properly formatted DOS command string

OPEN <file number> , <device number> , <secondary address>, <command string>

e.g. 1

default = 8

channel 15

"a legal command"

When using a DOS Wedge, the same applies, the wedge just sends the string after the "@" prefix to petSD+ command channel without any further formatting or error checking, but is much less unwieldy than formatting BASIC commands. However, DOS Wedge commands only work in immediate mode, they will not work from inside BASIC programs.

 

petSD+ User Interface  <  Previous Page   Goto   Next Page  >  LCD Functions

 

 

References :-

sd2iec home page

sd2iec boot-loader readme file from the boot-loader archive file

C64 Wiki - sd2iec firmware page

petSD+ home page

Nils Eiler's DOS Wedge home page

Tynemouth Software Blog - pet MicroSD User Guide

 

mailto: Webmaster

 Terms & Conditions