⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dsp.asm

📁 linux下的任天堂模拟器代码。供大家参考。
💻 ASM
📖 第 1 页 / 共 4 页
字号:
;Copyright (C) 1997-2007 ZSNES Team ( zsKnight, _Demo_, pagefault, Nach );;http://www.zsnes.com;http://sourceforge.net/projects/zsnes;https://zsnes.bountysource.com;;This program is free software; you can redistribute it and/or;modify it under the terms of the GNU General Public License;version 2 as published by the Free Software Foundation.;;This program is distributed in the hope that it will be useful,;but WITHOUT ANY WARRANTY; without even the implied warranty of;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the;GNU General Public License for more details.;;You should have received a copy of the GNU General Public License;along with this program; if not, write to the Free Software;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.%include "macros.mac"EXTSYM Decrease,DecreaseRateExp,EchoFB,EchoRate,EchoVL,EchoVREXTSYM FIRTAPVal0,FIRTAPVal1,FIRTAPVal2,FIRTAPVal3,FIRTAPVal4,FIRTAPVal5EXTSYM FIRTAPVal6,FIRTAPVal7,GlobalVL,GlobalVR,IncreaseEXTSYM MaxEcho,MusicVol,NoiseInc,NoiseSpeeds,dspPAdj,Voice0EnvIncEXTSYM Voice0IncNumber,Voice0State,Voice0TimeEXTSYM Voice0Start,Voice1Start,Voice2Start,Voice3StartEXTSYM Voice4Start,Voice5Start,Voice6Start,Voice7StartEXTSYM Voice0Noise,Voice1Noise,Voice2Noise,Voice3NoiseEXTSYM Voice4Noise,Voice5Noise,Voice6Noise,Voice7NoiseEXTSYM VolumeConvTable,VolumeTablebEXTSYM Voice0Status,Voice1Status,Voice2Status,Voice3StatusEXTSYM Voice4Status,Voice5Status,Voice6Status,Voice7StatusEXTSYM GainDecBendDataPos,GainDecBendDataTime,GainDecBendDataDatEXTSYM AdsrSustLevLoc,AdsrBlocksLeft,AdsrNextTimeDepthEXTSYM MuteVoiceF,VoiceStarter,DecayRate,SustainRateEXTSYM KeyOnStA,KeyOnStB,SoundTest,keyonsnSECTION .dataidentcode db 255,1,78,78SECTION .text; Digital Sound Processor of the SPC700 By _Demo_%macro initrevsthelp 1    mov al,[DSPMem+01h+%1]    mov ah,[DSPMem+00h+%1]    mov [DSPMem+01h+%1],ah    mov [DSPMem+00h+%1],al%endmacroSECTION .dataALIGN32NEWSYM DSPMem, times 256 db 0SECTION .text;Read DSP Registers functionsNEWSYM RDSPReg00       ; Voice  0  Volume Left      mov al,[DSPMem+00h]      retNEWSYM RDSPReg01       ; Voice  0  Volume Right      mov al,[DSPMem+01h]      retNEWSYM RDSPReg02       ; Voice  0  Pitch Low      mov al,[DSPMem+02h]      retNEWSYM RDSPReg03       ; Voice  0  Pitch High      mov al,[DSPMem+03h]      retNEWSYM RDSPReg04       ; Voice  0  SCRN      mov al,[DSPMem+04h]      retNEWSYM RDSPReg05       ; Voice  0  ADSR (1)      mov al,[DSPMem+05h]      retNEWSYM RDSPReg06       ; Voice  0  ADSR (2)      mov al,[DSPMem+06h]      retNEWSYM RDSPReg07       ; Voice  0  GAIN      mov al,[DSPMem+07h]      retNEWSYM RDSPReg08       ; Voice  0  ENVX      mov al,[DSPMem+08h]      and al,7Fh      retNEWSYM RDSPReg09       ; Voice  0  OUTX      mov al,[DSPMem+09h]      retNEWSYM RDSPReg0A       ;      mov al,[DSPMem+0Ah]      retNEWSYM RDSPReg0B       ;      mov al,[DSPMem+0Bh]      retNEWSYM RDSPReg0C       ;      mov al,[DSPMem+0Ch]      retNEWSYM RDSPReg0D       ;      mov al,[DSPMem+0Dh]      retNEWSYM RDSPReg0E       ;      mov al,[DSPMem+0Eh]      retNEWSYM RDSPReg0F       ; Voice  0  Echo coefficient      mov al,[DSPMem+0Fh]      retNEWSYM RDSPReg10       ; Voice  1  Volume Left      mov al,[DSPMem+10h]      retNEWSYM RDSPReg11       ; Voice  1  Volume Right      mov al,[DSPMem+11h]      retNEWSYM RDSPReg12       ; Voice  1  Pitch Low      mov al,[DSPMem+012h]      retNEWSYM RDSPReg13       ; Voice  1  Pitch High      mov al,[DSPMem+013h]      retNEWSYM RDSPReg14       ; Voice  1  SCRN      mov al,[DSPMem+014h]      retNEWSYM RDSPReg15       ; Voice  1  ADSR (1)      mov al,[DSPMem+015h]      retNEWSYM RDSPReg16       ; Voice  1  ADSR (2)      mov al,[DSPMem+016h]      retNEWSYM RDSPReg17       ; Voice  1  GAIN      mov al,[DSPMem+017h]      retNEWSYM RDSPReg18       ; Voice  1  ENVX      mov al,[DSPMem+018h]      and al,7Fh      retNEWSYM RDSPReg19       ; Voice  1  OUTX      mov al,[DSPMem+019h]      retNEWSYM RDSPReg1A       ;      mov al,[DSPMem+01Ah]      retNEWSYM RDSPReg1B       ;      mov al,[DSPMem+01Bh]      retNEWSYM RDSPReg1C       ;      mov al,[DSPMem+01Ch]      retNEWSYM RDSPReg1D       ;      mov al,[DSPMem+01Dh]      retNEWSYM RDSPReg1E       ;      mov al,[DSPMem+01Eh]      retNEWSYM RDSPReg1F       ; Voice  1  Echo coefficient      mov al,[DSPMem+01Fh]      retNEWSYM RDSPReg20       ; Voice  2  Volume Left      mov al,[DSPMem+20h]      retNEWSYM RDSPReg21       ; Voice  2  Volume Right      mov al,[DSPMem+21h]      retNEWSYM RDSPReg22       ; Voice  2  Pitch Low      mov al,[DSPMem+022h]      retNEWSYM RDSPReg23       ; Voice  2  Pitch High      mov al,[DSPMem+023h]      retNEWSYM RDSPReg24       ; Voice  2  SCRN      mov al,[DSPMem+024h]      retNEWSYM RDSPReg25       ; Voice  2  ADSR (1)      mov al,[DSPMem+025h]      retNEWSYM RDSPReg26       ; Voice  2  ADSR (2)      mov al,[DSPMem+026h]      retNEWSYM RDSPReg27       ; Voice  2  GAIN      mov al,[DSPMem+027h]      retNEWSYM RDSPReg28       ; Voice  2  ENVX      mov al,[DSPMem+028h]      and al,7Fh      retNEWSYM RDSPReg29       ; Voice  2  OUTX      mov al,[DSPMem+029h]      retNEWSYM RDSPReg2A       ;      mov al,[DSPMem+02Ah]      retNEWSYM RDSPReg2B       ;      mov al,[DSPMem+02Bh]      retNEWSYM RDSPReg2C       ;      mov al,[DSPMem+02Ch]      retNEWSYM RDSPReg2D       ;      mov al,[DSPMem+02Dh]      retNEWSYM RDSPReg2E       ;      mov al,[DSPMem+02Eh]      retNEWSYM RDSPReg2F       ; Voice  2  Echo coefficient      mov al,[DSPMem+02Fh]      retNEWSYM RDSPReg30       ; Voice  3  Volume Left      mov al,[DSPMem+30h]      retNEWSYM RDSPReg31       ; Voice  3  Volume Right      mov al,[DSPMem+31h]      retNEWSYM RDSPReg32       ; Voice  3  Pitch Low      mov al,[DSPMem+032h]      retNEWSYM RDSPReg33       ; Voice  3  Pitch High      mov al,[DSPMem+033h]      retNEWSYM RDSPReg34       ; Voice  3  SCRN      mov al,[DSPMem+034h]      retNEWSYM RDSPReg35       ; Voice  3  ADSR (1)      mov al,[DSPMem+035h]      retNEWSYM RDSPReg36       ; Voice  3  ADSR (2)      mov al,[DSPMem+036h]      retNEWSYM RDSPReg37       ; Voice  3  GAIN      mov al,[DSPMem+037h]      retNEWSYM RDSPReg38       ; Voice  3  ENVX      mov al,[DSPMem+038h]      and al,7Fh      retNEWSYM RDSPReg39       ; Voice  3  OUTX      mov al,[DSPMem+039h]      retNEWSYM RDSPReg3A       ;      mov al,[DSPMem+03Ah]      retNEWSYM RDSPReg3B       ;      mov al,[DSPMem+03Bh]      retNEWSYM RDSPReg3C       ;      mov al,[DSPMem+03Ch]      retNEWSYM RDSPReg3D       ;      mov al,[DSPMem+03Dh]      retNEWSYM RDSPReg3E       ;      mov al,[DSPMem+03Eh]      retNEWSYM RDSPReg3F       ; Voice  3  Echo coefficient      mov al,[DSPMem+03Fh]      retNEWSYM RDSPReg40       ; Voice  4  Volume Left      mov al,[DSPMem+40h]      retNEWSYM RDSPReg41       ; Voice  4  Volume Right      mov al,[DSPMem+41h]      retNEWSYM RDSPReg42       ; Voice  4  Pitch Low      mov al,[DSPMem+042h]      retNEWSYM RDSPReg43       ; Voice  4  Pitch High      mov al,[DSPMem+043h]      retNEWSYM RDSPReg44       ; Voice  4  SCRN      mov al,[DSPMem+044h]      retNEWSYM RDSPReg45       ; Voice  4  ADSR (1)      mov al,[DSPMem+045h]      retNEWSYM RDSPReg46       ; Voice  4  ADSR (2)      mov al,[DSPMem+046h]      retNEWSYM RDSPReg47       ; Voice  4  GAIN      mov al,[DSPMem+047h]      retNEWSYM RDSPReg48       ; Voice  4  ENVX      mov al,[DSPMem+048h]      and al,7Fh      retNEWSYM RDSPReg49       ; Voice  4  OUTX      mov al,[DSPMem+049h]      retNEWSYM RDSPReg4A       ;      mov al,[DSPMem+04Ah]      retNEWSYM RDSPReg4B       ;      mov al,[DSPMem+04Bh]      retNEWSYM RDSPReg4C       ;      mov al,[DSPMem+04Ch]      retNEWSYM RDSPReg4D       ;      mov al,[DSPMem+04Dh]      retNEWSYM RDSPReg4E       ;      mov al,[DSPMem+04Eh]      retNEWSYM RDSPReg4F       ; Voice  4  Echo coefficient      mov al,[DSPMem+04Fh]      retNEWSYM RDSPReg50       ; Voice  5  Volume Left      mov al,[DSPMem+50h]      retNEWSYM RDSPReg51       ; Voice  5  Volume Right      mov al,[DSPMem+51h]      retNEWSYM RDSPReg52       ; Voice  5  Pitch Low      mov al,[DSPMem+052h]      retNEWSYM RDSPReg53       ; Voice  5  Pitch High      mov al,[DSPMem+053h]      retNEWSYM RDSPReg54       ; Voice  5  SCRN      mov al,[DSPMem+054h]      retNEWSYM RDSPReg55       ; Voice  5  ADSR (1)      mov al,[DSPMem+055h]      retNEWSYM RDSPReg56       ; Voice  5  ADSR (2)      mov al,[DSPMem+056h]      retNEWSYM RDSPReg57       ; Voice  5  GAIN      mov al,[DSPMem+057h]      retNEWSYM RDSPReg58       ; Voice  5  ENVX      mov al,[DSPMem+058h]      and al,7Fh      retNEWSYM RDSPReg59       ; Voice  5  OUTX      mov al,[DSPMem+059h]      retNEWSYM RDSPReg5A       ;      mov al,[DSPMem+05Ah]      retNEWSYM RDSPReg5B       ;      mov al,[DSPMem+05Bh]      retNEWSYM RDSPReg5C       ;      mov al,[DSPMem+05Ch]      retNEWSYM RDSPReg5D       ;      mov al,[DSPMem+05Dh]      retNEWSYM RDSPReg5E       ;      mov al,[DSPMem+05Eh]      retNEWSYM RDSPReg5F       ; Voice  5  Echo coefficient      mov al,[DSPMem+05Fh]      retNEWSYM RDSPReg60       ; Voice  6  Volume Left      mov al,[DSPMem+60h]      retNEWSYM RDSPReg61       ; Voice  6  Volume Right      mov al,[DSPMem+61h]      retNEWSYM RDSPReg62       ; Voice  6  Pitch Low      mov al,[DSPMem+062h]      retNEWSYM RDSPReg63       ; Voice  6  Pitch High      mov al,[DSPMem+063h]      retNEWSYM RDSPReg64       ; Voice  6  SCRN      mov al,[DSPMem+064h]      retNEWSYM RDSPReg65       ; Voice  6  ADSR (1)      mov al,[DSPMem+065h]      retNEWSYM RDSPReg66       ; Voice  6  ADSR (2)      mov al,[DSPMem+066h]      retNEWSYM RDSPReg67       ; Voice  6  GAIN      mov al,[DSPMem+067h]      retNEWSYM RDSPReg68       ; Voice  6  ENVX      mov al,[DSPMem+068h]      and al,7Fh      retNEWSYM RDSPReg69       ; Voice  6  OUTX      mov al,[DSPMem+069h]      retNEWSYM RDSPReg6A       ;      mov al,[DSPMem+06Ah]      retNEWSYM RDSPReg6B       ;      mov al,[DSPMem+06Bh]      retNEWSYM RDSPReg6C       ;      mov al,[DSPMem+06Ch]      retNEWSYM RDSPReg6D       ;      mov al,[DSPMem+06Dh]      retNEWSYM RDSPReg6E       ;      mov al,[DSPMem+06Eh]      retNEWSYM RDSPReg6F       ; Voice  6  Echo coefficient      mov al,[DSPMem+06Fh]      retNEWSYM RDSPReg70       ; Voice  7  Volume Left      mov al,[DSPMem+70h]      retNEWSYM RDSPReg71       ; Voice  7  Volume Right      mov al,[DSPMem+71h]      retNEWSYM RDSPReg72       ; Voice  7  Pitch Low      mov al,[DSPMem+072h]      retNEWSYM RDSPReg73       ; Voice  7  Pitch High      mov al,[DSPMem+073h]      retNEWSYM RDSPReg74       ; Voice  7  SCRN      mov al,[DSPMem+074h]      retNEWSYM RDSPReg75       ; Voice  7  ADSR (1)      mov al,[DSPMem+075h]      retNEWSYM RDSPReg76       ; Voice  7  ADSR (2)      mov al,[DSPMem+076h]      retNEWSYM RDSPReg77       ; Voice  7  GAIN      mov al,[DSPMem+077h]      retNEWSYM RDSPReg78       ; Voice  7  ENVX      mov al,[DSPMem+078h]      and al,7Fh      retNEWSYM RDSPReg79       ; Voice  7  OUTX      mov al,[DSPMem+079h]      retNEWSYM RDSPReg7A       ;      mov al,[DSPMem+07Ah]      retNEWSYM RDSPReg7B       ;      mov al,[DSPMem+07Bh]      retNEWSYM RDSPReg7C       ;      mov al,[DSPMem+07Ch]      retNEWSYM RDSPReg7D       ;      mov al,[DSPMem+07Dh]      retNEWSYM RDSPReg7E       ;      mov al,[DSPMem+07Eh]      retNEWSYM RDSPReg7F       ; Voice  7  Echo coefficient      mov al,[DSPMem+07Fh]      retNEWSYM RDSPReg80       ;      mov al,[DSPMem+080h]      retNEWSYM RDSPReg81       ;      mov al,[DSPMem+081h]      retNEWSYM RDSPReg82       ;      mov al,[DSPMem+082h]      retNEWSYM RDSPReg83       ;      mov al,[DSPMem+083h]      retNEWSYM RDSPReg84       ;      mov al,[DSPMem+084h]      retNEWSYM RDSPReg85       ;      mov al,[DSPMem+085h]      retNEWSYM RDSPReg86       ;      mov al,[DSPMem+086h]      retNEWSYM RDSPReg87       ;      mov al,[DSPMem+087h]      retNEWSYM RDSPReg88       ;      mov al,[DSPMem+088h]      retNEWSYM RDSPReg89       ;      mov al,[DSPMem+089h]      retNEWSYM RDSPReg8A       ;      mov al,[DSPMem+08Ah]      retNEWSYM RDSPReg8B       ;      mov al,[DSPMem+08Bh]      retNEWSYM RDSPReg8C       ;      mov al,[DSPMem+08Ch]      retNEWSYM RDSPReg8D       ;      mov al,[DSPMem+08Dh]      retNEWSYM RDSPReg8E       ;      mov al,[DSPMem+08Eh]      retNEWSYM RDSPReg8F       ;      mov al,[DSPMem+08Fh]      retNEWSYM RDSPReg90       ;      mov al,[DSPMem+090h]      retNEWSYM RDSPReg91       ;      mov al,[DSPMem+091h]      retNEWSYM RDSPReg92       ;      mov al,[DSPMem+092h]      retNEWSYM RDSPReg93       ;      mov al,[DSPMem+093h]      retNEWSYM RDSPReg94       ;      mov al,[DSPMem+094h]      retNEWSYM RDSPReg95       ;      mov al,[DSPMem+095h]      retNEWSYM RDSPReg96       ;      mov al,[DSPMem+096h]      retNEWSYM RDSPReg97       ;      mov al,[DSPMem+097h]      retNEWSYM RDSPReg98       ;      mov al,[DSPMem+098h]      retNEWSYM RDSPReg99       ;      mov al,[DSPMem+099h]      retNEWSYM RDSPReg9A       ;      mov al,[DSPMem+09Ah]      retNEWSYM RDSPReg9B       ;      mov al,[DSPMem+09Bh]      retNEWSYM RDSPReg9C       ;      mov al,[DSPMem+09Ch]      retNEWSYM RDSPReg9D       ;      mov al,[DSPMem+09Dh]      retNEWSYM RDSPReg9E       ;      mov al,[DSPMem+09Eh]      retNEWSYM RDSPReg9F       ;      mov al,[DSPMem+09Fh]      retNEWSYM RDSPRegA0       ;      mov al,[DSPMem+0A0h]      ret

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -