Menu

#1128 ADSR glitches

v3.3
open-need-info
nobody
None
ReSID
2025-05-20
2019-05-11
ltx128
No

Hi,

I've come across some annoying pops in two tunes by Stryyker in the HVSC. The following was done in r36336, but I think these have been around for quite a while but I haven't written them up before now.

In Simple Mini (https://hvsc.etv.cx/C64Music/MUSICIANS/S/Stryyker/Simple_Mini.sid) there are pops throughout which are not present on a real 8580:

Looking at the siddump output these seem to be correlated with a particular ADSR write:

On another tune Lovely Mix (https://hvsc.etv.cx/C64Music/MUSICIANS/S/Stryyker/Lovely_Remix.sid) there are a couple of pops which are noticeable during a quieter part at ~10s and when the tune loops at 1:03:

Looking again at the siddump, these seem to occur a couple of ticks after a certain sequence of register writes:

I've attached recordings of the pops to this post.

SOASC links:
http://anorien.csc.warwick.ac.uk/mirrors/oakvalley/soasc/hvsc/049/MUSICIANS/S/Stryyker/Simple_Mini_T01.sid_CSG8580R5.mp3
http://anorien.csc.warwick.ac.uk/mirrors/oakvalley/soasc/hvsc/049/MUSICIANS/S/Stryyker/Lovely_Remix_T01.sid_CSG8580R5.mp3

2 Attachments

Related

Bugs: #290

Discussion

  • Querino

    Querino - 2019-05-11

    i tested only Lovely_Remix.sid in vsid.exe and i can confirm this happens back to VICE 2.4
    in 2.3 and older there was no vsid.exe

    /EDIT: works fine in 2.4 when i use Resid-fp

     

    Last edit: Querino 2019-05-12
  • gpz

    gpz - 2019-05-11

    it would be really interesting to have a small test program to reproduce this... and also if the problem is only at the audio output, or if it also can be "seen" by sampling env3/osc3

     
  • Querino

    Querino - 2019-05-11

    btw, the same happens in sidplayfp

    sidplayfp --resid Lovely_Remix.sid

    very easily to spot right after about 11 seconds

    i cannot hear it with --residfp or when filter is disabled with -nf

     
  • William McCabe

    William McCabe - 2019-05-12

    I've just done some troubleshooting with Lovely Remix. I don't think it has anything to do with the ADSR for that sid. It seems the floating output TTL on voice 3 might be causing the glitch. See attachment. The red square on the left highlights where the waveform on voice 3 is set to 0 initiating the floating output. The red rectangle on the right shows where the floating out goes to 0 which coincidently causes a glitch in the SID output.

      clock      PC                AC XR YR SP           WF  osc  pul  accum    TTL
    
      10615515: 1619:LDA $1750,X   12 02 0e f5 nv1BdIzc  01 0fb5 0fff 00824be0 0000
      10615519: 161c:STA $d402,Y   00 02 0e f5 nv1BdIZc  01 0fab 0fff 00829724 0000
      10615524: 161f:LDA $1753,X   00 02 0e f5 nv1BdIZc  01 0f9f 0fff 0082f539 0000
      10615528: 1622:STA $d403,Y   08 02 0e f5 nv1BdIzc  01 0f95 0fff 0083407d 0000
      10615533: 1625:LDA $1780,X   08 02 0e f5 nv1BdIzc  01 0f8b 0fff 00839e92 0000
      10615537: 1628:AND $1010,X   00 02 0e f5 nv1BdIZc  01 0f81 0fff 0083e9d6 0000
      10615541: 162b:STA $d404,Y   00 02 0e f5 nv1BdIZc  01 0f77 0fff 0084351a 0000  <== Set waveform 0, Start floating output TTL countdown
      10615546: 162e:RTS           00 02 0e f5 nv1BdIZc  00 0f71 0fff 0084932f 13ffd
      10615552: 10a0:LDA $171c     00 02 0e f7 nv1BdIZc  00 0f71 0fff 00850415 13ff7
      10615556: 10a3:STA $d416     05 02 0e f7 nv1BdIzc  00 0f71 0fff 00854f59 13ff3
      10615560: 10a6:LDA $1019     05 02 0e f7 nv1BdIzc  00 0f71 0fff 00859a9d 13fef
      ....
      ....
      10697448: 039b:BNE $0399     36 18 06 ff nv1BdizC  00 0f71 0fff 0008807d 000b
      10697451: 0399:BEQ $0399     36 18 06 ff nv1BdizC  00 0f71 0fff 0008b8f0 0008
      10697453: 039b:BNE $0399     36 18 06 ff nv1BdizC  00 0f71 0fff 0008de92 0006
      10697456: 0399:BEQ $0399     36 18 06 ff nv1BdizC  00 0f71 0fff 00091705 0003
      10697458: 039b:BNE $0399     36 18 06 ff nv1BdizC  00 0f71 0fff 00093ca7 0001
      10697461: 0399:BEQ $0399     36 18 06 ff nv1BdizC  00 0000 0fff 0009751a 0000 <== TTL underflow, waveform output abruptly goes to 0 
      10697463: 039b:BNE $0399     36 18 06 ff nv1BdizC  00 0000 0fff 00099abc 0000
      10697466: 0399:BEQ $0399     36 18 06 ff nv1BdizC  00 0000 0fff 0009d32f 0000
      10697468: 039b:BNE $0399     36 18 06 ff nv1BdizC  00 0000 0fff 0009f8d1 0000
    
     
  • Leandro Nini

    Leandro Nini - 2019-05-13

    In sidplayfp the TTL value is 0xF4240 for residfp (~1 sec) and 0x14000 for resid (~82 msec) which explains the difference with Lovely_Remix.sid.
    In the latest residfp code from trunk I've differentiated the value between models using the shift reset times (~200ms for 6581 and ~5s for 8580) which might be more realistic.
    BTW this is related to bug [#290]

     

    Related

    Bugs: #290

  • gpz

    gpz - 2019-05-13

    you are referring to floating_output_ttl = 0x14000; in wave.cc:247 right?

    i have stolen the change you did in residfp, see r36339

    please try if that removes the problem (also check bug #290 please) :)

     

    Last edit: gpz 2019-05-13
  • Querino

    Querino - 2019-05-13

    i only did a quick listening test, and the "pops" are now gone in Lovely_Remix.sid.

    they are still there if i chose the "wrong" SID model though.

     
  • gpz

    gpz - 2019-05-14

    ok, so the cause of the problem is located, i guess :)

    zero-x will do some measurements at the weekend or so, then we can change the values into something less arbitrary :)

    (what remains is the question if those pops are audible on the real thing too, with the "wrong" SID)

     
  • gpz

    gpz - 2019-06-07

    zero-x did that now, with surprising outcome, check [#290]

     

    Related

    Bugs: #290

  • gpz

    gpz - 2025-05-20

    can we close this one?

     
  • gpz

    gpz - 2025-05-20
    • status: open --> open-need-info
     

Log in to post a comment.

MongoDB Logo MongoDB