625 Commits
Author SHA1 Message Date
boubou666 235cd6fa5e Merge pull request #192 from TheBozos/release/0.7.5
Release 0.7.5
v0.7.5
2026-12-01 14:39:57 +01:00
Thomas MartinandClaude Opus 5.5 6508a32ed6 Release 0.7.5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 14:34:58 +01:00
boubou666 e1a8a77e25 Merge pull request #191 from TheBozos/audio/effect-clear-time
libsd: effect work area clears take their SPU2 DMA time (VP2 reverb handshake)
2026-12-01 14:34:33 +01:00
Thomas MartinandClaude Opus 5.5 37abf45ccb libsd: an effect work area clear takes its SPU2 DMA time, also for ready-completion hosts
sceSdCleanEffectWorkArea reported its end after the transfer latency alone,
and a host that delivers audio completions at once (VP2S) ran it immediately.
VP2's reverb change (Csm export 8) clears core 0, then core 1, then releases
its lock; the EE asks (Csi RPC 0x1c) about two frames later whether the change
is still running and sends it again when it is not. With a clear that takes no
time it was never running: the castle-hall event of chapter 2 waited forever.

The clear's end now comes after the area's DMA time (16 IOP cycles per
halfword: mode 7 is 0x18040 bytes, about 21 ms per core) through a new
LibsdHost::interruptCallAfterWork, which ready-completion hosts honour (its
default forwards to interruptCall). Test: the end's delay and its route.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 14:29:51 +01:00
boubou666 3485d5a5c2 Merge pull request #190 from TheBozos/release/0.7.4
BozoEngine 0.7.4
v0.7.4
2026-12-01 12:47:38 +01:00
Thomas MartinandClaude Opus 5.5 ddc7dee59f BozoEngine 0.7.4
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 12:43:09 +01:00
boubou666 068bb11ecc Merge pull request #189 from TheBozos/shinobido/spu-gaussian
Mixer: the SPU2's Gaussian interpolation, a port's choice
2026-12-01 11:54:13 +01:00
Thomas MartinandClaude Opus 5.5 57dd73bd34 Mixer: the SPU2's Gaussian interpolation, a port's choice
Shinobido's Hideout music recorded from PCSX2 (its own media capture of the
SPU2's samples) against the port's: the same to within 0.2 dB from 200 Hz to
4 kHz (coherence 1.000), but the port 1 dB brighter at 4-8 kHz, 2.6 dB at
8-12 kHz, 4 dB at 12-16 kHz and 6.4 dB above. The mixer resamples the voices
by 4-point Catmull-Rom (nearly flat to the top); the SPU2 by its 4-point
Gaussian table, as the PS1's SPU (psx-spx, "SPU ADPCM Pitch": 512 entries, the
index the pitch counter's bits 4-11, each of the four products shifted right
15), which rolls the highs off. With it the port's music is within 0.17 dB of
PCSX2's in every band from 200 Hz up.

Mixer::setGaussianInterpolation(bool), for every mixer, off by default (the
other ports' sound, and any recordings they compare against, unchanged);
Mixer::gaussian(y0, y1, y2, y3, t) the interpolation itself. The table's 512
values checked as the page says: each set of four weights sums to 0x7F7F-0x7F81.

Test (bozo-audio-tests): off by default; a constant 0x7000 at fraction 0 is
4206 + 20092 + 4262 - 1 = 28559; every index's weights sum within bounds; the
fraction's low 4 bits ignored (y1 alone at 0: 0x59B3); the switch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 11:50:29 +01:00
boubou666 88c59f6ae8 Merge pull request #188 from TheBozos/claude/release-0.7.3
BozoEngine 0.7.3
v0.7.3
2026-12-01 02:43:18 +01:00
Thomas MartinandClaude Opus 5.5 0e3edfb4a5 BozoEngine 0.7.3
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 02:40:14 +01:00
boubou666 3b705dafb3 Merge pull request #187 from TheBozos/claude/read-image
Renderer: readImage, a game's read of an auxiliary image
2026-12-01 02:39:57 +01:00
Thomas MartinandClaude Opus 5.5 0f0c281b7d Renderer: readImage, a game's read of an auxiliary image
Breath of Fire: Dragon Quarter's memory card picture is a sprite drawing the
frame so far into the GS memory, in the middle of a frame whose end is a
black fade tile: the presented picture (readPicture) is black. Natively the
port copies the frame so far into an auxiliary image there (fromFrame,
source 0) and reads that image back.

Renderer::readImage(image, width, height, rgba, timeoutMs) asks the first
present showing the frame published when it was called (or a later one) for
the auxiliary image as the frames drawn so far left it: all of it, one
ReadPixels, rows top-down as the screen's, RGBA (alpha 0x80), and its size.
Called on the game's thread after the frame drawing into the image was
published. False at once when nothing has presented in the last second
(headless), for an image no frame has drawn, and on a timeout.

GPU test (BOZO_APP, label gpu): a frame red over blue is copied into image 2
(8 x 6), then covered black; another thread reads the image back (red over
blue, top-down) while readPicture gives the black frame; an image never drawn
reads false.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 01:45:16 +01:00
boubou666 a9e523e6eb Merge pull request #186 from TheBozos/claude/release-0.7.2
BozoEngine 0.7.2
v0.7.2
2026-12-01 01:31:27 +01:00
Thomas MartinandClaude Opus 5.5 b600323f13 BozoEngine 0.7.2
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 01:26:03 +01:00
boubou666 8513d7a138 Merge pull request #185 from TheBozos/vp2s/pad-script-sticks
Pad scripts: stick-only names (LUP..., RUP...)
2026-12-01 01:21:23 +01:00
Thomas MartinandClaude Opus 5.5 dd9e3bb4d8 Pad scripts: stick-only names (LUP LDOWN LLEFT LRIGHT, RUP RDOWN RLEFT RRIGHT)
The D-pad pushes the left stick too, but always with its button bit. Games
that read the D-pad apart (VP2's battle: left/right split the party) could
not be given a plain stick move from a script. The new names push one stick
to its end with no button bit or pressure, winning on their axis.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 01:10:51 +01:00
boubou666 6e467efcd3 Merge pull request #184 from TheBozos/claude/release-0.7.1
BozoEngine 0.7.1
v0.7.1
2026-11-30 23:17:40 +01:00
Thomas MartinandClaude Opus 5.5 5870890b7d BozoEngine 0.7.1
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 23:13:31 +01:00
boubou666 1ef3d264a0 Merge pull request #174 from TheBozos/claude/destination-alpha-test
Renderer: destination alpha test (TEST.DATE) and GS alpha writes for opaque draws
2026-11-30 23:13:11 +01:00
Thomas MartinandClaude Opus 5.5 784932f106 Renderer: the destination alpha test (TEST.DATE) and GS alpha writes for opaque draws
- Material::destinationAlpha (Off / Clear: pass where the target's alpha is below
  0x80 / Set: 0x80 and up): the target so far copied to unit 4 before the draw (3 being the shader blend's destination),
  its alpha tested per fragment (0x80 is the 1.0 the target keeps).
- Material::frameAlpha: an opaque draw writes its own alpha (As) instead of 1, as
  the GS does, so a later DATE or DST_ALPHA blend reads it.
Both default off: other ports draw as before.

Breath of Fire: Dragon Quarter's character outlines: an inflated dark mesh drawn
with DATE, DATM 1 where the frame's alpha is set, not over the characters (alpha 0).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 23:05:52 +01:00
boubou666 f3bc935052 Merge pull request #173 from TheBozos/claude/sysclib-word-routines
Native IRX: sysclib strstr (34), wmemcopy (40) and wmemset (41)
2026-11-30 23:05:04 +01:00
boubou666 2c30d76d8b Merge pull request #183 from TheBozos/claude/release-0.7.0
BozoEngine 0.7.0
v0.7.0
2026-11-30 22:59:44 +01:00
Thomas MartinandClaude Opus 5.5 678a8bbe16 BozoEngine 0.7.0
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 22:55:33 +01:00
boubou666 8c319c7987 Merge pull request #182 from TheBozos/vp2s/gs-blend-xcx
Renderer: GS blends of the form X x C + X computed in the shader
2026-11-30 22:23:13 +01:00
Thomas MartinandClaude Opus 5.5 a4f911f275 Renderer: GS blends of the form X x C + X computed in the shader
The GPU blender has no factors for a colour times 1 + C (A = D, B = 0: ALPHA 0x49 Cd x (1 + As), 0x08
Cs x (1 + As)); applyGsBlend dropped the C term, so such draws did nothing (0x49) or lost their base (0x08).
They now blend in the shader against a copy of the target (the GS-arithmetic path), with the source alpha read
before the 1.0 clamp (the GS's As can exceed 0x80). Rare: a few draws a frame.

VP2S battle 0x8f (Dark Savior): the golden ground ring's 0x49 draws were invisible; they now brighten as on PCSX2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 20:01:24 +01:00
boubou666 81a45d889d Merge pull request #181 from TheBozos/vp2s/gs-shader-blend
Renderer: GS-arithmetic image blends computed in the shader
2026-11-30 16:42:14 +01:00
Thomas MartinandClaude Opus 5.5 c3d33be025 Renderer: GS-arithmetic image blends computed in the shader
With setGsArithmetic on, a gsBlend draw that reads an image (fromFrame with a source) copies its target and
blends in the shader with the GS's byte rules: floor((A - B) x C / 128) + D, C the truncated source or target
alpha or FIX. The GPU blender cannot truncate; with small factors (VP2's title glow layers at alpha 3..4)
that is most of the result. A few full-screen layers a frame.

VP2S title glow vs a GS-rule render of PCSX2's dump: ours added 11.6/12.4/13.3 per channel, PCSX2 7.3/8.6/9.1;
now 7.0/8.4/9.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 16:31:29 +01:00
boubou666 97efe9e745 Merge pull request #180 from TheBozos/vp2s/gs-arithmetic-passes
Renderer: GS arithmetic also truncates image passes on store
2026-11-30 16:14:52 +01:00
boubou666 e9199da012 Merge pull request #179 from TheBozos/sbc/picture-readback
Renderer: readPicture, a game's read of its presented picture
2026-11-30 16:09:21 +01:00
Thomas MartinandClaude Opus 5.5 aa74966b16 Renderer: GS arithmetic also truncates image passes on store
With setGsArithmetic on, image passes (frame copies, filters, levels, chains) store their result as truncated
bytes, as each GS pass does, where the 8-bit target would round to nearest. Scene draws are unchanged.

VP2S's world-map glow measured against a GS-rule render of PCSX2's dump: the full frame was +3.3..+4.0 per
channel over PCSX2, now +0.9..+1.8 (with a VP2S-side split of the glow level pass).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 16:06:21 +01:00
Thomas MartinandClaude Opus 5.5 bfac857af0 Renderer: readPicture, a game's read of its presented picture
Steambot Chronicles' menus are drawn over a half-size copy of the screen
(sceGsExecStoreImage of the frame buffer). Renderer::readPicture asks the
next present for a rectangle of the frame's screen, read back with one
ReadPixels after the picture is drawn and before the window draws over it,
box-averaged to the size asked for (RGBA, rows top-down, alpha 0x80). It
waits up to a timeout for that present and answers false at once when
nothing has presented in the last second (headless).

GPU test (BOZO_APP, label gpu): a hidden window presents red and blue
halves while another thread reads them back at 4 x 2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 16:01:28 +01:00
boubou666 48512cc955 Merge pull request #178 from TheBozos/shino/field-rate-rebase
Kernel: the next vblank a field after the last when the field's length changes
2026-11-30 15:30:12 +01:00
Thomas MartinandClaude Opus 5.5 89d0fe98b1 Tests: the field-rate test's PAL field named apart from the PAL rig
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 15:26:00 +01:00
Thomas MartinandClaude Opus 5.5 53fae4384d Tests: a field-rate change after many fields re-spaces the next vblank
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 15:23:16 +01:00
Thomas MartinandClaude Opus 5.5 ad38240bb8 Kernel: the next vblank a field after the last when the field's length changes
Counted from the start (vblanks x the field), a field-rate change after
many fields of another length put the next vblank far off: Shinobido at
60 (NTSC's fields) switching to PAL's for a movie waited 16 s for its
next vblank, the movie's sound polling for it. Now each vblank is a field
after the one before, and a change re-spaces the pending one. A rate
that never changes gets the same vblanks as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 15:21:23 +01:00
boubou666 a924c3ec5d Merge pull request #177 from TheBozos/vp2s/gs-arithmetic
Renderer: optional GS colour arithmetic (truncating bytes)
2026-11-30 14:59:08 +01:00
Thomas MartinandClaude Opus 5.5 71cea27656 Renderer: optional GS colour arithmetic (truncating bytes) for scene draws
Renderer::setGsArithmetic(true) makes textured scene draws compute as the GS does: the filtered texel and the
interpolated vertex colour as truncated bytes, modulate floor(T x C / 128), fog (F x C + (255 - F) x FOG) >> 8.
Off by default (exact float, rounded once on store). Image passes are unaffected.

VP2S measured a town frame against a GS-rule render of PCSX2's dump of the same frame: exact arithmetic is
+2.2 per channel over the GS (doubled by the game's 2x pass); with this, +0.4.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 14:48:55 +01:00
boubou666 38415efc5d Merge pull request #176 from TheBozos/sbc/task-stack-reuse
Native IOP threads: a deleted thread's stack is taken again
2026-11-30 14:47:37 +01:00
Thomas MartinandClaude Opus 5.5 a3d27ce9d5 Native IOP threads: a deleted thread's stack is taken again
CreateThread took each task's stack from a bump arena (0x1fe000 down to 0x190000) and DeleteThread never gave it
back, so a game that creates and deletes IOP threads at every map load ran the arena out: Steambot Chronicles stopped
with "native library task stacks exhausted" (thbase 4) after about 20 map loads.

- DeleteThread puts the task's stack on a free list; CreateThread takes the smallest free stack that fits (its whole
  size becomes the task's) before the arena's next.
- The free list is saved in the IOP section's new "taskstacks" part; a state saved before it loads with none free.
- Test: 257 CreateThread / DeleteThread pairs with 4 KiB stacks, each thread on the first one's stack.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 14:38:39 +01:00
boubou666 8740ac1e54 Merge pull request #175 from TheBozos/claude/reshade-before-ui
ReShade's effects under the 2D
2026-11-30 12:48:53 +01:00
Thomas MartinandClaude Opus 5.5 39268640ea ReShade's effects under the 2D
When a player installs ReShade (its opengl32.dll beside the executable), the
program registers as one of its add-ons and has it render its effects inside
present(), after the 3D picture and before the HUD and menus, so a colour
grade, depth of field or ambient occlusion no longer goes over the 2D. The
F2 / F3 panels stay clear too. Without ReShade nothing changes;
BOZO_RESHADE_AT_PRESENT=1 keeps ReShade's own pass over everything.

- Renderer::setBeforeOverlay: a hook present() calls when it draws to the
  window, between the 3D and the 2D, with the window's size; present()
  binds its own state again afterwards.
- app/reshade_bridge: registration after the window is made (ReShade's DLL
  loads with it) and before the GL context; the effects run on a texture
  of the window's size, copied upside down from and back to the window, as
  ReShade's own OpenGL pass does (its effects expect the top row first).
- ReShade 6.8.0's API headers (BSD-3-Clause) in app/reshade/.
- MinGW and ReShade's MSVC return structs from methods differently, so no
  API method returning a struct is called; views are built as ReShade's
  OpenGL backend makes them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 12:28:43 +01:00
Thomas MartinandClaude Opus 5.5 6f78a775f3 Native IRX: sysclib strstr (34), wmemcopy (40) and wmemset (41)
Capcom's SNDDRV.IRX 2.27W (Breath of Fire: Dragon Quarter) parses its arguments
with strstr and moves and clears its stream buffers with wmemcopy / wmemset
(bytes / 4 words). Test: tests/native/library_sysclib_words_tests.cpp.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 10:19:16 +01:00
boubou666 daaf18067c Merge pull request #172 from TheBozos/claude/native-sound-hooks
Native IRX: a work-free IOP clock (opt-in) and an import call log
2026-11-29 19:21:57 +01:00
Thomas MartinandClaude Opus 5.5 24691830b2 Native IRX: a work-free IOP clock (opt-in) and an import call log (BOZO_IRX_CALLS)
CompiledLibraries::useWorkFreeClock(): the IOP clock moves only with its own
events (deadlines, timers, the EE's time), not with the work compiled code
does, so a native rewrite of a compiled routine meets the same times and a
timer handler's work no longer delays its next period.

BOZO_IRX_CALLS=<file>: every import call (cycle, library, ordinal, a0-a3,
the caller, the result) written out, to compare two runs of the same
modules, compiled or rewritten. docs/native-irx.md also describes bindings
that sleep and resume at admitted return addresses.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-29 19:16:40 +01:00
Marc-Etienne Barrut 3bd89fe3cc Merge pull request #171 from TheBozos/sc3/versioned-releases
Versioned releases: a v* tag publishes the source archive
v0.6.0
2026-11-29 22:05:19 +07:00
ArzarothandClaude Opus 5.5 6b6fcd7da0 [sc3/versioned-releases] docs: releases, pinning one from a port, cutting one
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-29 15:59:24 +01:00
ArzarothandClaude Opus 5.5 198068116c [sc3/versioned-releases] ci: a v* tag publishes the source archive and its SHA-256 as a release
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-29 15:59:24 +01:00
ArzarothandClaude Opus 5.5 7d2bbece55 [sc3/versioned-releases] build: BozoEngine's version in its project(), 0.6.0
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-29 15:59:24 +01:00
boubou666 d937caef8f Merge pull request #170 from TheBozos/sbc/sif-get-other-data
libsif: native sceSifGetOtherData (IOP memory read back to the EE)
2026-11-29 14:50:54 +01:00
Thomas MartinandClaude Opus 5.5 76b56a3d5a libsif: native sceSifGetOtherData (IOP memory read back to the EE)
The SDK sends a SIF command and the IOP's sifcmd sends the bytes back by SIF DMA; with no IOP the guest code's
request is never answered and the EE buffer stays as it was. Natively the bytes come from the IOP host's memory
(SifState::receive, a port's provider) at once; the receive record is filled; 0.

Steambot Chronicles' file loader reads each archive into an IOP buffer (sceCdReadIOPm) and takes every file back
with sceSifGetOtherData: without it the map's models and textures were zeros (ImdGetObjFirst: Not IMD).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-29 14:44:38 +01:00