ZuluIDE / ZuluIDE-firmware

ZuluIDE emulates a parallel ATA ATAPI CD-ROM drive, or parallel ATA Zip/Removable (read and write) media
https://zuluide.com
Other
27 stars 2 forks source link

ZuluIDE™ Firmware

ZuluIDE™ is a hardware interface between IDE bus and SD cards. Currently it supports emulating ATAPI CD-ROM drives, Zip Drive 100, and a generic removable drive by providing access to image files stored on SD card.

Drive Types

There are three ways to specify drive type 1) In the zuluide.ini file under [IDE] set Device = "[Type]"

Image files

Any file on the ignored list will not be used as an device image.

Cycling Images

Currently the only way to cycle to the next image for a removable device is the eject the medium via the operating system. This will load the next valid file in alphabetic order.

Log files and error indications

Log messages are stored in zululog.txt, which is cleared on every boot. Normally only basic initialization information is stored, but switching the DEBUG DIP switch on will cause every IDE command to be logged, once the board is power cycled.

The indicator LED will normally report disk access. It also reports following status conditions:

In crashes the firmware will also attempt to save information into zuluerr.txt.

Hotplugging

The firmware supports hot-plug removal and reinsertion of SD card. The status led will blink continuously when card is not present, then blink once when card is reinserted successfully.

Programming & bootloader

For RP2040-based boards, the USB programming uses .uf2 format file that can be copied to the virtual USB drive that shows up in USB bootloader mode, which is enabled with DIP switch.

DIP switches

There are 3 DIP switches on board:

  1. CABLE SEL: Enable cable selection of IDE drive id
  2. PRI/SEC: When CABLE SEL is off, this DIP switch determins IDE drive id. Set to OFF for primary drive and ON for secondary.
  3. DEBUG: Enable debug log messages

In addition to the DIP switches, there is a momentary-contact button, labeled BOOTLDR. If the bootloader button is held down at power-on, the board will not load its firmware, and will instead boot the in-ROM bootloader, and will wait for a .uf2 file to be copied to it via USB.

In hardware revisions before PCB Rev 2023e there is a fourth DIP switch for BOOTLDR instead of a button.

Project structure

Building

This codebase uses PlatformIO. To build run the command:

pio run

Debugging with picoprobe

There are helper scripts in utils folder for debugging the code using picoprobe:

In gdb, use load to upload the firmware and run to restart from beginning.

Theoretically you can also use the platformio pio debug command, but currently it doesn't seem to work with picoprobe.

Origins and License

This firmware is original work developed by Rabbit Hole Computing™. It is closely related to ZuluSCSI, but starts from fresh beginnings.

The firmware code is licensed under the GPL version 3 or any later version.

The RP2040 platform utilizes a separate ICE5LP2K FPGA for IDE bus communication. Bitstream for the FPGA is provided in binary format and is licensed for free use and distribution on hardware produced by Rabbit Hole Computing™. Communication between the FPGA and the CPU uses QSPI interface documented in rp2040_fpga.h.

Ignored List

Any file that starts with zulu is ignored

The following common compression extensions are ignored: ".tar", ".tgz", ".gz", ".bz2", ".tbz2", ".xz", ".zst", ".z", ".zip", ".zipx", ".rar", ".lzh", ".lha", ".lzo", ".lz4", ".arj", ".dmg", ".hqx", ".cpt", ".7z", ".s7z"

The following document extensions are ignored: ".cue", ".txt", ".rtf", ".md", ".nfo", ".pdf", ".doc"