English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 23 October 2015, 18:10   #101
8bitbubsy
Registered User
 
8bitbubsy's Avatar
 
Join Date: Sep 2009
Location: Norway
Posts: 1,708
The problem with using SDL2 is that it has no support for PPC, AFAIK... It would put PPC Macs out of the equation, and I constantly make a build for those.
I could try the code with SDL2 and see if the SDL_Flip() is faster, and if so, try to use some #ifdef magic to make the code compilable with both SDL2 and SDL1.2.
8bitbubsy is offline  
Old 23 October 2015, 18:16   #102
tolkien
AmigaMan
 
tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 760
Would be interesting to know it. Don't know how mature is the MorphOS SDL2 port but yes, would be interesting.
You are the man olav!
tolkien is offline  
Old 23 October 2015, 19:55   #103
8bitbubsy
Registered User
 
8bitbubsy's Avatar
 
Join Date: Sep 2009
Location: Norway
Posts: 1,708
Just took a look at SDL2.0, and it looks like a pain in the *** to maintain SDL1.2/SDL2.0 compatibility with #ifdefs. So I'm not going to bother, it probably won't be much faster anyways.
8bitbubsy is offline  
Old 23 October 2015, 19:59   #104
tolkien
AmigaMan
 
tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 760
No problem mate. Keep the good work.
tolkien is offline  
Old 17 September 2019, 08:34   #105
no9
Registered User
 
no9's Avatar
 
Join Date: Feb 2018
Location: Poland
Posts: 352
This post is from 2011 so watch out!

Quote:
Originally Posted by 8bitbubsy View Post
I am glad to announce that I have finally fixed the annoying .. what should I call it... "Paula sample swap delay" bug?
This is NOT the same as the well known "swap sample on the fly" PT1.x phenomena.


- This only applies to a "new sample number" - e.g. a sample number that is different from the previous one. -
Sample 5 must finish playing (or reach its loop end) before Paula sets its new sample pointer/loop points to sample 0F! If the sample is still playing while it hits 0F, the 0F will be triggered when 05 is done. However, it will instantly set the sample volume to 0F's sample volume, so this only applies to loop points and the sample data pointer.
If you put a note number in front of 0F, it will of course trigger instantly (unless you put 3xx/5xx there too, then the exact same rule apply).

This is a very special bug, and I guess I am amongst the very few people to be aware of it. Several MOD songs are affected.
Right. I discovered it in late '90ties and applied it once as an experiment in this mod https://modarchive.org/index.php?req...id&query=98944


It interleaves sample numbers 11 and 12 in song but the latter one is there only for setting volume. Before sample 12 is reached, 11 is set again so 12 is never played but contributes to sample 11s volume.
no9 is offline  
Old 17 September 2019, 12:20   #106
8bitbubsy
Registered User
 
8bitbubsy's Avatar
 
Join Date: Sep 2009
Location: Norway
Posts: 1,708
The ProTracker 2.3D clone replayer is directly ported from the original assembly replayer code these days (+ I wrote a Paula "emulator" for register update after read, so that sample swapping works exactly the same as on Amiga). It's much more accurate than it used to be back then. Also I have learnt a lot since 2011 btw, so I wouldn't really quote something that old...
8bitbubsy is offline  
Old 17 September 2019, 12:42   #107
no9
Registered User
 
no9's Avatar
 
Join Date: Feb 2018
Location: Poland
Posts: 352
I quoted it just to place my post in the context, since I don't see forum to link my reply to the original post. I'm not a coder and I'm more interested in tunes that did use this bug/feature or was affected by it, incidentally or not. Did you find any other examples of Protracker modules, besides those 3 you listed in the original post, which I refer to?
no9 is offline  
Old 17 September 2019, 12:50   #108
8bitbubsy
Registered User
 
8bitbubsy's Avatar
 
Join Date: Sep 2009
Location: Norway
Posts: 1,708
I have probably found many throughout the years, but nothing that I remember in particular right now.
8bitbubsy is offline  
Old 21 September 2019, 02:54   #109
Hewitson
Registered User
 
Hewitson's Avatar
 
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 41
Posts: 3,771
Does this have anything to do with the bug in Vroom/VF^CPY intro?
Hewitson is offline  
Old 21 September 2019, 11:23   #110
8bitbubsy
Registered User
 
8bitbubsy's Avatar
 
Join Date: Sep 2009
Location: Norway
Posts: 1,708
Quote:
Originally Posted by Hewitson View Post
Does this have anything to do with the bug in Vroom/VF^CPY intro?
Actually yeah, it's related to sample swapping but also a replayer bug. I found the issue after looking around for a bit.

The replayer in the VF cracktro has a design error with restarting the song after the last position was played. Instead of setting the current pattern to the first entry in the "order table", it sets it to 0. This is wrong. In the song, position 0 has pattern 1, position 1 has pattern 0 (according to the table), and so on.

Pattern 0 (pos 1) starts with a portamento on the lead channel, so after the song wraps it goes from sample 7 to sample 6 with the portamento. The combination of sample swapping and portamento can give really strange results, I don't fully understand how it works to be honest. The song wraps fine in ProTracker (and my clone).

Last edited by 8bitbubsy; 21 September 2019 at 11:30.
8bitbubsy is offline  
Old 21 September 2019, 11:44   #111
Mickoz
Registered User
 
Join Date: Sep 2019
Location: Adelaide Australia
Posts: 29
Sorry to post in an old thread, just wanted say this is awesome and thank you for making it.
Mickoz is offline  
Old 21 September 2019, 12:01   #112
no9
Registered User
 
no9's Avatar
 
Join Date: Feb 2018
Location: Poland
Posts: 352
It plays wrong pattern after the song loops. That observation is correct. But it has nothing to do with sample swapping. You can get exactly same results in Protracker if you set first played pattern in the song to pattern 0, even if sample number is not changed inbetween.
no9 is offline  
Old 21 September 2019, 12:19   #113
8bitbubsy
Registered User
 
8bitbubsy's Avatar
 
Join Date: Sep 2009
Location: Norway
Posts: 1,708
Quote:
Originally Posted by no9 View Post
It plays wrong pattern after the song loops. That observation is correct. But it has nothing to do with sample swapping. You can get exactly same results in Protracker if you set first played pattern in the song to pattern 0, even if sample number is not changed inbetween.
Turns out you're right, so the reason it fails (when wrapped wrongly) is because the portamento slide is not big enough to reach the destination period (note). I initially thought it was related to the actual sample swap happening, because I remember sample swap + 3xx being quite strange.
8bitbubsy is offline  
Old 21 September 2019, 14:00   #114
no9
Registered User
 
no9's Avatar
 
Join Date: Feb 2018
Location: Poland
Posts: 352
Precisely.

Anyway, that module implements by hand 'modulation by loop shifting' I mentioned somewhere there http://eab.abime.net/showpost.php?p=...&postcount=114. Frame shifts in samples 06-0B which are exactly the same otherwise.

Too bad we never had a tracker that allowed us such things. By use of commands or automating it with envelopes or kind of lfo's. This could enrich chiptunes sounds on Amiga a little bit and save storage space and sample slots like in the case of track "Monday".

Last edited by no9; 21 September 2019 at 14:06.
no9 is offline  
Old 21 September 2019, 14:10   #115
8bitbubsy
Registered User
 
8bitbubsy's Avatar
 
Join Date: Sep 2009
Location: Norway
Posts: 1,708
Yes I've seen that in a couple of modules, classic trick to get multiple timbres out of the lead/waveform. This is pretty much the most common reason for using sample swapping.
8bitbubsy is offline  
Old 21 September 2019, 15:11   #116
no9
Registered User
 
no9's Avatar
 
Join Date: Feb 2018
Location: Poland
Posts: 352
Of course it is common way to modulate sounds in chiptunes. I'm saying that in theory there are smarter ways to achieve the same, or even better results without going beyond standard capabilities of Amiga hardware. And without throwing much of a burden on CPU. Unfortunately that path of tracker evolution left unexplored on Amiga.
no9 is offline  
Old 04 October 2019, 14:15   #117
Hewitson
Registered User
 
Hewitson's Avatar
 
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 41
Posts: 3,771
Quote:
Originally Posted by 8bitbubsy View Post
Actually yeah, it's related to sample swapping but also a replayer bug. I found the issue after looking around for a bit.

The replayer in the VF cracktro has a design error with restarting the song after the last position was played. Instead of setting the current pattern to the first entry in the "order table", it sets it to 0. This is wrong. In the song, position 0 has pattern 1, position 1 has pattern 0 (according to the table), and so on.

Pattern 0 (pos 1) starts with a portamento on the lead channel, so after the song wraps it goes from sample 7 to sample 6 with the portamento. The combination of sample swapping and portamento can give really strange results, I don't fully understand how it works to be honest. The song wraps fine in ProTracker (and my clone).
Interesting. Thanks for the detailed explanation!
Hewitson is offline  
Old 04 October 2019, 14:31   #118
8bitbubsy
Registered User
 
8bitbubsy's Avatar
 
Join Date: Sep 2009
Location: Norway
Posts: 1,708
Quote:
Originally Posted by Hewitson View Post
Interesting. Thanks for the detailed explanation!
My theory was not fully correct, please read the nexts posts after that one.
8bitbubsy is offline  
Old 21 January 2020, 23:24   #119
no9
Registered User
 
no9's Avatar
 
Join Date: Feb 2018
Location: Poland
Posts: 352
I have an issue with MOD2WAV function. It renders wav file twice long and the result seems buggy.
no9 is offline  
Old 21 January 2020, 23:27   #120
8bitbubsy
Registered User
 
8bitbubsy's Avatar
 
Join Date: Sep 2009
Location: Norway
Posts: 1,708
I just gave it a quick test and it seems to work fine here...
What OS are you on, and what PT2 clone version are you running? The latest version is v1.02: https://16-bits.org/pt2.php

If it still fails with the latest version, then maybe it's a bug with the specific .mod you are using.
8bitbubsy 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
SDL problem. tolkien Coders. C/C++ 10 24 March 2015 03:29
XAMOS - new cross-platform rewrite of jAMOS Mequa News 24 14 December 2012 09:49
use SDL 1.2.13 with AmyDevCpp TheDarkCoder Coders. General 3 18 August 2009 20:55
WinUAE w/SDL mangamuscle request.UAE Wishlist 8 31 January 2007 11:41
What do you know about Amiga SDL? Tolismlf Amiga scene 6 15 November 2004 18:54

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 09:01.

Top

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