/usr/share/doc/bochs-doc/user/x2114.html is in bochs-doc 2.6-5build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Sound Blaster 16 Emulation</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="Bochs User Manual"
HREF="index.html"><LINK
REL="UP"
TITLE="Setup"
HREF="c1367.html"><LINK
REL="PREVIOUS"
TITLE="bochsrc"
HREF="x1410.html"><LINK
REL="NEXT"
TITLE="How to write your own keymap table"
HREF="x2216.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Bochs User Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1410.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 4. Setup</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x2216.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="SB16-EMULATION"
>4.3. Sound Blaster 16 Emulation</A
></H1
><P
>This section is a detailed description for configuring Sound Blaster 16 from
source. If you have a binary and all you want to know is what to put in your
<TT
CLASS="FILENAME"
>bochsrc</TT
> file, see <A
HREF="x1410.html#SB16LINE"
>sb16 option</A
>.</P
><P
>The original version of the Sound Blaster 16 (SB16) emulation for Bochs was
written and donated by Josef Drexler. The entire set of his SB16 patches have
been integrated into Bochs, however, so you can find everything you need here.</P
><DIV
CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN2120"
>4.3.1. How well does it work?</A
></H2
><P
>Right now, MPU401 emulation is next to perfect. It supports UART
and SBMIDI mode, because the SB16's MPU401 ports can't do anything else as well.</P
><P
>The digital audio basically works, but the emulation is too slow for fluent
output unless the application doesn't do much in the background (or the
foreground, really). The sound tends to looping or crackle on slower
computer, but the emulation appears to be correct. Even a MOD
player works, although only for lower sampling speeds.</P
><P
>Also, the MIDI data running through the MPU401 ports can be written
into a SMF, that is the standard midi file. The wave output
can be written into a VOC file, which has a format defined by
Creative Labs. This file format can be converted to WAV by
sox for example.</P
></DIV
><DIV
CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN2125"
>4.3.2. Output to a sound card</A
></H2
><P
>Output is supported on Windows, Linux, FreeBSD, MacOS 9 and MacOSX at the moment.</P
><P
>On Linux, the output goes to any file or device. If you have a wavetable synthesizer,
midi can go to <TT
CLASS="FILENAME"
>/dev/midi00</TT
>, otherwise you may need
a midi interpreter. For example, the midid program from the DosEmu project would work.
Wave output should go to <TT
CLASS="FILENAME"
>/dev/dsp</TT
>. These devices
are assumed to be OSS devices, if they're not some of the ioctl's might fail.
If ALSA is present on Linux and the wave device is set to <TT
CLASS="FILENAME"
>alsa</TT
>,
Bochs uses it's default PCM output device instead of an OSS device.</P
><P
>On Windows, midi and (wave) output go to the midi mapper and the wave mapper,
respectively. A future version might have selectable output devices.</P
></DIV
><DIV
CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN2133"
>4.3.3. Installation on Linux</A
></H2
><DIV
CLASS="SECTION"
><H3
CLASS="SECTION"
><A
NAME="AEN2135"
>4.3.3.1. Prerequisites</A
></H3
><P
>A wavetable synthesizer on <TT
CLASS="FILENAME"
>/dev/midi00</TT
>
and a working <TT
CLASS="FILENAME"
>/dev/dsp</TT
> if you want real
time music and sound, otherwise output to midi and wave files is also possible.
Optionally, you can use a software midi interpreter, such as the midid program
from the DosEmu project instead of <TT
CLASS="FILENAME"
>/dev/midi00</TT
>.</P
></DIV
><DIV
CLASS="SECTION"
><H3
CLASS="SECTION"
><A
NAME="AEN2141"
>4.3.3.2. Configuring Bochs</A
></H3
><P
>You need to <B
CLASS="COMMAND"
>configure</B
> Bochs using the <CODE
CLASS="OPTION"
>--enable-sb16</CODE
>
option.
There are a few values in <TT
CLASS="FILENAME"
>config.h</TT
> that are relevant to the sound functions.
Edit <TT
CLASS="FILENAME"
>config.h</TT
> after running configure, but before compiling.</P
><P
>BX_USE_SB16_SMF should be 1 unless you intend to have several sound cards
running at the same time.</P
><P
>BX_SOUND_OUTPUT_C is the name of the class used for output. The default is
to have no output functions, so you need to change this if you want any sound.
The following are supported at the moment:</P
><PRE
CLASS="PROGRAMLISTING"
> bx_sound_linux_c for output to /dev/dsp and /dev/midi00 on Linux,
FreeBSD and maybe other OSes that use the OSS driver.
bx_sound_windows_c for output to the midi and wave mapper of
Windows 3.1 and higher.
bx_sound_output_c for no output at all.</PRE
><P
>Setup the SB16 emulation in your <TT
CLASS="FILENAME"
>bochsrc</TT
>, according to instructions
in that file (see <A
HREF="x1410.html#SB16LINE"
>sb16 option</A
>).</P
></DIV
><DIV
CLASS="SECTION"
><H3
CLASS="SECTION"
><A
NAME="AEN2154"
>4.3.3.3. Runtime configuration</A
></H3
><P
>The source for the SB16CTRL program that is used to modify
the runtime behavior of the SB16 emulation is included in
<TT
CLASS="FILENAME"
>misc/sb16/</TT
>. It is a C
program that can be run from inside the emulation.</P
><P
>It currently supports the following commands:</P
><DIV
CLASS="TABLE"
><A
NAME="AEN2159"
></A
><P
><B
>Table 4-5. Supported options for <B
CLASS="COMMAND"
>sb16ctl</B
></B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><COL><THEAD
><TR
><TH
>Option</TH
><TH
>Description</TH
></TR
></THEAD
><TBODY
><TR
><TD
><CODE
CLASS="OPTION"
>-i <TT
CLASS="REPLACEABLE"
><I
>number</I
></TT
></CODE
></TD
><TD
> Show the selected emulator info string,
e.g. <B
CLASS="COMMAND"
>sb16ctrl -i 3</B
> to show how many patch translations are active.
</TD
></TR
><TR
><TD
><CODE
CLASS="OPTION"
>-t <TT
CLASS="REPLACEABLE"
><I
>six numbers</I
></TT
></CODE
></TD
><TD
> Load a translation into the translation table. The numbers are:
"OldBankMSB,OldBankLSB,OldProgram,NewBankMSB,NewBankLSB,NewProgram".
All values can be 0..127 or 255. 255 for "Old" values means <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>match
any</I
></SPAN
> and for "New" values means <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>don't change</I
></SPAN
>,
e.g. <B
CLASS="COMMAND"
>sb16ctrl -t 255,255,0,255,255,32</B
>
to change patch 0 (Piano) to patch 32 (Acoustic Bass).
</TD
></TR
><TR
><TD
><CODE
CLASS="OPTION"
>-r</CODE
></TD
><TD
> Reset the patch translation table e.g. <B
CLASS="COMMAND"
>sb16ctrl -r</B
>.
</TD
></TR
><TR
><TD
><CODE
CLASS="OPTION"
>-m <TT
CLASS="REPLACEABLE"
><I
>some numbers</I
></TT
></CODE
></TD
><TD
> Upload the given numbers to the midi output device. Note
that it should be a complete midi message, and also that it is
subject to patch translation,
e.g. <B
CLASS="COMMAND"
>sb16ctrl -m 0x80,64,0</B
>
to send a note-off message to channel 0.
</TD
></TR
><TR
><TD
><CODE
CLASS="OPTION"
>-f <TT
CLASS="REPLACEABLE"
><I
>filename</I
></TT
></CODE
></TD
><TD
> Read in a file and execute the commands in it. These have
the same format as the above commands, except that they don't have
the dash "-" in front of them.
Comment lines are supported and start with a hash sign "#".
</TD
></TR
><TR
><TD
><CODE
CLASS="OPTION"
>-h</CODE
></TD
><TD
> Show a brief summary of the commands.
</TD
></TR
></TBODY
></TABLE
></DIV
><P
>All numbers can be valid parameters to the <CODE
CLASS="FUNCTION"
>strtol()</CODE
> function, so hex and
octal notation is fine. They have to be delimited by either commas "," or
slashes "/", spaces are not allowed.</P
><P
>The command line can have any number of commands. However, if none are given,
"-f -" is assumed, which means commands are taken from stdin.</P
></DIV
></DIV
><DIV
CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN2205"
>4.3.4. Features planned for the future</A
></H2
><P
></P
><UL
><LI
><P
>Port it to more OS's.</P
></LI
><LI
><P
>Finish the OPL3 FM emulation by translating the music to midi data.</P
></LI
></UL
></DIV
><DIV
CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN2212"
>4.3.5. Description of the sound output classes</A
></H2
><P
>You can find a description of the sound output classes and more details on
Sound Blaster 16 emulation in the
<A
HREF="../development/sb16-emulation-basics.html"
TARGET="_top"
>developer documentation</A
>.</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1410.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x2216.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>bochsrc</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c1367.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>How to write your own keymap table</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>
|