Wiki

Clone wiki

UniPCemu / Home

This wiki is to provide information and manual on the UniPCemu emulator.

If this is your first time using UniPCemu, click here.

For information on controlling the emulator, see Controls.

For information on supported disk images and XT-IDE Universal BIOS support, see Disk images.

For information on the emulator Settings and execution modes(as well as BIOS ROMs), see Settings menu.

For information on the emulator debugger, see Debugging.

For advanced command line parameters, see Command-line parameters.

The emulated system

  • Intel 8086/80186/80286/80386/80486/Pentium/Pentium Pro/Pentium II (Cycle-accurate 80286+(up to and including 80386 instructions) emulation, still containing some bugs due to unfound errors in the CPU emulation). A FPU isn't present on the 80486 and up. 8086/8088 is pretty cycle-accurate(up to 4% off).
  • Intel Inboard 386/PC(on XT) or 386/AT(on AT) when a 386 or 486 CPU is used on a XT or AT architecture.
  • IBM VGA graphics card directly emulated, CGA/MDA graphics card using a compatibility layer on the VGA renderer(fully working, even with accurate demos), Tseng Labs ET3000 and ET4000 is fully emulated(adding high-res up to 16M colors working on top of VGA modes(no non-VGA text modes working yet) using an Sierra SC15025 or AT&T 20C490 DAC). The ET4000 graphics card can use an extension for the ET4000/W32 chip to be used instead (when enabled). Various SVGA DACs can be emulated (Sierra SC11487 (up to 64K colors), UMC UM70C178 (Up to 64K colors), AT&T 20C490 (Up to 16M colors) and Sierra SC15025 (Up to 16M colors)). Various hack modes are also available(for using a VGA BIOS with software putting the hardware into CGA or MDA mode when it's control registers are addressed). EGA is emulated as a VGA restricted mode (with all EGA-only features).
  • MPU-401 (Requires soundfont loaded using the BIOS, or can use a MIDI command passthrough to Windows(on Windows only)).
  • PS/2 keyboard (and PS/2 mouse instead of a serial mouse when set to PS/2 architecture).
  • PIC interrupt controller on all platforms. i430fx/i440fx motherboards also include an IO APIC controller that can be used with a compatible CPU.
  • XT RTC chip (XT only, a NC MM58167 chip). It uses it's own clock instead of the CMOS RTC on AT and up(though configured using the same settings file method, but only using the time set in those settings(CMOS RAM values are ignored) as well as the EXTRARAM values.
  • CMOS RTC (on AT and up, an MC146818 chip). Settings on it are architecture-dependent and configured for each architecture individually. The EXTRARAM values in the settings aren't used for this chip(those are for the XT RTC only).
  • Adlib sound card(cycle-accurate).
  • IDE ATA(ATA-1) emulation on the Primary IDE controller. IDE CD-ROM is also fully implemented for the CD-ROM drives(On the Secondary IDE controller). Both can be selected to be on either a seperate board or onboard.
  • Dual DMA controller.
  • Floppy disk controller.
  • PCI emulation (used by ATA and CD-ROM controller).
  • PIT timer (with PC Speaker). The XT PIT performs as a 8253. All other architectures emulate a 8254 chip instead.
  • Dual Programmable Interrupt Controller (i8259).
  • Serial mouse (When set only, either Serial or PS/2(8042) mouse&keyboard is selectable, determined by the architecture used (PS/2 and up using a PS/2 mouse)).
  • Software debugger (Bochs' Port E9 hack, also port EA extensions for the UniPCemu emulator (see included debugger.txt)).
  • UART serial port (with Serial mouse at COM1, when not using a PS/2 mouse).
  • PPI hardware interface (simple buffers) for detecting floppy disk controller and specific hardware correctly.
  • Lo-tech 2MB EMS Board with 4MB EMS memory on 80(1)86.
  • Disney Sound Source/Covox speech things are both supported.
  • XT expansion unit (only capturing memory I/O and reporting it).
  • Several joysticks: Gravis Gamepad, Gravis Analog Pro and Logitech Wingman Extreme Digital.
  • Game Blaster sound card, rendered at 7MHz for full quality.
  • Sound Blaster 1.5 and 2.0 sound cards. Adlib and MPU-401 emulation are required, with the Adlib always emulated(instead of using the Adlib setting), Game Blaster emulation chips is optional and enabled by enabling the Game Blaster. Disabling MPU-401 emulation will also disable the Sound Blaster emulation. Recording uses a simple hack to allow realtime recording without transforming sound due to speed vs realtime differences. All of the Game Blaster, Adlib and MPU-401 can be used without the Sound Blaster by disabling the Sound Blaster. Otherwise, they're emulated as part of the Sound Blaster board.
  • Option ROMs managed by a Atmel 64K ROM(AT28C64B).
  • BIOS flash ROM (Intel 28F001BX-T) on i430fx/i440fx.
  • Serial modem(Server TCP port is configurable using the SETTINGS.INI file only, defaulting to port 23) on the second serial port).
  • PCI bus with either the emulated motherboard or compatibility bridge and a ATA/ATAPI adapter on it.
  • The ATA/ATAPI adapter used can be either a PCI card PC87415 or onboard(non-PCI when not PCI based).

All hardware uses the default IRQ assignments documented for XT/AT/Compaq hardware. Exceptions are(shared interrupt lines):

  • ATA/ATAPI on XT: IRQ5(shared line with below and third parallel port, if any).
  • Sound Blaster on any hardware on current releases: IRQ7(shared with the first parallel port).
  • VGA uses IRQ2(XT) or IRQ11(AT and up), shared with the MPU-401 controller on XT hardware only.
  • The MPU-401 uses IRQ 2(XT) or IRQ9(AT and up), shared with the VGA controller on XT hardware only.

Full IRQ assignments list:

  • 0 PIT
  • 1 PS/2 keyboard
  • 2 MPU-401 (XT only)
  • 2 VGA (XT only)
  • 3 UART2&4
  • 3 Sound Blaster (if configured for this)
  • 4 UART1&3
  • 5 Parallel port 3 - unused
  • 5 ATA Primary and Secondary channel (XT only)
  • 5 Sound Blaster (if configured for this)
  • 6 Floppy
  • 6 Parallel port 2 - unused
  • 7 Parallel port 1
  • 7 Sound Blaster (if configured for this)
  • 8 CMOS
  • 9 MPU-401 (AT and up)
  • 11 VGA (AT and up)
  • 12 PS/2 mouse
  • 14 ATA primary channel (AT and up)
  • 15 ATA secondary channel (AT and up)

Current builds that don't have a configurable Sound Blaster IRQ have it set to IRQ 7. The ATA channels can be remapped with PCI to behave like normal PCI native devices when not on the motherboard itself, if configured by software.

A little sidenote: The PS/2 Architecture just changes the mouse to a PS/2 mouse instead of a serial mouse, while keep using the Compaq Deskpro 386 architecture(Basically just a slightly more modern machine). The serial mouse is connected to the first serial port (COM1) when used. The second serial port (COM2) has the serial modem or passthrough cable connected to it.

Folders

Different parts of the emulator (except the SETTINGS.INI file) are placed in various subfolders:

  • The "disks" folder contains the disks that can be mounted with the emulator. It will be automatically generated when a disk is generated using UniPCemu.
  • The "soundfonts" folder contains any SoundFonts (in 2.04 format) to be used with UniPCemu's MIDI emulation.
  • The "music" folder contains any filed to be played using the Music player inside the Sound submenu. Currently Dosbox recordings (DRO) for the adlib sound card and MID/MIDI files are played using the emulated hardware. In order for playback to work, the Adlib sound card needs to be emulated(requires restart of the emulator to apply) for DRO files. The MPU needs to be having a soundfont loaded(and applied to be running, like the adlib) in order for MIDI playback to work.
  • A "logs" subfolder will automatically be created to hold logging data, when anything is logged by the emulator. This is for output purposes(by the emulator) only.'

Versioning

Different platforms have different methods of checking the version of the installed app:

  • Linux: See Command-line parameters.
  • Android: The package that's installed has the version in it. Simply check the app information inside Android for the version number.
  • Windows: The executable properties has the version number in the Product version field in the file information.
  • PSP/Vita/Switch: The settings menu has an option that displays version information in the main menu.

Extra features

The serial ports also support some extra suffixes:

  • ::OUT12:: and ::OUT21:: Redirect two control lines unavailable by default to the COM0COM special output pins instead of control port RTS/DTR. The first digit (the first digit after OUT) specifies the DCD OUT pin to use. The second digit (the second number after OUT) specifies the RI OUT pin to use.
  • ::COM0COM:: Forces COM0COM to be detected on a port (if the driver isn't detected automatically)

Android files location and permissions

Android also has support for using a redirect.txt in either the app's local files folder (at Android/data/com.unipcemu.app/files, which is the default file location for files (deleted when the app is deleted and can be unaccessible by the user depending on Android version)) or alternatively (with higher priority) a redirect.txt inside the UniPCemu folder on the root of the internal memory storage (derived from SDL2's default located Android folder mentioned above) to apply globally on the Android device.

The redirect.txt file (if found and pointing to a valid location that is writable) contains either an absolute or relative path, detected as Windows/Linux absolute paths (Windows to drive letters like "C:", Linux to "/<any path here>", PSP to "ms0:/" or "flash<anything>:/" and all platforms supporting the remainder case as <alphanumberic>:/ for absolute URL-syntax paths (which aren't escaped in any way)). If the path is a relative path, it's relative to the location of the redirect.txt file itself (being simply appended to it's absolute path). A simple redirect to, for example, a "files" directory at the same directory as the redirect.txt can thus be made by simply entering the name of the directory as the contents of the redirect.txt file and making sure that the directory exists (since it's required to be writable by the app as a directory). Any location can be specified by the redirect.txt, as long as the app can write to said location as a directory using SDL2 file functions (see the documentation on SDL2 RWFromFile operations for file operations and the supported directory operations of the used device directory functionality for more specifics on supported paths).

As a sidenote, the app requires write permissions to external storage for it to write it's settings and files properly.

Updated