V 0.1 First Release $VER V 0.2 Bug fixed in DSPGuiAnalyzer (Strings needed two zerobytes at the end instead of one !) ----------------------------------------------------------------------------- The DSP PlugIn System gives programmers the ability to design DSP algorithms for MOTOROLA 68k processors. The programmers don't have to care about nothing but the dsp algorithm to implement. It should be easy to use the DspPlugIns in other 68k Motorola Systems like AHI or Applications with minimal change to the source. :) You can do: - Any type of Scopes or spectrum analyzers - Soundcard Support plugins (Are difficult -> Sync) - Hall, Delay, Filters, Compressors ... - Overload analyzers, Correlation analyzers - Denoising Systems, Declicking Systems - Smoothing algorithms ... To try out a DSP plugin do the following: 1. Load Symphonie Player Pro (Symphonie Jr not yet supported for plugins) 2. Make the System Control Window as large as possible 3. Load a DSP Plugin (lower most gadgets) 4. Select |ON| to run the PlugIn This is just a short text. Look at it as BETA release. Experienced programers will have no problem in finding their ways by simply examining the example sources. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- The following text describes the functions of the SuperSupportTable. The SuperSupportTable is a mixed list of subjumps and data. Do never use subjumps not documented ! ----------------------------------------------------------------------------- LIBRARY SECTION : CONTAINS THE ADRESS OF SUBROUTINES ----------------------------------------------------------------------------- SST_SYS_GetMem EQU 0 ;Get Memory ;I(A0L)(MEMBLOCK_PTR) INPUT ;O(D0L)(0=ERROR) OUTPUT ;MEMBLOCK EXAMPLE: memblock dc.l 0 ;Ptr to memory (0= memory has been freed) dc.l 1024 ;Length in Bytes dc.l 1 ;Flags MEMF_PUBLIC = 1 SST_SYS_FreeMem EQU 4 ;Free Memory ;If the memblock has already been freed, it wont free again ! ;I(A0L)(MEMBLOCK_PTR) ;O() SST_FILE_RequestFileName EQU 100 ;Get Filename using reqtools.library ;I(A0L)(RequestText_PTR) ;O(D0W)(0=Cancel) SST_FILE_SetReqPattern EQU 104 ;Set Pattern for Filerequester ;I(A0L)(PatternText_PTR) ;O() e.g. Pattern_TXT dc.b "#?.SymDSP",0 SST_FILE_SetReqDir EQU 108 ;Set Filerequester path ;I(A0L)(Dir_TXT) SST_FILE_GetFileName EQU 112 ;Get requested FileName ;I() ;O(A0L)(Filename_PTR) SST_FILE_GetFileLen EQU 116 ;I(A0L)(Filename_PTR) ;O(D0L)(FileLength in Bytes) SST_GFX_AssistText EQU 200 ;Print Text ;I(A0L)(Text_PTR) ;O() SST_GFX_AssistDecLong EQU 204 ;I(D0L)(Value) ;O() SST_GFX_AssistDecByte EQU 208 ;I(D0B)(Value) ;O() SST_GFX_AssistHexLong EQU 212 ;I(D0L)(Value) ;O() SST_AUDIO_GetChunkLen EQU 400 ;O(D0L)(SampleStreamChunk Length in Samples) ;O() ;1 Sample = 2x16 Bit Samples = 32 Bits ----------------------------------------------------------------------------- DATA SECTION : POINTERS TO LIBS and SCREEN ----------------------------------------------------------------------------- SST_PTR_EXECBASE EQU 1600 ;Contains PTR to EXECBASE SST_PTR_INTBASE EQU 1604 SST_PTR_DOSBASE EQU 1608 SST_PTR_ASLBASE EQU 1612 SST_PTR_REQTOOLSBASE EQU 1616 SST_PTR_GFXBASE EQU 1620 SST_PTR_Screen EQU 1650 ;Contains PTR to SCREEN ----------------------------------------------------------------------------- DATA SECTION : CONTAINS DATA, some of it with realtime update from the SymphonieOS ----------------------------------------------------------------------------- SST_ADR_ProcessorFlags EQU 1800 SST_ADR_SystemFrequency EQU 1804 SST_ADR_SystemBpm EQU 1808 SST_ADR_ChunkLen EQU 1812 ;in Samples SST_ADR_OversampleFlag EQU 1816 SST_ADR_MaxAmplitude EQU 1820 ;$7fff in SymPRO SST_ADR_BitPerSample EQU 1824 ;16 for 2x16 Bit Stream ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- Notes: ----------------------------------------------------------------------------- Do only use PC relative Assembler. (Have a look at the example sources) You can use 020+ Opcodes. Save it as ABSOLUTE CODE / RAW CODE ! If you compile the given sources, you have to get identical PlugIns. If you use your own windows, use GetMsg in the DSPLIB:RefreshGraph to get window messages. Don't use Wait or the System might wait twice. Use OpenWindow in InitDSP and CloseWindow in CleanUpDSP OR Use OpenWindow in StartDSP and CloseWindow in StopDSP All GFX Update MUST take place in RefreshGraph NOT WITHIN ProcDsp !! ProcDsp is called within an interrupt -> so make your algorithms as fast as possible (or even faster ) :)) All interrupt limitations apply !!! Take care ! Within ProcDsp you are NOT allowed to do anything but calculate some stuff - thats it. To do a scope e.g. You have to copy data to a buffer and then do the gfx stuff in RefreshGraph. The same is for very slow algorithms e.g. FFT analyzer For advanced DSP algorithms you will most of the time have to install a ringbuffer. The Delay example does this. The DSP GUI can only handle positive values YET. To get memory protection do use the alloc mem free mems of the SuperSupportTable. ----------------------------------------------------------------------------- This is the DSP library, all functions must be valid, they must at least point to a RTS. InitDSP and GetDspTitle also need parameters which have to be present ! In ProcDsp you have to save all registers used. ----------------------------------------------------------------------------- DSPLIB DEF ----------------------------------------------------------------------------- jmp InitDSP(PC) ;Allocate Mem, Build your Tables, Open Wins jmp CleanUpDSP(PC) ;Free Mem, Close Wins jmp ProcDsp(PC) ;Process DSP algorithm (IN interrupt !!) jmp GetDspTitle(PC) ;Get DSP algorithm Title jmp ModifyValue(PC) ;notify changed Value jmp GraphSizeModify(PC) ;notify graph size has changed (not yet implemented) jmp RefreshGraph(PC) ;notify its time for a GFX update jmp StartDSP(PC) ;notify start (User pressed |ON| ) jmp StopDSP(PC) ;notify stop (User pressed |OFF| ) dc.l -1 ;-1 MUST BE PRESENT If you find a bug in the docs or the DspPlugIn System contact pmeng@vtx.ch Note its all beta, but its already fully functional. The DSP PlugIn Gui for RAPID PROTOTYPING will change for sure. If you have some problems with loading PlugIns try deactivating the cpu instruction cache.