14 July 2016, 21:40 | #21 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Sounds like useless "it does not work" comment. I don't like them.
-- Toccata is stupid board. "uaesnd" "board" is coming.. |
14 July 2016, 21:45 | #22 | ||
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
Quote:
However it doesn't really solve the problem. Toccata support must be enabled, and it probably isn't in most configs. Quote:
My advice is : don't attempt to use the copper for audio. It's useless, as it has no way to get in sync with paula. If you want to bypass the 28khz limit with interrupts, then you're similarly out of luck. I tried, and channels were always out of sync. I'm now wondering how complicated it would be to use native code and call the waveout (or whatever api) directly... |
||
15 July 2016, 00:45 | #23 |
Registered User
Join Date: Mar 2013
Location: Slovenia
Posts: 138
|
|
15 July 2016, 20:34 | #24 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Quote:
Register design and emulation is already mostly done but I haven't done any testing whatsoever.. Thats the point where interesting becomes boring.. Problem is that when I do emulation that only needs to be compatible enough (not timing sensitive etc), I take working driver as an example, then add emulation features until it works (+some extra if it is obvious from chips data sheet). Reverse operation of writing "driver" is very difficult and complex and extremely boring, at least if you also want it to work with real Toccata. Lots of DAC chip initialization is needed. And because it is PIO (like all non-PCI Amiga sound cards), you need to write samples to card's buffer with CPU in interrupt routine which makes it annoying to use from programmer point of view. |
|
08 October 2016, 16:35 | #25 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Very quick and dirty uaesnd example assembly attached that plays single channel 16 word sample with changing frequency.
Maybe it gets better later.. (at least someone should do proper asm and C header files. I don't use asm includes normally, they are only annoying when doing tiny programs) Current "hardware" documentation is here: https://github.com/tonioni/WinUAE/bl...r/sndboard.cpp (3.4.0b11+ required) |
29 October 2016, 15:44 | #26 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Another example. Plays wav sound file. 44100Hz/stereo/16-bit wave only. No wav-file parsing to keep example as simple as possible.
|
29 October 2016, 17:40 | #27 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
Would it be possible to have an extra flag in the interrupt status byte that disables EXTER interrupt requests and only handles internal interrupt flag ?
This is for simple polling. For normal Amiga audio INTREQ bits can be read with the relevant interrupt disabled, but here we're not alone on EXTER... Another thing. What happens if the repeat addr/len are set but the sample has already stopped ? For example, sample is run, second buffer is filled and we then set the repeat... but we were too slow so the sample has already stopped. This is to avoid buffer repetitions in case of overrun ; i set the sample with silent repeat, then fill the second buffer, then set the repeat. Therefore setting the repeat alone should start it immediately if nothing's currently being played. |
30 October 2016, 12:44 | #28 | ||
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Quote:
Check the hardware status register for pending interrupts. It is always valid, with or without enabled interrupts. Quote:
|
||
31 October 2016, 08:24 | #29 | |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
Quote:
Btw. As it's the size write that runs normal sample, it seems logic to me that the repeat address should be taken into account only when repeat length is written - this way nothing bad can occur between the two writes. This is how my current audio interface works. |
|
31 October 2016, 11:30 | #30 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
What about if there is special repeat length value (for example 0x80000000) that means "when sample ends and replen=0x80000000: pause until repeat length is changed"?
"Normal" sample length can also have same feature if needed. |
31 October 2016, 12:01 | #31 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
I guess this would work. Looks odd, though.
I'd prefer having a simple global flag indicating that setting the repeat makes it start immediately if no sample is playing. This way, one can set repeat+replen alone for looping samples. A good way to prevent pops - or any kind of race condition - would be to have some kind of strobe committing the changes. The structure can then be changed safely. In addition, with this way several streams can be perfectly in sync, which is important for tracker music. |
31 October 2016, 13:08 | #32 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Perhaps non-zero address + zero length look more sane. (Address can be freely changed, unpause happens only when length becomes non-zero)
Note that most important feature for me is that each stream can function completely separately, there can be multiple users at the same time without side-effects and without need for single driver software, for example some program(s) can use it via AHI while some other program can access it directly without danger of conflicts by using hardware allocation bits as documented. Thats why only global setting is stream on/off and play on/off bit masks (can be used to start/stop multiple streams at the exact same time). Do you really need other global options? There is already "latch" operation, one access to create atomically copy of stream's current parameters, another access to write it back atomically. Does it help if multiple streams (hopefully those that you allocated..) can be latched/written back simultaneously? (using new global bit mask register) |
31 October 2016, 14:07 | #33 | |||
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
Quote:
Quote:
Most 'global' options are perfectly fine at the stream scope. One thing that doesn't go well with trackers is the replay frequency. Using Hz isn't precise enough to play exactly like Amiga periods. A stream "base frequency" value, along with a period, would do the trick : we'd then use (3546895, per) for Amiga hw, (44100, 1) for cd-like, etc (iow the replay freq wouldn't be an int but a fraction). Quote:
Yes this is ok. |
|||
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bypassing the Amiga trademark | Anakirob | Amiga scene | 10 | 06 March 2012 13:51 |
Better Paula | 8bitbubsy | Hardware mods | 20 | 28 November 2011 10:51 |
Paula output rate | snyp | Coders. General | 5 | 18 February 2009 02:32 |
Who designed Paula? | thinlega | Amiga scene | 18 | 16 September 2005 16:45 |
Bypassing windows printer drivers | mtb | support.WinUAE | 4 | 19 September 2002 22:23 |
|
|