Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
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: 1627
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: 3132
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 Prg2Sid 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: 445
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: 3132
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
Peacemaker/CENSOR/Hi..
MaD ][/Starship
Guests online: 131
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Bromance  (9.6)
10 Memento Mori  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.8)
4 Acidchild  (9.7)
5 Starlight  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.042 sec.