## Feature #84

### Add SID

0%

**Description**

Agreed to try adding a SID to the pokeymax.

Eclaire is a good test bed for this, so starting out with that

### History

#### #5 Updated by foft 9 months ago

Also got this potential USB sharing, that'd save 750 ALMS. Each request/reply is host initiated, so no reason can't share one. Keepalives would need to go to both ports. Not sure how complex that'd be! Perhaps I plumb the output to both, with a mux for when I send explicit in/out requests?

#### #7 Updated by foft 9 months ago

I loaded the tables in to octave to take a look.

Observations...- Not a simple curve
- Lots of zeros, >80% in some cases
- Quite a lot of dupes

dupes:

log2(numel(unique(ps)))

ans = 6.5699

log2(numel(unique(st)))

ans = 4.7549

log2(numel(unique(p_t)))

ans = 5.8074

log2(numel(unique(pst)))

ans = 4.5850

zeros:

sum(ps==0)/numel(ps)

ans = 0.63379

sum(st==0)/numel(st)

ans = 0.86743

sum(p_t==0)/numel(p_t)

ans = 0.58545

sum(pst==0)/numel(pst)

ans = 0.89331

#### #11 Updated by foft 9 months ago

Did some research over the weekend. Generating these isn't a terribly trivial problem!

I tried for some time to generate in matlab. I came up with a pretty good solution for wave 3: triangle + sawtooth. Actually its sawtooth + 2 sawtooth since the triangle is inverted. Anyway this worked pretty well:

tmp = zeros(size(a));

for k=1:12

pre =k-4;

post = k;

if pre<1

pre = 1;

end

if post>12

post = 12;

end

idx = pre:post;

if a(idx) == b(idx);

tmp(k) = b(k);

end

end

i.e. and and if in conflict, ground the 4 adjacent bits.

Was struggling with the pulse + triangle one, now come up with an easy answer for that one yet!

Anyway found some description of what is going on in the libsidplayfp + some functions to generate:

libsidplayfp-2.0.1/src/builders/residfp-builder/residfp/WaveformCalculator.cpp

Also the wave files are here:

https://bel.fi/alankila/c64-sw/combined-waveforms/sidwaves/

#### #12 Updated by foft 9 months ago

**File**sidbits.tar.bz2 added

Attaching some of the octave files from investigating this for reference + the wave files + other useful bits I found online.