Skip to content

PS55DA2: Fix blitter-related video issues in OS/2#8

Merged
akmed772 merged 11 commits into
masterfrom
da2dev4
Mar 7, 2026
Merged

PS55DA2: Fix blitter-related video issues in OS/2#8
akmed772 merged 11 commits into
masterfrom
da2dev4

Conversation

@akmed772

@akmed772 akmed772 commented Mar 7, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes various video issues related to PS/55 Display Adapter II, especially when using with OS/2.

  • Fixed a Bitblt command parser to solve an issue that incorrect foreground text color appears on an active window in OS/2 J1.3.
  • Added FIFO buffering to work with sequential BitBlt operations in OS/2 J2.0.
  • Changed the write ROP to fix a text glitch issue when the mouse is moving in OS/2 J1.3.
  • Added an overwrite ROP command to fix an issue that incorrect color appeared on the scroll bar in OS/2 J1.3.
  • Fixed BitBlt Mode 3 operations to fix an issue that a grayout button had broken in OS/2 J2.0.

Checklist

References

Provide links to datasheets or other documentation that helped you implement this pull request.

akmed772 added 11 commits March 1, 2026 10:10
* Fixed the Bitblt command parser to solve an issue that incorrect foreground text color appears on an active window in OS/2 J1.3.
works on OS/2 but not on Win3
to work in OS/2 J2.0, but still causes glitches in OS/2 J1.3 command prompt.
to fix sequential BitBlt operations in OS/2 J2.0.
to fix a glitch issue in OS/2 J1.3.
to fix incorrect inverted color appears on the scroll bar in OS/2 J1.3.
A grayout button broken in OS/2 J2.0.
and attempt to support character drawing (works in DOS/V Ext V2.0 but not in OS/2 with original Kanji ROM)
@akmed772 akmed772 merged commit 74bf286 into master Mar 7, 2026
akmed772 pushed a commit that referenced this pull request Mar 18, 2026
Implement codegen_texture_fetch() and TMU combine paths for ARM64:
- Perspective-correct W division using SDIV (replaces x86 IDIV)
- LOD calculation via CLZ (replaces BSR, inverted: 63-CLZ)
- Point-sampled texture lookup with clamp/wrap S/T
- Bilinear filtered 4-tap blend using NEON (UXTL+MUL+ADD+EXT+USHR+SQXTUN)
- Mirror S/T via TBZ+MVN (replaces TEST+JZ+NOT)
- TMU0-only, TMU1-passthrough, and dual-TMU combine paths
- Dual-TMU tc_mselect/tc_add/tc_invert for RGB + tca_* for alpha
- trexInit1 override path
- Upstream bug at x86 line 1303 (0x8E) NOT ported — correct ADD used

Bug fixes discovered during review:
- Bilinear LDR D addressing: added LSL w4, w4, #2 before 64-bit texel
  pair loads to convert texel index to byte offset (ARM64 LDR Dt has no
  LSL #2 option, unlike x86 MOVQ with *4 scaling)
- LOD mantissa shift: changed LSR_REG to LSR_REG_X (64-bit) since the
  W reciprocal after LSL #8 can exceed 32 bits
- AND_BITMASK for 0xF0 mask: corrected from (N=0,immr=24,imms=27) which
  was an invalid encoding to (N=0,immr=28,imms=3) per ARM64 logical
  immediate rules
- Added #include <stddef.h> for offsetof() in _Static_assert checks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant