|
Post by gumpy on Mar 26, 2007 11:00:59 GMT -5
Hi folks, I downloaded the High Voltage Sid Collection a few days ago and I am wondering if there is a way to play these SIDs on a real c64? I'm using PlaySid for Windows to play them now. PlaySid can give you the LOAD address and the PLAY address for the sids. I've tried BLOADING them into memory on the c64 and then SYS the play address, but all I get is a crash. Is what I am trying to do even possible or I am doing something wrong? I'd like to find out, because it would be really cool if I could use some of these .SIDs in my own basic programs, by BLOADING them in and then calling them with an SYS or two.
|
|
|
Post by Robin Harbron on Mar 26, 2007 13:57:29 GMT -5
This program, or another one like it that I can't find now, will allow you to play many of these files on a real 64: noname.c64.org/csdb/release/?id=44876With some work, I'm sure you could get many SIDs running from your own programs, but there isn't a simple one-size-fits-all type solution.
|
|
|
Post by MadModder on Mar 26, 2007 14:06:11 GMT -5
|
|
|
Post by Robin Harbron on Mar 27, 2007 12:28:38 GMT -5
This thread over in another section is very much related to this question. Really cool!
|
|
|
Post by gumpy on Mar 27, 2007 13:41:36 GMT -5
Ok, thanks guys. I will check out the programs mentioned above.
|
|
|
Post by megaboz on Dec 13, 2007 0:10:57 GMT -5
Hi folks, I downloaded the High Voltage Sid Collection a few days ago and I am wondering if there is a way to play these SIDs on a real c64? I'm using PlaySid for Windows to play them now. PlaySid can give you the LOAD address and the PLAY address for the sids. I've tried BLOADING them into memory on the c64 and then SYS the play address, but all I get is a crash. Is what I am trying to do even possible or I am doing something wrong? I'd like to find out, because it would be really cool if I could use some of these .SIDs in my own basic programs, by BLOADING them in and then calling them with an SYS or two. I realize this is an old thread, but just in case you are ever interested in incorporating SIDs into your programs (past just playing them standalone with psid64) (apologies if this info is posted somewhere else on the board) - There are a couple of things to remember. 1. SIDs are simply executable code, which means the SID file must be loaded into memory at its original address, lest the absolute address calls in the program lead to who knows where and crash. A PSID file (All the ones from HVSC) will have a header in front of the SID executable that will show the initial address. The SID header can be found here: search.cpan.org/src/LALA/Audio-SID-3.11/SID_file_format.txt 2. After ensuring it goes in at the correct address (sans the PSID header), you also have to ensure the memory the SID code uses isn't overwritten/touched by the rest of your program. There are more flags in version 2 of the PSID header that tell you how much/which memory the SID can use (sometimes there is no range and you simply cannot use the SID). It tends to just be the start address of the SID to the size of the executable code. Ensure that you reserve this memory JUST for the SID and nothing else touches it. 3. At this point, your SID is in the right location, now you're ready to make your calls. Your PSID header will give you two addresses, one for the initialization of the SID (sets up variables and whatnot, can do nothing), and one for the play. The init you call once to get things ready, and the play you call repeatedly. You must also pass the song number you wish to play into the init function (zero indexed, 0 = song 1), and must time calls to the play function properly, both which are much better done with assembly than BASIC. Thats it in a nutshell. Now, this assumes that you are dealing with a known SID ahead of time and can format your memory accordingly. If you're looking for a one-size-fits-all, its not possible (as mentioned above). However, a lot of SIDs tend to load in at $1000 or around there, which means if you have a lot of memory free in your program, you can reserve the first 10K or so (after your initial program loader) just for the SID file. Then, you can dynamically link your SID in by replacing your absolute JSR calls in your wrapper functions with indirectly referenced JMP calls to init/play addresses read in from the header in your program, and manually pushing the address (minus 1 for the PC increment) of the next instruction of your init/play wrapper functions onto the stack. Then the RET calls will work okay, and you've got a dynamic SID player for any SIDs that make use of only the first 10K of RAM (or however much ram you want to dedicate).
|
|