Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user NoobTracker ! (Registered 2021-04-13) You are not logged in 
CSDb User Forums


Forums > C64 Composing > SIDedit on Linux
2021-03-08 11:53
El Topo

Registered: Jun 2006
Posts: 43
SIDedit on Linux

I tried to install and run SIDedit on Trisquel Linux 9.0 (Ubuntu knock-off) last night. Easy I thought, Perl runs everywhere. This was wrong, I ran into a wall when the script started throwing errors about variables that had to be initialized.

Is there any hope of this code seeing an update or should I shell out and buy new hardware and a Big Boy OS? :)
2021-03-08 11:54
El Topo

Registered: Jun 2006
Posts: 43
Are there any alternatives to this program by the way? It's hard to search for, to many false positives.
2021-03-08 11:58
Frantic

Registered: Mar 2003
Posts: 1497
What is it that you want to do, more specifically?

If a file already has a psid header, modifying it in a hex editor is doable. Adding a psid header (using an assembler, for example) isn't super difficult either, but it all depends on whether you know how to use an assembler etc.

If you want to modify the psid header in a hex editor, you can find the offsets to where various pieces of information is stored in the header here:
https://fossies.org/linux/vice/src/hvsc/psid.h
2021-03-08 12:12
El Topo

Registered: Jun 2006
Posts: 43
I found some Voicetracker 4 songs on a floppy from the early 90's that I thought could be fun to make SIDs of. I don't know who made them so they might already be in HVSC.

I guess I could ask someone who have a working SIDedit if they want them.
2021-03-08 15:37
iAN CooG

Registered: May 2002
Posts: 2857
How about writing us sending the suspect tunes?
hvsc@c64.org
I would personally take care of them =)
Anyway you can attach a sid header with Prg 2 Sid V1.00 (see summaries https://csdb.dk/release/?id=175248&show=summary#summary)
and identify them with SID Known V1.20
(oh sorry, windows only)
2021-03-08 16:26
spider-j

Registered: Oct 2004
Posts: 231
I use a shell script and acme assembler to i.e. convert Ninja Tracker PRGs to SID files and psid64 executables.

Maybe you can change it to your needs.

makesid.sh:
#!/bin/sh

# check if acme and psid64 are available
command -v acme >/dev/null 2>&1 || { echo >&2 "[ERROR] acme not installed or not in PATH variable."; exit 1; }
command -v psid64 >/dev/null 2>&1 || { echo >&2 "[ERROR] psid64 not installed or not in PATH variable."; exit 1; }

if [ "$#" -ge 1 ] && [ "$#" -le 2 ]
then
  INFILE=$1

  if [ "$#" -eq 1 ]
  then
    TITLE=untitled
  elif [ "$#" -eq 2 ]
  then
    TITLE=$2
  fi
  YEAR=`echo $(date +'%Y')`
  OUTFILE=`printf "$TITLE" | tr -s ' ' | tr ' ' '_' && printf ".sid"`

  echo "collecting data..."
  head -c 2 "$INFILE" >> initAddress
  printf "$TITLE" >> songTitle
  printf "Spider Jerusalem" >> songAuthor
  #printf "$YEAR Mayday!" >> songReleased
  printf "$YEAR Spider Jerusalem" >> songReleased
  cp -v "$INFILE" songData
  echo "compile sid file with acme crosass..."
  acme -v4 -f plain -o "../sid/$OUTFILE" psidheader.asm
  echo "building c64 executable with psid64..."
  psid64 -c -t blue -p "/home/spider/C64/tools/sidplay26w/sidid.cfg" -v -o "../psid64/" "../sid/$OUTFILE"

  echo "removing data files..."
  rm -v initAddress
  rm -v songTitle
  rm -v songAuthor
  rm -v songReleased
  rm -v songData
else
  echo "[ERROR] parameter error."
  echo "correct usage:"
  echo "./makesid.sh FILENAME \"SONGTITLE\""
  echo "ATTENTION: if no title is given"
  echo "the title and output filenames will default to:"
  echo " untitled.sid / untitled.prg "
  echo "old files with those names will be overwritten!!!"
  exit 1;
fi


psidheader.asm
; --------- SID File Format Headerdata
*=$00
  ; PSID Header
  !byte $50, $53, $49, $44
*=$04
  ; version: PSID v2NG
  !byte $00, $02
*=$06
  ; dataOffset
  !byte $00, $7c
*=$08
  ; loadAddress ( = $0000 in PSID)
  !byte $00, $00
*=$0a
  ; initAddress ( get from file )
  !bin "initAddress",1,1
  !bin "initAddress",1,0
*=$0c
  ; playAddress ( lowbyte = $03, highbyte from initAdress file )
  !bin "initAddress",1,1
  !byte $03
*=$0e
  ; songs ( number of songs = 1 )
  !byte $00, $01
*=$10
  ; startSong
  !byte $00, $01
*=$12
  ; speed ( 0 for VIC irq )
  !byte $00, $00, $00, $00
*=$16
  ; <title>
  !bin "songTitle"
*=$35
  !byte $00
*=$36
  ; <author>
  !bin "songAuthor"
*=$55
  !byte $00
*=$56
  ; <released>
  !bin "songReleased"
*=$75
  !byte $00
*=$76
  ; flags ( $24 for PAL, 8580 )
  !byte $00, $24
*=$7c
  ; <data>
  !bin "songData"
2021-03-08 21:22
El Topo

Registered: Jun 2006
Posts: 43
Thanks for your replies iAN CooG and spider-j. The script might come in handy once I wrap my head around this SID stuff. For now I think I'll send the tunes to HVSC and let people that know what they're doing look at them :)
2021-03-08 22:27
iAN CooG

Registered: May 2002
Posts: 2857
Thanks for the sending, 4 missing tunes by Trident were safely rescued from the disk, rest are barely identified (some blocks of good data between bad sectors) or known ones.
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
theK/ATL
Stryyker/Tide
AlexC
Fuzz/Retro64
NoobTracker
zscs
Andy/AEG Soft
jeroen1328
Guests online: 94
Top Demos
1 Edge of Disgrace  (9.6)
2 Coma Light 13  (9.6)
3 Uncensored  (9.6)
4 Unboxed  (9.6)
5 Comaland 100%  (9.6)
6 Lunatico  (9.6)
7 Memento Mori  (9.6)
8 Christmas Megademo  (9.5)
9 We Love to Party  (9.5)
10 The Shores of Reflec..  (9.5)
Top onefile Demos
1 Copper Booze  (9.8)
2 To Norah  (9.7)
3 Lovecats  (9.6)
4 Square Booze  (9.5)
5 Daah, Those Acid Pil..  (9.5)
6 Elite Code Mechanics  (9.5)
7 Dawnfall V1.1  (9.5)
8 No Mercy for the Tro..  (9.4)
9 Quadrants  (9.4)
10 Babbo Maiale  (9.4)
Top Groups
1 Booze Design  (9.4)
2 Fossil  (9.4)
3 Censor Design  (9.3)
4 Oxyron  (9.3)
5 PriorArt  (9.3)
Top Musicians
1 Rob Hubbard  (9.8)
2 Jeroen Tel  (9.6)
3 Linus  (9.5)
4 Drax  (9.5)
5 Martin Galway  (9.5)

Home - Disclaimer
Copyright © No Name 2001-2021
Page generated in: 0.057 sec.