44 Commits

Author SHA1 Message Date
Andre Zeps
c397c9413d CD-i: Add detection of different disc types for TOC usage (#1088)
Also replaced some magic numbers with enums
2026-01-19 13:41:45 +08:00
David Shadoff
3fddb9d19a PCE: Fix Stop key on CD+G player
Fix STOP key on CD+G graphics player, by waiting until head seek completed before sending subcode sector for new location.
2025-06-10 01:54:02 +08:00
David Shadoff
f8d5f51c0c TGFX16: Fixes pause on CD+G
* Fixes pause on CD+G (TurboGrafx16_MiSTer#189)

Fix pause on GRAPHICS playback screen by continuously sending subcode data. Also, synthesize subcode data when subcode file not found, so that regular CDs don't have issues in that function.

* suppress debug msg
2025-05-28 16:18:33 +08:00
David Shadoff
b69c1ab0c1 TGFX16: Initial CD+G support
Requires corresponding updates to TurboGrafx16_MiSTer.
Currently works when audio is running; pause/stop will need further updates.
Currently only supports a single, *.sub file which represents the whole disc.
2025-05-26 13:30:45 +08:00
Sergiy Dvodnenko
8b5187ef2c PCECD: returns READSUBQ data and status at the end of the frame. end. 2025-04-18 15:48:21 +03:00
Sergiy Dvodnenko
e8b11f49b9 PCECD: abort SAPEP interrupt by the other command. 2025-04-04 20:53:08 +03:00
Zakk
3a0d20577e Use hunksize from chd instead of header constant 2024-03-12 19:31:10 -04:00
David Shadoff
cfd32c117d Minor SCSI correction ( #670 ) (#671)
Real hardware returns 4-byte block on read TOC, but System Card can deal with short responses; this makes the hardware function the same as original hardware
2022-08-01 16:26:16 +08:00
David Shadoff
10d1c2f0ce Fix issue in PC Engine Tanjou Debut ( #594 ) (#595)
* Fix PC Engine CD player controls ( #585 )

Correct LBA-MSF conversion for absolute offset in the SUBQ request function (relative remains without offset)

* Fix issue in PC Engine Tanjou Debut ( #594 )
2022-05-07 03:18:32 +08:00
David Shadoff
12b9e8d75f Fix PC Engine CD player controls ( #585 ) (#586)
Correct LBA-MSF conversion for absolute offset in the SUBQ request function (relative remains without offset)
2022-04-25 15:25:10 +08:00
Sergey Dvodnenko
645e43e705 PCE CD: send the status of the SAPSP/SAPEP command (at the end of the track) immediately (Princess Maker 2). (#479) 2021-11-07 20:03:52 +08:00
David Shadoff
f683849d24 Correct Princess Maker 2 freeze (TurboGrafx16_MiSTer issue #154) (#439)
Fix off-by-one sector count on end of track for Princess Maker 2; the game constantly checks the subcode Q value to see whether it reached a certain time signature... Main_MiSTer was stopping the track one sector earlier than that sector.
2021-08-09 14:51:13 +08:00
David Shadoff
35639f0fb9 Fix for MiSTer-devel/Main-MiSTer#149 (#430)
Adjustment to head seek timing:
When seeking to audio tracks, there is a delay of between 130ms and 290ms between the status confirmation of completion and the start of audio.  80% of the time this is 220ms +/-20ms  and does not appear to be related to either seek distance or location on disc.

This fix inserts a delay between head seek arrival status confirmation and the start of audio play, without changing the total delay (ie. status is retruned earlier where appropriate).
This fixes Last Alert's excess sound, but may also fix other games' sound.
This was tested against main games which have presented issues with seektime in the past.
2021-07-20 00:41:34 +08:00
David Shadoff
9c1e4ac3bd PCECD: Fix end LBA when playing second-last track on disc (by track) (#415) 2021-06-26 14:16:14 +08:00
David Shadoff
77e9cb4eaa PC Engine CDROM timing corrections (#412)
1) Fix for Issue 120 broke timing for cut-scene videos.  Restoring delay for SAPSP-type seeks  (issue #145)

2) fixes for issues #120 & #145:
a) PAUSE placed head just outside of minimum-seektime area -> when playback was restored, it was late, contributing to hangs (i.e. Bomberman Panic Bomber).  Increase minimum seektime region, so as to include this case.
b) Moved logging printf to AFTER SendStatus on SAPEP transactions; may help reduce hangs (i.e. Bomberman Panic Bomber).

3) Minor adjustment to improve timing on Sherlock Holmes games' video playback.
2021-06-20 14:57:46 +08:00
Sergey Dvodnenko
b0bc66b251 pcecd: undefined command should reset the pending status flag for the current command (Tenshi no Uta II) (#344) 2021-02-06 20:35:57 +08:00
Zakk
26a2d8ee27 Add CHD support for ao486 CD-ROM 2020-12-27 16:39:44 -05:00
Zakk
7c11c3621b Remove some unneeded source files in lzma
Remove debug logging in mister_chd and pcecdd
Update Makefile
2020-12-26 17:03:38 -05:00
Zakk
f412273f84 Initial support for CHD cdrom images.
As of now, this is CHD v5 only
2020-12-23 18:31:21 -05:00
sorgelig
f26c530caa pcecd: reduce amount of debug messages (Fix Jack Nicklaus Turbo Golf). 2020-11-14 19:54:27 +08:00
Sergey Dvodnenko
7b80bf1ee3 pcecd: send status immediately for commands with instant execution (Bomberman: Panic Bomber), some cleanup
* pcecd: read 256 sectors when length is 0 (Kabuki Itouryodan).

* pcecd: send status immediately for commands with instant execution (Bomberman: Panic Bomber), some cleanup
2020-09-27 18:54:03 +08:00
Sergey Dvodnenko
cd06931a9b pcecd: read 256 sectors when length is 0 (Kabuki Itouryodan). 2020-07-01 23:50:51 +08:00
sorgelig
0d3e158607 pcecd: common SendStatus function. 2020-06-02 02:30:17 +08:00
Sergey Dvodnenko
63182d5ccb pcecd: send status immediately after receiving an invalid command
* pcecd: fix command SAPEP (stop cdda when mode=0)

* pcecd: send status immediately after receiving an invalid command
2020-06-02 01:49:48 +08:00
sorgelig
5567ab35fa pcecd: report finish playback when either end of disk or data track is reached. 2020-05-19 22:21:58 +08:00
sorgelig
e4516aea28 pcecd: fix SAPSP and cross track playback. 2020-05-18 22:50:58 +08:00
sorgelig
68aacc1a21 pcecd: fix the typo. 2020-05-18 04:24:55 +08:00
Sergey Dvodnenko
2657621a84 pcecd: fix command SAPEP (stop cdda when mode=0) (#221) 2020-05-18 02:32:51 +08:00
sorgelig
0af2be775c pcecd: fast seek option. 2020-05-16 01:02:46 +08:00
David Shadoff
19b3e04b05 pcecd: minor timing adjustments
Minor timing adjustments
2020-05-11 15:38:23 +08:00
sorgelig
39d60da096 pcecd: don't fill FIFO before seek. 2020-05-08 19:53:48 +08:00
sorgelig
73b4e1bb0e pcecd: disable print on sector reading. 2020-05-08 03:46:19 +08:00
sorgelig
67f2255437 pcecd: adjust position and seek time. 2020-05-08 03:22:00 +08:00
Sergey Dvodnenko
d94fbe0f92 pcecd: fix status sending in SAPEP command 2020-05-07 15:52:17 +03:00
Sergey Dvodnenko
194e355c78 pcecd: implement undefined commands (Steam-Heart's) and cdda pause state, cleanup 2020-05-07 13:39:34 +03:00
sorgelig
dd586f890f pcecd: calculate seek time. 2020-05-04 00:04:41 +08:00
Sergey Dvodnenko
1847090e28 pcecd: fix READSUBQ command (Snatcher, Jack Nicklaus Turbo Golf)
* pcecd: fix reset cdd in bios

* pcecd: cdda play modes added, some tweaks

* pcecd: fix cdda loop mode

* pcecd: fix READSUBQ command (Snatcher, Jack Nicklaus Turbo Golf)
2020-05-03 22:37:01 +08:00
Sergey Dvodnenko
39e391445e pcecd: cdda play modes added, some tweaks
* pcecd: fix reset cdd in bios

* pcecd: cdda play modes added, some tweaks
2020-04-29 22:43:35 +08:00
sorgelig
e4c3e50b39 pcecd: fix playback of last track. 2020-04-28 17:49:03 +08:00
sorgelig
caee23302d pcecd: fix for PREGAP and WAV tracks. 2020-04-26 04:44:49 +08:00
sorgelig
76934c405e pcecd: show CD activity. 2020-04-25 15:59:25 +08:00
sorgelig
d5cd08bde9 pcecd: fix multifile CD, adjust default menu position. 2020-04-25 08:11:38 +08:00
Sergey Dvodnenko
8600659c39 pcecd: some additions 2020-04-20 21:39:50 +08:00
sorgelig
d2e3d0fbd2 pcecd: initial support. 2020-04-19 14:58:44 +08:00