Skip to content

[pull] master from MiSTer-devel:master#361

Open
pull[bot] wants to merge 299 commits into
miscellaneousbits:masterfrom
MiSTer-devel:master
Open

[pull] master from MiSTer-devel:master#361
pull[bot] wants to merge 299 commits into
miscellaneousbits:masterfrom
MiSTer-devel:master

Conversation

@pull

@pull pull Bot commented Sep 8, 2023

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull Bot added ⤵️ pull merge-conflict Resolve conflicts manually labels Sep 8, 2023
yxkalle and others added 27 commits February 3, 2024 23:47
* N64: Implement improved save handling for Transfer Pak games.
Saturn: add support for multi-index tracks, send disc system ID data to FPGA
Saturn: fix audio track buffering, fix track offset for CHD
* N64: Implement cheats

* Remove unused function

* Corrected byte mask condition (skip if 0xffffffff)

* Meow

* Final changes to make the parser compatible with gamehacking.org's cheat files.

* Revert back to old pointer convention.
zstd compression and removal of flac (moved to single file implementation)
Signed-off-by: RoboSchmied <github@roboschmie.de>
…interrupted by a SEEK command (Astal sound stutters) (#893)
misteraddons and others added 30 commits May 11, 2026 15:37
* Add option to log OSD visibility

* Use log_file_entry option in place of log_osd_visible option
… Oric Atmos Code (#1204)

* Apple-II: per-disk, per-sector DSK writeback

The previous a2_writeNib2Dsk relied on module-static globals (track buffer,
current_track, bytes_accumulated) so two mounted .dsk images corrupted each
other, and used the byte counter as a buffer high-water mark which lost
sectors on any non-sequential LBA pattern. Checksums were also decoded but
discarded, so false sectors fabricated from gap bytes could be written.

Replace with a per-disk write state array (4 slots, matching the SD
dispatcher), and flush sectors one at a time as soon as the parser finds a
checksum-valid match anywhere in the per-track buffer. A 16-bit bitmap
suppresses redundant FileWrites when subsequent LBAs re-expose the same
sector. parse_nib_sector now verifies the address-field and data-field
checksums; the read path, encoding tables, and interleave tables are
untouched.

* Enable Apple II DSK conversion for Oric

* Revert "Apple-II: per-disk, per-sector DSK writeback"

This reverts commit 04279f6.

* Oric: gate Apple II disk conversion by menu format

* Support Oric disk conversion for Pravetz alias
- Supports .sub files together with .cue/.bin
- Supports .cdg files together with .cue/.bin
- Supports RW subchannel data from .chd
- Allows playback of CD+G
- Added core shareable helper class for CDG unpacking

Also added a .clang-format file for code style
Make the interrupt/hotplug poll path robust against edge-case sinks and
non-genuine ADV7513 chips:

- Defer the first sample after an hdmi_off wake: Monitor Sense reads low
  for a moment after the power-up write, so adopting it immediately turned
  every wake into a spurious reinit. Record HPD edges seen while the TX is
  down and re-probe EDID at wake only when the display may have changed.
- Decay the reinit burst limiter after a quiet minute so sinks that hold
  HPD high and toggle only Monitor Sense (AVRs, input switches) aren't
  suppressed forever; the anti-feedback cap is kept.
- Pre-adopt the link state in video_init so the first-sample EDID recovery
  fires only for a link that came up late, not on every boot for sinks with
  no readable EDID (DVI, VGA DACs) - those paid a second blocking EDID read.
- Latch interrupt edges until a sample consumes them so a pulse completing
  inside a blocked poll gap (or across a transient i2c read failure) isn't
  lost; service 0x96 latches in polled fallback mode too.
- Keep the stuck-INT demotion across reinit by feeding int_pin_usable into
  the 0x94 mask computation; don't demote on latched CEC (0x97) interrupts;
  count phantom interrupts cumulatively so a periodically re-latching bit is
  still detected.
- Rate-limit the settle and stuck-detection i2c reads instead of hammering
  the bus every co_poll iteration; treat a 0x96 read error as no-flags so
  the polled paths still run.
- Flush self-induced latches after a reinit so the link bounce it causes
  doesn't read back as a fresh hotplug and chain another reinit.

The blocking EDID re-read on cold boot is what froze the menu and gave the
black screen on clone boards, so this fixes the regression at its source and
makes the HDMI_INT opt-out flag proposed in #1210 unnecessary.

Fixes #1207.
Adds Apple IIgs disk support for the Apple-IIgs core:

- support/a2/iigs_fmt.{cpp,h}: self-contained disk-format codec
  (image classification, validation, and in-memory WOZ conversion).
- support/a2/iigs_disk.{cpp,h}: MiSTer integration glue bridging the
  codec to the SD-block plumbing. Active only for the Apple-IIgs core;
  all other cores (including the Apple II NIB flow) are untouched.
- support.h: include the IIgs integration header.
- user_io.cpp: classify/convert images on mount and route IIgs slots
  through iigs_read/iigs_write in the block dispatch.

The new support/a2/*.cpp are picked up automatically by the Makefile's
support/*/*.cpp glob; no Makefile change required.

See support/a2/IIGS_DISK_SUPPORT.md for design and disk-format details.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
#1217)

* video: bound EDID read and don't ingest garbage on DDC timeout (#1213)

* video: keep last-good EDID and skip redundant reinit on failed re-read (#1215)

* i2c: pin ADV7513 EDID/SPD/CEC to the main chip's bus to avoid a wrong-bus hang (#1215)

---------

Co-authored-by: TheJesusFish <TheJesusFish@users.noreply.github.com>
ide_set_regs() synthesizes status bit 4 as DSC for every device. For an
ATAPI (packet) device bit 4 is the SERVICE bit, not DSC, and since we never
run overlapped/queued commands it must read 0. 86Box masks DSC out of every
ATAPI status read and reports SERVICE=0 for a non-overlapped device. The
permanent SERVICE=1 made Win9x's ESDI_506 reject the channel (Device Manager
Code 10, "ESDI access to drive failed (IRQ?), so punting"), even though the
completion IRQ was delivered. Strip DSC for CD drives to match the reference.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
…ng OAKCDROM (#1224)

PR #1221 fixed the Win9x protected-mode "Code 10" on the ATAPI CD's IDE
controller by globally stripping the DSC/SERVICE status bit (0x10) for CD
drives. That approach had two problems:

1. It broke real-mode CD detection. OAKCDROM.SYS (the DOS / Win9x-setup ATAPI
   driver) keys off an explicit status byte after the ATAPI DEVICE RESET to
   detect the drive; the blanket strip clobbered it -> "No drives found".
2. The Code 10 it "fixed" was never a DSC problem. The strip only masked the
   real bug.

Real root cause of the Code 10: a successful ATAPI INQUIRY was completing with
a spurious UNIT ATTENTION. INQUIRY / REQUEST SENSE are exempt from the
media-change gate so they deliver their data even with a pending media change,
but the WAIT_PKT_RD completion called cdrom_reply() with the default
unit_attention=true, stamping CHECK CONDITION / err=0x60 onto the finished
transfer. Win9x's ESDI_506 reads "INQUIRY returned its data AND failed" as a
dead controller and refuses to start the channel -> Device Manager Code 10.
Bochs and 86Box both return GOOD for INQUIRY.

Fixes:
- ide_set_regs: replace the global DSC strip with "auto-assert DSC for non-CD
  drives only", letting each ATAPI command publish its own (DSC-free) status.
  Satisfies both OAK and Win9x without any blanket bit-4 policy.
- ATAPI DEVICE RESET (cmd 0x08): present status 0x00 (no DRDY/DSC), matching
  real ATAPI hardware, which routes OAKCDROM to its signature-detect path.
- WAIT_PKT_RD completion: pass unit_attention=false so a successful data phase
  reports GOOD. The pending media-change UA is still delivered on the first
  non-exempt command (TEST UNIT READY -> cdrom_nodisk).
- Post ATAPI diagnostic code 01h in the error register after a bus reset; a
  stale ABRT was otherwise read by ESDI_506 as a failed power-on self-test.

Tested on DE10-Nano: Win98 SE enumerates "MiSTer CDROM" with both Standard
IDE/ESDI controllers clean (no Code 10), and real-mode OAKCDROM.SYS detects the
CD (MSCDEX assigns drive D:).

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
There may be a good reason why this is still in here, but just in case there is not, I think it's worth pulling out of the ini default to help avoid confusion. 

This would just be an ini change to ensure backwards compatibility.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⤵️ pull merge-conflict Resolve conflicts manually

Development

Successfully merging this pull request may close these issues.