Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in 
CSDb User Forums


Forums > CSDb Discussions > ReSID DLL interface?
2019-05-02 17:11
Mindcooler

Registered: Nov 2006
Posts: 28
ReSID DLL interface?

Is there any documentation for the interface for the ReSID/ReSIDFP DLL (thought of using LibReSIDFP.dll from the XSID project), or are there any other docs that can help figuring out how to use it? Or is it a case of RTFC?
 
... 7 posts hidden. Click here to view all posts....
 
2019-05-21 20:59
Mindcooler

Registered: Nov 2006
Posts: 28
I got a 6581 running, but I don't get any output from an 8580. I don't get what the difference is; it seems that I need to clock the 8580 for each write I do? What gives?

void SID::write(int offset, unsigned char value)
{
busValue = value;
busValueTtl = modelTTL;

if (model == MOS8580)
{
delayedOffset = offset;
delayedValue = value;
}
else
{
writeImmediate(offset, value);
}
}
2019-05-21 23:42
Krill

Registered: Apr 2002
Posts: 1235
You're trying to write multiple SID registers in the same clock cycle?
2019-05-21 23:45
Mindcooler

Registered: Nov 2006
Posts: 28
Yes, that works fine for 6581. I'd like to keep all time management in the sound driver, not the data write routines. I'm not trying to emulate a c64.
2019-05-21 23:49
Krill

Registered: Apr 2002
Posts: 1235
I... i don't even
2019-05-22 00:03
Mindcooler

Registered: Nov 2006
Posts: 28
I'm not sure what's so strange. Is it illegal to break the laws of physics in an emulated device?

Writes are made asynchronously. And the time is stepped in chunks.
2019-05-22 00:22
Krill

Registered: Apr 2002
Posts: 1235
You might not want to emulate a C-64, but i take it you want to emulate a SID... AND expect the emulation to be faithful?

Then really, you cannot violate its fundamental hardware principles, emulated or not. No more than one read or write per clock cycle (yes, synchronous), as there are latches and whatnot in its internal state machine.

6581 might look like it's working with that horrible hack, but i'm pretty sure some things are quite distorted compared to the real chip.

What's so problematic about spreading out your writes over several clock cycles?
2019-05-22 00:27
Mindcooler

Registered: Nov 2006
Posts: 28
That would entail making a queue and screwing around in the driver routine, and I'm lazy :)

But I guess it's doable. Although a 6581 is alright, a 8580 is more synthy and more suitable for my purpose.
2019-05-22 00:33
Krill

Registered: Apr 2002
Posts: 1235
Yeah, and about the asynchronous writes... Do you mean you called the set-register function asynchronously, from another thread than the one running the actual emulation? If you do that, make sure you have your synchronisation primitives under control. :)
2019-05-22 00:39
Mindcooler

Registered: Nov 2006
Posts: 28
Yeah, that wasn't a problem with other emulators/synths I have used in the past. Perhaps it would be a problem with resid(-fp), didn't investigate the code to figure that out. Right now it's a moot point. Just bring in an SPSC queue, put things in one end asynchronously and write them to the SID in the driver. No locking needed.
2019-05-22 09:56
Krill

Registered: Apr 2002
Posts: 1235
The synchronisation will then probably be encapsulated within and implemented by the SPSC queue.

Perhaps you should also take some care about the write order of SID registers, as that can make quite some difference.
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
pcollins/Excess
fieserWolF/Abyss-Con..
Acidchild/Padua
Tim/Active
Krill/Plush
St0rmfr0nt/ExCeSs
Golara
Guests online: 39
Top Demos
1 Unboxed  (9.7)
2 Uncensored  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 The Shores of Reflec..  (9.6)
7 Lunatico  (9.6)
8 X Marks the Spot  (9.5)
9 Wonderland XII  (9.5)
10 OMG Got Balls!  (9.5)
Top onefile Demos
1 Smile to the Sky  (9.5)
2 Instinct  (9.5)
3 Daah, Those Acid Pil..  (9.5)
4 Dawnfall V1.1  (9.4)
5 Pandemoniac Part 2 o..  (9.4)
6 Crystal Gazer  (9.4)
7 Rewind  (9.4)
8 Bad Boy  (9.4)
9 Official X2018 Report  (9.4)
10 Party Horse  (9.4)
Top Groups
1 Fossil  (9.7)
2 PriorArt  (9.6)
3 Oxyron  (9.4)
4 Booze Design  (9.4)
5 Censor Design  (9.3)
Top Hardware-Gurus
1 Soci  (9.9)
2 Grue  (9.8)
3 Zer0-X  (9.8)
4 Wiesel  (9.8)
5 Lemming  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2019
Page generated in: 0.051 sec.