<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">Short:        Attach PSID header to a ripped (prg) tune
Author:       iAN CooG/HVSC, Morphos port by Fabrizio "Lanch" Bartoloni
Uploader:     lanch tiscali it (Fabrizio Bartoloni)
Type:         misc/emu
Version:      0.64
Architecture: ppc-morphos


PRG2SID 0.64 (/) iAN CooG/HVSC
Automatically attaches a PSID header to a ripped (prg) tune.

Identifies some players and sets init/play accordingly, also patches
the header/code if needed.

Default init/play addresses are $1000/1003 (actually loadaddress/loadaddress+3)
and are set like that for all unknown players.

Usage: p2s &lt;filename.prg&gt; [new_load_addr]

Output name will always have input base name plus .sid extension, whether
input name has an extension or not. If input file is already a PSID/RSID file,
won't be processed.

You can override the loadaddress by specifying the new one as 2nd parameter, to
avoid the need to cut the file manually up to the music file start address.

For example if you have an unpacked prg ranging from $0801 to $9fff generated
by UNP64, and the music is located at $1000, use:

p2s your_unpacked_file.prg $1000

New loadaddress must be contained between real loadaddress and end file address,
and can be specified in decimal or hex (use prefix $ or 0x). It will be ignored
if the value is out of range.


Identified players (assuming loadaddress is $1000):

20CC v1          - 0ffa/10xx, variable, adds init at $0ffa, 3 versions
20CC v2          - 0ffb/1000, adds init at $0ffb
AMP 1.x          - 13xx/13xx, variable
AMP 2.x          - 157e/14ce, sometime 1568, forced jmps to 1000/1003
Arne/AFL         - 1000/1009
Audial Arts      - 0fff/1003, adds TAY at $0fff (loadaddr-1)
Bappalander      - 1000/1018
Bappalander/S.Lab- 1003/1000 SpaceLab is the same as Bappalander with diff header.
Bjerregaard      - 0fff/10xx, adds TAX at $0fff (loadaddr-1), variable playaddr
Boogaloo         - 1003/1000
Comptech 2.x/LoS - 1003/1000, if needed, else leaves 1000/1003
Cybertracker/EXE - 53a2/53e2
Deenen           - 1006/1000, can also be 1000/1003, only special case covered.
Digitalizer 2.x  - 1003/1006, normally it's 1000/1003
Electrosound     - 1b00/1a65, patches 3 jmp $ea31 and installs init at $1b00 (1)
FAME v1          - 10xx/10xx, variable
FAME v2          - 10xx/10xx, variable
FAME v3          - 1003/1000
FutureComposer   - 1000/1006, patches the unneeded inc $d020/bit $d020
FutureComposer3.x- 1000/1006, one version patched with lda #$02 before $1000
GMC/Superiors    - 18ea/14ea
GroovyBits       - 1003/1000
Guy Shavitt      - 1000/1006
Hubbard v1       - 100x/10xx, variable from 1000/1006 up to 100d/1013
Hubbard v2       - 1000/1012
JO/Vibrants v1   - 10xx/10xx, variable, often 1000/1009. adds TAX before init.
JO/Vibrants v2   - 10xx/10xx, variable, often 1003/1006
Laxity v1        - 1000/1006
Laxity v2        - 1000/1006, can have data before $1000
LordsOfSonics/MS - 1003/1000
Master Composer  - xxxx/0000, variable, usually loadaddress+0x1b (3)
Matt Gray        - 0ffa/1002, patches init at $0ffa.
MoN/JTS          - 1000/1003, actually 110a/112c, patched at $1000
MoN/RWE          - 1000/1006
MusicAssembler   - 1048/1021
MusicMixer       - 1041/107a
Parsec/LoS       - 1003/1000
PollyTracker     - 080d/0000, RSID+samples
Prosonix v1      - 1000/1009
Prosonix v2      - 1000/1009
Prosonix v3      - 1000/1006
SidDuzzIt 0.98   - 0fff/1003, adds TAX at $0fff (loadaddr-1)
SidDuzzIt 2.07   - 0fff/1003, adds TAX at $0fff (loadaddr-1)
Soedesoft v1     - 1000/1106, 1029/1106 actually, removes CLI and jmp $ea31
Soedesoft v2     - 1000/1006, removes CLI
Soedesoft v3     - 1003/1006
Sosperec         - 10fc/1100, adds TAX+jmp $1103 at $10fc
System6581 v1    - 0ff9/0ffe, adds init/play at $0ffa-0fff
System6581 v2    - 0ff9/0ffe, adds init/play at $0ffa-0fff
TFMX/Huelsbeck   - 1009/1000
TFMX/MasterComp. - 1003/1000
TrackPlayer 3.0  - 1140/1287
Zardax v1        - 1000/1006, normally it's 1000/1003
Zardax v2        - 1000/1006, normally it's 1000/1003
Ubik's Music     - c600/c603, variable, code added for init/play (4)
XTracker_V4.1    - 1003/1000, 3 versions
ReflexTracker    - c006/0000, RSID+samples
Soundmaker3/UA   - 1000/1006  (5)
Soundmaker4/Arne - 1000/1006 or 1020/1026
SoundMonitor     - c000/c020, adds init at $c000, patches JMP $ea31 with RTS (2)
DUSAT/RockMon2   - c000/0000, RSID+samples, patch at $c000 (2)
DUSAT/RockMon3   - c000/0000, RSID+samples, patch at $c000 (2)
DUSAT/RockMon3h  - ce30/0000, RSID+samples (2)
DUSAT/RockMon4   - 9fd0/0000, RSID+samples (2)
DUSAT/RockMon5   - c000/0000, RSID+samples, patch at $c000 (2)
MusicMaster1.3/BB- c000/0000, RSID+samples, patch at $c000 (2)
Rockmon/Gaunt    - c000/0000, RSID+samples, patch at $c000 (2)

(1)
Electrosound tune speed must be manually found from the prg being ripped.
Search for STA $02ff or POKE 767. The default setting is for one subtune, the
value is at $1b15 and must be changed with the correct speed. For more subtunes
just add the speed values after $1b15 as it's indexed with the subtune number.

(2)
Special cases with fixed init/play address but variable loadaddress.

(3)
scans whole file to find the entry pattern, AD 04 D4 29 FE 8D 04 D4 etc,
then patches some CLI.
Clean with Sidclean to remove unneeded data, but that goes without saying for
every ripped sid, right? ;)

(4)
scans whole file to find the entry pattern AD xx xx 30 03 D0 22 60 18 29 7F A2,
usually at $c666, then patches an init/play routine at $c600/c603.

(5)
A-Man/5_Dimension is also identified as Soundmaker3/UA due to generic ID.
</pre></body></html>