UniPCemu build 2019/07/28 18:15 is now live!


The latest updates for UniPCemu are now available on itch.io! These include CPU improvements, various hardware improvements and emulator speed optimizations.

Common emulator framework updates:

  • Improved video updating to be more consistent on returning to the foreground.
  • Improved GPU window surface updating to reallocate the rendering surface better on Android, forcing reallocation.
  • Fixed non-Android compilation issue.
  • Increased the log text length from 8KB to 512KB to log large amounts of text in one go(up to 256K linebreaks).
  • Improved the CRLF conversion buffer to be able to hold any input the input buffer can give it.
  • Improved seperation of mouse events vs touch events.
  • Fixed SDL mousemotion to properly detect finger motion.
  • Added the new mouse to touch and touch to mouse seperation hints.
  • Improved mouse DTM detection when starting/finishing RDP.
  • Made RDP delta detection a full-sized bitflag, with delta being available for all the bits that are settable individually.
  • Discard mouse movement inside the app when not timing anything.
  • Implemented simple RCTRL to LWIN and (when the RCTRL remapping is enabled and pressed) Grave Accent to TAB remapping.
  • Improved releasing RCTRL when not remapping to LWIN anymore.
  • Fixed code issue with the last commit.
  • Fixed RCTRL and Accent Grave remapping.
  • Fixed input settings header.
  • Fixed input compiler issues.
  • Improved GPU text surface rendering priorities.
  • Implemented text surface input priorities.
  • Optimized text surface priorities handling.
  • Fixed text priority handler.
  • Implemented the full text and click based priority algorithm.
  • Fixed the GPU text surface priority resolving and code issues.
  • Disabled the relative mode warp for SDL2 due to still having issues with touch input.

UniPCemu updates:

  • Improved #TS faults vs #GP faults during having no outgoing task and during IRET.
  • ATA hard disk fail still needs to throw an IRQ to indicate the error.
  • Writing the main ATA drive registers writes to both the master and slave simultaneously.
  • Finished ATA read sector(s) commands don't raise an interrupt.
  • ATA error register after reset becomes a value of 1.
  • Improved ATA/ATAPI error reporting to be correctly reset.
  • Improved ATA reset to set the error register properly to 1 when needed after a reset.
  • ATA drive select takes 400ns instead of 50000ns.
  • Fixed floppy VERSION command execution.
  • Fixed floppy VERSION, DUMPREG, FORMAT TRACK and SEEK command lengths to be corrected, instead of having a length of 0.
  • Command 15h on the FDC doesn't exist.
  • Added the modem serial PNP logic to detect the modem, except the message to send.
  • Improved modem handling of A/ commands and the input of the AT or A/ prefix at the end of a command string that's to be discarded.
  • Improved AT and A/ handling after sending a previous A start.
  • Improved modem attention(AT/at) and A/ to be properly case-insensitive, except with AT and at requiring to be the same case.
  • Improved the A/ command to already have been converted to upper case, so no need to check for lower case too.
  • Implemented an actual modem PNP autodetection message.
  • Improved the Modem's PNP message generation.
  • UART: Only update the modem control register when it's changed.
  • Improved modem DSR to follow DTR and CTS to follow RTS by default, unless set to act otherwise.
  • Fixed ATA write sector to always trigger an IRQ when finished writing, even on errors.
  • Improved Hayes modem emulation of the DSR, DCD, RTS, CTS and DTR I/O.
  • Implemented the CTS to RTS line delay, according to the Technical Reference for Hayes Modem Users.
  • Improved MPU-401 IRQ handling.
  • MPU-401 IRQ is stays 2 on XT and 9 on AT.
  • VGA IRQ now changes to 2 on XT and 11 on AT.
  • Implemented the modem DTR to DSR delay.
  • Updated the modem RTS and DTR lines to apply a delay when changed, only applying the new line when they're kept in their new state for the specified time in the settings.
  • Fixed the RTS line delay to properly be triggered.
  • Implemented CUE disk image support.
  • Implemented CUE image geometry detection.
  • Implemented CUE image geometries for IDE CD-ROM drives.
  • Improved disk validation of CUE sheets.
  • Fixed the default selected CD-ROM track(track 1).
  • Fixed the CUE images to actually be detected as being mounted.
  • Fixed the CUE sheet line reading algorithm.
  • Improved ATAPI disk size reporting for CUE images.
  • Fixed CUE disk image decoding and line parsing issues.
  • Improved cue image detection and subtrack support.
  • Added CUE track and subtrack filters(and an ignore value of 0xFF for geometry lookups).
  • Fixed CUE image subfile paths.
  • Fixed cue image backend file seeking.
  • Fixed CUE image backend reading to verify properly.
  • Fixed ATAPI disk reads for CUE mounts.
  • Fixed CUE compiler warnings in ATAPI emulation.
  • Improved CUE image reporting of the read sector's track mode.
  • Improved type checking on CUE disk image read data.
  • Improved ATAPI command to properly respond with spin etc. for disk accesses.
  • Improved ATAPI seek command to store the seeked LBA address as the last LBA address(for relative seek and determining the track to seek within).
  • Improved ATAPI read CD commands expectations of the sector type.
  • Fixed CUE disk raw sector reporting.
  • Improved the TOC for CUE disk images.
  • Improved CUE image M,S,F calculation.
  • Improved the ATAPI CUE disk read routine to behave more correctly.
  • IDE: Improved handling of track types.
  • IDE: Improved CD-ROM various track reporting, reading and modes.
  • IDE: Improved missing track information specification and fixes it's issues.
  • IDE: Implemented the sense and request data for invalid ATAPI reads.
  • IDE: Implemented the ILI bit for invalid ATAPI transfers.
  • IDE: Improved ATAPI command aborts with ILI.
  • IDE: Fixed ATAPI aborted.
  • Fixed ATAPI code issues.
  • Improved ATAPI spin response to be waiting correctly.
  • Improved CD-ROM wait handling.
  • Fixed spin waiting to properly wait and not run the command.
  • Improved CUE image to allow reading without a specified buffer to ignore the size of the read sector properly.
  • Improved CUE ignoring of track and subtrack number.
  • Improved cue sheet track checks.
  • Fixed read sectors to properly take the read type as valid.
  • Improved load ready to not spin down until time has properly elapsed.
  • Fixed CD-ROM media type checks.
  • Improved normal ATAPI command errors.
  • Improved ATAPI error reporting for out of bounds sectors in all cases.
  • ATAPI: Only INQUIRY and REQUEST SENSE clear the Unit Attention.
  • Inquiry doesn't clear Unit Attention.
  • A successfull command other than Request Sense won't clear sense information or the Unit Attention(ERROR) bit.
  • Don't clear Unit Attention or sense packet data during TEST UNIT READY!
  • Improved ATAPI Sense packet data.
  • Improved the ATAPI error and status register changes to be minimal.
  • Added default command aborted status when executing an ATA(PI) command.
  • IDE: Improved running spin response during transfers to keep ticking.
  • IDE: Implemented interrupt on ATAPI disk change.
  • Improved CD-ROM disk changed handling to only handle notifications when ready to receive.
  • Improved ATAPI results to be drive-independent.
  • Improved ATAPI devices to ignore the DRV bit for interrupts.
  • Improved ATAPI devices to give the IRQ line output (before acnowledging) in the status register IDX bit.
  • Fixed IDE code errors.
  • IDE: Improved partial ATAPI block transfers to properly last until the end of a block instead of until the end of a transfer.
  • Improved ATAPI status register during error reporting.
  • Improved ATAPI common spinup response errors to fill the complete sense packet.
  • Fixed the reserved bits of the SENSE key packet byte.
  • Fixed ATAPI error reporting bug to look at the correct sense packet.
  • Made all ATAPI handling active drive-independent, only using the active drive when specified to use it.
  • Disabled the ATAPI special IDX bit in the status register to always be zeroed.
  • Improved error register during ATAPI errors.
  • Set the ABRT bit to 0 with ATAPI error reporting.
  • Disabled remaining ATAPI ABRT bit during disk insertions.
  • Fixed missing interrupt reason for ATAPI errors.
  • Added missing interrupt reason generation.
  • Improved ATAPI reset behaviour when active.
  • Don't automatically change the processing packet stage from the result phase to the NOP phase anymore.
  • Unit Attention because of a disk change pending stays in result phase as well.
  • Handle interrupt reason updates within the interrupt handler start only.
  • Fixed interrupt reason to only be for CD-ROM devices, instead of the other way around.
  • Only apply drive select timing when switching between Master and Slave drives.
  • Made the ATAPI DEVICE RESET command trigger an IRQ when ready.
  • Fixed ATAPI DEVICE RESET command to properly trigger an IRQ only with the command itself and not with the SRST bit.
  • Fixed some MinGW compiler warnings.
  • Added debugging variables that indicate if what ATA channel we're handling and it it's a master or a slave.
  • Fixed an issue with the format 0 TOC second/frame reporting being swapping incorrectly.
  • Made all MSF addresses properly binary instead of BCD.
  • Fixed duplicate MSF translation functions.
  • Improved TOC reporting for multi-track disks.
  • Fixed non-reporting of tracks with TOC format 0.
  • Improved geometry reporting to report a proper 1 when a track is found.
  • Cleaned up the ATAPI TOC code.
  • Fixed track search algorithm to only report found tracks.
  • Improved reporting of CUE track types for audio and data tracks.
  • Removed the NOP result for CUE images, while reporting the track mode when requesting geometry(or reading without a buffer).
  • Fixed the track modes with the new geometry reporting method.
  • Fixed invalid track mode reporting for geometry detection.
  • Fixed the TOC reading to check the cue result correctly.
  • Improved track reporting with cue images to be handled at the track level instead of the index level.
  • Fixed incorrect parsing of the cue image numbers and calculation priorities.
  • Fixed CUE image file size tracking and final index detection.
  • Fixed various packet parameters to be correctly shifted to their respective sum holders for processing.
  • Improved ATAPI spin response with running transfers to be more pending.
  • Improved ATAPI spindown timeout.
  • Improved erroring out properly on running ATAPI transfers.
  • ATAPI: Implemented proper A0-A3 records(and their tracks following them) and raw TOC/multisession Read TOC results.
  • The Read TOC mode 1 result is always returning LBA addresses, while the Read TOC mode 2 result always returns MSF results.
  • Improved ET4K attribute register 16h emulation with it's high color mode setting.
  • Fixed the ET4000 Attribute Controller register 16h to properly use it's settings.
  • Fixed the reserved value on the ET4000 to actually be applied correctly.
  • Simplified the pixels doubling used with high-resolution color modes.
  • Improved (S)VGA HRetrace and VRetrace pending to keep the retrace signal active, properly retracing on the screen.
  • Improved ET4000 HBLANKSTART register timings based on the normal VGA precalcs.
  • Added CRTC status logging to the VGA dump.
  • Disabled the debugging output for VGA rendering the overscan and blanking periods.
  • Changed and documented segdesc to use -128 as the non-paging memory access, disabling any paging translation from occurring. All other cases use paging normally.
  • RETF/IRET: Pop SS using the used privilege level first(as the code's privilege level), only apply the new (lower) privilege level after popping the required data off the (kernel) stack.
  • Fixed a code bug with LOADALL loading data from memory.
  • JMP/CALL to a lowered DPL(numerically higher) code segment is always forbidden!
  • Updated the Android Gradle to the newest version.
  • Changed the default static/dynamic disk image format when creating to Bochs type geometry. Square now generates a minimal type disk image instead (swapping the two options between non-Square and Square disk image creation).
  • Disabled high memory logging on RALT-F9.
  • Fixed MIDI RDP delta detection to use the new RDP delta correctly.
  • CUE images: Added reading of PREGAP/POSTGAP without processing it.
  • Fixed and cleaned up pregap and postgap cue reads.
  • Improved cue to implement pregap and postgap to add to the virtual address, but not being able to read from them.
  • Implemented cue image pregap and postgap detection and reporting.
  • Sector reads from pregap and postgap are currently counted as Out-of-range.
  • Implemented track gap skipping.
  • Added basic track reporting implementation.
  • Fixed cue image handling to properly use it's variables.
  • Improved and fixed pregap/postgap reading.
  • Audio tracks now also read the pregap area as zeroes, when reading audio tracks.
  • Improved cue track reporting to properly look past the pregap(if any is reported) for the first frame within the track to get the actual track type properly.
  • Fixed the start of the CUE track gap check to properly start at track 01.
  • Fixed cue image postgap missing LBA calculation.
  • Fixed cue image invalid result (1) with report1ontrackfound (when supposed to be -2 and lower).
  • Fixed cue image result container to be of the proper size.
  • Made the gap detection detect the gap properly, taking the total gap size into account as well.
  • Improved CUE image gap detection and handling to be track independent.
  • Improved cue image reporting of the start of the track difference when requesting a gap to be accessed.
  • The gap from the start of the track has nothing to do with the gap length being reported.
  • Improved the CUE overlap detection for determining if the request is for the current index, but shifted further ahead by the gaps.
  • Fixed the LBA addition required for the start of a track from a pregap area.
  • Converted cue image MSF tracking on the physical medium to be using a number to keep track of the physical MSF position the user addresses.
  • Improved pregap and postgap support for cue images.
  • Improved pregap/postgap handling and their results to affect the physical medium better.
  • Fixed the cue pregap without a precursing index or postgap to not count the MSF position twice incorrectly.
  • Improved cue gap handling.
  • LBA was substracted by 1 for the final address, so take that into account applying gaps and MSF positions.
  • Fixed EOF position check to properly be handled.
  • Improved cue image end MSF address to be properly filled.
  • Fixed a wrong goto statement inside the cue image handling.
  • Fixed ATAPI CD-ROM drive size storage to be corrected, including the pregap of track 01.
  • Implemented special cue image reporting on the pregap and postgap of a track.
  • Improved pregap and postgap processing with ATAPI drives.
  • Improved reporting of track pregap and postgap.
  • Improved the special pregap/postgap cue image result to behave better.
  • Allow reading a size of 0 bytes from a cue image. It just reads nothing at all and returns the track type.
  • Improved pregap skipping with ATAPI drives.
  • Improved the cue image special features bit 2(report postgap bit) to not report for locations until the postgap actually starts.
  • Implemented the postgap properly when parsing the tracks to read within the ATAPI handling.
  • Implemented the new input settings into the settings load/save functions(RCTRL to LWIN and Accent Grave to Tab remapping when RCTRL is pressed).
  • Added the new remapping input settings to the input menu in the Settings menu.
  • Improved ATAPI mode sense/select support with proper data reported and in ROM.
  • Implemented the basic code paths for the new CD-ROM audio playback commands.
  • Implemented the basic handling framework of ATAPI CD-ROM audio commands.
  • Implemented ATAPI audio playback according to sff8028i documentation.
  • Improved disk change handler reporting the disc change for the Microsoft Removable Media notification specs.
  • Modified the BIOS main, disks and advanced menu to allow returning to the emulator by pressing the cancel button(escape or circle) when it can return to the emulator without rebooting. This will automatically save changes if any changes are made in the settings menu(acting like the save&resume or discard&resume based on the settings being changed or not).
  • Implemented the remainder of the audio commands handling.
  • Enabled the new audio commands for playback.
  • Added 2 seconds to the audio play locations for CD-ROM audio playback commands.
  • Fixed the MSF convertion to and from LBA to properly use the binary mode instea of the incorrect BCD mode.
  • Improved cue image track start/end reporting.
  • Improved cue pregap/postgap reporting.
  • Improved cue image reporting to report the pregap/postgap/normal modes better.
  • Fixed issues in the track detection in the ATAPI drive.
  • Fixed the ATAPI CD-ROM playback sample read to use the correct track/subtrack filter, instead of always trying to read from the very last track of the disk.
  • Simplified the rendering of the first sample to use the same code only once.
  • Disabled the adding of 2 seconds to the requested play audio CD-ROM command.
  • Fixed incrementing of the MSF address for CD-ROM audio playback.
  • Fixed audio frame loading vs rendering a loaded sample to not happen at the same time.
  • Improved reporting of player status during the read sub-channel command.
  • Improved track and current address reporting using the read sub-channel command CD-ROM current position channel.
  • Fixed returned length for the CD-ROM current position data format for the Read Sub-channel command.
  • Implemented the last read format into the read sub-channel command.
  • Fixed reporting of the current position to not overwrite the current address with the relative track address.
  • Fixed the returned length for subchannel format 1.
  • Improved ATAPI Seek command to fill the subchannel data with the seeked frame information.
  • Improved ATAPI Seek command to be able to seek to 2352-byte sectors correctly.
  • Stop the CD-ROM player when a Seek command is executed.
  • Fixed missing header of sign conversion support in the ATAPI music player.
  • Removed unused ATAPI variables.
  • Simplified CD-ROM Seek command.
  • Fixed the read Sub-channel result for format 3 to actually be format 1 as documented.
  • Optimized the track information by storing the retrieved and calculated values in a precalculated table for all information that's used. So in this way, it doesn't need to access the cue file many times for each sector read(and audio frame playback). Changing the disk or restarting the emulator is still required for reloading said cache from the cue file(it won't see changes in the cue file otherwise).
  • Improved the settings menu by properly reloading the CD-ROM both with and without reloading state when not changing the disc and returning to the emulator. It will now reload the track precalcs from the file when the settings menu is closed.
  • Improved the cue file command when replacing the existing file with a new file, making the previous index run until it's EOF.
  • Improved the CD-ROM CD-DA commands to error out or NOP when using a unusable disk image without audio tracks.
  • Improved the CD-ROM audio player erroring out when not using a playable disc image.
  • Improved reporting of correctly read data tracks from non-CUE disk images.
  • Improved PIQ flushes during (E)IP loads to be at the end of the action only.
  • Improved and optimized 4KB/4MB block addresses in Paging TLB read/write operations.
  • Updated the SDL2 common emulator framework to the latest commit.
  • Updated the common emulator framework to the latest commit.
  • Fixed MinGW CPU_flushPIQ compiler warning.
  • Improved and fixed MinGW compiler warnings with the cue image parsing.
  • Fixed more MinGW compiler warnings.
  • Updated SDL2 to version 2.0.10.

So in short:

  • Updated SDL2 to version 2.0.10.
  • Fixed various CPU issues.
  • CUE disk images are now supported!
  • Improved the ATAPI protocol to implement all sff8020i mandatory commands for data and audio CD-ROMs and fix various issues with it.
  • Implemented CD-ROM audio playback(CD-DA).
  • Fixed Tseng ET4000 high-color mode issues and smaller emulation improvements.
  • Fixed floppy disk controller bugs.
  • Improved serial modem autodetection and emulation.
  • Improved Hayes modem command input.
  • Improved IRQ numbers of conflicting devices where possible.
  • Added options for RCTRL to LWIN remapping and Accent Grave(Tilde) key remapping to Tab when pressing RCTRL in that when both are enabled.
  • Improved mouse RDP and touch response on Windows.
  • Improved touch and click input on text surfaces to behave better.
  • The keyboard layer now sits on top of both the BIOS menu text layer and framerate text layer(which sits at the bottom, which is on top of the video output layer). Response to touch/click input is also improved(visible over non-visible priority and foreground over background layers priority).

Files

UniPCemu.apk 4 MB
Jul 28, 2019
UniPCemu_PSP.zip 880 kB
Jul 28, 2019
UniPCemu_win64.zip 1 MB
Jul 28, 2019
UniPCemu_win64server.zip 1 MB
Jul 28, 2019
UniPCemu_win32.zip 1 MB
Jul 28, 2019
UniPCemu_win32server.zip 1 MB
Jul 28, 2019

Get UniPCemu

Leave a comment

Log in with itch.io to leave a comment.