为8086拼装游戏添加背景音乐

问题描述

我正在使用程序集 8086 作为我的编程语言创建一个 dosbox 游戏。我想为游戏添加一些背景音乐。我正在使用 tasm/masm 汇编程序。

我该怎么做,我到底需要什么?

我正在尝试在游戏运行时播放 MIDI 文件。

解决方法

DOS 对 PCM 或 MIDI 声音没有任何抽象,因此您需要直接对硬件进行编程。这是如何完成的取决于硬件。

这是我在网上找到的有关 SoundBlaster 卡的手册: https://pdos.csail.mit.edu/6.828/2008/readings/hardware/SoundBlaster.pdf

以下是有关 AdLib 卡的一些信息: http://shipbrook.net/jeff/sb.html

您可以在 Google 上通过“AdLib 编程”等搜索词找到更多资源,包括 YouTube 教程。

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...