![]() |
![]() |
#1 |
Registered User
Join Date: Jan 2013
Location: Slovakia
Posts: 27
|
Simple sample player (no DMA)
Hi
I want to play samples using no DMA. is it possible ? For example (not working): ;--------------------------------------------------------------------- lea Sound(pc),a0 move.l #(SoundEnd-Sound)/2,d0 move.w #$0040,$dff0a8 ; Aud0vol move.w #$0080,$dff0a6 ; Aud0Per Loop move.w (a0)+,$dff0aa ; Aud0dat move.w #$0100,d1 ; Pause Wait dbra d1,Wait sub.l #$0001,d0 bne Loop rts Sound incbin "dh1:work/samples/crom_16khz.snd" SoundEnd ;-------------------------------------------------------------------- What's wrong, any suggestions ? Thanks. |
![]() |
![]() |
#2 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,574
|
You need to clear channel's interrupt request bit. Writing to AUDxDAT does nothing if interrupt request is set.
btw, much better method is to wait for channel's interrupt bit (poll INTREQR), clear it immediately, write next word to AUDxDAT and so on. |
![]() |
![]() |
#3 |
68k
Join Date: Sep 2005
Location: Somewhere
Posts: 829
|
|
![]() |
![]() |
#4 |
Registered User
Join Date: Jan 2013
Location: Slovakia
Posts: 27
|
Many thanks
![]() Just one line added and result is awesome. |
![]() |
![]() |
#5 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,856
|
|
![]() |
![]() |
#6 |
Registered User
Join Date: Jan 2013
Location: Slovakia
Posts: 27
|
Yes audio data is in FastMem.
Thanks. |
![]() |
![]() |
#7 |
Registered User
Join Date: Apr 2013
Location: paris
Posts: 133
|
|
![]() |
![]() |
#8 |
Moderator
Join Date: Sep 2004
Location: France
Age: 51
Posts: 4,277
|
|
![]() |
![]() |
#9 |
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,888
|
Higher sampling rates, override CHIP limitations, increase number of the independent audio channels etc.
|
![]() |
![]() |
#10 | |
Registered User
Join Date: Apr 2013
Location: paris
Posts: 133
|
Quote:
I just realized you can use the same trick as with ATARI-ST digisound: you can use several PAULA voices to play a "more than 8bits" sample. |
|
![]() |
![]() |
#11 |
Moderator
Join Date: Sep 2004
Location: France
Age: 51
Posts: 4,277
|
|
![]() |
![]() |
#12 | |
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,888
|
Quote:
Higher sampling rate means or ECS/AGA or tricks in OCS with horizontal line shortening or CPU (Copper) software driven AUDxDAT. Higher resolution than 8 bit imply use 2 DMA channels + calibration (never perform any measurements what kind of accuracy can be achieved in this way - i assume something between 10 and 12 bits should be possible - with modern PC sound card used as a audio analyzer perhaps this calibration can be performed even better than previously and 12 - 13 bits sounds reasonable). Still i believe that 8 bit with dithering and noiseshaping can provide higher quality than combined 2 Paula channels with pseudo 14 bit mode. If CPU can be replaced by synchronous and cycle accurate Copper then most of the Paula (Agnus) limitations can be override. |
|
![]() |
![]() |
#13 |
Registered User
Join Date: Sep 2009
Location: Norway
Posts: 1,719
|
|
![]() |
![]() |
#14 |
Registered User
Join Date: Jan 2013
Location: Slovakia
Posts: 27
|
|
![]() |
![]() |
#15 |
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,888
|
Sorry for using this topic but can be closely related - i have strange idea how to play in non-DMA mode with DMA active.
General principle how Paula works is quite clear: If period value is to low - last data stored in AUDxDAT register are repeated. Is there any chance to set 1 word DMA in AUDxLEN, data for example $0000 word (or similar) in CHIP RAM location addressed by ADUxLCH/L, set period higher than maximum supported by normal DMA, then manually (CPU - Copper) write to ADUxDAT data words in regular time slots to increase sampling frequency? |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
BZR Player - a new music player for Win | bLAZER | Retrogaming General Discussion | 1040 | 15 June 2024 12:07 |
FAT Player MikMod v5 (amiga mod player for Nintendo DS) | spajdr | Amiga scene | 0 | 14 August 2008 21:55 |
Simple two player games ? | eternalcrusader | Retrogaming General Discussion | 25 | 24 April 2007 11:50 |
DMA Cards | alewis | support.Hardware | 11 | 12 January 2007 15:01 |
AMIGA1200 as a Sample-Player? | Ebster | support.Apps | 0 | 19 November 2006 13:05 |
|
|