04 December 2012, 18:28 | #1 |
titan sucks!
Join Date: Dec 2012
Location: munich/germany
Posts: 54
|
Distorted sound with ptreplay
Hi there,
today I created a small development environment with vasm, vlink and vbcc on my windows machine. Also I added AgaOS to it (https://github.com/jsvennevid/agaos) which helps me a lot with initialization stuff and so on. I came very far today, displayed my first copper list and wanted to integrate sound. Some time ago StingRay gave me a ptreplay.s which is fairly easy to integrate. I did that and indeed the sound starts (yes I do mt_music on every vertical blank or after WaitTOF) but it sounds highly distorted. There is not much source to show except some de-/initialization stuff. Also I'm testing in WinUAE and everything else audio-related is working there. I uploaded some sources + exe here: http://www.localmindprovider.com/help/ The intro.asm was compiled by vbcc btw, so have a look into intro.c. I really don't know what's I'm doing wrong there Thanks! neoman/titan |
04 December 2012, 19:09 | #2 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
Hi Neoman, it's been a while. I suppose it happens with all modules you tried?
|
04 December 2012, 19:14 | #3 |
titan sucks!
Join Date: Dec 2012
Location: munich/germany
Posts: 54
|
StingRaaaay!
Yes, I tried it with sowhat-intro.mod, cebit90.mod and this one I also tried to set DMA and IRQ stuff on my own but no change. It sounds distorted as if the data written into AUDxDAT gets clipped somehow. |
04 December 2012, 19:17 | #4 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
It somehow sounds as if the samples aren't in chip ram but they are. Strange. Need to investigate. =)
|
04 December 2012, 19:19 | #5 |
titan sucks!
Join Date: Dec 2012
Location: munich/germany
Posts: 54
|
Yeah I also checked that but when they were in fast RAM I just heard nothing :P
|
04 December 2012, 20:17 | #6 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
I checked, your replayer code is broken! Apparently your compiler/assembler optimised it and broke something in the process (probably jump table stuff). Try to disable any optimisations for the replay routine and it should work then. Yet another reason why I always hated opimising Assemblers/Compilers on Amiga!
|
04 December 2012, 23:06 | #7 |
titan sucks!
Join Date: Dec 2012
Location: munich/germany
Posts: 54
|
StingRay my hero I'll give it a try and also answer back here. Thanks in advance!!
|
04 December 2012, 23:38 | #8 |
titan sucks!
Join Date: Dec 2012
Location: munich/germany
Posts: 54
|
Yeah, you were right. It's working now. The optimizer killed some stuff.
So I investigated that further and noticed that I was not using the current vasm version because I had an old one somewhere in my %PATH% With the current version it works now - even with optimizations. The newest vasm even got a module now to show the optimizations and which ones could be critical. There are none left now and it's working with vasm 1.5c. 1.3 wasn't working. Thanks for finding that out, StingRay, I'm happy now |
05 December 2012, 07:34 | #9 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
No problem. =) After checking your source and exe I couldn't find any reason why the music sounded so strange so I compared the replayers. First I ripped the replayer from your intro and tested it -> same strange sound without any extra code and also a different size compared to the original replayer binary -> replayer broken. Hooray for disassemblers.
|
05 December 2012, 10:13 | #10 |
titan sucks!
Join Date: Dec 2012
Location: munich/germany
Posts: 54
|
I feel I little bit ashamed now because I should have noticed it! I tested some mods now and all are working. Issue solved.
|
05 December 2012, 10:29 | #11 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
No reason to feel ashamed, that's not really an obvious bug specially when you just started with Amiga coding. Good thing is, it's solved now.
|
05 December 2012, 12:34 | #12 |
titan sucks!
Join Date: Dec 2012
Location: munich/germany
Posts: 54
|
Also, which disassembler do you use?
|
05 December 2012, 13:15 | #13 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
ReSource which is still the best for Amiga stuff. You can use IDA Pro on PC too but I prefer ReSource.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Amiga 4000 Sound Distorted and low | virge | support.Hardware | 28 | 15 July 2018 19:18 |
The Faerytale Adventure - Distorted Sound | Rick Dangerous | Retrogaming General Discussion | 18 | 10 April 2013 00:30 |
[CD-32] [Noob] Distorted CD Audio | 79LfL | support.WinUAE | 2 | 20 August 2011 14:18 |
Picasso II distorted output | hese | support.Hardware | 7 | 17 February 2010 08:46 |
Distorted sound with Vsync enabled... | PowerPie5000 | support.WinUAE | 37 | 11 November 2009 21:50 |
|
|