UniPCemu build 2018/09/08 18:42 is now live!

There have been various CPU accuracy and bug improvements and CPU speed improvements(mainly IPS clocking mode).


  • Removed the special segment descriptor type split.
  • Optimized the segment descriptors by adding various precalcs.
  • Added missing real-mode segment descriptor precalcs.
  • Implemented missing segment descriptor precalcs during CPU reset and LOADALL instructions.
  • CPU: Optimized segment descriptor precalcs data order.
  • Modem: Implemented missing DTR setting.
  • Modem: Improved escape character recognition.
  • Improved the modem guard time algorithm. Now the escape is only recognised when prefixed and suffixed by the guard time and exactly three escape characters are sent.
  • Fixed modem compiler errors.
  • Improved modem backspace behaviour to send back a proper backspace clearing the previous character, if possible.
  • Improved modem backspace behaviour during echo mode only.
  • Fixed modem backspace reporting compiler warning.
  • Improved the modem to allow to take the Hang-up on DTR loss, instead of erroring out.
  • Seperated the segment descriptor and it's precalcs to not pack the precalcs.
  • Moved the segment base precalcs into the segment descriptor precalcs.
  • Renamed the *DTR_PTR type to be a more precise named DTR_PTR type, instead of TR_PTR type.
  • Disabled the CPU timings being packed in memory, to speed things up, as it's not required to be packed.
  • Removed data packing on data types that don't need to be packed in memory.
  • Optimized emulator core time discarding.
  • Optimized the BIU for faster IPS clocking(keeping the prefetch buffer filled).
  • Optimized checkrights conditions for descriptor type access checking on reads/writes/executes.
  • Improved BIU faults to not hang the IPS clocking mode.
  • Modified Page Faults to no longer hang the BIU when it's in IPS mode.
  • Made the BIU able to continue when possible using the MMU error line, by resetting it properly before trying to fill the PIQ completely in IPS cycle mode.
  • INC/AND/SUB: Fixed modr/m checks and not to be checking modr/m parameters incorrectly when used on a register.
  • Cleaned up the descriptor access protection checks in protection.c.
  • Added detection bit of segment descriptor loading through task switch.
  • Implemented slight support for TSS special segment loading.
  • Generalized support for general purpose faults during segment descriptor loading.
  • Added #TS fault replacing #GP fault during TSS descriptor loading.
  • Implemented generic #TS fault handler.
  • TSS now lets the descriptor loading know it's loading descriptors and segments for the TSS-bases task switch.
  • Implemented some basic TSS fault handling for task switches.
  • Fixed #TS fault to specify the correct table.
  • Fixed TSS-based detection bit not truncating anymore.
  • Allow interrupts using code/execute-only segments.
  • Fixed interrupt limit checks and EIP loading to be 16/32-bits instead of 64-bits always.
  • Optimized type checking precalcs.
  • Improved logging to no longer log physical addresses instead of paged addresses when accessing memory through the BIU-EU interface.
  • Don't log direct memory accesses as paged memory accesses, since they aren't mapped using the Paging Unit.
  • BIU should only log the Paged layer when performing Paged memory accesses.
  • Fixed missing BIU paged memory write logging on processing memory write requests for word/dword accesses.
  • Fixed ENTER using the EBP value BEFORE pushing EBP, instead of AFTER pushing EBP, as is documented.
  • Implemented logging of double and triple faults.
  • Disabled logging of Virtual 8086 interrupts.
  • Fixed RETF/IRET to higher privilege levels not being allowed.
  • Improved processor identification based on the article at the IBMulator wiki.
  • Fixed incorrect stuck bit in CR0.
  • Fixed incorrect prefetch bits when logging.
  • Fixed the order of logging during memory writes to log the logical address before the physical one.
  • Fixed call gate and retf pushing and popping of SS/ESP.
  • Fixed logging of first byte written to the Paged layer.
  • Fixed incorrect logging of written data for multiple byte transfers by the BIU.
  • Merged the interrupt raising logic with segment descriptor structure.
  • Seperated core interrupt descriptor logic from the protected-mode interrupt handler.
  • Improved CALL to interrupt gates to allow triggering an interrupt.
  • CALL to interrupt/trap gates are illegal and will throw a #GP fault.
  • The EXT bit isn't set for normal segment load faults.
  • Improved EXT fault during segment loading faults to not be set during normal loads of segments using software(non-interrupts).
  • Removed unused variable in the protected mode interrupt handler.
  • Improved the EXT bit of an exception error code to be 0 when caused by an interrupt directly(problem handling an interrupt) or instruction faulting, and 1 when caused by an interrupt handling fault(any interrupt exception handling failing) or hardware itself faulting on an internal operation when parsing an interrupt.
  • Fixed code typo.
  • Added support for the type bit 1 of an interrupt to trigger the EXT bit to set.
  • Made hardware interrupts and debug and coprocessor exceptions type external.
  • protection.c: Made exceptions of exceptions with the EXT bit set keep the EXT bit set in nested exceptions.
  • cpu_interrupts.c: NMI is an external fault when faulting during interrupt handling(it's a form of IRQ handler after all).
  • protection.c: Fixed faulting DPL check on software interrupts only.
  • Implemented the background policy to the task being (partly) emulated or halted.
  • Implemented four background policies and a setting to implement said policy.
  • Background policies behaviour has been improved.
  • Updating the background policy doesn't need a full emulator restart.
  • Fixed 16-bit segment moves to apply segment registers, if required.
  • Fixed GRP5 CALL/JMP Mp to check for memory parameters correctly, like the 8086+ core.
  • Fixed a bug in retrieving a segment selector RPL and CPL from CS.
  • Fixed TSS errors locking up the CPU when faulting. Only return 1 when handling BIU I/O outselves!
  • Fixed loading 32-bit TSS SS0+/ESP0+ values.
  • Made multitasking loads of segments big-endian compatible.
  • Fixed saving segments of a 32-bit TSS.
  • Made 32-bit TSS loading handle 32-bit data better.
  • Fixed the TSS T and IOMapBase fields to be loaded correctly.
  • Improved debugging using the TSS T-bit.
  • Improved support of the Resume Flag on different CPUs.
  • Improved debugger fault handling when executing a task switch debugger.
  • Include the set resume flag when triggering a fault during a task switch trap fault.
  • Fixed the T-bit to check the T-bit instead of bit 0 of the Backlink.
  • Renamed the PS/2 architecture to be more accurate.
  • Improved the 8042 to report both enabling and disabling of hardware peripherals.
  • Improved the 8042 to handle enabling and disabling of the mouse packets when required(when the port is turned on or off).
  • Improved support of the 8042 for both enabling a peripheral and disabling a peripheral.
  • Improved a hardware device to turn on/off in all cases when the 8042 controller registers are modified.
  • Improved the PS/2 mouse to activate the samplerate properly when written to.
  • Improved mouse getting power resetting settings.
  • Fixed PS/2 mouse packet index to wrap correctly.
  • Implemented mouse echo and remote modes fully as documented.
  • Improved mouse shutdown and timer disabling.
  • Improved PS/2 mouse packets based on the serial mouse emulation.
  • Improved PS/2 mouse to reverse vertical movement.
  • Improved PS/2 mouse overflow behaviour to check against clipping values correctly.
  • Fixed PS/2 mouse missing header.
  • Fixed the remaining compiler warnings.
  • Faults throwing faults are to throw interrupts with the EXT bit set.
  • Restricted stack switch for call gates to apply to higher privilege level using non-conforming code segments only.
  • Fixed x86 RETF to use it's proper internal level stack pop instead of the incorrect instruction level stack pop.
  • Improved support for return to outer privilege level.
  • Improved retf/iret conditions for invalidating a data segment register.
  • Improved naming of the conditional jump *6h, from JB to JBE.
  • Added missing 32-bit LAR/LSL to the 0F opcode jumptable.
  • Improved 32-bit LAR to add missing descriptor fields.
  • Fixed a 32-bit LAR compiler error.
  • Fixed 80286+ required to #UD on ARPL from Virtual 8086 mode.
  • Implemented an option to logging advanced data to the debugger log(data not currently implemented in the common emulator log, like interrupts being triggered, faults, memory I/O).
  • Improved logging of the Real and RAM layer. The Real layer now is only used with actual existant RAM. The RAM layer is any direct RAM being processed(Memory register/status or actual RAM). Non-existant Real and/or RAM layer gives no response at all(although does give the undefined BUS for the platform according to motherboard logic.
  • Improved 16-bit vs 32-bit usage of either IP or EIP and it's wrapping behaviour.
  • Improved PTE updating logic.
  • Fixed memory usage detection to be correct in it's detecting of memory usage to the byte.
  • Fixed emulator reset to be a complete emulator reset when starting emulating after running the boot text.
  • Fixed 80386+ SHLD and SHRD instructions to perform correctly.
  • Improved handling of CPU debugger faults.
  • Fixed trap fault code.
  • Improved trap not triggering on faults.
  • Disabled trap flag from triggering a trap when switching tasks or executing any interrupt.
  • Optimized memory holes.
  • More unmapped memory optimizations.
  • Fixed a bug in remapping low reserved memory high.
  • Improved support for faulting when pushing interrupt data on the stack in real mode.
  • Modified debugger logging registers or not and advanced memory logs to be seperated correctly.
  • All logarithmic instructions clear the auxilliary carry too.
  • Fixed SHRD to properly update the Overflow flag.
  • Fixed PS/2 keyboard numlockable keys to be detected correctly.
  • Improved SBB flag accuracy compared to ADC.
  • Improved real mode interrupt stack check to only trigger before starting to push data.
  • LMSW only sets the low 4 bits of CR0.
  • Improved flags of BSR/BSF instructions.
  • Fixed hidden space in absolute/relative jumps.
  • Improved limit checking on RETF/IRET instructions.
  • Improved IMUL flags to be more accurate(logic flags + OF/CF specifics depending on sign overflowing or not.
  • Updated Android gradle to 3.1.4
  • BIU: Implemented instruction byte limit for 80286+ CPUs.
  • Added missing CPU in the instruction byte limit.
  • Prioritize memory faults over instruction limit. Only after memory faulting are we to check the instruction limit having been broken(or about to).
  • Fixed non-REP pending instruction properly clearing the instruction buffer.
  • Fixed the Sound Blaster Direct ADC special rule not applying anymore, according to recent Dosbox builds.
  • Improved interrupts clearing flags(Alignment Check and Resume flags).
  • Added support for the missing AC flag being used.
  • Removed ATAPI packet status #4 (result processing status).
  • Optimized IPS clocking mode to no longer handle BIU communications in the BIU itself, instead handling it immediately when requested.
  • IPS clocking mode now only fetches new instructions when starting an instruction.
  • Improved PIQ handling when flushing it in IPS cycle mode.
  • Optimized Protected mode debugger being not in use.
  • Improved the EU to recover when fetching instructions from the BIU when jumping to an errored out or paged out memory location.
  • Improved fetching from unmapped memory to happen only when required in IPS cycle mode.
  • Improved (un)likelyhood of CPU opcode fetching faults.
  • Added missing 16-bit and 32-bit IPS mode fault prefetches that are required.
  • Fixed MinGW compiler warnings about unused variables.
  • Optimized paging by ordering the actual TLB entries as well as their ages.

Common emulator framework updates:

  • Removed data packing on data types that don't need to be packed in memory.
  • Implemented the background policy to the task being (partly) emulated or halted.
  • Implemented four background policies and a setting to implement said policy.
  • Background policies behaviour has been improved.
  • Made Android minimize/restore and SDL/SDL2 both handle some common parameters, while both handling emulator pause/resume on varying components(audio/video) universal.
  • Made input-disabling Android-only.
  • Removed disabling the input in the main thread, as it requires a filter before it's handled.
  • Prevent Windows idling while the app is running.
  • Prevent sleeping with the nosleep parameter.
  • Fixed nosleep parameter type.
  • Fixed left windows key index to be loaded correctly.
  • Improved no sleep handling.
  • Improved dynamic RDP detection on Windows.
  • Improved noSleep call to be more accurate.
  • Split [Win]pcap builds from normal builds to have it's own build directory.
  • Implemented use of either pcap or winpcap, but not both when using the Linux makefile. Pcap having priority over winpcap on Linux.
  • Converted the emulator into an video&audio playback, preventing sleep that way.
  • Added support for ini files to be read in all possible newline formats(CR, LF or CRLF). Writing ini files still happens in the native format.
  • Fixed MinGW compiler warnings.
  • Improved Windows and Linux Makefile to use the platform-specific subdirectories for executables as well. Executables are copied to their parent directory after compilation finishes.
  • Improved Makefiles for Windows, Android and Linux to report improved executable names.
  • Improved Android Makefile to use the intermediate subdirectory like the other Makefiles.

So, the emulator now supports a few new features:

  • A background policy setting has been added: the application can pause completely or keep running in the background(with varying levels being: running fully in the background with audio playback and recording, no audio recording but with audio playback, neither playback or recording and finally a full halt setting(which effectively pauses the emulator and audio/video playback and recording completly). Note that due to SDL2 blocking the main thread on Android options other than Full halt won't work properly on Android. Windows builds work properly as instructed.
  • A nosleep parameter has been added to prevent Windows from entering standby or screensavers while the application is running.
  • Windows RDP(Remote Desktop) detection has been extended to not only apply the RDP parameter to detect RDP being used, but now also automatically detecting RDP connect and disconnect(instead of the earlier detection only happening when the application is started). So connecting and disconnecting RDP now has a proper effect on mouse movement(slowing mouse movement to prevent the problem with RDP and SDL(2) from happening that makes the mouse jump to the corners of the screen incorrectly, as can be noticed with various emulators(including Dosbox) when moving the mouse during RDP sessions).
  • Emulator speed in IPS clocking mode has been improved.
  • Windows builds now have their server versions added(which disables the serial modem hardware's dialing ability(it simply won't connect to other modems or being connected to from the emulated system's perspective) on the  and makes it act like a ISP server for connecting serial modems instead). A logon script that can be used with Windows 95's dial-up functionality in e.g. Dosbox can be found at https://bitbucket.org/superfury/unipcemu/raw/d056951ee021b2f1171764b5d1162249055... . Simply enter the server logon information and required related settings in the modem section of the SETTINGS.INI file, then logon using either the script or through manual input(confirmed working in both Dosbox Windows 95(Using Internet Explorer and Mozilla Firefox 2.0) and the Arachne web browser(without automatic scripts on Arachne).

Various new 80286+ software is now running properly(Windows 3.0 isn't running in Standard mode yet, but Windows 3.1 and Windows 95 setup in Standard mode are running now(although Windows 95 still fails booting past the registry update)).


UniPCemu.apk 3 MB
Sep 08, 2018
UniPCemu_PSP.zip 641 kB
Sep 08, 2018
UniPCemu_win32.zip 997 kB
Sep 08, 2018
UniPCemu_win64.zip 1 MB
Sep 08, 2018
UniPCemu_win32server.zip 1 MB
Sep 08, 2018
UniPCemu_win64server.zip 1 MB
Sep 08, 2018

Get UniPCemu

Leave a comment

Log in with itch.io to leave a comment.