VOOZH about

URL: https://mednafen.github.io/documentation/ChangeLog.txt


-- 1.32.1: -- March 15, 2024: Apple2: Fixed erroneous parsing of WOZ file padding bytes and unknown chunks' data as 8-byte chunk headers. Fixed broken handling of the end-of-stream condition when reading from non-compressed files stored in ZIP archives; fixes loading of such Apple II WOZ disk images and CloneCD CD images. January 17, 2024: SS: Implemented workaround for gcc bug #113255 in the VDP1 rasterization code. January 14, 2024: Apple2: Fixed typos/brainfart that broke language card and ROM card control accesses via $C08F. -- 1.32.0-UNSTABLE: -- December 29, 2023: Silently disable keyboard grabbing temporarily while the netplay text input, debugger, or cheat interface is active, to avoid complicated text input problems with AltGr and low-level keyboard hooks on Windows. December 25, 2023: Fixed directory creation error(s) when trying to run Mednafen in the root directory of a (non-subst'd) drive on Windows, a regression introduced in 1.22.0-UNSTABLE. December 24, 2023: PSX: Added support for Konami's "Pop'n Music" controller. December 22, 2023: Added setting "input.grab.strategy" to control when the system keyboard and mouse are grabbed while input grabbing is toggled on in Mednafen. Note that SDL2 2.0.16 or later is required for the non-default "auto" option to fully work. December 18, 2023: Fixed excessive CPU usage when sound is disabled or fast-forwarding is active while in frame advance/pause or in the cheat interface. December 17, 2023: No longer set environment variable "__GL_SYNC_TO_VBLANK", instead relying only on SDL_GL_SetSwapInterval(), as it seems to work fine nowadays with Nvidia's binary Linux driver, to avoid thread safety issues with environment modifications. Renamed configuration macro "PSS_STYLE" to "MDFN_PSS_STYLE", and path-separator string macro from "PSS" to "MDFN_PSS". December 15, 2023: PSX: Renamed setting "psx.dbg_level" to "psx.dbg_mask", and changed its type to a multi-enum, to allow for more granular enabling of debug messages. Added SettingsManager::GetMultiM() and MDFN_GetSettingMultiM() functions, which will return the setting's enum values OR'd together. abort() when SettingsManager::GetUI(), SettingsManager::GetI(), or SettingsManager::GetF() is called for a MDFNST_MULTI_ENUM-type setting. PSX: Snoop additional BIOS tty stdout functions when setting "psx.dbg_level" is 2 or higher. December 2, 2023: Patched SDL2 in the Windows build toolchain to ignore synthetic Left CTRL key events generated by AltGr, when keyboard input grabbing is active. Demo: Added an interactive graphical keyboard test mode to check input grabbing and SDL2 keyboard support, among other things, activated by changing the value of new setting "demo.mode" to "keyboard". November 29, 2023: PCE, NES: Fixed broken rendering in the graphics debugger when the OSD pixel format is not the same as the emulation video pixel format. November 28, 2023: Changed the OpenGL RGB555 support(e.g. via the "video.glformat" setting) to use a pixel format and type of GL_RGBA and GL_UNSIGNED_SHORT_5_5_5_1(instead of GL_BGRA and GL_UNSIGNED_SHORT_1_5_5_5_REV as before). Set emulation video texture parameters GL_TEXTURE_WRAP_* to GL_CLAMP before trying to set them to GL_CLAMP_TO_BORDER, to avoid texture wrapping on pre-1.2 OpenGL. November 26, 2023: Added support for 16bpp video/framebuffer modes, dependent on specific emulation module support, when OpenGL is disabled. Blocked the graphics debugger from being selected when it's not implemented for the current emulation module. Fixed hang when a post-startup error occurred during video reinitialization or blitting, due to erroneously unlocking a mutex twice. November 23, 2023: Updated toolchain for official Windows builds(non-Win9x): binutils 2.28 -> 2.28.1 flac 1.3.2 -> 1.3.4 mingw-w64 5.0.3 -> 5.0.5 SDL2 2.0.8-11835 -> 2.28.5 zlib 1.2.8 -> 1.2.13 Additionally, the 32-bit build of SDL2 has been patched to restore support for Windows 2000, broken since the migration to SDL2 in Mednafen 1.x. November 21, 2023: Apple2: Delay Disk II processing of normal flux pulses vs. random noise pulses, and disable the 500ns delay pseudorandomly(50% probability) added to normal pulse detection, as it breaks WOZ dumps of "Test Drive" and "Wizardry". November 19, 2023: Fixed design flaw in MDFN_strargssplit() that broke handling of an escaped backslash immediately preceding a closing double quote character. November 18, 2023: Documentation: Added support for hyperlinks to settings in the description text for settings, custom palettes, and internal databases, by enclosing the setting name in double quotes and prefixing the name with ASCII control character 5. Fixed broken handling of octal along with a few edge case issues in MDFN_strunescape(). In MDFN_strescape(), escape control characters in 3-digit octal instead of 2-digit hex or 1-digit octal to avoid potential conflicts with subsequent characters. October 21, 2023: Align QTRecord CSCD video codec line data to 4-byte boundaries, as is correct, to fix broken recorded video in some circumstances. October 20, 2023: SS: Parse the 32-byte region area data in addition to the 1-byte region characters when determining the region to emulate. October 18, 2023: SS: Extend previously-undocumented bootable ROM cart support from 1MiB to 48MiB, with support for 512KiB backup memory if 32MiB or smaller, and force full cache emulation to be enabled when running with a bootable ROM cart image. SS: When loading a save state, mark internal and cart backup memories as dirty only if loading the state actually changed them, to try to avoid excessive disk writes when using state rewinding. SS: Added support for routing SCSP MIDI output to stdout, activated by changing the value of the new "ss.midi" setting to "stdout". Note that byte values of 0x1B will be filtered from the output, and timing synchronization issues limit its uses outside debug text output. October 12, 2023: SS: Corrected behavior of VDP2 color calculation blending when in both hires mode and a non-zero color RAM mode. October 11, 2023: SS: Prevent VDP2 color calculation blending with a transparent sprite shadow pixel beneath the topmost layer; fixes erroneous opaque red shadows under units during the last episode's first battle in "Sakura Taisen". October 2, 2023: SS: Added "Gambler Jiko Chuushinha: Tokyo Mahjongland" to the internal database of games to use full cache emulation with, to fix octopus screen flickering. September 22, 2023: Apple2: Error out when loading WOZ 2.1-format images with FLUX chunks, as they're not currently supported. September 21, 2023: Apple2: Added "rgb_video7" video rendering mode, which supports the additional graphics modes offered by the Apple IIe Video 7 RGB interface, one of which is used by Sierra's AGI games, and provides two distinct grays in all graphics modes. September 14, 2023: Apple2: Added "apple2.input.kb.auto_repeat" setting. Debugger: In the memory editor, the Escape key will now exit text entry prompts and editing mode. Debugger: Don't set a register's value to 0 when the register edit text entry string is empty or completely invalid. September 13, 2023: Fixed bug that could cause nearly all hotkey/command key functions to trigger spontaneously when Mednafen has been running for around 49.7 days Changed the default mapping for exit to just F12 instead of ESC and/or F12. Added a new hotkey for closing the netplay popup, by default mapped to "ESC", controlled by setting "command.close_popup". September 10, 2023: Apple2: Added "rgb_qd" and "rgb_qd_tfr" video rendering modes, which will render DHGR at quarter-resolution, and provide two distinct grays in all graphics modes. September 9, 2023: Apple2: Renamed keyboard input mapping settings to reduce their lengths, and documented the caps lock default position setting. Apple2: Changed how HGR is handled with the "rgb_alt" and "rgb_alt_tfr" video rendering modes, for consistency with DHGR and to correct a few glitches. August 31, 2023: Apple2: Added an adjustable composite color video sharpening filter, controlled by the new setting "apple2.video.postsharp". May 7, 2023: SNES-Faust: CPU writes to VRAM during active display are now blocked. Fixes missing dialog box and text in "Mazinger Z", title screen corruption in "NBA Pro Basketball: Bulls vs Blazers" and "Shin Nihon Pro Wrestling: Chou Senshi in Tokyo Dome", and graphical garbage during startup in "Zen-Nihon Pro Wres". May break ancient ROM hacks and fan translations. April 17, 2023: Include general mode(read, write, read+write) in file open error messages. April 12, 2023: Added command-line option "-ovconfig", to load global override settings from the specified file. The global override settings will override any settings loaded from "mednafen.cfg" or set via command-line arguments, but will be overridden in turn by more-specific per-module and per-game override configuration files. April 4, 2023: Apple2: Added high-level(no seek delay) ProDOS-compatible hard disk drive emulation, usable by loading a raw hard disk drive image with an "hdv" file extension, and through the "hdd" directive in a MAI file. March 28, 2023: Apple2: Added support for Apple IIe and Enhanced IIe, selectable via changing the new "apple2.model" setting, or by utilizing the new "model" directive in a MAI file. Apple2: When loading a floppy disk image from a ZIP archive without a MAI file, all other floppy disk images with the same extension in the same directory in the ZIP archive will now also be loaded automatically. If desired, this feature can be disabled by setting the new "apple2.multiload" setting to "0". March 26, 2023: Apple2: Added setting "apple2.input.kb.ghosting", default value of "1", that can be set to "0" to disable emulation of spurious ghost keypresses. March 25, 2023: Apple2: Increased the maximum value of the "apple2.video.color_smooth" setting to "2", which will enable more-aggressive composite video color smoothing. March 6, 2023: Use AX_APPEND_COMPILE_FLAGS() instead of AX_CFLAGS_GCC_OPTION() in the configure script. February 24, 2023: SS: Enable data cache bypass kludge for "Kanzen Chuukei Pro Yakyuu Greatest Nine (Japan)", to fix game hangs. SS: Enable full cache emulation for "Gal Jan (Japan)", to fix a hang after a game ends. SS: Enable data cache bypass kludge for "Creature Shock: Special Edition (USA)", "Magic Carpet (Europe)", and "Manx TT SuperBike (Europe)", to fix hangs/crashes. SS: Enable full cache emulation for the Europe and Germany releases of "Revolution X", to fix hangs. February 7, 2023: SNES-Faust: Implemented a minor SA1 CPU emulation optimization. January 29, 2023: Fix potential stack corruption due to insufficiently large array in the Win32-utilizing version of Time::LocalTime(). October 20, 2022: SNES-Faust: When a write to INIDISP changes the force blank bit from 1->0, only trigger OAM address reset if the write occurred during the first line of vblank(semantics might not be totally correct); fixes disappearing graphics glitches in "Wordtris". September 4, 2022: SNES-Faust: Fixed distorted graphics in "Marvelous" and "Bishoujo Janshi Suchie-Pai" due to hires color math emulation inaccuracies. -- 1.31.0-UNSTABLE: -- August 22, 2022: SNES-Faust: Fixed garbage MSU1 audio on big-endian platforms. August 15, 2022: SS: Added "Real Bout Garou Densetsu" to the internal database of games to enable full cache emulation with, to fix startup hang after skipping the BIOS bootup animation, a regression introduced in 1.26.0-UNSTABLE. August 11, 2022: VB: Don't flip framebuffers at the first start of drawing to the framebuffer after power-on, and (always) flip framebuffers when XPRST is triggered, per tip from blitter. August 6, 2022: When running the configure script with --with-external-trio, pkg-config information is now used preferentially if available. July 28, 2022: SNES-Faust: Added mouse emulation. July 25, 2022: SNES: Fixed #if/#ifdef typo in libco PPC code that reportedly broke libco on PPC when compiling with clang. July 16, 2022: MD: Fixed bad values in the PAL V28 VCounter table(though normal resolution interlace VCounter stuff still needs to be fixed). Fixes glitches and hang in the Europe release of "Donald in Maui Mallard". Fixed some M68K instruction and exception execution time inaccuracies. Implemented emulation of M68K instruction Scc's dummy read. July 4, 2022: SS: Added basic ST-V support. SS: In SMPC INTBACK command processing, when starting controller reading after returning SMPC status, wait for Continue/Break *before* waiting for the end of VBlank, prioritize Continue over Break, and don't allow the wait for end of VBlank to be interrupted by setting the Break bit, per tests on a SS. June 30, 2022: Extended support for configuring buttons on virtual ports from port 12 to port 13, using new key combo ALT+SHIFT+Keypad 3, and switching devices by CTRL+SHIFT+Keypad 3, for future use. June 25, 2022: Added std::string variants of MDFN_strazicmp(). Adjusted minimum file extension search priority(e.g. for ".bin" and ".exe" extensions) from -80 to -1000. June 20, 2022: Added initial value argument to crc16_ccitt(). June 14, 2022: Added support for returning CRC32 values in VirtualFS::finfo(), for entries in a ZIP archive. June 12, 2022: SS: Trigger mid-frame synchronization when going into vblank if not already triggered by SMPC INTBACK command processing. March 26, 2022: SS: When VDP2 per-dot RBG0 coefficient reading is enabled, and a per-dot coefficient read is attempted from a memory region not configured for that purpose via RDBS, force the coefficient data to 0, instead of using the per-line coefficient data. Fixes graphical glitches in "Radiant Silvergun" when starting a new game after interrupting the attract mode during the AKA-O battle. March 23, 2022: SS: Forcibly disable NBG1-3 only if both RBG0 and RBG1 are enabled via BGON, instead of only checking if RBG1 is enabled; fixes missing/glitchy graphics in "Houkago Ren'ai Club: Koi no Etude". March 9, 2022: SNES-Faust: Fixed broken ExLoROM support. PCE, PCE-Fast, PC-FX: Update channel 1 frequency cache upon LFO frequency register writes(the way the channel 1 frequency and LFO frequency are combined is still inaccurate, however, causing frequency update timing granularity to be too high). February 4, 2022: SNES-Faust: Fixed PPU window emulation bug that caused graphical glitches with a white circle at a few places in "Final Fantasy 5". February 2, 2022: PC-FX: Expanded external backup memory to 128KiB, and changed it so that internal backup memory and external backup memory are saved to/loaded from separate files. January 22, 2022: SASPlay: Added support for "Air Walkers". -- 1.29.0: -- January 12, 2022: PCE, PCE-Fast: Initialize VCE color table memory at power-on to roughly(without probabilistic bit randomness) match test results from a PC Engine Duo instead of just zeroing it; fixes unreadable letters in the password entry screen of "Order of the Griffon". Added test for potential splatting-related bug in qemu's PPC64 VSX "xscvdpsp" instruction emulation that messes up OwlResampler when compiled with gcc. January 11, 2022: PCE: Added patch in the "notes" subdir for extending the upper range of the "pce.slend" setting to 241(not applied in Mednafen due to increasing the probability of an extra 8ms of input lag with some games). January 9, 2022: VB: Fixed a couple inaccuracies in the VSU modulation emulation, fixing a few sound effects in "Virtual Boy Wario Land". January 7, 2022: SNES-Faust: Fixed S-DSP pitch modulation being half as strong as it should be. December 29, 2021: SNES: Fixed wrong compile-time endian detection on little-endian PPC64. December 24, 2021: PCE: Fixed incomplete initialization of the VDC BG tile cache; fixes glitches after the boss explodes in "R-Type" under certain conditions(more likely to occur in forks of Mednafen). December 20, 2021: NES: Added missing mapper 90 variables to save states. December 5, 2021: Placing a "%d" or "%b" specifier at the beginning of a filesys.fname_* setting format string will now cause the generated path to be used as-is, rather than potentially being prefixed with the corresponding filesys.path_* setting or the Mednafen base directory. Fixes a regression introduced in 1.28.0-UNSTABLE that caused IPS patch files to be loaded from the wrong location when the user had loaded a game via a relative path. November 29, 2021: Added support for playing the SCSP-generated music from most Sega Model 2A, 2B, 2C, and 3 games, via the new experimental "sasplay" module. November 15, 2021: SNES: Fixed compilation error for little-endian PPC64 with LTO enabled. Fixed compilation error after running configure with --disable-fancy-scalers. -- 1.28.0-UNSTABLE: -- November 7, 2021: SNES: Updated libco to latest. November 5, 2021: Paths included in informational and error messages are now outputted with ASCII control characters non-reversibly transformed by inverting bit 6 and prefixing with a "^" character. When loading a game from a ZIP archive, the path used within the ZIP archive is now outputted in an informational message. The paths of CD images specified within M3U files are now outputted in informational messages as they are loaded. November 3, 2021: Added support for loading CD images from ZIP archives when the "cd.image_memcache" setting is set to "1". Implemented an M3U recursion limit of 9, adjustable by the new setting "cd.m3u.recursion_limit". Implemented a limit of 25 on the total number of CD images loaded while processing M3U files, adjustable via the new setting "cd.m3u.disc_limit". Implemented a size sanity limit of 65535 bytes for PSF tag source data. October 28, 2021: Changed handling of single gzip/Zstd compressed files to treat the .gz/.zst suffix as the second part of the extension, instead of the whole extension, with respect to Mednafen data file path construction and naming. Added undocumented setting "filesys.old_gz_naming", that can be set to "1" by the user to restore the old data file naming behavior for gzip-compressed files for backwards-compatibility reasons. October 27, 2021: Added Zstandard decompression support to game loading, with both naked files("zst" extension) and ZIP archives. October 21, 2021: SS: Don't send CD data sectors to partition buffers when the disc hasn't gone through the authentication process. October 19, 2021: SS: Moved some CDB CD reading variable initialization into StartSeek() to reduce the amount of redundant error-prone code. SS: Don't erroneously signal CDB EHST HIRQ when ending a TOC or file info data transfer. October 18, 2021: SS: Implemented more aspects of the CD block disc authentication process. Fixes abort to CD player screen when trying to start a game demo in Gremlin Interactive's "Demo Disc". SS: fixed a few issues with CD block directory reading and handling of directories with more than 256 entries. October 6, 2021: SS: Added commented-out partial fix for end-of-level hang in "Loaded". SS: Changed midsync event time initializing to use SS_SetEventNT() instead of doing it directly(and breaking when the midsync event isn't the last enumerated event) SS: Added a dev build event order sanity check to ForceEventUpdates(). October 5, 2021: SS: Implemented a delay when the SMPC joystick read process is aborted due to time over or due to the Break bit being 1, per tests on a SS, and fixed timing granularity issues with the processing of the Break/Continue bits; fixes unresponsive input in "Discworld", and abort to CD player screen in the USA and Europe releases of "Primal Rage". October 1, 2021: SS: Added "Senkutsu Katsuryu Taisen: Chaos Seed" to the internal database of games to enable full cache emulation with, to fix the inability to skip the intro FMV. An empty string for a setting that expects a numeric value is now rejected instead of being treated as 0. September 29, 2021: Misformatted setting file lines are now rejected with an error instead of silently ignored. September 27, 2021: SS: Fixed a mistake in an invocation of the SH-2 emulation Branch() macro that caused an expensive debugger function to be called even when the debugger was not active, hurting performance. September 26, 2021: Settings file parsing error messages now include line numbers when relevant. SS: Removed MDFN_COLD from SH7095::SetDebugMode(), as it causes newer gcc's optimizer to make bad assumptions and place the main CPU execution loop in the cold text section. September 25, 2021: Providing an empty string for a setting that expects an integer or real number will now result in an error, instead of being treated as 0. Modified the settings code to use the new string<->integer conversion functions, for stricter parsing(nonsense like "0x -0x1" is no longer allowed) and better error messages in certain cases. Added new string<->integer utility conversion functions. September 21, 2021: SS: Implemented a simple optimization in the VDP1 drawing code, reducing executable size by about 900KB on x86_64 Linux. Added MDFNI_SaveSettingsCompact(), to be used in the future for settings backups. September 14, 2021: Added tests for clamp_to_u8(), clamp_to_u16(), and MDFN_abs64(). Added the MDFN_abs64() function. Rewrote the sign_*_to_s*() macros and clamp_to_u8/u16() functions. September 13, 2021: Added MemoryStream::get_line_mem() function to allow for more efficient parsing of large line-delimited text files. Added MDFN_memdupstr() function, stuck the guts of the settings handling code in a class, and reworked the settings file loading code to be a bit faster. Added inline FileStream::put_char() function, and optimized the settings file saving code. September 10, 2021: Reworked how setting generation at startup works a bit to reduce the number of memory allocations, and added setting flags to mark strings that should be free()'d when MDFNI_Kill()->MDFN_KillSettings() is called at exit, to reduce noise when checking for memory leaks. Fixed currently-benign memory leak in the FPS display code. SexyAL: Fixed memory leak in dummy sound driver. September 9, 2021: SexyAL: Modified the ALSA driver code to not use a VLA for the noninterleaved multichannel support. September 8, 2021: Fixed an instance of undefined behavior in SwiftResampler. September 7, 2021: Added a couple more compiler bug/sanity tests. September 6, 2021: Rewrote some of the small inline utility functions in CDUtility.h, and added tests for the rewritten utility functions to ensure correctness and stable semantics. Added test for gcc bug #97760. August 28, 2021: Added crc32_cdrom_edc() function(to be used later), reimplemented crc16_ccitt() with the new generic fast CRC calculation template function, and added a few CRC calculation sanity tests run at startup. August 24, 2021: SS: Fixed an off-by-150 bug in the CDB code, present since the first release with Saturn emulation, that caused the read hinting at the start of emulated seeks to not have the desired effect. SS: Implemented emulation of the CDB Scan command. August 16, 2021: SS: Optimized the SCSP sound CPU interrupt level calculation code. August 14, 2021: SS: Fixed a few inaccuracies in the relative timing of SCSP timer increments across different prescaler rates, per tests on a SS. August 13, 2021: SS: Added emulation of the SCSP MIDI interface output logic and approximate timing. August 10, 2021: SS: Fixed a few inaccuracies in the relative timing of SCSP EG level updates across different rates, per tests on a SS. July 21, 2021: Typedef signed char and unsigned char to int8 and uint8 respectively, instead of relying on int8_t and uint8_t, in case they're ever implemented without the aliasing properties of char types, which Mednafen code relies on. July 17, 2021: SS: When a CDB seek is started very shortly after another seek, don't elide the previous seek's startup side effects; fixes the CD audio player in the North America/Europe BIOS, which broke with 1.26.0-UNSTABLE. Compile with -Wstack-usage=32768 to check for excessive stack usage in functions. July 15, 2021: VB: Added "left" and "right" options to the "vb.3dmode" setting, to allow for more easily showing only the left or right view. July 11, 2021: Added setting "video.cursorvis", to control the window manager default cursor visibility. June 26, 2021: Use AtomicFIFO for the main thread->emulation thread event queue, and fixed related excessive(100+ KB) stack usage in a couple functions. June 20, 2021: SS: Added "Saturn Super Vol. 2" to the internal database of games to use the data cache read bypass kludge with, to fix the flickering title screen in the "Golden Axe: The Duel" demo. SS: The VA0/VA1 motherboard's memory mapping behavior for Low-RAM is now emulated instead of VA2's, to fix a crash in "Myst" in the generator room. SS: The emulated reset button mapped to Mednafen's reset command key(F10 default) will now respect the "ckdelay" setting. Added a quick configure script test to check if disabling PIC/PIE breaks the compiler/linker, and if it does, PIC/PIE is not disabled, to prevent a link-time failure on Haiku. June 19, 2021: Use AC_TRY_LINK() instead of AC_TRY_COMPILE() in the configure script test for AVX inline assembly availability, to handle toolchain setups where the assembler is run at link time instead of compile time. Added setting "video.force_bbclear", default value of "0", which when set to "1" will force clearing of the backbuffer before drawing every frame. -- 1.27.1: -- June 4, 2021: SS: Added "Herc's Adventures" to the internal database of games to enable SH-2 read/write VDP1 draw slowdown with, to fix a few graphical glitches. May 28, 2021: Error out in the configure script when iconv is not found, rather than later during compilation. May 26, 2021: SNES: Applied untested fix for an issue with libco on PPC64 ELFv2 systems. May 18, 2021: SS: Corrected a few inaccuracies in the handling of SCSP EG phase transitions, per tests on a SS. May 12, 2021: Renamed intl/VERSION to intl/VERSION.txt to prevent a conflict with a system C++ header file on case-insensitive filesystems(problem introduced in 1.27.0-UNSTABLE). April 29, 2021: Demo: Use #pragma(pack) instead of __attribute__((packed)), to work around a bug/design flaw in older versions of gcc that caused the demo module's save state test to fail when compiled for a Windows target(where ms_struct is the default structure layout). April 28, 2021: Increased verbosity of bad Q subchannel data error messages in the CloneCD CD image loader. Fixed crashing with non-glibc iconv implementations when the user specifies an unsupported character encoding in the debugger's memory editor. -- 1.27.0-UNSTABLE: -- March 29, 2021: SS: Corrected threshold and semantics of envelope level-based blocking of slots' access to SCSP RAM, per tests on a SS. March 13, 2021: SS: Fixed a big-endian target incompatibility in the SCSP emulation code. Use ternary operator instead of std::min in endian.h, as doing so somehow causes gcc to produce smaller and faster machine code. PSX: Removed incorrect filtering of CD-XA ADPCM sectors based on the file and channel numbers of the first ADPCM sector played, originally added in 0.9.24-WIP to fix the speech playback in "Yarudora Series Vol.1: Double Cast", but made unnecessary by later sector buffering accuracy improvements; fixes missing audio in the FMVs of "Blue's Clues: Blue's Big Musical". March 12, 2021: PSX: Adjusted which sectors are processed and reflected by GetLocP after SeekP completes to only those before the seek target(which is slightly different than SeekL behavior, which also includes the target and a few after, at least with a typical PS1 CD); fixes hangs at different points in some versions of "Tomb Raider", a problem initially fixed in 0.9.38.3, but regressed in 1.22.0-UNSTABLE. March 9, 2021: VB: Block writes to VSU registers and memories when A0 and A1 are not both 0, per tip from "enthusi". March 7, 2021: SS: Implemented incomplete(regarding stack frame data) M68K address error handling, and implemented M68K halting when accessing addresses where any of A21-A23 is 1. Fixes major audio distortion during boss battles in "Lunar: Silver Star Story" due to SCSP DSP register corruption that occurred when the game crashed the sound CPU during bootup. SNES-Faust: Don't call event handlers in read/write handlers if the read/write is from DMA/HDMA, to avoid problematic recursion and related issues. SNES-Faust: Fixed clearing of pending SuperFX IRQ on reset/power; fixes hang/crash in "Stunt Race FX" upon performing a virtual power toggle after the game boots up. March 4, 2021: SNES-Faust: Added commented-out fix for "Speedy Gonzales", to enable later. SNES-Faust: Added detection heuristics and support for mapping LoROM RAM into $8000-$FFFF, to fix save game saving/loading in "Light Fantasy", "PGA Tour Golf", and "Ys III". February 23, 2021: SNES-Faust: Added commented-out fix for "Kishin Douji Zenki Tenchi Meidou", to enable on a per-game basis in the future due to a minor negative performance impact. February 19, 2021: SNES-Faust: Reworked cart header detection and cart type detection logic a bit, fixes "Yuuyu no Quiz de Go! Go!". February 17, 2021: SNES-Faust: Return open bus in bits 4 through 6 for reads from $4210; fixes early hang in "Super Professional Baseball II". SNES-Faust: Return open bus in bits 0 through 6 for reads from $4211; fixes early hang in "Yuujin Janjuu Gakuen 2". SNES-Faust: Added support for special ROM mapping required by "Derby Stallion 96" and "Sound Novel Tsukuru". February 16, 2021: SNES-Faust: Changed power-on APU RAM initialization pattern; fixes hangs in "Ihatov Monogatari" and "Kyuuyaku Megami Tensei". February 3, 2021: Fixed an off-by-1 error in the multithreaded CD reader that would cause a hang if a read was attempted for the sector at LBA 449849. January 31, 2021: Fixed a design flaw that caused the creation of empty backup counter files when automatically attempting to back up a nonvolatile memory save file that does not exist. January 28, 2021: SNES-Faust: Disabled the PPU brightness modulation sanity check when compiling a non-dev build, and fixed array misalignment that was causing the code to segfault when compiled with stack smashing protection enabled on newer gcc. January 25, 2021: Resync console scroll to the last drawn line of the target unwrapped line in the scrollback buffer, not the first, otherwise the console will erroneously scroll up on windowed<->fullscreen transitions when the last line is wider than the console viewport, confusing the user. January 24, 2021: Fixed rendering of Unicode combining characters, fixed handling of combining characters when entering text in the console and debugger prompt, added support for pasting into the debugger prompt, cleaned up rendering of the debugger prompt box, implemented automatic scrolling when entering text in the debugger prompt, made console text entry automatic scrolling bidirectional, changed console scrollback buffer beginning/end scroll key combos to CTRL+Home/CTRL+End instead of SHIFT+Home and SHIFT+End, added support for clearing multiple characters at once in the console and debugger prompts by pressing CTRL with Backspace/Delete. January 19, 2021: Added support for reinitializing game controllers while Mednafen is running by pressing Shift+F3. Aborting the input configuration process for a virtual device will now discard the new configuration data, instead of combining it with the old configuration data for the not-configured buttons as previously done. January 12, 2021: Added "upper_center" and "center" options to the "fps.position" setting. January 7, 2021: WonderSwan: Fixed RTC month field being incorrectly treated as 0-based instead of 1-based. Give the user feedback when they try to toggle a graphics layer that doesn't exist or isn't toggleable. NGP: Sanitize some sound-related variables on state load to prevent potential memory corruption. January 6, 2021: SMS: Sanitize more variables on state load. NES: Fixed a few instances of missing variable initialization on poweron. January 5, 2021: GB: Sanitize a few variables on state load. January 4, 2021: Automatically create any missing parent directories to the Mednafen base directory on startup. Create each Mednafen data directory(e.g. firmware, sav, snaps, etc.) at startup based on the current value of the filesys.path_* setting instead of based on its default value, unless the corresponding filesys.fname_* setting is not set to its default value, in which case the directory is not created. January 2, 2021: NES: Sanitize more sound emulation variables on state load. January 1, 2021: NES: Added missing VRC6 variables to save states. GBA: Backup save game memory files on game load SMS: Fixed a bug that could cause the emulated reset button state to get stuck as pressed if a hard reset occurred within about 20 frames after a soft reset. December 31, 2020: GBA: Added a few missing variables to save states. GB: Added a few missing variables to save states. PCE-Fast: Renamed encapsulating namespace from "PCE_Fast" to "MDFN_IEN_PCE_FAST", to match the convention of all other emulation modules. Made Emulated* MDFNGI objects constant, copied over to a dynamically-allocated MDFNGI assigned to MDFNGameInfo on game load. December 30, 2020: Dynamically-allocate QTRecord LZO work memory. Apple2: Dynamically allocate state helper floppy disk object. PCE-Fast: Fixed massive overallocation of memory for the VDC background tile cache. December 29, 2020: Optimized MDFN_FastArraySet() for non-ideal counts. Utilized MDFN_HIDE in more places. December 28, 2020: Removed incomplete YCbCr MDFN_Surface support unused since 0.9.x, and likely to remain unused. Added support for 16bpp graphics output to core Mednafen code and the majority of emulation modules(excluding "pce", "pcfx", "psx", "snes", "ss", and "vb"), and added setting "video.glformat" to allow for using this support with OpenGL. December 25, 2020: PSX: Initialize some missed state on reset/poweron. December 24, 2020: Completely rewrote the save state preview image resizing code, so that now it's only somewhat wrong, instead of mostly wrong as before. December 22, 2020: GB: Use fastcall on 32-bit x86, for a tiny performance boost. Use MDFN_RESTRICT macro instead of __restrict__. NGP: Use fastcall calling convention on 32-bit x86 to boost performance a little bit. Apple2: Disabled some expensive asserts when compiling without MDFN_ENABLE_DEV_BUILD defined. December 20, 2020: Birthed pernicious human date/time calculation functions to replace the usage of _gmtime64() and _localtime64() on Windows, for Windows 9x compatibility. December 14, 2020: Set icon using Win32 API functions on Windows instead of relying on SDL_SetWindowIcon(), and use alternate, smaller(and boxier!) window icons when running on Windows 9x so the poor beetle doesn't look splatted. December 12, 2020: Don't call SetConsoleOutputCP() on startup on Windows, as it messes up the cmd.exe console on Windows 7(at least) even when Mednafen has exited, and for Windows 9x compatibility. Pass a pointer to a dummy variable, instead of NULL, as the output thread identifier pointer argument to _beginthreadex(), for Windows 9x compatibility. Allow for the absence of GetConsoleWindow() on Windows, for Windows 9x compatibility. Automatically attempt to lock file offset 0xFFFFFFFF if the attempt to lock offset 0xFFFFFFFFFFFFFFFF fails with an invalid parameter error on Windows, for Windows 9x compatibility. Use SetFilePointer(), GetFileSize(), and LockFile() instead of SetFilePointerEx(), GetFileSizeEx(), and LockFileEx() on Windows, for Windows 9x compatibility. December 10, 2020: Dropped usage of and dependency on libsndfile, and added a direct dependency on libFLAC. The only CD image audio file formats/encodings other than raw supported now are: FLAC, Ogg Vorbis, Musepack, and uncompressed PCM in AIFF/AIFC, AU/SND, W64, and WAV. Require the first four bytes of the tentative Ogg Vorbis file to be "OggS" before calling ov_open_callbacks(), to prevent unnecessary excessive reads when trying to determine the type of the audio file, and to avoid treating a non-Vorbis file as Vorbis under certain conditions. Open the main settings file for both reading+writing on startup instead of just reading, to allow file locking to work over NFS, and as a quick check to make sure the file is writeable before it's too late upon exit. December 1, 2020: Made various changes to the Windows support code, to allow for compiling a non-Unicode Windows build. November 24, 2020: Implemented stream buffering in the FileStream class, now using read(), write(), etc. instead of fread(), fwrite(), etc. -- 1.26.1: -- November 8, 2020: PSX: Fixed various inaccuracies in the SPU reverb emulation code. PSX: Fixed quasi-benign dereferencing of a null pointer in the GPU code when playing a PSF. November 3, 2020: SNES-Faust: Fixed a crash when an MSU1-enabled game tried to play MSU1 audio but no audio tracks existed. SNES-Faust: Only create MSU1 multithreaded audio reader object if at least one audio track is available. November 2, 2020: SNES-Faust: Fixed a design flaw in the MSU1 audio track loading code that broke loading of audio tracks when the game's filename included a "%" character. November 1, 2020: SS: Fixed compilation errors after configuring with --disable-debugger. SS: Fixed compilation errors with clang. -- 1.26.0-UNSTABLE: -- October 26, 2020: SS: Added "The Lost World: Jurassic Park" to the internal database of games to enable full cache emulation with, to fix most rock face graphical glitches. October 25, 2020: SS: Added "Corpse Killer" to the internal database of games to enable full cache emulation with, to fix the glitchy rotation-zoom effect. October 24, 2020: SS: Fixed major bug, existing since Saturn save state support was added, in the SCU save state code that caused wrong state to be saved(and later restored) when an SCU DMA level in indirect mode was active. SS: Added "Kaitei Daisensou"/"In the Hunt" to the internal database of games to enable SH-2 read/write VDP1 draw slowdown with, to fix FMV tearing. SS: Added "Zero Divide" to the internal database of games to use the data cache read bypass kludge with, to fix a graphical glitch with character portraits. October 23, 2020: SS: Made changes to prevent the CDB emulation from reporting PLAY status until the second sector is read after a seek completes; fixes game-breaking problems in "Break Point", "DJ Wars", "Hop Step Idol", and "Tennis Arena". SS: Fixed inaccuracies with how CDB playback buffer full auto-pause and resume works; fixes occasional hangs of finite duration in "Dragon Force II" and "World Cup France '98: Road to Win" when trying to skip FMVs. October 22, 2020: SS: Added "Mujintou Monogatari R: Futari no Love Love Island" to the internal database of games to use the data cache read bypass kludge with, to fix glitches when character portrait graphics change. October 21, 2020: SS: Added "Doraemon: Nobita to Fukkatsu no Hoshi" to the internal database of games to use the data cache read bypass kludge with, to fix the blank Game Over screen. SS: When a CDB 'Get CD Device Connection' command is issued very shortly after a 'Reset Selector' command, the 'Get CD Device Connection' command will now be executed before the resetting effects of the 'Reset Selector' command occur. Fixes startup hang in the USA version of "Independence Day". October 20, 2020: SS: Slowed down emulated VDP1 pixel plotting performance by a bit less than 20%(10% in 8bpp mode); fixes prematurely cut-off voices in "Paneltia Story", and reduces tearing in "Yu-No". October 18, 2020: SS: Added "3D Baseball", "The Crow", "NBA Action", "NFL Quarterback Club 96", "Solar Eclipse", and "Titan Wars" to the internal database of games to enable full cache emulation with, to fix minor FMV glitches. SS: Added "Thunder Force Gold Pack 1" to the internal database of games to enable full cache emulation with, to fix the glitchy ship sprite in the ending of "Thunder Force III". SS: Added the Europe releases of "Virtua Cop" and "Virtua Cop 2" to the internal database of games to enable full cache emulation with, to fix startup hangs. SS: Added "Yu-No" to the internal database of games to enable full cache emulation with, to fix the problem of the intro FMV ending too soon. SS: Added "Horror Tour" to the internal database of games to enable full cache emulation with, to fix graphical glitches on the save and load screens. SS: Added "Falcom Classics II" to the internal database of games to enable SH-2 read/write VDP1 draw slowdown with, to fix tearing in the intro FMV of "Ys II". SS: Added "Tokimeki Memorial: Forever With You" to the internal database of games to enable SH-2 read/write VDP1 draw slowdown with, to fix the glitchy arm sprite in the Konami intro. SS: Added "Virtua Fighter Kids" to the internal database of games to use the data cache read bypass kludge with, to fix a major FMV glitch. October 17, 2020: SS: Made a very small SSE2-based optimization to the cache tag evaluation code. October 16, 2020: SS: Removed incorrect write mirrors for the SH-2 CCR register; fixes FMV glitches in "NFL Quarterback Club 97". SS: When full cache emulation is enabled(e.g. via database), alternate slave CPU and bus sharing emulation code will be used, to reduce disproportionate sharing of the bus(it's still not perfect, however). SS: SH-2 PC-relative MOV.W and MOV.L loads are now correctly treated as instruction fetches instead of data fetches with respect to the OD/ID bits of CCR. SS: The SH-2 WB/EX pipeline stall emulation logic is now always enabled, instead of only being enabled in full cache emulation mode as it was previously. October 12, 2020: SS: Moved SH-2 cache entry invalid bit from bit31 of the internal combined tag variable to bit0, for slightly better code generation. October 11, 2020: SS: Slave SH-2 on/off is now handled outside of the regular event handling system to prevent a crash under certain conditions. October 9, 2020: SS: Extended the handling of VDP1 command execution slowdown on SH-2 CPU reads/writes to also include SH-2 DMA accesses. October 5, 2020: SS: Bumped up minimum seek timing delay, to compensate for upcoming general CPU timing improvements in the games sensitive to seek timing. October 4, 2020: SS: The SR value loaded with RTE is now properly masked. October 2, 2020: SS: Allow the SMPC joystick reading process to be aborted earlier on, while still waiting for vblank to end; fixes another hang in "QuoVadis". SS: Added "Wolf Fang SS: Kuuga 2001" to the internal database of games to enable SH-2 CPU read/write VDP1 draw slowdown with, to fix glitchy graphics in the player's robot. SS: Added "Mahjong Doukyuusei Special" to the internal database of games to use the data cache read bypass kludge with, to fix the missing background graphics layer on disc 2. SS: Added "Kidou Senkan Nadesico: Yappari Saigo wa Ai ga Katsu" to the internal database of games to use full cache emulation with, to fix a hang. SS: Implemented emulation of the timing effects of the B-bus write buffer on SH-2 CPU writes; fixes hang in "QuoVadis". September 4, 2020: SNES-Faust: Fixed bug in the multithreaded PPU renderer that could cause massive graphics corruption when a game interleaves reads and writes to VRAM without resetting the VRAM address, like in "NBA Pro Basketball: Bulls vs Blazers". August 28, 2020: SS: Delay CDB status position info update by about 44us after a seek request(via Play command, or otherwise); fixes missing graphics in the intro of "Magical Drop 3". -- 1.25.0-UNSTABLE: -- June 27, 2020: SS: Implemented more accurate emulation of VDP1 drawing of excessively-large primitives. It's not perfect, there's still something weird going on with antialiasing, and the effects on gradient shading and texturing are not fully emulated, but it's enough to fix missing graphics in the attract mode of "Virtua Cop", and a hang after defeating the final boss in "Rayman". SS: Fixed an off-by-1 inaccuracy in the edge stepping code for sprites and polygons, with minor visible effects in non-rectangular sprites/polygons. June 26, 2020: SS, MD: Fixed/Implemented M68K MULU and MULS instruction timing. June 24, 2020: SS: Added wait states to M68K writes; fixes hang in "Lunar" after the Meribia pub singer's singing, that was caused by a timer being reloaded too quickly in an interrupt handler. June 13, 2020: SS: Allow VDP1 primitive drawing code to be suspended(and later resumed) mid-drawing when it's consumed too much emulated time; fixes excessive CPU usage during the FMV in "Dark Seed II". June 4, 2020: SS: Added "Senken Kigyouden", "Xian Jian Qi Xia Zhuan", "Virtua Fighter", and "Virtua Fighter Remix" to the internal database of games to enable full cache emulation with, to fix graphical glitches. May 17, 2020: SS: Implemented more complete emulation of SCSP's buggy(inter-slot contamination) linear interpolation on FM carrier slots. -- 1.24.3: -- May 1, 2020: SS: Implemented more complete emulation of the SCSP short waveform mode, after running further tests; fixes excessive distortion in a sound effect in "Sega Ages: OutRun", a regression introduced in Mednafen 1.24.2. -- 1.24.2: -- April 25, 2020: Fixed broken support for systems without any usable OpenGL implementation available. April 24, 2020: Apple2: Adjust disk angle variable upon disk change, partially sanitize the disk angle variable on state load, and print out a debug error message instead of triggering an assert() in the disk reading code, to prevent Mednafen from aborting out in certain circumstances involving disk changing and state loading. April 21, 2020: Apple2: Added missing keyboard reading variable to save states. April 7, 2020: SS: Fixed a few inaccuracies with the SCSP waveform loop handling. April 6, 2020: SS: Added emulation of SCSP slot short waveform mode bit. April 5, 2020: SS: Implemented the buggy linear interpolation that occurs on the SCSP when FM is used. April 3, 2020: SS: Added emulation of SCSP slot EG bypass bit. SS: Implemented SCSP register mirroring. -- 1.24.1: -- February 27, 2020: NES: Changed some macros in the CPU emulation code to not have leading underscores. February 25, 2020: Use sem_clockwait() or sem_clockwait_np() when available, instead of sem_timedwait(). NES: Don't memset() MDFN_PixelFormat object. February 23, 2020: Fixed build errors on FreeBSD relating to the multithreading code. February 22, 2020: Fixed broken semaphore emulation code used on non-Windows platforms when sem_timedwait() is not available(1.24.0-UNSTABLE regression). February 15, 2020: Altered Linux joystick API detection in the configure script, to avoid compiling with Linux joystick support in lieu of SDL joystick support on *BSD systems with Linux header files installed. February 11, 2020: Fixed AltiVec-related build errors on 64-bit POWER/PPC. SS: Added kludges to fix NBG2/NBG3 background layer offset problems in "Fighters Megamix". February 2, 2020: SNES-Faust: Replaced assert() in the DSP-1 emulation code with a SNES_DBG() January 23, 2020: PSX: Implemented a partial fix for missing notes/instruments in the music of "Dragon Ball GT: Final Bout". December 30, 2019: PSX: Don't ignore the sample loop address set via ADPCM header when the loop address register was written only before the end of voice on startup delay. Fixes sound effect glitches in "Re-Loaded: The Hardcore Sequel". -- 1.24.0-UNSTABLE: -- December 19, 2019: PSX: Handle SPU CD volume as signed 16-bit instead of unsigned; fixes lowest volume setting in "Star Wars Dark Forces". December 18, 2019: PSX: Tweaked PAL pixel aspect ratio, tweaked nominal FPS values, added setting "psx.correct_aspect", and fixed light gun Y positioning with PAL games. December 16, 2019: SNES-Faust: Added SDD-1 emulation. November 26, 2019: SNES-Faust: Allow emulation to switch away from the SPC700 during execution of opcode 0xFA, between the read and write, to fix bonkers audio that leads to a hang in the "Tenshi no Uta" game. SNES-Faust: Extended DMA NMI delay kludge to cover 8-bit LDX #imm to fix hang in "Frisky Tom" in "Nichibutsu Arcade Classics". SNES-Faust: Added DSP-2 emulation. November 19, 2019: SNES-Faust: Added MSU1 support. SNES-Faust: Added a multithreaded PPU renderer, controlled via the new "snes_faust.renderer" setting, disabled by default. SNES-Faust: Added SuperFX overclocking support, controlled via setting "snes_faust.superfx.clock_rate". SNES-Faust: Added SuperFX instruction cache emulation support, controlled via setting "snes_faust.superfx.icache", disabled by default. SNES-Faust: Added support for Game Genie cheats(entered via Mednafen's cheat system). SNES-Faust: Added setting "snes_faust.region" to allow for overriding the automatic region detection and emulating one region while reporting the different region to the game. November 17, 2019: On Windows, call CoInitializeEx() with COINIT_MULTITHREADED before calling SDL_Init(), to prevent potential initialization errors with Mednafen's WASAPI sound code. November 16, 2019: Using drive-relative paths on Windows should no longer make a mess due to Mednafen looking for and putting files in the wrong place. November 14, 2019: SS: Removed "ss.midsync" setting; the functionality it controlled is now always enabled. Added settings "affinity.cd", "affinity.emu", "affinity.video", and "ss.affinity.vdp2" to specify CPU thread affinity masks for the CD read threads, main emulation thread, video blitting thread, and Saturn VDP2 rendering thread, respectively. Setting thread affinities properly can improve Saturn emulation performance on a dual-core CPU with hyperthreading. Cleaned up multithreading code and API. November 10, 2019: Removed "using namespace Mednafen;" from types.h, and related changes. October 25, 2019: SNES-Faust: Ignore frameskip if interlace mode is enabled, to avoid feeding uninitialized data into the deinterlacer which leads to a crash. September 18, 2019: Implemented workaround in OwlResampler_neon.inc for a C++ parsing bug in gcc 9.x. September 13, 2019: Apple2: Renamed(with backwards-compatibility aliases) video mode "rgb_alt1" to "rgb_alt" and "rgb_alt2" to "rgb_alt_tfr", and added new video mode "rgb_tfr". Apple2: Added support for 32-color custom palettes(will automatically enable a text fringe reduction RGB mode if used). -- 1.23.0-UNSTABLE: -- August 26, 2019: Apple2: Added support for an RGB-style video mode, selectable with the new setting "apple2.video.mode". SS: Added "Shunsai" to the internal database of games to use the data cache read bypass kludge with, to fix various graphical glitches. August 25, 2019: Expanded and harmonized the accepted value ranges for settings "sfspeed" and "ffspeed" to 0.25 through 15, for greater versatility. NGP: Added very incomplete emulation of BIOS system call "VECT_FLASHERS", per tip from stellarporter. Fixes eventual hang in "The Last Blade". NGP: Fixed TLCS-900H new IFF calculation when taking an interrupt, per tip from trinemark. Fixes broken voice playback in "Densetsu no Ogre Battle Gaiden". NGP: Fixed potential division by zero in the TLCS-900H MINC* and MDEC* instructions emulation(the emulation of the instructions is still almost certainly wrong, though), per tip from byuu. August 24, 2019: PCE: Changed the Super CD-ROM^2 memory identification signature to match a Duo instead of a PCE with a system card, to fix compatibility issues with some US Super CD-ROM^2 games when using a US system card image, per tip from elmer. August 22, 2019: SS: Added "Ronde" to the internal database of games to use the data cache read bypass kludge with, to fix missing graphics on the title screen and main menu. August 20, 2019: SS: Added "Thunder Force Gold Pack 1" to the internal database of games to use the data cache read bypass kludge with, to fix explosion graphic glitches in "Thunder Force III". SS: Fixed a bug that could cause erroneous VDP1 framebuffer erasure when the lower Y coordinate for the erase window was too large. August 12, 2019: SS: Added "Thunder Force Gold Pack 2" to the internal database of games to use the data cache read bypass kludge with, to fix quasi-random hangs when pausing the game in "Thunder Force AC". SS: Corrected the value the SCU DMA mode registers are initialized to on reset. June 18, 2019: SS: Added "Formula Grand Prix - Team Unei Simulation" to the internal database of games to use the data cache read bypass kludge with, to fix a hang after the title screen. SS: Added "Virtual Mahjong" to the internal database of games to use the data cache read bypass kludge with, to fix graphical glitches on the character select screen. June 16, 2019: SS: Slowed down SCU DMA from SDRAM/SH-2 bus slightly, though I'm not sure what is the origin of the measured overhead/slowdown on a Saturn. Fixes FMV flickering in "Lunar". SS: Added partial emulation(CS0 and CS1, SH-2 non-DMA accesses and SCU DMA accesses) of the timing effects of the SCU A-bus configuration registers. SS: Added "Tech Saturn 1997.6" to the internal database of games for which 1MiB RAM cart emulation is enabled, for its "Groove on Fight" demo. SS: Implemented a crude simulation of the VDP1 command execution slowdown that occurs when an SH-2 CPU writes to VDP1 RAM or registers, activated via the horrible hacks mechanism; fixes text flickering in "Arcade's Greatest Hits", most rescue text flickering in "Burning Rangers"(at least on the first stage), graphical glitches in "Whizz", and some of the graphical glitches in "All-Star Baseball 97". SS: Added a horrible hack to fix the hang in "Fighters Megamix" that occurred after the intro FMV played(or was interrupted). SS: Added a horrible hack to fix the hang at the end of disc 1 of "Grandia". SS: Added a per-game horrible hacks mechanism. SS: Added "Albert Odyssey" to the internal database of games to use full cache emulation with, to fix battle text truncation. SS: Added "Die Hard Trilogy", "GeGeGe no Kitarou", "Nobunaga no Yabou Shouseiroku", "Space Jam" to the internal database of games to use full cache emulation with, to fix hangs/crashes. SS: Added "Gex" and "Slam 'n Jam 96" to the internal database of games to use full cache emulation with, to fix minor FMV glitches. SS: Added "Policenauts" to the internal database of games to use full cache emulation with, to fix screen flickering on disc 2. SS: Full cache emulation(enabled via database) now also enables emulation of SH-2 WB/EX pipeline stalls. SS: Tweaked the kludgey CPU instruction read/write penalty during SH-2 DMA to be higher in some circumstances; fixes major graphical glitches in the later stages of "Shienryu" when on arcade mode. SS: Added "Dragon Force II" to the internal database of games to use the data cache read bypass kludge with, to fix major game logic errors during battles. March 15, 2019: SNES-Faust: Added CX4, SuperFX, and SA-1 emulation. SNES-Faust: Made various changes to try to improve game compatibility. -- 1.22.2: -- April 23, 2019: PSX: Fixed a regression introduced in 1.22.0-UNSTABLE that broke a few PS1 games(e.g. SimCity 2000 and Rise 2). Fixed issues with inline functions in the QuickLZ code that could cause linker errors when compiling with optimizations disabled. April 14, 2019: Apple2: Added basic WOZ 2.0 disk image support. April 13, 2019: NGP: Fixed a sequence point rule violation that could cause "Gals' Fighters" to malfunction when Mednafen was compiled with clang, per tip from stellarporter. SS: Added the European release of "Theme Park" to the internal database of games to use the data cache read bypass kludge with, to fix a crash/hang during the intro FMV. Lynx: Fixed an old heap buffer overflow bug that could be triggered if the emulated game set up registers and RAM in a certain way. March 18, 2019: PCE: Fixed an old bug(looks like from around a decade ago) in the HES playback code; it caused periodic high IRQ latency, which resulted in timer IRQ-driven DDA playback sounding rougher than it should have. -- 1.22.1: -- January 27, 2019: Changed the default sound device for the OpenBSD sound driver from "/dev/audio" to "/dev/audio0". January 26, 2019: Semaphores are now implemented with condition variables and mutexes when compiling against a POSIX threads implementation without sem_timedwait(). January 23, 2019: PC-FX: Replaced old RAINBOW IDCT code with newly-written code. January 20, 2019: Some hotkeys in the debugger's memory editor weren't being ignored properly when in text entry mode; fixed. (Regression introduced in 1.21.0-UNSTABLE) January 1, 2019: Apple2: Corrected minimum allowed value for the "apple2.video.mono_lumafilter" setting(was -2 when it should have been -3). SS: Corrected line-scroll handling in double-density interlaced mode with non-zero LSS; fixes broken background graphics effect in Dural's stage in "Virtua Fighter 2". SS: Added "Linkle Liver Story" to the internal database of games to use the data cache read bypass kludge with, to fix a crash/hang when going to the world map. -- 1.22.0-UNSTABLE: -- December 11, 2018: SS: Added support for directly loading <= 1MiB bootable cart ROM images, with the expected file extension being "ss", for debugging and testing purposes. December 2, 2018: SS: Added "Fighting Vipers" to the internal database of games to use the data cache read bypass kludge with, to fix the problem of the computer-controlled opponent sometimes losing the will to not be a statue. December 1, 2018: PSX: Memory cards are now backed up on startup(maximum number of backup copies kept for each memory card is 5). November 30, 2018: PCE: Increased CD read startup delay per tip from dshadoff. Fixes ADPCM voice playback issues in "Downtown Nekketsu Monogatari" when text speed is set to fast. MD: Fixed a few errors in the internal automatic multitap database, per tip from clobber. SS: Added setting "ss.cart.auto_default". NES: Removed apparently erroneous iNES header correction database entry for "Dragon Quest II" that was breaking the game. November 6, 2018: VB: Added the ability to toggle the state of the low battery sensor bit; configure the device on virtual input port 2(e.g. ALT+SHIFT+2) to assign a key/button to this function. November 4, 2018: PSX: Added a pseudorandom component to Pause command timing to address loading-related hangs in "Colony Wars - Vengeance (Europe)" and "Army Men - Air Attack (Europe)". PSX: Generate a seek error if the tray is opened while the CD drive is not stopped; fixes broken disc switching in "Arc the Lad III". November 3, 2018: PSX: Improved emulation of the behavior of CDC command 0x0A per tests on a PS1; fixes hang in "Goryuujin Electro". November 2, 2018: PSX: Don't set the autopause track test value unless autopause is enabled; fixes missing music in "Pitball". PSX: Delay first CD-DA report after playback begins, per tests on a PS1; fixes missing music in "Roswell Conspiracies - Aliens, Myths & Legends". October 31, 2018: PSX: Improved timing of CDC command 0x0A per tests on a PS1; fixes missing music and hangs in "Grind Session". PSX: Altered seek and pause timing and behavior per tests on a PS1; fixes hangs in "Incredible Crisis", "Ballerburg - Castle Chaos", "Transformers - Beast Wars Transmetals", and "Simple 1500 Series Vol. 057 - The Maze". October 28, 2018: The settings management code will now throw an exception if a floating-point setting is NaN. Fixed a crash that occurred when "debugger.autostepmode" was set to "1" and a game was loaded for a system for which debugger functionality was not implemented. NativeVFS, FileStream, and GZFileStream methods taking a path will now throw an error when the path contains a null character. October 23, 2018: SNES-Faust: Added recognition of files with "fig" and "swc" file extensions as SNES ROM images. October 9, 2018: Altered the variants of MDFN_rtrim(), MDFN_ltrim(), MDFN_trim(), MDFN_zapctrlchars(), MDFN_strazlower(), MDFN_strazupper(), and UTF8_sanitize() that operate on a mutable std::string to take a pointer to the std::string instead of a non-const reference, and added variants that take a const std::string reference and return a std::string result. October 8, 2018: Dropped support for "game set" hashes used to change the naming of save state and save game files. The feature was mostly broken by changes made years ago, and is redundant now with M3U support. Save game files for multi-disc PC-FX games created in previous versions of Mednafen will need to be renamed to be seen by this and newer versions of Mednafen. Other files, including save states, should generally be unaffected, unless the user has changed filesys.fname_* settings to use the %F specifier where they wouldn't by default. Removed usage of the deprecated "register" keyword in some old code. October 7, 2018: Adjusted placement of MDFN_FASTCALL and NO_INLINE to fix some compilation errors with MSVC. In addition to nonvolatile memory backup files as before, any missing directories in the file path for input-recording movies, save states, screen snapshots, and nonvolatile memory files are now created as necessary, to increase the versatility of the filesys.fname_* settings. October 6, 2018: Implemented partial virtual filesystem support via classes VirtualFS, NativeVFS, and ZIPReader. Emulation modules' loading of files referenced from the main file being loaded is now done through its associated VFS. This does create a small backwards-compatibility issue with PSF-family(PSF, SSF, GSF, etc.) files, in that previously a ZIP'd PSF-family file that referenced a library file would have the referenced file loaded from the directory containing the ZIP file, but now will have it loaded from within the same ZIP file. October 4, 2018: NGP: Replaced min/max macros with usage of std::min/std::max. September 30, 2018: Modified usage of std::swap in OwlResampler.cpp to not explicitly(and unnecessarily) specify the template argument, to fix a compilation error on MSVC. Reworked FileStream.cpp to fix some issues causing errors on MSVC. GBA: Fixed a regression introduced in 0.9.47 that partially broke compatibility with save states created in previous versions(< 0.9.47), while preserving compatibility for save states created in versions between and including 0.9.47 and 1.21.3. September 29, 2018: SNES-Faust: Added RAM cheat support(main WRAM only for now). SNES-Faust: Added emulation of PPU-area open bus/bus read latches; fixes missing sprites in the water stage of "Mario's Time Machine". SNES-Faust: Corrected H/V latch reading to use two separate high/low byte toggles. September 24, 2018: SNES-Faust: Made minor changes to the CPU emulation core to not require computed goto support in the compiler. September 23, 2018: Added "blend" and "blend_rg" deinterlacers. Moved multithreading management code into the core. Encapsulated most(ish) core Mednafen code in the "Mednafen" namespace. Slightly improved the quality of audio output by SwiftResampler when running at the higher quality settings. September 22, 2018: Moved NES audio resampler so it can be used by any emulation module, and renamed it to "SwiftResampler". Added an SSE intrinsics-utilizing MAC loop to OwlResampler as a fallback(for the inline assembly) when compiling with MSVC. Added an SSE2 intrinsics-utilizing MAC loop to SwiftResampler as a fallback(for the inline assembly) when compiling with MSVC. September 21, 2018: Wrote new Kaiser-windowed sinc generation code, and modified OwlResampler and the NES resampler to use it. It shouldn't have any particularly noticeable end-user effects, other than slightly different startup performance(assuming no mistakes were made :p). September 11, 2018: SS: Emulated input devices' internal states were not being reset on virtual power toggle; fixed. September 5, 2018: SS: Reorganized SCSP DSP emulation code to make the lifetime of variables clearer, for a possible x86_64 dynarec in the future. August 30, 2018: Modified SHA-256 hashing code to allow for piecemeal hashing of data, instead of requiring the hash to be generated from one contiguous chunk of memory. August 8, 2018: PSX: Fixed a startup crash that could occur with a malformed or corrupted SYSTEM.CNF file. July 31, 2018: Replaced MD5 hashing code with newly-written code. July 29, 2018: Replaced SDL threading code with new code that uses pthreads directly. July 28, 2018: Replaced Q subchannel CRC16 calculation code from cdrdao with newly-written code. July 24, 2018: gzip-compressed ROM/disk image files are now recognized by file extension instead of header magic. June 13, 2018: SS: Fixed an emulation inaccuracy with the handling of the SH-2 "mac.l" instruction when saturation is enabled, per tests on a SS. -- 1.21.3: -- April 29, 2018: SNES: Fixed an off-by-1 bug in the PPU code that would cause writing past the end of the OAM tile list array. April 24, 2018: SS: Added "House of the Dead (Japan)" to internal database of games to use the data cache read bypass kludge with, to fix a game crash on the gun calibration screen. SS: Added "Virtua Fighter Kids (Java Tea Original)" and "World Series Baseball" to internal database of games to use the data cache read bypass kludge with, to fix gameplay glitches. April 22, 2018: Removed some unnecessary memory allocations in the old settings to argument parsing glue code. Fixed a crash bug with 2xSaI-family scalers during initialization(regression introduced in 1.21.0-UNSTABLE). Create the Mednafen base directory(e.g. ~/.mednafen) before opening the lockfile to fix a startup error when the directory does not already exist(regression introduced in 1.21.0-UNSTABLE). April 21, 2018: SS: Added kludge to fix layer offset problem in "Alien Trilogy". SS: Added "WipEout" to internal database of games to use the data cache read bypass kludge with, to fix a hang that occurred when trying to exit gameplay back to the main menu. -- 1.21.2: -- April 2, 2018: Updated bundled copy of Tremor to address a security vulnerability. SS: Improved emulation of SCU DSP DMA to program RAM, per tests on a SS(still nowhere near perfect, the way it's implemented on hardware is kind of horrible, but it should work ok if games use it how it's meant to be used); fixes graphical glitches in "Shining Force III - Scenario 2", and perhaps in the other "Shining Force III" games as well. SS: Flush the prefetched SCU DSP instruction when PC is set via PPAF, instead of when END/ENDI executes or when execution is forcibly stopped, per tests on a SS. SS: Disallow SCU DSP LOP from being written in a looped single instruction unless it's the final iteration, per tests on a SS. SS: Allow SCU DSP LOP to underflow to 0xFFF with LPS and BTM, per tests on a SS. -- 1.21.1: -- March 9, 2018: Enabling the automatic save state loading/saving feature will no longer cause an error to be outputted on game load if the save state does not exist. March 3, 2018: Added support for compiling and linking with external LZO instead of the bundled miniLZO. A CD image loading hint will now be appended to the ROM image too large error message in certain circumstances. February 25, 2018: PC-FX: Added a missing variable to save states. (Re)Added backwards-compatibility "video.driver" setting value aliases. February 24, 2018: NES: Misc minor fixes for a few bootleg mappers. NES: Added missing data to VS Unisystem save states. NES: Added missing variable to mapper 64 save states. NES: Added missing save state support to the mapper 22 code. NES: Fixed improper handling of an MMC1 variable in save states. February 22, 2018: Fixed handling of the "osd.state_display_time" setting to allow a value of "0" to work as expected. -- 1.21.0-UNSTABLE: -- February 19, 2018: An attempt to run an instance of Mednafen while another instance is already running with the same base directory is now blocked during startup, via a lock file; note that this check occurs after stdout and stderr are potentially redirected to stdout.txt and stderr.txt on Windows. February 15, 2018: Changed the default value of setting "video.driver" from "opengl" to "default", removed the old "0" and "1" backwards-compatibility value aliases, renamed the "sdl" driver to "softfb"(without backwards-compat aliases), and made it so the setting's value will be reset to "default" after automatically importing settings from "mednafen-09x.cfg". On Windows, no longer exit on ALT+F4 while input is grabbed. Added settings "fps.autoenable", "fps.position", "fps.textcolor", and "fps.bgcolor". February 11, 2018: Removed reliance on malloc(), realloc(), and calloc() setting errno to ENOMEM on failure, since it's not the case on Windows XP, and possibly other platforms/operating systems too. February 9, 2018: ZIP files are now recognized by file extension instead of by magic(wizards). Replaced old minizip code with newly-written ZIP archive reading code. Replaced MDFN_PrintError() and MDFN_DispMessage() with MDFN_Notify(). February 6, 2018: Use versionsort() instead of alphasort() when scanning for js* joystick devices on Linux. February 1, 2018: Added settings "fps.scale" and "fps.font". January 31, 2018: On Windows, in-memory conversion of M3U and CUE files to UTF-8 will be attempted if they lack a UTF-8 BOM and contain byte sequences that are not valid UTF-8. On Windows, path/filename settings loaded from the old mednafen-09x.cfg(before being saved to mednafen.cfg on exit) will now be converted to UTF-8. January 29, 2018: Added support for pasting text into the cheat and netplay consoles. January 28, 2018: SS: Added Japanese keyboard emulation. SS: Improved VDP2 window Y coordinate evaluation emulation; fixes at least one background layer graphical glitch in "Radiant Silvergun"(at the start of stage 2C), and the graphical glitch near the end of the intro in "Snatcher". January 20, 2018: Altered calculations involving *.xscale(fs)/*.yscale(fs) settings to be more predictable given floating point nuances; any user using non-integer scaling values for these settings may need to adjust them to get the same result as in previous versions of Mednafen, however. Added setting "video.fs.display". January 18, 2018: SDL2(2.0.5+) is now used and required. Removed the "overlay" video driver. On Windows, error messages during startup will now be displayed in a popup message box. On Windows, Mednafen will now output text to a console if it's started from a console(e.g. cmd.exe or Cygwin), and if not, write to stdout.txt and stderr.txt like before. On Windows, Mednafen now uses Unicode variants of CRT and Win32 functions; this may require the user to convert their CUE sheets to UTF-8 if filenames use exotic(e.g. not directly typable on a standard US-layout keyboard) characters. For key bindings relating to the debugger and cheat management interface, the Right ALT key modifier will no longer be respected(only the Left ALT has any effect now), for internationalization reasons. The configuration file is back to "mednafen.cfg" instead of "mednafen-09x.cfg". If a 0.8.x "mednafen.cfg" is in the way, it will be renamed. If "mednafen.cfg" does not exist, or is from an old version of Mednafen, settings will initially be loaded from "mednafen-09x.cfg", but still saved to "mednafen.cfg" on exit(and loaded from "mednafen.cfg" from that point on). Reworked the input mapping setting format to be more human-readable(and editable). Details are in the documentation, in the "Advanced Usage" section. Old input mappings will be translated internally, except for keyboard mappings, due to incompatibilities between how SDL 1.2 and 2 handle keyboards. Added support for mapping joystick axes and buttons, mouse buttons, and keyboard keys to emulated mouse device relative motion for testing purposes(via manually editing the configuration file, as the in-emulator configuration process currently won't create such mappings). Added support for digital button input mappings that mix AND, ANDNOT, and OR-style operations together(previously it was either just AND or OR); refer to the documentation for more details. Note that the in-emulator configuration process won't create complex mappings that mix different boolean operations, but you can map combinations using simpler logic in-emulator, and then edit the configuration file to adjust the boolean operations used. January 15, 2018: SS: Fixed a bug that caused a crash if an error occurred early in the process of loading a game. Updated the configure script to disable gcc's mitigations for Spectre, in the event distributions configure their compilers to enable them by default. Stopped (erroneously) memset()'ing some MDFN_PixelFormat objects. January 12, 2018: Cleaned up the handling and reduced the size of axis-related inputs as communicated from the driver-side code to core Mednafen. PCE_FAST: Fixed fubared mouse emulation. December 28, 2017: Replaced usage of strcasecmp() and strncasecmp() with MDFN_strazicmp(), for consistent behavior across locales. Added MDFN_strazlower(), MDFN_strazupper(), MDFN_memazicmp(), and MDFN_strazicmp() functions. December 14, 2017: SS: Fixed a logic error in the BIOS sanity check code that caused it to throw a less helpful error message than intended in certain circumstances, and made the error messages related to BIOS file misconfiguration more verbose(and hopefully more helpful...). December 6, 2017: Fixed broken cheat file saving on MS Windows. November 12, 2017: Changed how some multidimensional arrays and arrays of structs are accessed, to try to avoid behavior that's probably undefined and may be a problem in the future. PC-FX: Fixed integer overflows that caused fatal division by zero when Mednafen's cheat functionality was used(a regression introduced around 0.9.39). SS: Stuck SCU DMA table arrays in a struct to avoid unspecified behavior in the SCU save state code. -- 0.9.48: -- September 16, 2017: Set cheat's default endianness to that preferred by the system being emulated when manually adding a cheat that's not a cheat device code nor the result of a cheat search. September 15, 2017: SS: Fixed SCU DSP DMA from B-bus; fixes the periodic loud popping in Grandia's FMV. September 12, 2017: SS: Added a hack/kludge to allow bypassing of data cache on reads(such that the timing benefits of partial cache emulation are preserved, without cache coherency problems that partial cache emulation sometimes leads to with poorly programmed games), and added an internal database to enable it on select games; fixes graphical glitches and/or hangs in "Area 51 (USA and Europe)", "Clockwork Knight 2 (USA)", "DeJig - Lassen Art Collection", "Father Christmas", "Golden Axe The Duel", "Sega Saturn Choice Cuts", "Spot Goes to Hollywood (USA and Japan)", "Street Fighter Zero", "Street Fighter Zero 3", "Super Puzzle Fighter II Turbo", and "Virtual Volleyball". SS: Full cache emulation is now enabled for "Whizz"(by using an internal database), to resolve(or at least reduce) quasi-random hanging issues during startup. September 11, 2017: SS: Corrected an inaccuracy with CDB play repeat handling; fixes hang when trying to resume a suspended game in "Tactics Ogre". SS: Initialize VDP1 clipping and local coordinate registers only on power-on, and not on reset. September 7, 2017: SS: Fixed side-effect inaccuracies in the CDB Put Sector Data, Copy Sector Data, and Move Sector Data command emulation. September 6, 2017: Added configure option "--with-external-trio", for distribution packagers. SS: Added partial emulation of SH-2 external bus open bus behavior; fixes messed up colors in "Discworld 2". September 4, 2017: SS: Improved CDB Initialize command emulation; fixes crash in "Tenchi Muyou! Ryououki Gokuraku" when it tries to play an opening movie during startup. August 28, 2017: SS: Made CD seek overhead calculation less completely wrong; fixes graphics corruption in intro of "Batman Forever", and fixes hang in "Jung Rhythm" when trying to retry a failed stage. -- 0.9.47: -- August 25, 2017: Lynx, MD, NGP, SMS: Added a few missing variables to save states. August 24, 2017: SS: Added save state support. Revamped save state helper macros and functions, to allow save-stating of variables in arrays of structs to be simpler. August 22, 2017: SS: Fixed BCR1 write protect, and added stub emulation of the other BSC registers. SS: Added incomplete stub Action Replay 4M Plus emulation(for experimentation); proper Action Replay support would require SH-2 UBC emulation, and that may be too costly performance wise. August 21, 2017: SS: Implemented very rough approximation of bus timing side effects when master SH-2 DMA is active(accurate handling of bus priorities and sharing would increase CPU requirements noticeably, but it may ultimately be necessary as a database-driven option for some stubborn games in the future). Fixes startup hangs in "Device Reign", "Real Sound", "Resident Evil", "SD Gundam G Century S", "Super Tempo", "Tennis Arena", "Tilk", "Yuukyuu Gensoukyoku", "Yuukyuu Gensoukyoku 2nd Album", "Yuukyuu Gensoukyoku ensemble", "Yuukyuu Gensoukyoku ensemble 2", "Yuukyuu no Kobako Official Collection", and "Zero4 Champ". -- 0.9.46: -- August 10, 2017: Compile with explicit -fstrict-aliasing, for distributions/OSes that have configured gcc to not enable strict aliasing at -O2(and possibly other levels). Fixed a bug that could, under certain conditions, cause emulator OSD elements to not be updated in the time after entering frame advance mode and before a frame advance. August 7, 2017: Use a sorted std::vector instead of std::multimap to store current settings, to reduce memory usage. August 6, 2017: SS: Added ss.input.port*.3dpad.mode.defpos settings to control the default position of the digital/analog mode switch. August 5, 2017: Allow addresses above FFFF to be entered as the logical watch address in the debugger. August 4, 2017: SS: Added kludge to fix layer offset problem in "Daytona USA CCE". NES: The functionality controlled by setting "nes.fnscan" now recognizes "(F)" and "(France)" as PAL. NES: Added support for iNES mapper 40. July 11, 2017: Utilize _byteswap_*() functions in endian.h when compiling with Microsoft's C++ compiler. June 22, 2017: Fixed a couple of minor issues(log header formatting, and skipped logging of first instruction in step mode) with the debugger's undocumented trace log feature. NES: Corrected the period of PAL noise channel frequency setting 0x1. June 21, 2017: NES: Fixed a few square wave sound channel emulation bugs(wrong phase for duty setting 3, and failing to clock the period counter when the channel is silenced). -- 0.9.45.1: -- June 5, 2017: SNES: Fixed an instance of possibly-undefined behavior. Silenced dumb warning spam relating to endian.h emitted by newer versions of gcc. June 4, 2017: Fixed garbled audio with the exclusive-mode WASAPI sound driver on some higher-end sound cards(regression introduced in 0.9.45 due to a mistake in changing the meaning of a macro field during development); may also fix garbled audio when using the new OpenBSD sound driver with certain sound cards. -- 0.9.45: -- May 29, 2017: Tweaked netplay sound buffer underrun kludge code. The netplay server host and port being connected to are now printed to the netplay console at the beginning of a connection attempt. Netplay connection attempts to servers are now non-blocking. May 25, 2017: SS: Synchronize end of SMPC clock change commands to beginning of vsync instead of beginning of vblank, per tests on a SS. May 23, 2017: SS: Reworked how the VDP2 rendering thread waits, to make Saturn emulation usable with the default OpenBSD kernel. SS: Added emulation of the light gun("Stunner"/"Virtua Gun"). April 28, 2017: #include'd many commonly-used C and C++ standard library headers in types.h(and removed redundant #include statements from various header and source files), to reduce the probability of portability problems(due to neglecting to explicitly include a header file) when different standard C/C++ libraries behave differently in regards to what header files include what other header files. Added a sound output driver for OpenBSD's /dev/audio. Reworked the sound output format conversion code to be more versatile, April 25, 2017: NES: Wrote new "Barcode Battler II" emulation code to replace the old "Barcode World" code, based on quick testing with actual hardware(albeit the English version). April 24, 2017: SSFPlay: Added save state support. -- 0.9.44.1: -- April 21, 2017: MD: Added a missing MDFN_FASTCALL, the absence of which broke 32-bit x86 builds(either at link time or run time). -- 0.9.44: -- April 19, 2017: PSX: Restructured the GPU emulation code and data a bit to get a minor performance boost. April 18, 2017: VB, PCE, WonderSwan, MD, GBA: Use fastcall calling convention(on 32-bit x86) in a few (more) places where it makes sense. April 16, 2017: SNES-Faust: Added setting "snes_faust.correct_aspect", default value of "1". SNES-Faust: Added PAL support. April 14, 2017: SNES-Faust: Made minor optimizations to the BG rendering code. April 9, 2017: Added command-line option "-which_medium", to specify which CD to start with when using multi-CD M3U sets. April 5, 2017: SNES: Fixed emulator hang when saving state in "Panic Bomber W". April 3, 2017: Added some simple scripts to cross-compile and package Mednafen for Windows. Added Windows cross-compiler toolchain setup notes. 32-bit Windows builds are now compiled with -march=i686 instead of -march=i586(shouldn't affect compatibility for official builds, since the toolchain and libraries were already effectively being compiled with -march=i686, which was not intended, but since nobody apparently complained... ;p). March 25, 2017: VB: Added support for custom palettes. VB: Reworked how LED on-state duration is translated into RGB values and added setting "vb.ledonscale"; the default value of "vb.ledonscale" is set such that the overall brightness will be lower than in previous versions of Mednafen, to reduce white crush, but the user can set it to a value of "1.9921875" to approximate the old brightness level. March 20, 2017: SNES: Made a couple of SDD1 registers readable; fixes "Tractor Beam" spell graphical glitches in "Star Ocean"(thanks to orbea). March 17, 2017: SS: Added support for a 16MiB RAM cart mapped into the A-bus CS1 area(for "Heart of Darkness" and homebrew). March 15, 2017: WonderSwan: Removed setting "wswan.rotateinput", and added a new device("gamepadraa") that can be selected on virtual input port 1 to automatically rotate inputs when the display is rotated. March 14, 2017: Reworked text drawing to not use an excessive number of potentially-large VLAs. Moved statements with important side effects outside of assert()s in settings.cpp. Replaced ancient Unicode conversion code with newly-developed code. March 7, 2017: SS: Prioritize SMPC command execution over VBlank handler execution, per (limited) tests on a SS. Fixes broken input in "Primal Rage"(a 0.9.43 regression). -- 0.9.43: -- February 24, 2017: Reworked how input grabbing is handled. The new way uses only one key combo(CTRL+SHIFT+Menu), and will adapt its behavior based on any keyboards being selected on any virtual input ports or not(refer to the documentation for full details). A new setting is added, "command.toggle_grab", and two settings were removed, "command.toggle_grab_input" and "command.toggle_cidisable". Emulated keyboard(FKB, Tsushin, Saturn) key state is now only updated when input grabbing is toggled on. February 22, 2017: SS: Fixed SMPC read handling of an empty input port. SS: Implemented emulation of SMPC 0-byte port read mode. PSX: Reduced rumble latency by 1 frame. February 20, 2017: Reworked how keyboard key state is handled, to prevent extremely short button presses from being lost(like what can happen with the Pause key, or other keys when slow-forwarding is active). SS: Added 101-key US keyboard emulation. February 17, 2017: SS: Allow SMPC commands to be dual-issued; fixes hang in "F1 Challenge", and hangs/missing sound in "Magic Knight Rayearth". SS: Added emulation of the 6-Player Adaptor(multitap). February 15, 2017: SS: Added emulation of the Mission Stick and Dual Mission Sticks. February 13, 2017: SS: Added emulation of the steering wheel("Arcade Racer"), for use with "Virtua Racing", "High Velocity - Mountain Racing Challenge", "The Need for Speed", and other Saturn racing games that apparently lack 3D pad support. -- 0.9.42: -- February 7, 2017: SS: Ignore lower bit of VDP1 sprite draw command texture base address when drawing using color mode 5, per tests on a SS; fixes some of the graphical glitches in "All-Star Baseball 97". February 6, 2017: SS: Ignore writes to VDP1 registers via SCU DMA under certain conditions to approximate what happens on a SS; fixes hang in "GunBlaze-S". SS: Fixed handling of RSTCSR WOVF clearing, per tests on a SS. Also changed the semantics of RSTCSRM a bit to simplify things, might want to change WTCSRM, FTCSRM, etc. semantics too in the future for consistency... SS: Fixed handling of WTCSR OVF clearing, per tests on a SS. Updated tremor to revision 19427. Updated libogg to version 1.3.2. Fixed a bug that caused a crash if the user tried to select(via CTRL+SHIFT+[n]) a device on a non-existent virtual input port. February 5, 2017: SNES-Faust: Added multitap support. February 3, 2017: SS: Fixed a bug in the handling of M68K level 7 interrupts; fixes missing sound in "Arcade's Greatest Hits". February 1, 2017: SS: Suspend VDP1 command processing while an SCU DMA from SDRAM to VDP1 VRAM is active, to approximate how a SS behaves. Fixes FMV tearing in "Johnny Bazookatone", and fubared graphics in "Virtua Cop" and "Virtua Cop 2". January 31, 2017: SS: Fixed handling of clearing FTCSR bits, per tests on a SS. January 30, 2017: SS: Improved instruction timing(though still far from perfect); fixes speed problems in "Pocket Fighter", reduces the size of the flickering area in "Lunar"'s FMV, and fixes the crash that occurs immediately after gameplay starts in "Virtua Fighter" and "Virtua Fighter Remix". January 26, 2017: NES: Added support for iNES mapper 190. January 25, 2017: SS: Clear SCU internal pending interrupt bit upon the SCU's acceptance of the IRQ to send to the SH-2, instead of when the SH-2 fetches the vector, per tests on a SS. -- 0.9.41: -- January 21, 2017: SS: Implemented disc change IRQ on disc eject. January 20, 2017: Replaced usage of trio_snprintf() to a fixed-size buffer for path construction in general.cpp with manual concatenation of std::string strings. January 18, 2017: Use _beginthreadex() instead of CreateThread() on Windows, to avoid a small memory leak. Now explicitly use 64-bit walltime functions on 32-bit Windows builds. January 17, 2017: PCE, PCE_FAST: Added a missing sound emulation variable to save states. January 16, 2017: SNES: Added setting "snes.h_blend", default value of "0", that when set to "1" will enable a horizontal blend/blur filter. January 15, 2017: PCE: Improved SuperGrafx window handling in 10MHz dot clock modes. GBA: Modified RTC emulation to not use standard C library walltime functions during emulation. Wrapped various time functions, and dropped the dependencies on SDL time functions, in Time.cpp/Time.h. January 14, 2017: WonderSwan: Fixed off-by-1 bugs in window coordinate evaluation, per tip from trap15. WonderSwan: Fixed copyright notice headers to not allow distribution under versions of the GPL other than version 2(an oversight from back when the Cygne code was added to Mednafen). WonderSwan: Applied sound and DMA emulation fixes from trap15; fixes rain sound effect in "Star Hearts". The changes did necessitate lowering the overall WonderSwan sound emulation volume a bit to prevent excessive clipping, however. January 12, 2017: SS: Fixed a logic error in the VDP2 rendering code; fixes battle scenes in "Grandia". January 10, 2017: SS: Removed a few bad entries in the internal region-correction database that were breaking the Korean releases of some games. January 9, 2017: PCE, PCE_FAST: Added support for auto-enabling SuperGrafx emulation with CDs when a mode 1 data track has the 16-byte magic "4D 65 64 6E 61 66 65 6E 74 AB 90 19 42 62 7D E6" at offset 0x86A(assuming 2048 bytes per sector), for homebrew and translations. January 7, 2017: SS: Added emulation of the SCSP 18-bit DAC enable bit; fixes low volume problem in "Daytona USA". SS: Fixed some bugs that broke emulation on big-endian platforms. January 5, 2017: Fixed an off-by-1 memory corruption bug in the debugger's memory editor relative bytestring search code. VB: Finally commented out some debug printf()s. January 1, 2017: Cleaned up code that passes video data from the game thread to the main thread, and replaced some volatile usage with atomics. December 31, 2016: Fixed a large memory leak that occurred when saving screenshots with SHIFT+F9. VB: Fixed a regression introduced in 0.9.39.2 that caused transient sound/note distortion on save state load. December 27, 2016: Moved TCP/IP networking code into the core of Mednafen, and added support for non-blocking connects, so the Saturn emulation module can eventually use it for modem emulation. December 25, 2016: Modified configure script to (hopefully) compile in the Saturn emulation module when building for PPC64 and AArch64 architectures(in addition to x86_64). December 21, 2016: Allow emulated digital button mappings to be used in AND mode(like command keys configured with SHIFT+F2) if the user manually prefixes the "/&&\ " magic string to the mapping setting string in the configuration file. Can be useful with emulated switches and mode toggle buttons, but the in-emulator input configuration process will need to be revamped before enabling this mode for a mapping can be done in a sane and more user-friendly manner. Rewrote round_up_pow2() in math_ops.h to use MDFN_log2, which in turn uses MDFN_lzcount*(), since the major CPUs that Mednafen is going to run on should have dedicated instructions to (at least indirectly) count leading zeroes. Also changed the semantics to return 0 on overflow instead of 1. December 20, 2016: SS: Now use leading-zero counting function from math_ops.h in the VDP2 rendering code, instead of using inline assembly. Reorganized the leading/trailing bit counting functions in math_ops.h, added 32-bit and 64-bit trailing-bit counting functions, and added faster variants where passing a 0 results in an undefined result. December 19, 2016: Print out the game key used after a connection is established with netplay, when the game key is not empty. SMS: Added settings "sms.slstart", "sms.slend", "sms.slstartp", and "sms.slendp". Added some checks to help prevent a black screen when the scanlines effect is enabled via a