当前位置: 首页 > news >正文

网站风格分析免费织梦网站源码

网站风格分析,免费织梦网站源码,北京兼职做网站推广,宠物网站模板下载一、模拟器源码 源码#xff1a;https://files.cnblogs.com/files/twzy/arm-NES-linux-master.zip 二、文件系统 文件系统#xff1a;debian bullseye 使用builtroot2018构建的文件系统#xff0c;使用InfoNES模拟器存在bug#xff0c;搞不定#xff0c;所以放弃…一、模拟器源码 源码https://files.cnblogs.com/files/twzy/arm-NES-linux-master.zip 二、文件系统 文件系统debian bullseye 使用builtroot2018构建的文件系统使用InfoNES模拟器存在bug搞不定所以放弃改用debian。 三、编译 在debian文件系统下编译在f1c200s开发板执行 解压源码进入Linux目录不用做修改执行make编译。 编译后在f1c200s开发板执行屏幕可见画面。 启动debian模拟器 mount_debian.sh #/bin/bash cd rootfs sudo mount --bind /dev dev/ sudo mount --bind /sys sys/ sudo mount --bind /proc proc/ sudo mount --bind /dev/pts dev/pts/ sudo cp /usr/bin/qemu-arm-static usr/bin/ cd .. sudo LC_ALLC LANGUAGEC LANGC chroot rootfs编译 cd /home/arm-NES-linux/linux make退出debian模拟器 unmount_debian.sh sudo rm rootfs/usr/bin/qemu-arm-static #删除之前拷贝的文件 cd rootfs sudo umount dev/pts/ # 一定要在/dev前面umount sudo umount dev/ sudo umount sys/ sudo umount proc/四、适配遥控 builtroot制作的文件系统下调试驱动。 在debian系统下使用evtest命令 这里使用无线手柄 在命令行执行evtest操作无线手柄可发现有按键事件上报。 修改NES模拟器源码linux目录下的joypad_input.cpp使其适配自己的无线手柄。 修改一 int InitJoypadInput(void) {int iErr 0;//iErr RegisterJoypadInput(joypadInput);iErr RegisterJoypadInput(usbJoypadInput); // 只注册这个输入return iErr; }修改二 static int USBjoypadGet(void) {/*** FC手柄 bit 键位对应关系 真实手柄中有一个定时器处理 连A 连B * 0 1 2 3 4 5 6 7* A B Select Start Up Down Left Right*///因为 USB 手柄每次只能读到一位键值 所以要有静态变量保存上一次的值static unsigned char joypad 0;struct input_event e;if(0 read (USBjoypad_fd, e, sizeof(e))){if(0x3 e.type){/*上value:0x8001 type:0x2 number:0x5value:0x0 type:0x2 number:0x5*/if(17 e.code -1 e.value){joypad | 14;}/*下value:0x7fff type:0x2 number:0x5value:0x0 type:0x2 number:0x5*/if(17 e.code 1 e.value){joypad | 15;}//松开if(17 e.code 0 e.value){joypad ~(14 | 15);}/*左value:0x8001 type:0x2 number:0x4value:0x0 type:0x2 number:0x4*/if(16 e.code -1 e.value){joypad | 16;}/*右value:0x7fff type:0x2 number:0x4value:0x0 type:0x2 number:0x4*/if(16 e.code 1 e.value){joypad | 17;}//松开if(16 e.code 0 e.value){joypad ~(16 | 17);}}if(0x1 e.type){/*选择value:0x1 type:0x1 number:0xavalue:0x0 type:0x1 number:0xa*/if(314 e.code 1 e.value){joypad | 12;}if(314 e.code 0 e.value){joypad ~(12);}/*开始value:0x1 type:0x1 number:0xbvalue:0x0 type:0x1 number:0xb*/if(315 e.code 1 e.value){joypad | 13;}if(315 e.code 0 e.value){joypad ~(13);}/*Avalue:0x1 type:0x1 number:0x0value:0x0 type:0x1 number:0x0*/if(304 e.code 1 e.value){joypad | 10;}if(304 e.code 0 e.value){joypad ~(10);}/*Bvalue:0x1 type:0x1 number:0x1value:0x0 type:0x1 number:0x1*/if(305 e.code 1 e.value){joypad | 11;}if(305 e.code 0 e.value){joypad ~(11);}/*Xvalue:0x1 type:0x1 number:0x3value:0x0 type:0x1 number:0x3*/if(307 e.code 1 e.value){joypad | 10;}if(307 e.code 0 e.value){joypad ~(10);}/*Yvalue:0x1 type:0x1 number:0x4value:0x0 type:0x1 number:0x4*/if(308 e.code 1 e.value){joypad | 11;}if(308 e.code 0 e.value){joypad ~(11);}}return joypad;}return -1; }修改三 static void *InputEventTreadFunction(void *pVoid) {/* 定义函数指针 */int (*GetJoypad)(void);GetJoypad (int (*)(void))pVoid;while (1){//因为有阻塞所以没有输入时是休眠//g_InputEvent GetJoypad();int data GetJoypad();if (data -1){continue;}else{g_InputEvent data;}//有数据时唤醒pthread_mutex_lock(g_tMutex);//因为有阻塞所以没有输入时是休眠pthread_cond_signal(g_tConVar);pthread_mutex_unlock(g_tMutex);} }五、测试游戏是否可以正常玩耍 可以无声音畅玩了。 六、先解决debian系统下的语音播放 检查声卡 cat /proc/asound/cards默认声卡配置 vi /etc/asound.conf defaults.ctl.card 0 defaults.pcm.card 0 defaults.timer.card 0amixer controls 用于查看音频系统提供的操作接口 amixer contents 用于查看接口配置参数 amixer cget 接口函数 amixer cset 接口函数 设置值amixer cget numid14,ifaceMIXER,nameADC Mixer Mic Capture Switch amixer cset numid14,ifaceMIXER,nameADC Mixer Mic Capture Switch on 打开之后才可以录音 arecord out.wavrootwang-virtual-machine:~# arecord out.wav Recording WAVE out.wav : Unsigned 8 bit, Rate 8000 Hz, Mono ^CAborted by signal Interrupt... rootwang-virtual-machine:~# rootwang-virtual-machine:~# rootwang-virtual-machine:~# aplay out.wav Playing WAVE out.wav : Unsigned 8 bit, Rate 8000 Hz, Mono ^CAborted by signal Interrupt...七、解决NES模拟器的声音 启动游戏会出现乱七八糟的声音也不知道对不对。在NES中是通过一些PCM的API操作音频的具体的看代码吧。 八、mplayer播放音频 mplayer -ao alsa out.wav 特别慢有声音 mplayer -ao alsa test.wav mplayer -ao alsa test.mp3 rootwang-virtual-machine:/home# mplayer -ao alsa test.mp3 MPlayer 1.4 (Debian), built with gcc-10 (C) 2000-2019 MPlayer Team do_connect: could not connect to socket connect: No such file or directory Failed to open LIRC support. You will not be able to use your remote control.Playing test.mp3. libavformat version 58.45.100 (external) Audio only file format detected. Load subtitles in ./Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III AUDIO: 16000 Hz, 2 ch, s16le, 16.0 kbit/3.12% (ratio: 2000-64000) Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I, II, III)AO: [alsa] 16000Hz 2ch s16le (2 bytes per sample) Video: no video Starting playback... A: 3.1 (03.0) of 3.0 (03.0) 12.7%Exiting... (End of file)有办法去掉connect to socket吗 是遥控器通过配置去掉。 vi /etc/mplayer/mplayer.conf lircno但依然还是很慢。能正常使用。 九、参考 https://zhuanlan.zhihu.com/p/670785159
http://www.w-s-a.com/news/642908/

相关文章:

  • 大连手机自适应网站建设织梦做音乐网站
  • 烟台网站建设优化网页设计师证
  • 手机微网站建设多少钱个人网站 wordpress
  • 做外贸是不是必须有网站wordpress网络图片
  • 赣县企业网站建设用dw做网站的基本步骤
  • 辽源网站建设微信小程序公众平台
  • 多媒体网站设计开发是指什么常宁网站建设
  • 淄博网站推广优化17岁在线观看免费高清完整版
  • 企业形象网站开发业务范畴wordpress最好最全的教程
  • 企业网站的建立意义网站首页制作网站
  • 网站制作过程内容深圳最好的活动策划公司
  • 深圳网站关键词排名查询公司网站怎么做啊
  • 微网站 制作平台广州电商聚集地
  • 建设外国商城网站网站服务器 虚拟主机
  • 天河网站建设开发电子商务公司名字大全
  • 站长推荐为何用wdcp建立网站连不上ftp
  • 云南旅行社网站开发学编程多久可以写游戏辅助
  • 推广网站的步骤网站备案号中信息有变
  • 优秀企业建站织梦能不能做门户网站
  • 广东省建设局官方网站wordpress 自动安装 插件怎么用
  • 哪类小网站容易做h5页面制作代码
  • 北京网站建设公司华网百度热搜seo
  • 小清新博客网站中山做网站公司
  • 美团做团购网站如何新建自己的网站
  • 安卓软件制作网站电子商务网站建设实训总结报告
  • 肃宁网站制作价格外国设计师素材网站
  • 自已建网站用jsp做的可运行的网站
  • 外贸建站代理网站建设设计公司哪家好
  • 普升高端品牌网站建设台州中兴建设咨询有限公司网站
  • 模板演示网站移动网站开发公司