26 March 2020, 17:55 | #1 |
Registered User
Join Date: Jan 2020
Location: Poland
Posts: 10
|
Problem with MOD playback in game on real Amiga
Hi everyone!
I'm developing a game in the C language, using GCC, and KaiN's ACE engine https://github.com/AmigaPorts/ACE. I do have a mod with music to play in-game, and managed to implement both ptplayer, and p61 routines for that purpose, to compare them. When testing the game on WinUAE the music plays fine and smooth. However, when I try and test it on my A1200, the music is glitchy. The timing is fine, but every like half a second it seems to "lose" a random channel for a moment, and it's that way using both routines. Any help will be appreciated. |
26 March 2020, 18:17 | #2 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
This sounds like the same problem which Slamy first reported to me from a beta tester for his "Tiny Little Slug". It was an A1200 as well. Seems that the hardware is strange...
The problem turned out to be that a delay of 496 ticks is not enough for the lowest notes, before audio-DMA is reenabled. So we settled for 576 ticks now, which fixed it. The new ptplayer version 5.4 is not yet released, but you can fix that locally by replacing the two occurences of "496" in ptplayer.asm with "576". I really should do the release now... Code:
5.4: - New function _mt_samplevol may be used to redefine a sample's volume. - Wait 576 ticks for audio DMA instead of 496, which fixes issues with low notes on a few A1200 configurations. (No, this doesn't harm the player's performance, as it is a timer interrupt.) - Minor optimizations. (UNRELEASED) |
26 March 2020, 18:29 | #3 | |
Registered User
Join Date: Jan 2020
Location: Poland
Posts: 10
|
Quote:
|
|
26 March 2020, 18:42 | #4 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
576 is already a lot. It doesn't hurt to try, but then it is probably a different problem.
The next step would be to find out if it always happens at the same positions in the song and try to isolate them. Maybe the song was written on a PC-tracker and uses features which are simply not supported by Protracker? Last edited by phx; 26 March 2020 at 18:46. Reason: Some more hints. |
26 March 2020, 20:30 | #5 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,166
|
576 is how many vertical beam counts BTW? I'm using a raster delay in my fixes. i'm using 7 raster waits.
Do you have to wait when enabling audio DMA or just when disabling it? |
26 March 2020, 21:31 | #6 | ||
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
Quote:
Quote:
|
||
26 March 2020, 23:18 | #7 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,166
|
Roadkill doesn't use any delays, and when it uses some, it uses 3 raster lines! no wonder why some people report that the sound is completely broken. Thanks
|
27 March 2020, 18:06 | #8 |
Registered User
Join Date: Jan 2020
Location: Poland
Posts: 10
|
Ok, some update. I tried playing different mods in my game, and the work without a hitch, so there's most likely a problem with the particular MOD that I'm trying to use. What are the possible reasons for such issue that are MOD related?
EDIT: Nevermind. Found one with the same problem. Last edited by MacSpain; 27 March 2020 at 18:12. |
05 April 2020, 18:22 | #9 |
Registered User
Join Date: Jan 2020
Location: Poland
Posts: 10
|
Bumping here to inform about further developments. I tried a different configuration on my WinUAE (68000 ECS with no other expansions/improvements), and it has the same issue as my real A1200. Last configuration that worked was 020 AGA with 68881 FPU, what would I have to do to address the problem with sound on certain configs?
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
"EaglePlayer" playback VS "real" playback | chip | support.Other | 31 | 27 September 2020 13:14 |
Using this forum on real Amiga problem | lukassid | project.EAB | 8 | 10 November 2013 13:44 |
ClassicWB OS3.9 problem on Real Amiga | Echelon | project.ClassicWB | 16 | 31 March 2009 22:17 |
CIA timer interrupt handler called twice during mod playback | absence | Coders. General | 5 | 16 March 2009 18:55 |
Playback problem from recording | RickyC | support.Other | 0 | 31 May 2007 13:38 |
|
|