English Amiga Board


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

 
 
Thread Tools
Old 21 March 2021, 07:51   #21
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
But something is still confusing to me: if you said PT2.3F replay my stress-test mod correctly, it means player should also write sample address using non atomic write during the play, right? We know it's not "legit". Maybe there is no glitch in this specific case
There can not be a glitch in your stress-test mod, as the value is written long before AUDxDAT has a chance to expire.
meynaf is offline  
Old 21 March 2021, 10:14   #22
leonard
Registered User
 
leonard's Avatar
 
Join Date: Apr 2013
Location: paris
Posts: 133
Quote:
Originally Posted by meynaf View Post
There can not be a glitch in your stress-test mod, as the value is written long before AUDxDAT has a chance to expire.
I agree but my mod isn't a stress test, it's just a test to see if player supports or not the feature.
The code snippet I posted before really is a stress test, and produces audio glitch (at least in winuae)

My feeling is that you *could* have some .mods where the repeat ad is written at the exact bad time. I guess probability in normal music ( reasonable period, quite long sample etc) is quite low, but in theory existing players have this potential bug when dealing with "sample without a note"
leonard is offline  
Old 21 March 2021, 11:00   #23
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
My feeling is that you *could* have some .mods where the repeat ad is written at the exact bad time. I guess probability in normal music ( reasonable period, quite long sample etc) is quite low, but in theory existing players have this potential bug when dealing with "sample without a note"
That's very possible. IIRC i've seen Delitracker2's Paula-Noteplayer code waiting for some horizontal scanline position before touching some audio hardware regs. I wondered why, but it might be linked to this.
meynaf is offline  
Old 21 March 2021, 11:52   #24
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
AUDxLEN is counted down 1-2 cycles after AUDxDAT DMA write so it always happens near the beginning of scan line.
Toni Wilen is offline  
Old 21 March 2021, 12:31   #25
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,216
Quote:
Originally Posted by leonard View Post
Hi,

The "official" safe way to start a new sampleA on voice A is:

1) switch off dma voice A ( move.w #$0001,$dff096 )
2) write sample address ( move.l #sampleA,$dff0a0 )
3) wait the right amount of time ( say X rasterlines )
4) enable the dma voice A ( move.w #$8001,$dff096 )
Actually, this is not "official". Busy waiting for a scan line is never necessary, and neither sufficient as you do not know what X is. You need to wait until Paula generates its interrupt, and then can write new data.


Thus, if audio DMA is currently off, write data and length into the registers, then write first two samples into the output register (as 16 bit), potentially set the period to 8 to lower the wait time for the next interrupt. This will initiate the audio state machine. Paula will generate an interrupt as soon as the first two samples are played (the same as those in your data).



Then wait for the interrupt to happen that you can write more data, which will happen as soon as Paula recognizes the write. At that point, you can enable the DMA. "Wait X Rasterlines" is not necessarily going to work, even if not knowing what "X" is going to be. Depending on the Paula release, X may depend on the current playback rate, and some ancient mod players failed exactly for this reason - not waiting "properly".



If audio DMA is already running, there is no need to stop it. Just wait for the next "audio done interrupt", which is an indication that Paula can take a new sample, and at this point, write the new length and address.



But there is also the audio.device to do that for you.
Thomas Richter is offline  
Old 21 March 2021, 12:43   #26
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
Waiting for interrupt after disabling DMA is not that simple.

Interrupt activates before channel state goes to idle. There is no safe way to do it without waiting (polling or timers or whatever) a bit. I think I explained this long time ago and AFAIK audio.device is not safe if CPU is "too fast". As in interrupt processing is really fast.

Also, there is no need to do any AUDxDAT writes. Most likely it was done that way to simplify driver (start and continue with new sample becomes identical). No one else does that except audio.device.

EDIT: Also you can't know if interrupt was due to sample ending or DMA stopping (Sample might end just after interrupt is cleared but before DMA is disabled). The shorter the sample the more unreliable it gets.

EDIT2: As I already said, "dma wait" requirement is Paula design flaw.

Last edited by Toni Wilen; 21 March 2021 at 18:25.
Toni Wilen is offline  
Old 22 March 2021, 00:07   #27
Antiriad_UK
OCS forever!
 
Antiriad_UK's Avatar
 
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 418
Quote:
Originally Posted by leonard View Post
for instance this really cool attached .mod use a lot of "sample without note".
Did I?!

If I was doing something unexpected it was almost certainly an accident. I wrote the version of that tune in FL Studio and then did the amiga mod in a few hours after not creating a mod since 1990 so just winged it - I definitely wasn't trying to use weird features

Edit: And it was p61 I used in that intro and it sounded like I expected. I wrote the mod in milkytracker and never played it in Protracker on the amiga. (The mp3 of the fl studio master is in the intro download )

Edit2: Just opened the mod again, I think it must be the ostinato part you mean where the same riff goes on forever and various "similar" samples are used to retrig the previous note but with a different sample at a lower volume. Yeah that's chip tune 101 from the mods I looked at. I've not listened to this mod in ptplayer, but tbh it's so subtle I wouldn't notice in that mod because it's so fast. Maybe it _didn't _ play correctly in p61!!! (OpenMPT does as I just single stepped it and the sample changed)

Last edited by Antiriad_UK; 22 March 2021 at 00:47.
Antiriad_UK is offline  
Old 22 March 2021, 16:49   #28
leonard
Registered User
 
leonard's Avatar
 
Join Date: Apr 2013
Location: paris
Posts: 133
Quote:
Originally Posted by Antiriad_UK View Post
Did I?!
Oh didn't even knew you composed this tune, congrats! I love it, feel both oldskool feeling and "melancholic" melody. So you didn't really used "sample without a note" on purpose? interesting

I don't remind what was the intro using this tune, could you post a link? ( need to listen to the original audio stream )
leonard is offline  
Old 22 March 2021, 17:32   #29
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by leonard View Post
Oh didn't even knew you composed this tune, congrats! I love it, feel both oldskool feeling and "melancholic" melody. So you didn't really used "sample without a note" on purpose? interesting

I don't remind what was the intro using this tune, could you post a link? ( need to listen to the original audio stream )
Just check the message I sent you 2 days ago
ross is offline  
Old 22 March 2021, 17:49   #30
leonard
Registered User
 
leonard's Avatar
 
Join Date: Apr 2013
Location: paris
Posts: 133
Quote:
Originally Posted by ross View Post
Just check the message I sent you 2 days ago
oh damn I should always spot the private message counter at top right of the screeen!
leonard is offline  
Old 22 March 2021, 17:53   #31
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
I LOVE this intro by Antiriad, so Amigaish and nostalgic.
ross is offline  
Old 22 March 2021, 19:34   #32
Antiriad_UK
OCS forever!
 
Antiriad_UK's Avatar
 
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 418
Quote:
Originally Posted by leonard View Post
Oh didn't even knew you composed this tune, congrats! I love it, feel both oldskool feeling and "melancholic" melody. So you didn't really used "sample without a note" on purpose? interesting

I don't remind what was the intro using this tune, could you post a link? ( need to listen to the original audio stream )
Thanks . The mp3 is quite fun. Here’s the link, it should be in the zip if I remember.

http://www.pouet.net/prod.php?which=81350

Yes I used the sample without a note on purpose. Pretty much every chip tune does something like that. I got it from looking at 4mats stuff in the 90s and assumed everyone did that .
Antiriad_UK is offline  
Old 22 March 2021, 20:47   #33
leonard
Registered User
 
leonard's Avatar
 
Join Date: Apr 2013
Location: paris
Posts: 133
Quote:
Originally Posted by Antiriad_UK View Post
Yes I used the sample without a note on purpose. Pretty much every chip tune does something like that. I got it from looking at 4mats stuff in the 90s and assumed everyone did that .
I tried to remove the "sample without a note" in pattern 7 in OpenMPT, and play pattern 6 ( with "sample without a note" ) chaining on pattern 7. I have the feeling I didn't spot a difference.

So I'm really confused now: I have a working modified LSP local version supporting this feature. Generic player is slightly slower, and slighty bigger ( about 540 bytes, not under 512 bytes anymore ). Insane mode is running at same speed.

So my question: Is it worth to support this feature in LSP?

what do you think everyone as a user?
leonard is offline  
Old 22 March 2021, 21:18   #34
Antiriad_UK
OCS forever!
 
Antiriad_UK's Avatar
 
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 418
Quote:
Originally Posted by Antiriad_UK View Post
Thanks . The mp3 is quite fun. Here’s the link, it should be in the zip if I remember.

http://www.pouet.net/prod.php?which=81350

Yes I used the sample without a note on purpose. Pretty much every chip tune does something like that. I got it from looking at 4mats stuff in the 90s and assumed everyone did that .
Actually it just occurred to me. Doesn’t cream of the earth do this sample without a note retrigger? I need to look at the mod but from memory it was a single note retriggered on each line with an A01 effect as well. That’s as a popular mod as you can get

Last edited by Antiriad_UK; 23 March 2021 at 00:23.
Antiriad_UK is offline  
Old 22 March 2021, 23:51   #35
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,039
https://www.stef.be/bassoontracker/?...uleid%3D120017
a/b is offline  
Old 23 March 2021, 00:24   #36
Antiriad_UK
OCS forever!
 
Antiriad_UK's Avatar
 
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 418
Yes but sample number and A0F How the hell did that mod stick in my mind for 35 years - I don't even remember what I had to eat last night haha
Antiriad_UK is offline  
Old 23 March 2021, 00:39   #37
leonard
Registered User
 
leonard's Avatar
 
Join Date: Apr 2013
Location: paris
Posts: 133
Is "cream of the earth.mod" broken if played with anything else than PT2.3F?
leonard is offline  
Old 23 March 2021, 01:24   #38
leonard
Registered User
 
leonard's Avatar
 
Join Date: Apr 2013
Location: paris
Posts: 133
Quote:
Originally Posted by leonard View Post
Is "cream of the earth.mod" broken if played with anything else than PT2.3F?
I just figured out why "cream of the earth.mod" will play correctly with mod player that doesn't support "instrument without a note". Look at first pattern, voice C. These players (as LSP 1.03) won't retrigger a note even if the column is full of "instrument 10". Sample is not restarted BUT the voice volume is reset to instrument volume each row!
This module doesn't really showcase the "instrument without a note" bug of many amiga players.
leonard is offline  
Old 23 March 2021, 19:59   #39
8bitbubsy
Registered User
 
8bitbubsy's Avatar
 
Join Date: Sep 2009
Location: Norway
Posts: 1,710
Quote:
Originally Posted by leonard View Post
I tried to remove the "sample without a note" in pattern 7 in OpenMPT, and play pattern 6 ( with "sample without a note" ) chaining on pattern 7. I have the feeling I didn't spot a difference.

So I'm really confused now: I have a working modified LSP local version supporting this feature. Generic player is slightly slower, and slighty bigger ( about 540 bytes, not under 512 bytes anymore ). Insane mode is running at same speed.

So my question: Is it worth to support this feature in LSP?

what do you think everyone as a user?
Yes it is, "sample swapping" was a common technique used in plenty of ProTracker MODs, especially chiptune-styled ones.
8bitbubsy is offline  
Old 24 March 2021, 00:16   #40
leonard
Registered User
 
leonard's Avatar
 
Join Date: Apr 2013
Location: paris
Posts: 133
Quote:
Originally Posted by 8bitbubsy View Post
Yes it is, "sample swapping" was a common technique used in plenty of ProTracker MODs, especially chiptune-styled ones.
so all these chiptune mods aren't played correctly with all existing amiga players but PT2.3F? Anyone can confirm that?
leonard is offline  
 


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 17:18.

Top

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