亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? aica.c

?? DC上的GB模擬器源代碼
?? C
字號:
/* This file is part of the Dreamcast function library. * Please see libdream.c for further details. * * (c)2000 Dan Potter */#include "aica.h"void aica_init() {	int i, j;		/* Initialize AICA channels */		SNDREG32(0x2800) = 0x0000;		for (i=0; i<64; i++) {		for (j=0; j<0x80; j+=4)			CHNREG32(i, j) = 0;		CHNREG32(i,0) = 0x8000;		CHNREG32(i,20) = 0x1f;	}	SNDREG32(0x2800) = 0x000f;}/* Translates a volume from linear form to logarithmic form (required by   the AICA chip *//* int logs[] = {0, 40, 50, 58, 63, 68, 73, 77, 80, 83, 86, 89, 92, 94, 97, 99, 101, 103,105, 107, 109, 111, 112, 114, 116, 117, 119, 120, 122, 123, 125, 126, 127,129, 130, 131, 133, 134, 135, 136, 137, 139, 140, 141, 142, 143, 144, 145,146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 156, 157, 158, 159,160, 161, 162, 162, 163, 164, 165, 166, 166, 167, 168, 169, 170, 170, 171,172, 172, 173, 174, 175, 175, 176, 177, 177, 178, 179, 180, 180, 181, 182,182, 183, 183, 184, 185, 185, 186, 187, 187, 188, 188, 189, 190, 190, 191,191, 192, 193, 193, 194, 194, 195, 196, 196, 197, 197, 198, 198, 199, 199,200, 201, 201, 202, 202, 203, 203, 204, 204, 205, 205, 206, 206, 207, 207,208, 208, 209, 209, 210, 210, 211, 211, 212, 212, 213, 213, 214, 214, 215,215, 216, 216, 217, 217, 217, 218, 218, 219, 219, 220, 220, 221, 221, 222,222, 222, 223, 223, 224, 224, 225, 225, 225, 226, 226, 227, 227, 228, 228,228, 229, 229, 230, 230, 230, 231, 231, 232, 232, 232, 233, 233, 234, 234,234, 235, 235, 236, 236, 236, 237, 237, 238, 238, 238, 239, 239, 240, 240,240, 241, 241, 241, 242, 242, 243, 243, 243, 244, 244, 244, 245, 245, 245,246, 246, 247, 247, 247, 248, 248, 248, 249, 249, 249, 250, 250, 250, 251,251, 251, 252, 252, 252, 253, 253, 253, 254, 254, 254, 255}; */int logs[] = {	0, 15, 22, 27, 31, 35, 39, 42, 45, 47, 50, 52, 55, 57, 59, 61,	63, 65, 67, 69, 71, 73, 74, 76, 78, 79, 81, 82, 84, 85, 87, 88,	90, 91, 92, 94, 95, 96, 98, 99, 100, 102, 103, 104, 105, 106,	108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 120, 121,	122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,	135, 136, 137, 138, 138, 139, 140, 141, 142, 143, 144, 145, 146,	146, 147, 148, 149, 150, 151, 152, 152, 153, 154, 155, 156, 156,	157, 158, 159, 160, 160, 161, 162, 163, 164, 164, 165, 166, 167,	167, 168, 169, 170, 170, 171, 172, 173, 173, 174, 175, 176, 176,	177, 178, 178, 179, 180, 181, 181, 182, 183, 183, 184, 185, 185,	186, 187, 187, 188, 189, 189, 190, 191, 191, 192, 193, 193, 194,	195, 195, 196, 197, 197, 198, 199, 199, 200, 200, 201, 202, 202,	203, 204, 204, 205, 205, 206, 207, 207, 208, 209, 209, 210, 210,	211, 212, 212, 213, 213, 214, 215, 215, 216, 216, 217, 217, 218,	219, 219, 220, 220, 221, 221, 222, 223, 223, 224, 224, 225, 225,	226, 227, 227, 228, 228, 229, 229, 230, 230, 231, 232, 232, 233,	233, 234, 234, 235, 235, 236, 236, 237, 237, 238, 239, 239, 240,	240, 241, 241, 242, 242, 243, 243, 244, 244, 245, 245, 246, 246,	247, 247, 248, 248, 249, 249, 250, 250, 251, 251, 252, 252, 253, 254};int vol_to_log(int vol) {/*	vol = 0xff - (vol & 0xff); *//*	vol = 0xff - logs[vol & 0xff]; *//*	vol = 128 - ((vol & 0xff) / 2); */	vol = 0xff - logs[128 + ((vol & 0xff) / 2)];	return vol;}/* Sets up a sound channel completely. This is generally good if you want   a quick and dirty way to play notes. If you want a more comprehensive   set of routines (more like PC wavetable cards) see below.      ch is the channel to play on (0 - 63)   smpptr is the pointer to the sound data; if you're running off the     SH4, then this ought to be (ptr - 0xa0800000); otherwise it's just     ptr. Basically, it's an offset into sound ram.   mode is one of the mode constants (16 bit, 8 bit, ADPCM)   nsamp is the number of samples to play (not number of bytes!)   freq is the sampling rate of the sound   vol is the volume, 0 to 0xff (0xff is louder)   pan is a panning constant -- 0 is left, 128 is center, 255 is right.   This routine (and the similar ones) owe a lot to Marcus' sound example --    I hadn't gotten quite this far into dissecting the individual regs yet. */void aica_play(int ch, unsigned long smpptr, int mode, int loopst, int loopend,		int freq, int vol, int pan, int loopflag) {	unsigned long freq_lo, freq_base = 5644800;	int freq_hi = 7;	int i, j;	/* Stop the channel (if it's already playing) */	/*for (i=CHNREG8(ch, 41); i<=0xff; i++) {		CHNREG8(ch, 41) = i;	} */	aica_stop(ch);	for (i=0; i<256; i++) {		asm("nop");		asm("nop");		asm("nop");		asm("nop");	}		/* Convert the incoming volume and pan into hardware values */	vol = vol_to_log(vol);		/* For the moment this is going to have to suffice, until we really	   figure out what these mean. */	if (pan == 0x80)		pan = 0;	else if (pan < 0x80)		pan = 0x1f;	else		pan = 0xf;		/* Envelope setup. The first of these is the loop point,	   e.g., where the sample starts over when it loops. The second	   is the loop end. This is the full length of the sample when	   you are not looping, or the loop end point when you are (though	   storing more than that is a waste of memory if you're not doing	   volume enveloping). */	CHNREG32(ch, 8) = loopst & 0xffff;	CHNREG32(ch, 12) = loopend & 0xffff;		/* Need to convert frequency to floating point format	   (freq_hi is exponent, freq_lo is mantissa)	   Formula is ferq = 44100*2^freq_hi*(1+freq_lo/1024) */	while (freq < freq_base && freq_hi > -8) {		freq_base >>= 1;		--freq_hi;	}	freq_lo = (freq<<10) / freq_base;		/* Write resulting values */	CHNREG32(ch, 24) = (freq_hi << 11) | (freq_lo & 1023);		/* Set volume, pan, and some other things that we don't know what	   they do =) */	CHNREG8(ch, 36) = pan;	CHNREG8(ch, 37) = 0xf;	CHNREG8(ch, 40) = 0x24;	CHNREG8(ch, 41) = vol;	/* Vol starts at zero so we can ramp */	/* If we supported volume envelopes (which we don't yet) then	   this value would set that up. The top 4 bits determine the	   envelope speed. f is the fastest, 1 is the slowest, and 0	   seems to be an invalid value and does weird things). The	   default (below) sets it into normal mode (play and terminate/loop).	CHNREG32(ch, 16) = 0xf010;	*/	CHNREG32(ch, 16) = 0x1f;	/* No volume envelope */			/* Set sample format, buffer address, and looping control. If	   0x0200 mask is set on reg 0, the sample loops infinitely. If	   it's not set, the sample plays once and terminates. We'll	   also set the bits to start playback here. */	CHNREG32(ch, 4) = smpptr & 0xffff;	if (loopflag)		CHNREG32(ch, 0) = 0xc000 | 0x0200 | (mode<<7) | (smpptr >> 16);	/* Loops */	else		CHNREG32(ch, 0) = 0xc000 | 0x0000 | (mode<<7) | (smpptr >> 16);	/* No loop */		/* Enable playback */	/* CHNREG32(ch, 0) |= 0xc000; */	/*for (i=0xff; i>=vol; i--)		CHNREG8(ch, 41) = i; */}/* Stop the sound on a given channel */void aica_stop(int ch) {	CHNREG32(ch, 0) = (CHNREG32(ch, 0) & ~0x4000) | 0x8000;}/* The rest of these routines can change the channel in mid-stride so you   can do things like vibrato and panning effects. */   /* Set channel volume */void aica_vol(int ch, int vol) {	vol = vol_to_log(vol);	CHNREG8(ch, 41) = vol;}/* Set channel pan */void aica_pan(int ch, int pan) {	if (pan == 0x80)		pan = 0;	else if (pan < 0x80)		pan = 0x1f;	else		pan = 0xf;	CHNREG8(ch, 36) = pan;}/* Set channel frequency */void aica_freq(int ch, int freq) {	unsigned long freq_lo, freq_base = 5644800;	int freq_hi = 7;	while (freq < freq_base && freq_hi > -8) {		freq_base >>= 1;		freq_hi--;	}	freq_lo = (freq<<10) / freq_base;	CHNREG32(ch, 24) = (freq_hi << 11) | (freq_lo & 1023);}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕精品一区二区精品绿巨人 | 亚洲人成网站色在线观看| 亚洲精品va在线观看| 成人午夜激情在线| 久久精品久久精品| 精品一区二区在线观看| 国产精品久久久久一区二区三区共 | 亚洲综合自拍偷拍| 日韩一区二区中文字幕| 色综合久久天天综合网| 国产精品资源站在线| 视频一区欧美日韩| 国产精品欧美一区二区三区| 91捆绑美女网站| 美女视频黄 久久| 亚洲欧美日韩一区二区三区在线观看| 欧美精品vⅰdeose4hd| 色综合久久88色综合天天6| 免费久久精品视频| 亚洲影视资源网| 欧美一级日韩免费不卡| 99九九99九九九视频精品| 免费欧美在线视频| 舔着乳尖日韩一区| 亚洲一区二三区| 亚洲高清在线视频| 婷婷中文字幕一区三区| 亚洲高清视频中文字幕| 蜜桃精品视频在线| 国产一区在线观看视频| 日日夜夜一区二区| 日本成人在线一区| 国产精品一二三区在线| 久久国内精品视频| av中文字幕一区| 欧美中文一区二区三区| 欧美一区二区三区系列电影| 欧美va在线播放| 国产精品成人网| 亚洲午夜视频在线| 国产在线精品免费av| 中文字幕一区二区在线播放| 欧美综合亚洲图片综合区| 日韩一区二区免费在线观看| 精品欧美一区二区三区精品久久| 久久综合色之久久综合| 亚洲你懂的在线视频| 日本欧美大码aⅴ在线播放| 国产一区二区三区电影在线观看| 99久久综合国产精品| 欧美军同video69gay| 国产精品久久久久久久蜜臀| 日韩极品在线观看| 欧美影院一区二区三区| 国产精品人成在线观看免费| 麻豆精品视频在线观看免费| 色先锋久久av资源部| 欧美电影免费观看高清完整版在| 亚洲精品日日夜夜| www.亚洲在线| 欧美国产国产综合| 激情国产一区二区 | 中文字幕精品—区二区四季| 激情av综合网| 2020国产精品自拍| 奇米色777欧美一区二区| 88在线观看91蜜桃国自产| 国产精品婷婷午夜在线观看| 国产一区二区不卡| 中文字幕乱码久久午夜不卡| 国产一区二区在线免费观看| 精品国产乱码久久久久久闺蜜| 午夜久久久久久久久 | 日韩午夜在线播放| 精品一区二区久久久| 欧美大片在线观看| 成人美女视频在线观看18| 中文一区在线播放| 91视频com| 久久er精品视频| 自拍偷拍亚洲综合| 91精品一区二区三区久久久久久| 五月综合激情婷婷六月色窝| 亚洲精品一区二区三区在线观看| 国产激情一区二区三区四区| 亚洲尤物在线视频观看| 日韩欧美成人一区二区| 97精品电影院| 久久精品国产第一区二区三区| 中文字幕精品—区二区四季| 欧美日韩一区精品| 欧洲一区二区三区免费视频| 国产麻豆视频一区二区| 一区二区久久久久| 国产精品网友自拍| 精品国产乱码久久久久久蜜臀| 91福利视频网站| 波多野结衣中文字幕一区二区三区| 视频一区视频二区在线观看| 亚洲免费观看高清完整版在线观看 | 成人美女视频在线观看18| 日韩国产欧美在线播放| 1区2区3区国产精品| 中文字幕第一区二区| 国产亚洲欧美中文| 精品国产乱码久久久久久蜜臀| 欧美性xxxxxx少妇| 91丨九色丨国产丨porny| 成人网页在线观看| 不卡的av电影在线观看| 国产成人综合网站| 国产东北露脸精品视频| 国产盗摄女厕一区二区三区| 成人免费视频免费观看| 国产成人亚洲综合a∨猫咪| 国产成人免费视| 成人久久18免费网站麻豆| 91美女在线观看| 欧美高清一级片在线| 日韩亚洲欧美在线| 久久人人97超碰com| 亚洲欧美日韩国产手机在线| 亚洲一区二区三区免费视频| 免费成人在线影院| 成人性生交大片免费看视频在线 | 精品一区二区三区视频在线观看| 丰满岳乱妇一区二区三区| 欧美性猛片aaaaaaa做受| 久久久久久麻豆| 亚洲永久精品大片| 国产一区二区三区日韩| 欧美这里有精品| 欧美精品一区二区三区四区| 一区在线观看免费| 国产乱码精品一区二区三区av| 欧美最新大片在线看| 国产欧美综合在线| 蜜桃av噜噜一区| 色菇凉天天综合网| 国产午夜精品久久久久久免费视 | 午夜精品久久一牛影视| 91在线观看视频| 日韩一区二区精品在线观看| 亚洲色欲色欲www| 国产精品一二三区在线| 精品三级在线看| 蜜臀久久99精品久久久久宅男 | 亚洲一区二区欧美日韩| 99精品偷自拍| 亚洲伦在线观看| 成人免费va视频| 国产精品久久久久久久久免费丝袜| 久久97超碰国产精品超碰| 欧美一级欧美一级在线播放| 天堂成人国产精品一区| 欧美一级电影网站| 免费高清在线一区| 精品国产一区二区三区不卡 | 国产一区二区成人久久免费影院| 欧美大片在线观看一区| 国产揄拍国内精品对白| 国产无遮挡一区二区三区毛片日本| 成人免费观看视频| 亚洲五码中文字幕| 亚洲精品在线免费播放| 成人app在线| 天天色 色综合| 中文字幕巨乱亚洲| 欧美日韩国产系列| 国产风韵犹存在线视精品| 亚洲综合在线五月| 精品国产一区二区三区久久久蜜月| 国产成人av电影在线播放| 亚洲日本在线看| 久久免费视频色| 日韩一级二级三级| 色综合久久久久| 高清不卡在线观看| 男女性色大片免费观看一区二区 | 午夜欧美电影在线观看| 国产精品视频一二三区| 欧美精品日韩一区| av网站免费线看精品| 国产精品66部| 精品一区二区三区免费观看| 国产精品成人一区二区艾草| 久久天天做天天爱综合色| 欧美日韩一区中文字幕| 91视频免费观看| 成人18精品视频| 成人美女在线观看| 丁香婷婷综合五月| 国产成人激情av| 成人开心网精品视频| 国产精品亚洲а∨天堂免在线| 免费人成在线不卡| 激情综合色综合久久综合| 国产一区二区在线观看免费| 国产成人精品www牛牛影视| 国产成人综合网|