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 Coding > Playing SIDs on the 64
2005-08-29 07:22
Sasq

Registered: Apr 2004
Posts: 156
Playing SIDs on the 64

So, anyone has some insights on how to make sid player as compatible as possible?

This is what I'm currently doing, and it works reasonably well:

- Put the player on $100-$180 (seems to be a bit more safe than $400). Of course it's best to use the reloc info in the SID if it exists, but often it doesn't.

- Clear all SID-regs before each subtune, except #$F -> $D418.

- Check the high nibble of the init adress, and set banking accordingly.


Things that doesnt work:

Some obviously broken SIDs, like Mikey who has its Init under ROM but still puts #$37 in $01. Playsid64 handles this though, not sure how you do that without actually checking the code for such things.

RSID. What I first thought was a good thing turns out to be stupid, since many of them put the player in the INIT and there is no way of changing song without resetting (or maybe use NMI to break it ?)
Also the ones that do install an interrupt and return like they're supposed to often break when you try to switch songs.


Thoughts, comments, anything to add?




2005-08-29 11:40
Inge

Registered: Nov 2003
Posts: 144
I perfectly understand why you get a little frustrated. While most of HVSC consist of tunes with a "simple interface" (like jsr $1000 for init, and jsr $1003 for play), there are some which requires some tweaking in one way or another.

There are probably some tunes left in HVSC that was ripped in what I would call the "psid-era". Originally, the psid-format (from Amiga's PlaySID) did allow many things that wasn't possible on a Real C64, like placing the init below ROM without setting $01. I'm very careful with the $01-settings, but that doesn't mean anyone else is.

The RSID-tunes are another problem. The RSID-format has a few minor limitations, but it's often the nature or mem-use of the tune that is the problem. I always make RSIDs in a way that will work 100% on a Real C64, but sometimes I'm forced to do some dirty tricks just to make it work in SIDplay.

The reason for putting the player in the INIT is a simple one. The RSID-format requires just the INIT and expects the init-code to set up an IRQ-interrupt for executing the player. However, with some special cases like the Berkeley Speech Engine, that won't work well, so I have to do the speech-stuff in the init code. The problem here is, of course, that the player doesn't return properly (like in some versions of Soundmonitor/Rockmonitor).

Inge, HVSC
2005-08-29 12:00
Graham
Account closed

Registered: Dec 2002
Posts: 990
@Inge: Concerning those mysterious PlaySID registers, wouldn't it be great to support something which exists in reality? The SFX Sound Sampler from Commodore has an 8 bit D/A, so instead of that PlaySID register it would be better to support THAT.
2005-08-29 12:15
Sasq

Registered: Apr 2004
Posts: 156

Galway songs seems to be some of the more problematic. Combat School and Arkanoid (RSID) doesnt return from INIT (tricky player code I guess), Mikie switches on ROM over the RAM its executing from (easy fix by changing init and play adress in sid header though), Athena uses low stack and indicates no free pages and Never Ending Story seems to do screen scrolling in the player code (and doesnt work in Playsid64).

Guess some re-ripping would be in order :)
2005-08-29 19:13
Steppe

Registered: Jan 2002
Posts: 1510
"- Put the player on $100-$180 (seems to be a bit more safe than $400). Of course it's best to use the reloc info in the SID if it exists, but often it doesn't."

If no reloc fields are set, then it's safe to assume that all the area outside of the loadrange (except for the zeropage) is safe to put your play routine handler in.

As you seem to be quite an investigative character, why not drop me an email as soon as you've found a proven fishy tune, preferrably with a hint on what exactly is going wrong? That's always appreciated and we're much more willing to fix or rerip tunes when there's a little more than "tune doesn't work". :-)
2005-08-29 21:54
Sasq

Registered: Apr 2004
Posts: 156
Thats not really true. Athena has a 0 but still puts code at 100-130. That may count as the stack and thus never included in what is considered "free" but its a good place to put the player in most cases. When all songs where converted to the new format, how did you know what to put in reloc? Maybe there should have been a value that meant UNKNOWN.

I thought I gave pretty good descrtiption on the problems with those Galway songs :) Well I can put together all I find and send a mail later.
2005-08-30 07:03
Inge

Registered: Nov 2003
Posts: 144
Combat School, Arkanoid, Game Over and Microprose Soccer use digis, and the problem is that the digiroutine goes in an infinite loop. There is a simple solution (I have thought about implementing such a thing in my rips), and that is to add a keychecker to the routine. SIDPlay won't (hopefully) do anything with it, but a real C64 will.

Mikie and Athena are probably a matter of "doing it right", and shouldn't be too difficult to fix.

When it comes to the reloc-values, the person who creates the PSID/RSID-file is responsible for checking out if there's any need to set them. When the reloc-values are 0,0, the music-routine is expected to write to nothing else than its own mem-area (ie the mem it uses when it loads), the zero-page area, and the SID-chip. RSIDs can also be expected to write to 0314/15, 0318/19 and FFFA/FB, FFFE/FF.

Inge/HVSC
2005-08-30 07:07
Inge

Registered: Nov 2003
Posts: 144
@Sasq: You are free to report any problems you encounter with the tunes. We will try to fix the tunes if it's doable.

Inge/HVSC
2005-08-30 10:46
Graham
Account closed

Registered: Dec 2002
Posts: 990
@Inge: What about those "real" PlaySID-like registers? It would be cool to listen to those tunes without scrambled SID channels on C64 too, and the sfx sound sampler is offering that.
2005-08-30 11:02
Sasq

Registered: Apr 2004
Posts: 156
Quote:
When it comes to the reloc-values, the person who creates the PSID/RSID-file is responsible for checking out if there's any need to set them.


Didnt you batch convert to V2 format? Somehow I doubt someone sat down and checked 20,000+ songs (or however may it was back then) and recorded free pages... :)

Another way to solve the RSID issue is to flag songs that take over the CPU, and make sure they allow an interrupt to be run.
This would mean you need two routines again; INIT that just sets up the song to be played and flags the play routine to stop playing, and PLAY that "busy-plays" the current song but watches for song change flagged by INIT routine.

2005-08-30 11:36
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
There's a lot of things that could be different, if there was another fileformat, and another sidplay.

If you want to help make anything, the person to write is Simon White.

We are living still with the limits of the original PSID format. Only way you can change that, is to work on a whole new technology.
 
... 14 posts hidden. Click here to view all posts....
 
Previous - 1 | 2 | 3 - 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
MCM/ONSLAUGHT
Jammer
danikAdmiral
Guests online: 109
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 The Demo Coder  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Fullscreen Graphicians
1 Joe  (9.7)
2 Sulevi  (9.6)
3 The Sarge  (9.6)
4 Veto  (9.6)
5 Facet  (9.6)

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