DOS specifics

There are four Allegro files which you should redistribute along your program. These are the files `keyboard.dat', `language.dat', `allegro.cfg' and `setup.exe'.

The first two contain internationalisation information for keyboard mappings and system messages to show up localised on the user's computer. The `setup.exe' program, which comes in Allegro's `setup' directory, is a standalone tool which you can graphically customise and even embed into your main binary. The user can generate a configuration file with this tool, to store special settings or avoid Allegro's autodetection failing on specific hardware. Even if you distribute `setup.exe', you are recommended to copy too the empty `allegro.cfg' file, in case the setup program itself is unable to run and the user has to edit manually the configuration with a text editor.

If you are using get_config_text() in your program to localise text strings, merge your xxtext.cfg files with the ones provided by Allegro in the `resource' directory before creating `language.dat', and redistribute this with your program. This file will contain then both Allegro's system messages and the strings of your program.


Drivers JOY_TYPE_*/DOS

The DOS library supports the following type parameters for the install_joystick() function:
See also: install_joystick.
Drivers GFX_*/DOS

The DOS library supports the following card parameters for the set_gfx_mode() function: There are a few things you need to be aware of for scrolling: most VESA implementations can only handle horizontal scrolling in four pixel increments, so smooth horizontal panning is impossible in SVGA modes. A significant number of VESA implementations seem to be very buggy when it comes to scrolling in truecolor video modes, so you shouldn't depend on this routine working correctly in the truecolor resolutions unless you can be sure that SciTech Display Doctor is installed. Hardware scrolling may also not work at all under Windows.

Triple buffering is only possible with certain drivers: it will work in any DOS mode-X resolution if the timer retrace simulator is active (but this doesn't work correctly under Windows 95), plus it is supported by the VBE 3.0 and VBE/AF drivers for a limited number graphics cards.

See also: set_gfx_mode.
Drivers DIGI_*/DOS

The DOS sound functions support the following digital sound cards:
      DIGI_AUTODETECT      - let Allegro pick a digital sound driver
      DIGI_NONE            - no digital sound
      DIGI_SB              - Sound Blaster (autodetect type)
      DIGI_SB10            - SB 1.0 (8-bit mono single shot DMA)
      DIGI_SB15            - SB 1.5 (8-bit mono single shot DMA)
      DIGI_SB20            - SB 2.0 (8-bit mono auto-initialised
                             DMA)
      DIGI_SBPRO           - SB Pro (8-bit stereo)
      DIGI_SB16            - SB16 (16-bit stereo)
      DIGI_AUDIODRIVE      - ESS AudioDrive
      DIGI_SOUNDSCAPE      - Ensoniq Soundscape
      DIGI_WINSOUNDSYS     - Windows Sound System
See also: detect_digi_driver, install_sound, install_sound_input.
Drivers MIDI_*/DOS

The DOS sound functions support the following MIDI sound cards:
      MIDI_AUTODETECT      - let Allegro pick a MIDI sound driver
      MIDI_NONE            - no MIDI sound
      MIDI_ADLIB           - Adlib or SB FM synth (autodetect type)
      MIDI_OPL2            - OPL2 synth (mono, used in Adlib and SB)
      MIDI_2XOPL2          - dual OPL2 synths (stereo, used in
                             SB Pro-I)
      MIDI_OPL3            - OPL3 synth (stereo, SB Pro-II
                             and above)
      MIDI_SB_OUT          - SB MIDI interface
      MIDI_MPU             - MPU-401 MIDI interface
      MIDI_DIGMID          - sample-based software wavetable player
      MIDI_AWE32           - AWE32 (EMU8000 chip)
See also: detect_midi_driver, install_sound, install_sound_input.

DOS integration routines


extern int i_love_bill;

When running in clean DOS mode, the timer handler dynamically reprograms the clock chip to generate interrupts at exactly the right times, which gives an extremely high accuracy. Unfortunately, this constant speed adjustment doesn't work under most multitasking systems (notably Windows), so there is an alternative mode that just locks the hardware timer interrupt to a speed of 200 ticks per second. This reduces the accuracy of the timer (for instance, rest() will round the delay time to the nearest 5 milliseconds), and prevents the vertical retrace simulator from working, but on the plus side, it makes Allegro programs work under Windows. This flag is set by allegro_init() if it detects the presence of a multitasking OS, and enables the fixed rate timer mode.
See also: install_timer, allegro_init, os_type.

Back to contents