57 Commits
Author SHA1 Message Date
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
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
Thomas MartinandClaude Opus 5.5 77096ee2bc Memory cards survive a save state; Archive::end checks before closing
A state restored the cards' contents but not their host folder, so a game's saves after
--load-state stayed in memory and were lost. Cards kept in a folder are now taken back from
the folder when a state loads (a console's memory card is not part of a save state); cards in
memory stay the state's.

Archive::end closed a section before checking its size: a reader trying an older layout (the
libraries' sif section) that failed there rewound into a nameless section and the load failed
further on. The check now comes first. Tests for both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 21:17:24 +01:00
Thomas MartinandClaude Opus 5.5 13cddc4904 GS library: sceGsResetGraph's display mode kept in the library, not read back from the scratchpad
5030dbb made sceGsSetDefDispEnv and the Z buffer's address read the display mode back from scratchpad 0x100, where
the reference also leaves ResetGraph's parameters. The game's own code reuses that scratchpad afterwards (TMB from its
fourth frame), so SMODE2 and DISPLAY came out non-interlaced where the reference's are interlaced. TMB's pinned boot
check (tmb-check, boot.clg) diverged there at frame 4; it passes again: 3000 frames, all 4,650,558 records, draw lists
on every checked frame. Libraries::gsVideo keeps them (saved in the states); the scratchpad still gets them.

sceGsExecStoreImage's refusal names its caller.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 00:15:35 +01:00
Thomas MartinandClaude Opus 5.5 82913ae4ef tests: the skipped libmpeg model's line as one string
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-18 19:53:28 +01:00
Thomas MartinandClaude Opus 5.5 d19e7373bb tests: the libmpeg SDK model needs FFmpeg's native functions (CI builds without it)
The test added with TTA's integration called sceMpegInit and the others
unconditionally. They are native only in builds with FFmpeg, so master's CI
failed in libs. Skipped there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-18 19:50:21 +01:00
Thomas MartinandClaude Opus 5.5 a7ae5a63e3 tests: close pad2Calls (a brace lost when TTA's branches were merged)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-18 19:40:32 +01:00
Thomas MartinandClaude Opus 5.5 b6dc6cd44f Merge JC2's save states (jc2/native-irx-host b73692e) into TTA's integration
Conflicts: libmpeg's Nodata end becomes a Resume record that keeps TTA's SDK callback (a[2] flags:
1 work area, 2 SDK callback; 0 is the reference's behaviour); cdvdman keeps JC2's drive commands and
TTA's sceCdSearchFile. TTA's state the archive did not have: libpad2's sockets, the IOP software
registers and libmpeg's inputEnded.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-18 18:30:24 +01:00
Thomas MartinandClaude Opus 5.5 8beaf9648c Memory card: entries listed in creation order
A card kept in a host folder now lists its files in the order they were
created (the host's creation time where it keeps one, else the write time;
then the name), and a file made again keeps its place. JC2's save list
reads each slot at a fixed position after icon.sys and the three icons, so
an alphabetical listing showed every slot empty. BOZO_TRACE_MC also logs
each read's size and buffer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-18 10:02:41 +01:00
Marc-Etienne Barrut cc2b9494f2 Merge pull request #98 from TheBozos/champions/soft-double-sqrt
[champions/soft-double-sqrt] sqrt for games with software doubles
2026-11-12 05:29:25 +01:00
ArzarothandClaude Opus 5.5 aa38aeb58f [champions/soft-double-sqrt] test(libs): sqrt in both ABIs
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-12 05:15:32 +01:00
Marc-Etienne Barrut 41bb8a4893 Merge pull request #96 from TheBozos/sctpt2/mc-getdir-missing-folder
[sctpt2/mc-getdir-missing-folder] libmc: a listing in a missing folder returns -4
2026-11-12 05:14:24 +01:00
Marc-Etienne Barrut 095c332b47 Merge pull request #93 from TheBozos/ffop/native-movies-tail-overrides
[ffop/native-movies-tail-overrides] Overrides that take tail jumps, linear sceMpegDemuxPss
2026-11-12 04:58:14 +01:00
ArzarothandClaude Opus 5.5 10a23628d3 [sctpt2/mc-getdir-missing-folder] test(mc): a listing in a missing folder
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-12 04:57:15 +01:00
ArzarothandClaude Opus 5.5 0ea9ae1ad3 [champions/cd-stream-pause] test(libs): a paused stream reads nothing until it resumes
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-12 04:37:10 +01:00
ArzarothandClaude Opus 5.5 c256f5613e [ffop/native-movies-tail-overrides] test(libmpeg): the linear demux only where libmpeg is native (a build with FFmpeg)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-12 04:15:01 +01:00
ArzarothandClaude Opus 5.5 48f7e7f714 [ffop/native-movies-tail-overrides] test(libmpeg): the linear demux of sceMpegDemuxPss
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-12 04:09:58 +01:00
Thomas Martin 77757f3560 Merge branch 'tta/libmpeg-addbs' into tta/integration 2026-11-10 00:05:09 +01:00
Thomas MartinandClaude Opus 5.5 c5d6408199 libmpeg: sceMpegInit returns the SDK's 1 off the reference layout, and resets nothing
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-10 00:05:07 +01:00
Thomas Martin 53a2915eb1 Merge branch 'tta/libmpeg-addbs' into tta/integration
# Conflicts:
#	tests/libs/libs_tests.cpp
2026-11-10 00:04:44 +01:00
Thomas MartinandClaude Opus 5.5 54b5eb7ea3 libmpeg: sceMpegAddBs and MpegOptions for games on the SDK's model
libmpeg answered as TMB's reference build does: its sceMpeg layout (with
TMB's addresses: 0x1717bc, the table at 0x171800, 0x171904), blocks from the
game's heap, its results and its pacing. The Third Age uses libmpeg the SDK's
way: raw MPEG-2 video added with sceMpegAddBs from its Nodata callback, its
own 29.97 pacing, the end when the callback returns 0.

- sceMpegAddBs(mp, data, bytes): ((bytes + 19) >> 4) << 4 bytes of coded
  video to the decoder (what the SDK sends to the IPU); wakes a thread
  waiting in sceMpegGetPicture once a picture is decodable; 1.
- MpegOptions (Libraries::mpegOptions, kept across sceMpegCreate), all
  defaulting to today's behaviour:
  - referenceLayout off: nothing written outside the game's work area (the
    Nodata data is its first 32 bytes), the SDK's results (Create/Delete 1,
    AddCallback the previous callback);
  - paced off: GetPicture gives each picture at once, IsEnd answers from the
    stream (input ended, all pictures out);
  - sdkNodata: the Nodata callback gets the data given to AddCallback in a2,
    and a 0 it returns ends the input.

Test mpegSdkModel in libs_tests. TMB's path is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-10 00:04:28 +01:00
Thomas MartinandClaude Opus 5.5 67c5867e7b libpad2 and libvib: native DualShock 2 sockets, report, profile and motors
For games on a later SDK that read their controllers through libpad2 over
libdbc (The Third Age): scePad2Init/End, scePad2CreateSocket/DeleteSocket,
scePad2GetState (1 with a controller), scePad2GetButtonProfile (the DualShock
2's, four bytes), scePad2Read (the 18-byte report: buttons active low, sticks
RX RY LX LY, the twelve pressures in the controller's order), and
scePad2GetButtonInfo; libvib's sceVibGetProfile (0x03) and sceVibSetActParam
(the motors as libvib packs them, to the input's rumble); sceDbcInit/End.

The controllers are libpad's: the same ports, players and PadInput, so the
PC's devices and the frame-keyed scripts drive both libraries. Behaviour read
from The Third Age's libpad2 and how its pad manager uses each answer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-09 23:35:58 +01:00
Thomas Martin 9d3da5096c Cover native CD cancellation and subsequent reads
Retain current main sceCdBreak implementation and add the Dark Cloud cancellation regression: sync becomes idle, copied bytes remain, and a subsequent read clears abort status and establishes its own completion.
2026-11-08 17:33:14 +01:00
Thomas Martin 52bfb2e101 Integrate native depth-write fix and flush regressions on current engine
# Conflicts:
#	docs/specs/libraries.md
#	runtime/libs/mc.cpp
#	runtime/render/present_gl.cpp
#	tests/render/render_targets_tests.cpp
2026-11-07 17:44:13 +01:00
Thomas Martin db3b1dafa8 Backport native Flush completion for the qualified DC engine revision
The native service is already present upstream in 63caf16. Retain the existing pinned base while adding command 0xA completion, cursor and on-disk reload coverage.
2026-11-07 17:43:28 +01:00
ArzarothandClaude Opus 5.5 4894c88a4a [sc3/io-siglblid] test(io): docs(libraries): the IPU's registers at rest
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 23:49:37 +01:00
ArzarothandClaude Opus 5.5 f28aff08e3 [sc3/io-siglblid] test(io): the registers #58 acknowledged
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 23:42:37 +01:00
ArzarothandClaude Opus 5.5 67a8cc8a7d [sc3/io-siglblid] test(io): SIGLBLID and SADR
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 23:42:22 +01:00
Marc-Etienne Barrut 7daa1cf44a Merge pull request #44 from TheBozos/sc3/irx-sound
Answer the imports of Soulcalibur III's sound modules natively
2026-11-06 23:29:00 +01:00
Marc-Etienne Barrut 5f4f3b69d5 Merge pull request #55 from TheBozos/norrath/cd-read-iop
Native sceCdReadIOPm
2026-11-06 23:27:00 +01:00
ArzarothandClaude Opus 5.5 7bb981c32f [sc3/irx-sound] Merge main (compiled IRX host, port stream, kernel calls by number)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 23:22:37 +01:00
ArzarothandClaude Opus 5.5 1e063dcd53 [sc3/libs-cd] Merge sc3/libs (main with kernel calls by number, symbol maps, dual-layer CD)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 23:21:50 +01:00
ArzarothandClaude Opus 5.5 83da721187 [sc3/libs] Merge main (kernel calls by number, symbol maps, dual-layer CD)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 23:21:44 +01:00
ArzarothandClaude Opus 5.5 acaf93638f [norrath/cd-read-iop] merge main
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 23:21:40 +01:00
Marc-Etienne Barrut 9afc5d239d Merge pull request #38 from TheBozos/sc3/kernel-syscalls
Answer kernel calls by syscall number, with the kernel services a stripped ELF needs
2026-11-06 23:21:33 +01:00
Marc-Etienne Barrut 0a5d474ec3 Merge pull request #52 from TheBozos/norrath/libc-sceprintf
scePrintf is the native printf
2026-11-06 23:20:45 +01:00
Marc-Etienne Barrut 8eb74d34d3 Merge pull request #47 from TheBozos/norrath/libmtap
Native libmtap
2026-11-06 23:19:49 +01:00
Marc-Etienne Barrut 381aa9c3d9 Merge pull request #46 from TheBozos/norrath/sif-mem-queries
IOP free memory queries from the IOP heap model
2026-11-06 23:19:35 +01:00
ArzarothandClaude Opus 5.5 489e2adf8c [sc3/irx-sound] test(native-irx): module arguments from sceSifLoadModule to argc and argv
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 22:09:14 +01:00
ArzarothandClaude Opus 5.5 d4777aef08 [sc3/libs-cd] test(cd): the drive calls, busy, aborted and ready
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 21:40:43 +01:00
ArzarothandClaude Opus 5.5 3a4a0f01bc [sc3/libs] test(libs): pad, card, DMA, SIF and debug calls
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 21:40:43 +01:00
ArzarothandClaude Opus 5.5 cb315d9fca [sc3/libs-cd] Merge #27 (con/cd-dual-layer) under the CD calls
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 21:40:43 +01:00
ArzarothandClaude Opus 5.5 7911b5e72c [con/cd-read-iop] test(cd): sceCdReadIOPm with and without IOP memory
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 20:59:25 +01:00
ArzarothandClaude Opus 5.5 ea14395df8 [sc3/kernel-syscalls] test(kernel): syscall numbers, alarms, the frame boundary, the timers and a calibration
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 20:58:56 +01:00
ArzarothandClaude Opus 5.5 14b1635a6a [sc3/kernel-syscalls] refactor(io): timer 0's state as the first of four timers
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 20:50:04 +01:00
ArzarothandClaude Opus 5.5 a2f9efef87 [con/libmtap] test(pad): slot max with and without the multitap, PortClose, End
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 20:47:42 +01:00
ArzarothandClaude Opus 5.5 4e85a8f600 [con/libc-sceprintf] test(libc): scePrintf formats as printf
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 20:20:58 +01:00
ArzarothandClaude Opus 5.5 1ccf26eb1c [con/sif-mem-queries] test(sif): the free memory queries follow allocations and holes
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 19:53:15 +01:00
ArzarothandClaude Opus 5.5 73be1433c8 [con/libmtap] test(pad): multitap open, connection, close and an unplugged one
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 19:53:15 +01:00
ArzarothandClaude Opus 5.5 498dc99938 [con/cd-dual-layer] test(cd): searches and dual-layer info on a synthetic two-layer image and a single-layer one
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 19:53:14 +01:00