Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

SID Jukebox Disk Creator

This script automates the process of organizing large collections of .sid music files into Commodore 64 .d81 disk images. It handles filename conversion, ensures unique names to avoid conflicts, and can optionally include a SID player program on every disk.


🚀 Features

  • Batch Processing: Scans a folder and distributes files across multiple 800KB .d81 images.
  • C64 Compatibility: Automatically sanitizes filenames to uppercase and removes illegal characters.
  • Collision Avoidance: If two files result in the same name (e.g., Last_Ninja_1 and Last_Ninja_2 both becoming LAST_NIN.SID), the script appends a suffix like _1, _2, etc.
  • Player Integration: Automatically writes a SID player (like sidplay64.prg) to each disk.
  • Smart Capacity: Monitors remaining blocks to ensure disks aren't overfilled.

🛠️ Prerequisites

To use this script, you must have the VICE emulator tools installed on your system (specifically c1541).

Linux (Ubuntu/Debian):

sudo apt-get install vice

macOS:

brew install vice

📖 Usage

  1. Make the script executable:
chmod +x sid_player_d81.sh
  1. Run the script:
./sid_player_d81.sh <sid_folder> [base_name] [player_file]

Arguments:

  • <sid_folder>: The directory containing your .sid files.
  • [base_name]: (Optional) The prefix for the generated disks (default is SIDJUKE).
  • [player_file]: (Optional) The path to your C64 SID player .prg.

Example:

./sid_player_d81.sh ./MyMusic Collection1 sidplay64.prg

This will generate Collection11.d81, Collection12.d81, etc., each containing the player and as many SIDs as will fit.


📂 How it Works

  1. Format: Creates a fresh D81 image using c1541.
  2. Player First: Copies the player PRG to the disk first to ensure it's easily accessible in the directory.
  3. Sanitization: Converts "Krakout_Theme.sid" → KRAKOUT.SID.
  4. Unique Check: Before writing, it reads the disk directory. If the name exists, it generates a variation (e.g., KRAKOU_1.SID).
  5. Overflow: When the disk reaches the MIN_FREE_BLOCKS limit (default 50), it closes the disk and starts a new one.

⚠️ Technical Notes

  • File Limits: The script targets 8.3 filename formats for maximum compatibility with various C64 file browsers, though D81 supports up to 16 characters.
  • Disk State: The script uses a brief "micro-pause" and forced disk re-reads to ensure c1541 provides an accurate directory listing during high-speed batch processing.

Would you like me to add a section on how to customize the block limit or filename length?

About

SID Jukebox Disk Creator

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages