Chat

Author Topic: Portamento tick skip. Bug/feature?  (Read 129 times)

Offline Hpman

  • Newbie
  • Posts: 8
  • Delek FTW
    • Email
Portamento tick skip. Bug/feature?
« on: June 26, 2018, 11:55:08 PM »
Howdy.

Been looking up DM behavior quite a bit lately to write a player, and noted this strange behavior with portamento, not sure if this is the expected outcome.

So, looking up at portamento up, I noted max frequency is 1286 before going up one octave and dialing back frequency.

However  it appears the tick overflowing the 1286 limit is skipped, then next tick runs a frequency of 644+defined speed.

Here's what I found in the VGM output:


So is that a glitch or is it intended (avoiding computing the exact overflow maybe?  :D) ?

Offline Delek

  • Salí para ver
  • Administrator
  • Hero Member
  • Posts: 1801
    • Delek's Website
    • Email
Portamento tick skip. Bug/feature?
« Reply #1 on: July 02, 2018, 01:06:47 PM »
Hello, I don’t get where the problem is. Could you please be more specific with the values?

Offline Hpman

  • Newbie
  • Posts: 8
  • Delek FTW
    • Email
Portamento tick skip. Bug/feature?
« Reply #2 on: July 02, 2018, 06:36:19 PM »
Hey,

From my understanding potamento up/down (up in this case) should update channel frequency each tick right ?

Looking at the VGM output it shows one tick is skipped (you can see the double sync line on output). Figured this happens each time frequency overflows 1286 (0x506).
Then the next tick updates frequency with 644+potamento speed with increased octave, regardless of the overflow size.

(2612 FM channel if that wasn't obvious)
« Last Edit: July 02, 2018, 06:49:58 PM by Hpman »

Offline Hpman

  • Newbie
  • Posts: 8
  • Delek FTW
    • Email
Portamento tick skip. Bug/feature?
« Reply #3 on: July 26, 2018, 02:21:46 PM »
Worked out the inner workings of DM a bit more, and I'm now conviced this is a glitch.

Here is some data extracted trom a VGM output:


Column D is an A-4 note with portamento up frequency output
Column E is an A-4 note with portamento up + vibrato frequency output
(column B is the raw vibrato data)

We can see on tick #204,  FM1 frequency stays at 1286 for a second consecutive tick. Meanwhile FM2 makes the loop back to 644 (+67 from vibrato =711)

So it appears frequency is internally updated to 644 but not sent to the chip unless there are more effects relying on this value going on.
« Last Edit: July 26, 2018, 02:33:47 PM by Hpman »