flat assembler
Message board for the users of flat assembler.
Index
> DOS > How to make my SB AWE 64 (or SB16, perhaps) double channel? |
Author |
|
ASHLEY4 30 Aug 2004, 14:41
I have not worked on SB16 for years, so am ruste, but here may help http://www.singlix.org/trdos/specs.html
go to this site and get the txt doc "AWE32P10 TXT" in it is a part called " Sample Uploading/Downloading" which tells howto up/down load at the same time, (does not us dma) it may help ?. \\\\||//// (@@) ASHLEY4. |
|||
30 Aug 2004, 14:41 |
|
Bitdog 05 Sep 2004, 05:25
Hello my friend, ASHLEY4.
You're always in the right place, at the right time, with the right thing to say. Bitdog |
|||
05 Sep 2004, 05:25 |
|
Cas 08 Sep 2004, 21:47
Ashley: I have not yet tried that link. I'm going to do it right now. But anyway, I've got the sensation that it is only about loading and uploading samples in the AWE soundbank. What I need is DSP handling. This is also useful to me, but, what do you know about the DSP in this matter?
|
|||
08 Sep 2004, 21:47 |
|
ASHLEY4 09 Sep 2004, 09:21
This is a DSP lib from the above site.
Code: ;------------------------------; SB_DSP.ASM --; Programmer's library for the Sound Blaster DSP interface;------------------------------- IDEAL MODEL small DATASEGSB_IO_Port DW 0220h ;These values are kept here to avoid addDSP_Reset DW 0226h ;instructions in code that may be time-DSP_RDData DW 022Ah ;sensitive.DSP_Command DW 022ChDSP_RDAvail DW 022EhDSP_WRData EQU DSP_Command ;Aliases for the same variable nameDSP_Status EQU DSP_Command CODESEGPUBLIC _dsp_reset,_dsp_voice,_set_SB_address,_dsp_dma_prepare,_dsp_timeMACRO await_DSPLOCAL @@Wait_Ready push ax dx@@Wait_Ready: mov dx,[DSP_Status] in al,dx and al,128 jnz @@Wait_Ready pop dx axENDM MACROMACRO ten_microsec_delayLOCAL @@KT ;If you know of a better, more accurate, push cx ;more reliable, just plain smarter, way mov cx,20000 ;to do this, PLEASE TELL ME.@@KT: ; nop ;(The idea is to kill 10 microseconds.) loop @@KT ; pop cx ;email: heathh@cco.caltech.eduENDM ten_microsec_delay;------------------------; void far dsp_time(int pacing);-----------------------; pacing = 255 - (1,000,000 / frequency);----------------------PROC _dsp_time FARARG delay:WORD push bp mov bp,sp push ax dx await_DSP mov dx,[DSP_Command] mov al,040h out dx,al await_DSP mov dx,[DSP_Command] mov ax,[delay] out dx,al pop dx ax pop bp retENDP _dsp_time;------------------------------; void far dsp_reset(void);------------------------------PROC _dsp_reset FAR push ax dx mov dx,[DSP_Reset] mov al,1 out dx,al ten_microsec_delay mov al,0 out dx,al@@Wait_Ready: mov dx,[DSP_RDAvail] in al,dx and al,128 jz @@Wait_Ready mov dx,[DSP_RDData] in al,dx cmp al,0AAh jne @@Wait_Ready mov ax,165 push ax call _dsp_time pop ax pop dx ax retENDP _dsp_reset;-----------------------------; void far dsp_dma_prepare(int Dir,int Length);-----------------------------; Dir = 0 for Microphone Input, 1 for Speaker Output; Length = Length of data to be sampled/played;-----------------------------PROC _dsp_dma_prepare FARARG Dir:WORD,Len:WORD push bp mov bp,sp push ax dx await_DSP mov al,24h cmp [Dir],0 jz @@Is_Read mov al,14h@@Is_Read: mov dx,[DSP_Command] out dx,al await_DSP mov ax,[Len] out dx,al await_DSP mov al,ah out dx,al pop dx ax pop bp retENDP _dsp_dma_prepare;---------------------------; void far dsp_voice(Activity);---------------------------; Activity = 0 for silent, 1 for audible;---------------------------PROC _dsp_voice FARARG Which:WORD push bp mov bp,sp push dx ax await_DSP mov ax,[Which] and al,1 ;Want a 1/0 parameter xor al,1 shl al,1 or al,0D1h mov dx,[DSP_Command] out dx,al pop ax dx pop bp retENDP _dsp_voice;--------------------------; void far set_SB_address(int base);-------------------------; Sets base port of SoundBlaster that other functions refer to.; Most likely value (and the default): 0x220;-------------------------PROC _set_SB_address FARARG Port:WORD push bp mov bp,sp push ax mov ax,[Port] mov [SB_IO_Port],ax add ax,6 mov [DSP_Reset],ax add ax,4 mov [DSP_RDData],ax add ax,2 mov [DSP_Command],ax add ax,2 mov [DSP_RDAvail],ax pop ax pop bp retENDP _set_SB_addressEND As i am making a 32bit dos like OS, i will be looking into sound card drivers etc, i will be moving on from SB16 etc, maybe looking at AC97 chips as a lot of sound cards use these chips, i am just get info at the moment, no coding on sound yet. So i do not have much info, i use to program SB16 for my dos games and cdplayer etc, but have forgotan most things . \\\\||//// (@@) ASHLEY4. |
|||
09 Sep 2004, 09:21 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.