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


Forums > C64 Coding > Single cycle of decay at note start - in VICE too as of December 2016
2018-01-27 08:10
ChristopherJam

Registered: Aug 2004
Posts: 746
Single cycle of decay at note start - in VICE too as of December 2016

It seems VICE users received a present with very little fanfare a little over a year ago. Decemeber 31st 2016, Groepaz checked in a patch from Leandro Nini (reSID patch #138) that contained a number of envelope emulation enhancements based on die reverse engineering and transistor level emulation.

Biggest news for me is reSID finally emulates the SID bug that results in a single cycle of decay state at the very beginning of every 'gate on' event.

I discovered this bug myself back in 2013, but got distracted attempting to create an envelope emulation that covered various other niggles I found at the same time. Without the circuit diagrams the reSID team has since acquired, cycle exact emulation proved intractable, and I moved on to other things. In hindsight I probably shouldn't have been such a perfectionist.

It's reasonably straightforward for music routine coders to ensure that the bug never affects musicians. Whenever you're about to gate on, if the current release value equals the current attack value, you need to ensure decay matches as well. If you don't do this, there's a 1 in <rate> chance that you'll let the rate counter escape¹, and note start will be delayed by a frame and a half; ADSR bug strikes again. For attack=decay=0, that's a one in nine; not good.

Simplest way to do this after a hard restart is to set gate before you set AD; then decay will still be zero, which will match the attack and release from the restart.



(¹ of course, if the attack value is lower than the decay value, the chances of a rate counter escape are considerably higher, but you knew that already, and musicians frequently do this deliberately to delay note start to halfway through the next frame).
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
Alakran_64
Guests online: 33
Top Demos
1 Uncensored  (9.7)
2 Edge of Disgrace  (9.7)
3 Coma Light 13  (9.6)
4 The Shores of Reflec..  (9.6)
5 Comaland 100%  (9.6)
6 Lunatico  (9.6)
7 Incoherent Nightmare  (9.5)
8 Wonderland XII  (9.5)
9 Comaland  (9.5)
10 Wonderland XIII  (9.5)
Top onefile Demos
1 Pandemoniac Part 2 o..  (9.5)
2 Synthesis  (9.5)
3 Daah, Those Acid Pil..  (9.5)
4 Dawnfall V1.1  (9.5)
5 Treu Love [reu]  (9.5)
6 FMX Music Demo  (9.4)
7 Dawnfall  (9.4)
8 Merry Xmas 2017  (9.4)
9 Tribute to Bob Wakelin  (9.3)
10 Hardware Accelerated..  (9.3)
Top Groups
1 Oxyron  (9.4)
2 Booze Design  (9.4)
3 Censor Design  (9.3)
4 Crest  (9.3)
5 Finnish Gold  (9.3)
Top Coders
1 Axis  (9.8)
2 Crossbow  (9.8)
3 Graham  (9.8)
4 HCL  (9.8)
5 Lft  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2018
Page generated in: 0.266 sec.