Skip to content

Commit

Permalink
emulators/jgenesis: update to 0.8.2
Browse files Browse the repository at this point in the history
v0.8.2

Mostly frontend improvements, the highlights being improved video/audio sync and more flexible

input/hotkey mapping. Also adds Genesis overclocking support.

Input/hotkey configuration is not compatible with previous versions; input configuration is now stored in a different format, and all input-related settings will one-time revert to defaults if using a config file from a previous version

Save states are not compatible with previous versions
New Features

    Video/audio sync improvements which should enable significantly improved frame pacing without needing to rely on 60Hz VSync (which can cause very noticeable input latency on some platforms)
        Added a new "frame time sync" option that uses the host system clock to match the emulated system's framerate and frame timing as closely as possible without relying on host GPU synchronization (i.e. VSync)
        Added a new option for dynamic audio resampling ratio, which periodically adjusts the audio resampling ratio to try and avoid audio buffer underflows and overflows (which both cause audio popping)
            This is implemented in a very conservative way in order to avoid audible differences in audio pitch, so it is not completely guaranteed to prevent audio buffer underflow/overflow
        Audio sync now checks the audio buffer size every 16 samples enqueued rather than only checking once per frame, which should significantly reduce stuttering when audio sync is enabled without VSync or frame time sync
        Adjusted default sync/audio settings values to hopefully make stuttering and audio popping less likely when running with default settings
        In the GUI, video/audio sync settings have been moved to a new window under Settings > Synchronization
    Input mapping overhaul to make input mapping/configuration more flexible (#134 / #137)
        Keyboard and gamepad settings are no longer separate configurations; each system now supports up to 2 mappings for each emulated button where each mapping can be a keyboard key, a gamepad input, or a mouse button
        Key/input/button combinations (2 or 3 simultaneous inputs) are now supported for mappings in addition to individual keys/inputs
        Hotkeys can now be mapped to gamepad inputs, mouse buttons, and combinations in addition to individual keyboard keys
        Each input settings window now has a button to apply one of two keyboard presets for P1 inputs, one with arrow keys mapped to the d-pad and one with WASD mapped to the d-pad
    Added a new set of hotkeys for saving/loading specific save state slots (#134)
    (Genesis / Sega CD / 32X) Added an option to overclock the main Genesis CPU (the 68000) by decreasing the master clock divider, which can reduce or eliminate slowdown in games (#133)
        Note that this is a fairly naive form of overclocking that works very well in many games but very poorly in some games; use with caution
        As far as SCD/32X, from my testing overclocking the 68000 almost always causes problems in 32X games (which are normally bottlenecked on SH-2 speed anyway), but it does fix slowdown in some Sega CD games
    (SMS / Game Gear) Replaced the "double Z80 CPU speed" setting with an option to overclock at finer granularity by decreasing the Z80 master clock divider
        Same caveat as above regarding this form of overclocking working very poorly in some games, and this is more of an issue for SMS/Game Gear than it is for Genesis/Sega CD
    Added an option to only hide the mouse cursor when in fullscreen, in addition to the previous settings of "always hide" and "never hide"
    Added an option to change the fullscreen mode from borderless to exclusive
    Added an option to change the audio output frequency from 48000 Hz to 44100 Hz

Improvements

    (Genesis / Sega CD) Slightly improved performance by advancing the emulated clock in larger intervals while a long VDP DMA is in progress
    (32X) Slightly improved performance by optimizing SH-2 instruction decoding
    (GB) Improved video frame delivery behavior when the PPU is powered off to make it play a little nicer with VSync and frame time sync
    The emulator window is now explicitly focused/raised when a game is loaded; previously this wouldn't always happen automatically, particularly on Windows

Fixes

    (Sega CD) Slightly extended the delay between a game sending a CDD Play/Read command and the CD drive reading the first sector; this fixes Time Gal having excruciatingly long "load times"
        "Load times" in quotes because the game was actually getting confused and repeatedly re-reading the same CD-ROM sectors until various interrupts happened to trigger at exactly the right times relative to each other
    (Sega CD) Fixed a bug where some backend settings would not correctly persist after loading a save state (they would temporarily revert to what they were when the save state was created)

v0.8.1

Small release with mostly bugfixes and a few save state-related features

SMS/Game Gear and NES save states are not compatible with previous versions, other systems' save states should be compatible
Features

    Made the game save file and save state locations configurable (#132)
        Can be set to the same folder as the ROM image (same as previous behavior), subdirectories in the emulator folder, or custom paths
    Added a new --load-save-state <SLOT> command-line arg to load a specific save state slot at game launch (#132)
    Added an option to attempt to load the most recently saved state when launching a game
        If this option is set when there are no save states or the most recent state cannot be loaded, the game will boot normally
    (Game Gear) Added an option to render at SMS resolution (256x192) instead of native resolution (160x144)
        The expanded parts of the frame often contain garbage because they weren't meant to be visible, but they sometimes contain an expanded playfield

Fixes

    (Sega CD) Fixed a bug where loading a save state could possibly crash the emulator due to a stack overflow; this was particularly likely to happen on Windows due to the small default stack size
        This was caused by the state deserialization code inadvertently deserializing some very large arrays into the stack before moving them to the heap, rather than deserializing directly into the heap
    (SMS/Game Gear) Fixed the VDP display disabled implementation so that it properly blanks the display rather than leaving the previous frame onscreen
    (SMS) Fixed the NTSC/PAL and SMS Model settings not having any effect when loading a game from a .zip/.7z file rather than a .sms file
    (NES) Fixed multiple bugs related to how the PPU determines what color to display when rendering is disabled while PPUADDR points to palette RAM; this fixes Micro Machines having a solid gray bar in the middle of the title screen, as well as several test ROMs that rely on this hardware quirk for high-color display (#53 / #55 / #56)
    GUI: Saving or loading a save state slot from the GUI window now also changes the selected save state slot
    CLI: Fixed

    the 32X option missing from the help text for the --hardware arg (#131)
    The video memory viewer window now renders without VSync; this fixes likely stuttering and audio popping while the memory viewer window is open
  • Loading branch information
0323pin committed Nov 27, 2024
1 parent bc8d071 commit 4bc32bb
Show file tree
Hide file tree
Showing 5 changed files with 649 additions and 826 deletions.
17 changes: 4 additions & 13 deletions emulators/jgenesis/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.4 2024/10/13 20:25:40 pin Exp $
# $NetBSD: Makefile,v 1.5 2024/11/27 13:16:09 pin Exp $

DISTNAME= jgenesis-0.8.0
DISTNAME= jgenesis-0.8.2
CATEGORIES= emulators
MASTER_SITES= ${MASTER_SITE_GITHUB:=jsgroth/}
GITHUB_TAG= v${PKGVERSION_NOREV}
Expand All @@ -10,19 +10,13 @@ HOMEPAGE= https://github.com/jsgroth/jgenesis/
COMMENT= Sega Genesis - Sega CD - SNES - Master System - Game Gear emulator
LICENSE= mit

DEPENDS+= zenity-[0-9]*:../../x11/zenity
#DEPENDS+= zenity-[0-9]*:../../x11/zenity

.include "cargo-depends.mk"

# Depends on an unpublished crate. Can't use cargo.mk to fetch it.
GLYPHON_REV= 47f4126f999753e14728c0862b822677f1b039e2
DISTFILES= ${DEFAULT_DISTFILES}
DISTFILES+= glyphon-${GLYPHON_REV}.tar.gz
SITES.glyphon-${GLYPHON_REV}.tar.gz+= -${MASTER_SITE_GITHUB:=grovesNL/}glyphon/archive/${GLYPHON_REV}.tar.gz

RUST_REQ= 1.80.1
#Upstream does not state the required MSRV.
#This package is confirmed to build with Rust 1.80.1 on amd64
#This package is confirmed to build with Rust 1.82.0 on amd64
USE_TOOLS+= pkg-config

RUSTFLAGS+= -C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.libX11}/lib
Expand All @@ -31,9 +25,6 @@ RUSTFLAGS+= -C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.dbus}/lib

INSTALLATION_DIRS+= bin

post-extract:
mv ${WRKDIR}/glyphon-* ${WRKSRC}

do-install:
${INSTALL_PROGRAM} ${WRKSRC}/target/release/jgenesis-cli \
${DESTDIR}${PREFIX}/bin
Expand Down
Loading

0 comments on commit 4bc32bb

Please sign in to comment.