News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
L

CPC Sid Player?

Started by LambdaMikel, 16:46, 15 October 19

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LambdaMikel

Anybody has a SID file player for the CPC? The sound will actually be produced by a real SID, but I need to be able to change the IO port. The SID registers are just being mapped into a range, starting from a given port.

Source code would also be fine, such that I can tweak it.

So, I am mostly asking for the SID file parsing. Another idea might be to use an open source PC program that can parse SID files, and translate this into a sequence of SID IO requests. Anybody has a sense of how difficult it is to emit a Z80 program from a SID file? Is there a lot of logic in a SID file, or is it merely stating which SID registers to set to what value at what time point?




@Targhan is it possible to do this with Arkos Tracker? Import a SID file an have it create a Z80 MC program that plays the SID at a specific IO port on the CPC?

Targhan

AT2 does not manage SID, not right now.

I don't understand what you are trying to achieve, though. There are many ways to produce SIDs, even on a AY/YM, but are you talking about that kind of SID? "sid registers" does not really mean anything. So maybe what I'll talk about here is off topic.

One thing you can do is explore the YM format by Leonard and see how SID is encoded, but the format will only give you hints about what timer to use. Then it is up to YOU to chop real-time the square envelope, via volume or the mixer (already two ways of doing SID), according to the period of the notes being played. Doing it on CPC+ helps, thanks to the timer (Offset has already an available player, one of the latest demo on CPC+ uses it... 15 years after Offset release his player (which shows how much SID raises interest...)).

On CPC old, BSC did another kind of SID, called SID-sample. Tiny samples are played. Make a search on the forum to get it. Once again, no one was really interested, sadly for BSC...
So the SID question is vast, highly technical, and basically, if you don't master assembly (and have a good ear), you won't be able to do much!
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

LambdaMikel

Quote from: Targhan on 20:40, 15 October 19
AT2 does not manage SID, not right now.

I don't understand what you are trying to achieve, though. There are many ways to produce SIDs, even on a AY/YM, but are you talking about that kind of SID? "sid registers" does not really mean anything. So maybe what I'll talk about here is off topic.



First, thanks for answering! Well, given that I am talking about a hardware SID Player,  SID REGISTERS should be pretty obvious what it means, but you can take a look at what has been accomplished so far - I just thought it might be nice to have a SID file to Z80 ASM converter for this  ;)



https://youtu.be/zLsgOHT1fmA


So, I don't care for any kind of "SID Emulation" - I just want a player that plays and uses the real thing in hardware. UNFORTUNATELY I am beginning to understand that in order to play SID files, you need to emulate 6510 / 6502...
:-X :-\ :'(


Cheers
MIchael

LambdaMikel

#3
PS Btw, I can play BASIC C64 SID "demos" simply by converting the POKE s+... to OUTs+... and change s to the right Speak&SID port address, as shown with the SID Demo in the video which I simply type in from the C64 Reference Manual. I guess that is not as easy with SID files unfortunately, because of the machine code part in them... I wish it was "data only". Like in a MIDI file. Know what I mean?

BSC

There was a SID player converted from the Enterprise 128 (or so) a few years ago which, if I am not mistaken, included a 6502 emulation to be able to play SID files (with the .sid extension).
You should easily find it using the search function of the forum.

As far as I understood, .sid files always contain a play routine in assembly, probably because there are so many different trackers available, so that's something that you most likely
will not be able to avoid. But if your emulation intercepts writes to the sid memory addresses, it should be fairly easy to send the register values somewhere else. 

I did some quick search on the webs and found this: https://github.com/simonowen/sidplay

Sounds just like to right tool for you.  ;D
** My SID player/tracker AYAY Kaeppttn! on github **  Some CPC music and experiments ** Other music ** More music on scenestream (former nectarine) ** Some shaders ** Some Soundtrakker tunes ** Some tunes in Javascript

My hardware: ** Schneider CPC 464 with colour screen, 64k extension, 3" and 5,25 drives and more ** Amstrad CPC 6128 with M4 board, GreaseWeazle.

LambdaMikel

#5
Excellent, indeed

https://github.com/simonowen/sidplay/blob/master/sidplay.asm

should be possible to adjust for Speak&SID... Thanks a lot! Will try that.

It even has something like

sam_sid_port:  equ  &d4             ; base port for SAM SID interface

Powered by SMFPacks Menu Editor Mod