diff --git a/dev/api/device.rst b/dev/api/device.rst index bfe4608..738af94 100644 --- a/dev/api/device.rst +++ b/dev/api/device.rst @@ -163,12 +163,24 @@ Most devices need a place to store their internal state. We discourage the use o Registration ------------ +New devices must be **registered** before they can be selected by the user. This is usually accomplished by adding one or more ``device_t`` pointers to the **device table** for the device's class: +* **Video cards:** ``video_cards`` in ``video/vid_table.c`` +* **Sound cards:** ``sound_cards`` in ``sound/sound.c`` +* **Network cards:** ``net_cards`` in ``network/network.c`` +* **Parallel port devices:** ``lpt_devices`` in ``lpt.c`` +* **Hard disk controllers:** ``controllers`` in ``disk/hdc.c`` +* **Floppy disk controllers:** ``fdc_cards`` in ``floppy/fdc.c`` +* **SCSI controllers:** ``scsi_cards`` in ``scsi/scsi.c`` +* **ISA RTC cards:** ``boards`` in ``device/isartc.c`` +* **ISA memory expansion cards:** ``boards`` in ``device/isamem.c`` + +Devices not covered by any of the above classes may require further integration through modifications to the user interface and configuration loading/saving systems. Availability ------------ -A device will be available for selection by the user if these criteria are met: +A device will be **available** for selection by the user if these criteria are met: 1) The device is :ref:`registered `, so that the user interface knows about it; 2) The selected machine has any of the expansion buses specified in the device's ``flags``; diff --git a/dev/api/timer.rst b/dev/api/timer.rst index 9ad58ea..edaff77 100644 --- a/dev/api/timer.rst +++ b/dev/api/timer.rst @@ -3,7 +3,7 @@ Timers **Timers** allow devices to perform tasks after a set period. This period is **automatically scaled** to match the emulation speed, which helps 86Box stay relatively accurate, unlike other emulators and virtualizers which may operate timers in real time independently of speed. Unless otherwise stated, all structures, functions and constants in this page are provided by ``86box/timer.h``. -.. note:: Timers are processed after each instruction in interpreter mode, or each recompiled code block in dynamic recompiler mode (unless an instruction requests a Time Stamp Counter (TSC) update). In both cases, timer accuracy **should** be in the single-digit microseconds at a minimum, which is good enough for most time-sensitive applications like 48 KHz audio playback. +.. note:: Timers are processed after each instruction in interpreter mode, or each recompiled code block in dynamic recompiler mode (unless an instruction requests a Time Stamp Counter (TSC) update). In both cases, timer accuracy **should** be in the single-digit microsecond range at a minimum, which is good enough for most time-sensitive applications like 48 KHz audio. Adding ------