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 Productions > SIDBlaster
2025-05-04 19:33
Raistlin

Registered: Mar 2007
Posts: 722
SIDBlaster

A little early perhaps to put here on CSDb as a full release .. but for anyone interested, here's a new tool from me:-

https://github.com/RobertTroughton/SIDBlaster

I have big plans with this.. main features right now (may be buggy!) are:-

- ability to add simple players to SIDs <-- later on of course this will allow full visualisers, SID information and more

- relocation of SIDs. The process used for this is very different to other relocators that I've seen. I essentially do a 10mins emulation of the CPU, running through the SID, checking what's data, what's code, what's read from, what's written to, etc... detecting indirect reads, and where the vectors for those come from ... dealing with "backups" of those vectors and all that nastiness. It's far from perfect .. but it works already with many SIDs and I'll look at other SIDs to see how easy those will be to fixup.

Next tasks:-
- exposing more information to players/visualisers
- allowing import of information/defines from txt files to pass to the visualisers
- adding an "insanity check" to the relocator - so I'll do 10mins' emulation of the SID before and after relocation, recording all the $d4xx writes and making sure they tally up.

Much more to be done ... feedback is of course welcome.

Windows/Ubuntu/Mac releases are there .. though I've only tested Windows - hopefully the others "just work"??
 
... 7 posts hidden. Click here to view all posts....
 
2025-05-05 17:25
Stone

Registered: Oct 2006
Posts: 176
Quoting hedning
My thought exactly. I actually own one. :) https://cbmretro.fi/product/sidblaster-usb-nano/


I even made a driver for it back in the day, available here on csdb SIDBlaster USB driver BETA

I think this version is obsolete though.

Quoting Raistlin
relocation of SIDs. The process used for this is very different to other relocators that I've seen. I essentially do a 10mins emulation of the CPU, running through the SID, checking what's data, what's code, what's read from, what's written to, etc... detecting indirect reads, and where the vectors for those come from



Not sure how LFT does it in Sidreloc V1.0 but this sounds similar to what I did in SIDdecompiler V0.8 I basically create (through emulation) a graph for each value that is written to the SID chip and by traversing that and applying some heuristics, I try to determine which are vectors that should be relocated. I found that some drivers need to be page-aligned to some extent, e.g because of self-modifying code where only the low-byte is changed in the vector. It's a very interesting project, for sure!
2025-05-05 18:47
Raistlin

Registered: Mar 2007
Posts: 722
Quoting Stone
e.g because of self-modifying code where only the low-byte is changed in the vector


Yep, exactly this. I mentioned this oddity just above. I do plan to tackle this one eventually as well though so that relocation still works without restricting to whole pages .. but I'm not there yet.
2025-05-05 18:52
Raistlin

Registered: Mar 2007
Posts: 722
Quoting Stone
this sounds similar to what I did in SIDdecompiler V0.8


Interesting! That does sound very similar indeed, actually..! We look to have very similar commandline options too.

It's a fun project to work on so I'm definitely going to push ahead and see if I can get the relocation working solidly.
2025-05-05 21:43
Bansai

Registered: Feb 2023
Posts: 51
Quoting Raistlin

Quoting Burglar
I'm wondering about the relocating bit, I'm a huge fan of lft's Sidreloc V1.0, which hasn't failed me yet. So, why a new tool?


So, long-term, if I can get more SIDs to be -fully- relocatable, to the point where the generated ASM can be hand-edited without problems.. then that opens up a truckload of options. Optimisation. Direct hooks for visualisers. Etc etc.


SIDdecompiler has worked great for me. Relocation cases that I've come across somewhat often that need human intervention are optimized pointer math where the upper byte of a 16-bit pointer is skipped. Addresses used as data are another fun one. Fortunately, it's not typical. :-) This is from Beyond.sid (Michael Hendriks) using the FAME player:
 957                   L_D_0EFD_TEST
 958                   .ifne L_D_0EFD_TEST-$0EFD
 959                   L_D_0EFD_RELO_PATCH ; L_ARPTAB_LO data were abused to provide filtering enables, and we need these constants, otherwise the code isn't relocatable
 960                                       ; $11 gives low pass filtering, bad values will write 1 to bit 7 of $d418 turning off voice 3
 961                    .byte $11,$14,$17,$1A,$1D
 962                   .endif
 963                   .ifeq L_D_0EFD_TEST-$0EFD
 964                    L_D_0EFD_RELO_PATCH
 965                   .endif
 966
 967                   L_ARPTAB_LO ; from 60-7D block command, writes into EFFTAB[0] table!
 968 0efd 11 14 17 1a   .byte <L_ARP_037,<L_ARP_03A,<L_ARP_035,<L_ARP_03C,<L_ARP_0180
     0f01 1d
 969                   L_ARPTAB_HI
 970 0f02 0f 0f 0f 0f   .byte >L_ARP_037,>L_ARP_03A,>L_ARP_035,>L_ARP_03C,>L_ARP_0180
     0f06 0f
 971                   L_ARPTAB_LEN
 972 0f07 03 03 03 03   .byte $03,$03,$03,$03,$03
     0f0b 03
 973                   L_ARPTAB_RPT
 974 0f0c 00 00 00 00   .byte $00,$00,$00,$00,$00
     0f10 00
 975
 976                   L_ARP_037
 977 0f11 00 03 07      .byte $00,$03,$07
 978                   L_ARP_03A
 979 0f14 00 03 0a      .byte $00,$03,$0A
 980                   L_ARP_035
 981 0f17 00 03 05      .byte $00,$03,$05
 982                   L_ARP_03C
 983 0f1a 00 03 0c      .byte $00,$03,$0C
 984                   L_ARP_0180
 985 0f1d 00 18 00      .byte $00,$18,$00
 986
2025-05-05 21:58
Burglar

Registered: Dec 2004
Posts: 1129
@raistlin, cheers for the explanation, will follow this project :)
2025-05-05 22:06
Stone

Registered: Oct 2006
Posts: 176
Quoting Raistlin

It's a fun project to work on so I'm definitely going to push ahead and see if I can get the relocation working solidly.


I Hope you do one of your write-ups on this one too. It's always interesting.
2025-05-06 19:33
Raistlin

Registered: Mar 2007
Posts: 722
Quoting Stone
I Hope you do one of your write-ups on this one too. It's always interesting.


Well, now that you mention it..!

https://c64demo.com/welcome-to-sidblaster/

And, also, while I'm here .. I added some new features today - WIP and subject to massive change - to make it easier to verify relocation work etc. It's not 100% yet but it works well enough for now.

https://github.com/RobertTroughton/SIDBlaster

PS. I will still change the name of the tool .. maybe .. but probably as I get to v1.0.
2025-05-09 17:20
Raistlin

Registered: Mar 2007
Posts: 722
Quote: RSID are not supported, it's not told anywhere, add in the readme a warning at least. Trying to relocate \MUSICIANS\T\Turbocracker_87\Crockets_Theme.sid the message is a bit vague

SIDBlaster.exe -relocate=$1000 Crockets_Theme.sid Crockets_1000.sid

Not a valid SID file!
[2025-05-05 16:50:52] [ERROR] Failed to load file: Crockets_Theme.sid

other than that, if the exe needs java to run kickass, I'm outta here. I won't install java to test if further


Hey Ian,

I've added detection for RSID on the head version now and will put in a later release .. but .. I don't suppose you can give example SIDs for the various other versions, could you..? If they exist in HVSC - maybe everything's already updated to the latest PSID version?

I might come back to RSID if there's any way to emulate it - but it sounds like it would be tricky?
2025-05-09 17:58
iAN CooG

Registered: May 2002
Posts: 3229
"RSID files require a true C64 environment and cannot be emulated by SIDBlaster."
Very well, now it's clear why the sid gets refused =) Before it seemed it was either in the wrong path or something else.

I tried a RSID to see if this new tool would support them, but apparently no tool so far emulates them to be able to relocate them.

I really don't understand what you mean by:

"I don't suppose you can give example SIDs for the various other versions, could you..? If they exist in HVSC - maybe everything's already updated to the latest PSID version?"

Which other versions? Other PSID header version?
*_2SID.sid (version 3)
f.e. HVSC\MUSICIANS\A\A-Man\Phat_Frog_2SID.sid
*_3SID.sid (version 4)
f.e. HVSC\MUSICIANS\C\Chiummo_Gaetano\Arcade_Memories_3SID.sid
2025-05-09 18:57
Raistlin

Registered: Mar 2007
Posts: 722
Thanks Ian, that's perfect. Both the _2sid and _3sid files seem to work (on the current head version at least). Interestingly, I couldn't load the _3sid file in SidPlayerW so wasn't able to audibly test it that way - but that's fine, my tool will do a before/after verify anyway so should be all good.
Previous - 1 | 2 - Next
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
Sam/Beyond Force
hedning/Gā˜…P
Krill/Plush
celticdesign/Gā˜…P/M..
Seppo Heavy
š˜š—”š—š/FairLight
lotus_skylight
BlackJack/Civitas
aegis/ascraeus/r3turn
Arcane/Glance
Hypnosis/TSD
Guests online: 102
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Coma Light 13  (9.6)
5 Mojo  (9.6)
6 Signal Carnival  (9.6)
7 Edge of Disgrace  (9.6)
8 In Surgery  (9.6)
9 Comaland 100%  (9.6)
10 Uncensored  (9.6)
Top onefile Demos
1 Keine Termine und le..  (9.9)
2 Nine  (9.8)
3 Layers  (9.6)
4 Cubic Dream  (9.6)
5 Party Elk 2  (9.6)
6 Copper Booze  (9.5)
7 Charflasher  (9.5)
8 Onscreen 5k  (9.5)
9 Libertongo  (9.5)
10 Dawnfall V1.1  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Oxyron  (9.3)
3 Performers  (9.3)
4 Censor Design  (9.2)
5 Artline Designs  (9.2)
Top Original Suppliers
1 Derbyshire Ram  (9.7)
2 Fungus  (9.3)
3 Black Beard  (9.2)
4 Baracuda  (9.2)
5 hedning  (9.1)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.048 sec.