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


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

Registered: Aug 2004
Posts: 1409
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
rambo/Therapy/ Resou..
Matt
Flashback
Hein
Alakran_64
LDX#40
HOL2001/Quantum
bOOZElEE
Guests online: 88
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 No Listen  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Rainbow Connection  (9.5)
7 Dawnfall V1.1  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Crackers
1 Mr. Z  (9.9)
2 Antitrack  (9.8)
3 OTD  (9.8)
4 Fungus  (9.8)
5 S!R  (9.8)

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