Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user Werner ! (Registered 2024-05-30) You are not logged in - nap
CSDb User Forums


Forums > C64 Composing > Proposal for 2SID hardware-compatibility
2013-07-25 10:33
Hermit

Registered: May 2008
Posts: 208
Proposal for 2SID hardware-compatibility

I'm fiddling with 2SID hardware solution right now, and got an idea for a most suitable address for the 2nd SID, which could be compatible with almost all hardware solutions (except $de00, $df00, but they're not good selection anyway due to conflicting with AR,TFR, etc. cartridges.)
In VICE it's easy to set 2nd SID base-address, but it's not the case with real C64.
There's a multiplexer circuitry, which uses one of the address lines between A5..A9 ($20..$200) beside the original $d400..$d7ff chip-select signal. The address-line is hardwired in most of the cases, and not easily selectable/switchable in the real machines.
(Btw. I could solve it by hardware to see 2nd SID both in $d420 and $d500 locations, by "OR"-ing A5 and A8 lines...)

I think using/preferring only base-address $D7E0 for 2nd SID in 2SID programs & music releases would ensure that any of the A5..A9 address lines could select the 2nd SID in the machines, similarly to an "OR" function...
(the address came from this simple calculation: $d400+$20+$40+$80+$100+$200 = $D7E0)

It's easier by software than by hardware.
And VICE's 2nd SID address can be set to $D7E0. If VICE emulates the hardware multiplexor, the $d420, $d500, etc. settings could be fine too in VICE, just as on real C64, all would call 2nd SID at $d7E0
I guess it's not hard to configure in SID-players too...

Just, because 2SIDs seem to get more popular and real machine is always better to compose & listen with :)

Maybe the issue, it's not forward-compatible with 3SID, 4SID, etc solutions.


A further improvement to this 'specification' could be to distinguish mono (6 channels) vs stereo (2x3 channels) SID tunes by the A6 or A7 ($40 or $80) address lines, which seem rarely used for 2nd SID selection...
So in that case SID addresses could follow like this:
$d400..$d41f: 1st SID
$d7a0..$d7bf: 2nd SID, A6 ($40) low - line says "mono"
$d7e0..$d7ff: 2nd SID, A6 ($40) high - line says "stereo"

It was just a idea, i couldn't find this in the forum after some search, maybe it was mentioned before, maybe not...
 
... 22 posts hidden. Click here to view all posts....
 
2013-07-26 19:41
tlr

Registered: Sep 2003
Posts: 1727
Quote: Quote:
Does 2 MHz mode affect the VIC output at all if kept in the upper/lower border?


No.


You're totally right - it should be enough to test whether you've got a C128 and then exclude $D500..$D6FF.

But you don't need to do timing tests - write $00 to $D030 and then read it back, AFAIK you'll then always get $FF on C64 and $FC on C128.


However, there might be unconnected address ranges (e.g. if a 2-SID addon was installed but just 1 SID inserted into it) - you'll get nonsense (more or less) when reading from those values (to be precise: remnants of the data byte read by the VIC during its cycle phase, with 0 or more bit flips).


I've used the $d030 method previously. I don't think the $00->$d030 is necessary unless the machine has TEST + 2MHz set at the routine start. Thought perhaps I'd give a different method a shot but maybe not. :)

So $d500-$d5ff can't be used for sid on a c128? I know it's the MMU but is it still there in c64 mode?

Unconnected stuff is simple to handle. I'm more concerned about stuff that has side effects when written to, like a cart. ;)
2013-07-27 19:03
tlr

Registered: Sep 2003
Posts: 1727
I made a simple scanner you can try out: sid-detect2.prg

It always scans $d400-$d7ff + $de00-$dfff so it may cause problems with carts.
Only emulator tested, which revealed a secret bug... ;)

EDIT: fixed some stupid errors. (like printing 6581 for both 8580 and 6581)
EDIT: and yet another one, masked by the secret bug.
2013-07-28 18:31
Trurl

Registered: Mar 2002
Posts: 59
Quote: I made a simple scanner you can try out: sid-detect2.prg

It always scans $d400-$d7ff + $de00-$dfff so it may cause problems with carts.
Only emulator tested, which revealed a secret bug... ;)

EDIT: fixed some stupid errors. (like printing 6581 for both 8580 and 6581)
EDIT: and yet another one, masked by the secret bug.


I tried this on my DualSID. It detects 6581 on D400 and 2nd SID (8580) on DE00 and DF00 correctly.
However, when the 2nd SID is on D500 it tells me it's in D520. Also, when both SIDs are in D400 it says there's only 8580 in D420 :)
2013-07-28 18:54
tlr

Registered: Sep 2003
Posts: 1727
Quote: I tried this on my DualSID. It detects 6581 on D400 and 2nd SID (8580) on DE00 and DF00 correctly.
However, when the 2nd SID is on D500 it tells me it's in D520. Also, when both SIDs are in D400 it says there's only 8580 in D420 :)


Interesting. The scan relies on that the sid can be read from. It's expected that you'll get corrupt results when both sids are in $d400 as the reads will collide on the bus and the sids are different.

$d500 seems strange on the other hand. Are you sure that the sid at $d500 can be read back from $d500 in that configuration?
2013-07-28 19:58
Trurl

Registered: Mar 2002
Posts: 59
Quoting tlr
Are you sure that the sid at $d500 can be read back from $d500 in that configuration?


At least poking+peeking shows values correctly. It seems to mirror d500 to d520, d540, d560 and so on.
2013-07-28 20:20
tlr

Registered: Sep 2003
Posts: 1727
What does the "sid map" look like for the mysterious configuration?
2013-07-28 20:28
Trurl

Registered: Mar 2002
Posts: 59
Quoting tlr
What does the "sid map" look like for the mysterious configuration?


D400 11 -- 11 -- 11 -- 11 --
D500 -- 20 -- 20 -- 20 -- 20
D600 11 -- 11 -- 11 -- 11 --
D700 -- 20 -- 20 -- 20 -- 20
D800 ** ** ** ** ** ** ** **
D900 ** ** ** ** ** ** ** **
DA00 ** ** ** ** ** ** ** **
DB00 ** ** ** ** ** ** ** **
DC00 ** ** ** ** ** ** ** **
DD00 ** ** ** ** ** ** ** **
DE00 -- -- -- -- -- -- -- --
DF00 -- -- -- -- -- -- -- --
2013-07-28 20:40
tlr

Registered: Sep 2003
Posts: 1727
Thanks. That explains the result but not what causes it. It could be a bug or it could be something I fail to realize with the decoding.

The digits are XY, X=sid number, Y=type (1=6581, 0=8580)

I did a few changes to the binary as the edits indicate, when did you download it? (the changes were within a few minutes)
2013-07-29 06:35
Trurl

Registered: Mar 2002
Posts: 59
Quoting tlr
I did a few changes to the binary as the edits indicate, when did you download it? (the changes were within a few minutes)


I downloaded it after both of the edits. If there's something funny with the hardware, maybe Tomi Malinen knows what's going on.
2013-07-29 06:48
Trurl

Registered: Mar 2002
Posts: 59
Oh, what was missing from my first post was that 2nd SID in D420 is detected correctly.
Previous - 1 | 2 | 3 | 4 - 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
WVL/Xenon
Aomeba/Artline Desig..
Acidchild/Padua
Clayboy
zscs
DJ Gruby/TRiAD
cba
Mihai
St0rmfr0nt/Quantum
katon/Lepsi De
Guests online: 123
Top Demos
1 Next Level  (9.8)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Aliens in Wonderland  (9.6)
6 Edge of Disgrace  (9.6)
7 No Bounds  (9.6)
8 Comaland 100%  (9.6)
9 Uncensored  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Happy Birthday Dr.J  (9.7)
2 Layers  (9.6)
3 It's More Fun to Com..  (9.6)
4 Cubic Dream  (9.6)
5 Party Elk 2  (9.6)
6 Copper Booze  (9.6)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Rainbow Connection  (9.5)
9 Dawnfall V1.1  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.4)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 SHAPE  (9.3)
Top Musicians
1 Rob Hubbard  (9.7)
2 Stinsen  (9.7)
3 Jeroen Tel  (9.6)
4 Linus  (9.6)
5 psych858o  (9.6)

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