Hasty Briefsbeta

Bilingual

Running DOS on Behringers DDX3216 with a DIY x86-Bios from Scratch

7 hours ago
  • #BIOS Development
  • #Retro Computing
  • #Hardware Hacking
  • In 1994, the author's first computer was an Intel i486 DX2-66 with 4 MB RAM and a 512MB hard disk, running IBM OS/2 and Windows 3.11, and they upgraded it over four years.
  • In 2026, 32 years later, the author discovered that the Behringer DDX3216 uses a real 386 processor, prompting them to explore booting software and an operating system on the device to learn about x86 boot processes.
  • The DDX3216 hardware includes an AMD Elan SC300 386 SoC, 64k ROM, 16MB DRAM, SRAM for video, flash ICs, a 4-bit LCD, Toshiba TLC16C552 UART, PCMCIA connector, and an unassembled floppy disk controller.
  • Initial attempts to find a ready-to-use BIOS for the AMD Elan SC300 failed due to outdated sources, leading the author to develop their own BIOS from scratch.
  • The x86 boot process involves the CPU jumping to the reset vector at 0xFFF0 after reset, executing code to disable interrupts and enter real mode, with memory segments allowing addressing up to 1MB.
  • A linker script was used to place the reset vector at 0xFFF0 in the ROM, and a ROM emulator (PicoROM/OneROM) was employed for faster development cycles.
  • The external UART was initialized via specific I/O writes to enable serial communication for debugging, with characters successfully sent at 9600 baud.
  • The LCD was initialized using the SC300's CGA/HGA-compatible interface, requiring custom font data and functions to write to video memory at segment 0xB800.
  • A full-featured BIOS was implemented, including the Interrupt Vector Table (IVT), BIOS Data Area (BDA), timer, keyboard controller, and CF card interface using ATA commands and PCMCIA memory mapping.
  • MS-DOS 6.22 booting was attempted but failed due to interrupt handling issues and stack management problems, despite partial success in loading system files.
  • FreeDOS v1.4 was successfully booted after creating a virtual environment, partitioning the CF card, and implementing necessary BIOS interrupts, achieving a functional operating system on the DDX3216.
  • Additional hardware like LEDs controlled by shift registers were explored, with code to manipulate them, though full control of proprietary components like DSPs remains challenging.
  • The author used AI tools (Google Gemini, Claude Sonnet) for assistance with documentation and code generation, but maintained control over the implementation.
  • Future steps include adding keyboard support, graphics modes for older Windows versions, and further experimentation with protected mode bootloaders available on GitHub.