English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 24 March 2021, 12:07   #41
8bitbubsy
Registered User
 
8bitbubsy's Avatar
 
Join Date: Sep 2009
Location: Norway
Posts: 1,710
Quote:
Originally Posted by leonard View Post
so all these chiptune mods aren't played correctly with all existing amiga players but PT2.3F? Anyone can confirm that?
Sample swapping has been a feature since the very first ProTracker version AFAIK, or at least from very early on... There are plenty of oldskool .MODs out there using the technique.
It works fine in every PT version except the 3.x series (and maybe not 4.x), where they ruined the replayer logic by "fixing" it.
Here's an example demonstrating the effect: https://www.dropbox.com/s/zq6lq3ym1q..._swap.mod?dl=1

EDIT: It's mostly used to simulate PWM by replacing the current sample with a pulse wave of a different duty cycle. The fun part is that the swap is delayed until the current sample has reached the end loop point. This means that the swap will not reset the sampling position in the middle of a sample, so you get no clicks from it (depending on the sample data of course).

How come you mention PT2.3F specifically? Did I mess something up which makes it play back a module differently?

Last edited by 8bitbubsy; 24 March 2021 at 12:24.
8bitbubsy is online now  
Old 25 March 2021, 16:47   #42
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by leonard View Post
so all these chiptune mods aren't played correctly with all existing amiga players but PT2.3F? Anyone can confirm that?
I have made a few tests and PT3.15 fails where Delitracker2 plays these mods correctly.
As i understand it, the normal behaviour is to change the repeat/replen of currently playing sample.
meynaf is offline  
Old 25 March 2021, 20:13   #43
no9
Registered User
 
no9's Avatar
 
Join Date: Feb 2018
Location: Poland
Posts: 352
Yep. At the end of the cycle.

I also stressed this feature some months ago in non-chiptune way:
[ Show youtube player ]
Download files
no9 is offline  
Old 27 March 2021, 09:55   #44
leonard
Registered User
 
leonard's Avatar
 
Join Date: Apr 2013
Location: paris
Posts: 133
Quote:
Originally Posted by 8bitbubsy View Post
The fun part is that the swap is delayed until the current sample has reached the end loop point. This means that the swap will not reset the sampling position in the middle of a sample, so you get no clicks from it (depending on the sample data of course).
exactly, and this is a PAULA hardware feature ( the player just "write" the new sample address in PAULA registers and the chip will "really" use this new address at the next loop point

My issue is that players are writing the new sample address during the playback (Audio DMA is still running). And it theory, if you're very unlucky, as the 32bits address write isn't atomic, you may have an audio glitch during 2 samples.

As no one complained for this for years, I guess it's ok in practice. But the
bug is here, in all Amiga players supporting this feature.
leonard is offline  
Old 27 March 2021, 13:21   #45
8bitbubsy
Registered User
 
8bitbubsy's Avatar
 
Join Date: Sep 2009
Location: Norway
Posts: 1,710
Quote:
Originally Posted by leonard View Post
exactly, and this is a PAULA hardware feature ( the player just "write" the new sample address in PAULA registers and the chip will "really" use this new address at the next loop point
Yep, I know. Same for the LEN register.

Quote:
Originally Posted by leonard View Post
My issue is that players are writing the new sample address during the playback (Audio DMA is still running). And it theory, if you're very unlucky, as the 32bits address write isn't atomic, you may have an audio glitch during 2 samples.

As no one complained for this for years, I guess it's ok in practice. But the
bug is here, in all Amiga players supporting this feature.
Sounds like a rare issue, and I don't think I have personally encountered it. It's still worth supporting sample swapping, imo.
8bitbubsy is online now  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
I want to set up an Amiga DAW for audio recording Overmann support.Hardware 8 07 March 2019 10:45
Tools for set FILTER OFF audio jhonny82 support.Games 14 22 July 2015 16:06
DMA-free audio robinsonb5 Coders. Asm / Hardware 3 05 November 2012 08:43
CPU execution on odd cycles if no Audio/Disk/Sprite DMA mc6809e Coders. Asm / Hardware 2 02 April 2012 19:50
Unsual Case of Dr. Strange / Return of Doctor Strange killergorilla HOL contributions 1 12 July 2007 16:08

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 16:03.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07171 seconds with 16 queries