Computers Overview
Commodore PET
    Adverts
    Articles
    Documents
    Options
    Photos
    Projects
        Documents
        PET ROMs
        petSD+
            Alternatives
            Assembly
            Feedback
            Firmware
            Hardware
            History
            IEC (for C64)
            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
Atari ST
Commodore Amiga
PDAs
DEC 3000 AXP
OpenVMS
Raspberry Pi

 

 
 
 

Commodore PET Projects - petSD+

petSD+ - IEC Support

Getting from this to this
Photo : Wikipedia    

 

Introduction

As its name indicates, petSD+ was designed to allow Commodore PET/CBM computers to use SD media for removable storage; like PET floppy disk drives, petSD+ connects to the PET's IEEE-488 interface. The PET IEEE-488 interface is based on the original IEEE-488/GPIB interface and uses an 8-bit parallel data bus. Later Commodore computers, such as the C64, used an 8-bit serial bus, using a communications protocol based on IEEE-488.

Devices based on the sd2iec firmware are available that provide an SD card storage solution for C64 computers, including the SD2IEC hardware device, or non sd2iec based devices such as Ultimate II or the UK1541.

Given the availability of existing SD card solutions for the C64, there was no intention to include C64 compatibility with petSD+ until a specific request was made from one buyer who wanted to use petSD+ with a C64.

When Nils was asked about the possibility of using petSD+ with a C64, he felt that "it should be rather easy to build an adapter cable to use the petSD+ with a custom firmware with the C64. With a little more effort, it should be possible to switch menu driven between the serial IEC bus and the parallel IEEE-488 bus at runtime."

Nils has now built and tested a suitable cable and has integrated IEC support into the petSD+ firmware.

IEC to petSD+ Cable 

The IEEE-488/GPIB signal lines consist of eight data lines, three handshake lines, and five management lines.

Connector pin assignments are standardized as shown. 1

The Commodore 64 uses a serial version of the bus
Pin 1 /SRQ-IN Serial Request-in (not used by C64)
Pin 2 GND Ground
Pin 3 ATN Attention
Pin 4 CLK Clock
Pin 5 DATA Data
Pin 6 /RESET Reset

Cable configuration for petSD+ to Commodore Serial Port

(Serial port pin out as viewed from the rear of the plug)
Directory listing from my C64 using BASIC V2.

BASIC 2 doesn't have the disk handling features of later versions, so legacy commands are needed to access the disk.
e.g. LOAD"$",8
followed by LIST
to display the disk directory
And, by way of example . . . .

The Hobbit, running on my C64, loaded from petSD+

 

Toggle IEEE-488 / IEC Mode

The petSD+ menu is used to toggle the operating mode between IEEE-488 and IEC modes
From the main menu, scroll down to the second page of the menu until you see the
    "Select IEC/IEEE-488" option
Press Sel to select that menu entry

A submenu with the two entries IEC / IEEE-488 will appear.
Position the cursor on the required option and press Sel

"IEC" for serial interfaces, e.g., the Commodore 64, or
"IEEE-488" for parallel interfaces, i.e., a PET
The Save Settings dialogue will be displayed
Position the cursor on the required option and press Sel
Selecting yes will save the setting to Flash and will persist through reset or power cycles
 
  
Limitations

The first release of NODISKEMU to support IEC bus communications was dated 15/03/2016

At first release, Fast Loaders were not supported, only the slower standard kernal routines worked (400 bytes/sec).

Update : 12/04/2017 Fast Loader Support added with Firmware Version 2017/04/05

From the Firmware Release Notes :
Fix IEC fastloader for petSD+

The AVR fastloader code is hardcoded for 8 MHz and running the device at other speeds breaks the timing and thus the support of fastloaders.

But the device can not run at 8 MHz because that would be too slow to respond in time to the IEEE-488 ATN signal.

To fix this, a CPU clock prescaler is introduced to run at 8 MHz when in IEC mode and at 16 MHz when in IEEE-488 mode. Replace the crystal on your petSD+ with a 16 MHz type to benefit from this commit.

However, take care not to damage the PCB when you exchange the crystal!

petSD+ devices shipped after 01/05/2017 have the 16MHz oscillator fitted and are "JiffyDOS Ready"


Update : 28/05/2017 Fast Loader (JiffyDOS) Speed Tests


When I first tried the enhanced petSD+ firmware with JiffyDOS, I knew that it "felt" much faster, but wanted to try and quantify the speed improvements. To that end, I tried loading a few games using a petSD+ with the previous firmware under Commodore DOS, then repeated the loads using a modified petSD+ and JiffyDOS. In short, the speed improvement is almost incredible!

Game Original petSD+
Commodore DOS
Modified petSD+
JiffyDOS
The Hobbit 90 seconds 7 seconds
Galaxions 33 seconds <2 seconds
Galaxian 16 seconds <2 seconds

Upgrades

Upgrading petSD+ devices shipped prior to 01/05/2017 to work with the Fast Loader compatible firmware is quite straightforward, but in addition to replacement of the 18.432MHz oscillator with a 16MHz one, the MCU must be programmed with an upgraded boot-loader. Again, this is a simple task, but requires a programmer for the MCU.

If you don't have the tools to carry out the upgrade for yourself, then I will upgrade petSD+ devices that I built free of charge, if you cover the cost of postage. Drop me an e-mail if you want me to do the upgrade for you and we can make the arrangements.



Popularity

There are very few known users of petSD+ IEC mode, if you are using it, please let me know so that I can update this table

User Country User Country User Country User Country
DS β uk PD β nl MU de CH de
RB uk -- -- -- -- -- --
-- -- -- -- -- -- -- --

          User's marked " β" are running "JiffyDOS Ready" version of the boot-loader.



References :

1 Contec.com Basic Knowledge and Glossary for GPIB Communication

2 Github The Commodore IEC Bus

 

mailto: Webmaster

 Terms & Conditions