Commit Graph

42 Commits

Author SHA1 Message Date
tomcw
72cc98d72a Fix for loading save-state test with continuous SSI263 phoneme 2025-07-06 18:00:10 +01:00
tomcw
d18f0a58a2 SSI263: Fix for power-down (CONTROL=1) not silencing continuous phoneme (#1412) 2025-06-21 13:40:10 +01:00
Andrea
b7452e00ba Fix compilation for LoadStringA() (PR #1410)
. LoadStringA() does not exist.
2025-06-13 19:21:58 +01:00
tomcw
552d830045 SSI263:
. Default to SSI263AP (ie. with reset fixed)
. Support SSI263 type set from cmd-line: SSI263P, SSI263AP or empty
. Support SC01 type set from cmd-line: SC01 or empty
. Save-state: MB v14: support SSI263 & SC01 type (including Empty)
2025-06-08 12:42:55 +01:00
TomCh
839c493b67 Support IIe aux slot: 80-col(1KiB) card via generic read ptrs (#1341, PR #1391)
Better support the IIe's aux slot when it's empty or has the 80-col(1KiB) card.
- any h/w using this alternate CPU emulation, (ie. aux=empty or 80-col(1KiB)), then the 'mem' cache is completely bypassed.
Debugger: change all the direct 'mem' accesses to go via ReadByteFromMemory().
TestCPU6502: test the alt CPU emulation code too.
2025-04-03 21:10:02 +01:00
Andrea
fa6d2f7c12 Fix initial volume of SSI263 and after a Load State. (PR #1383)
It was set at the maximum level rather than the Mockingboard volume.
2025-02-22 14:38:04 +00:00
TomCh
b35a4d17d2 Restore SC01 continuous phoneme playback from save-state (#1372, PR #1380)
. Save-state: Mockingboard v13: deprecate SS_YAML_KEY_VOTRAX_PHONEME (from Mockingboard card).
. Consolidate the save/loading of the SSI263 & SC01 state into single function (in class SSI263).
2025-02-11 21:54:48 +00:00
tomcw
fa181922f0 Commit 287a0f8 fixed #1318 2025-02-09 21:56:05 +00:00
tomcw
287a0f892e SSI263: Fix phoneme leadout ASSERT when single-stepping.
(And add some logging for SSI263::Update() for early returns)
2025-02-09 21:43:21 +00:00
TomCh
5bc7e495bf Restore SSI263 continuous phoneme playback from save-state (#1372, PR #1376)
. Defer each SSI263's DSInit() until SSI263::Play() & Update() are called.
. Refactor DSInit(): rename to Init() for consistency with MockingboardCardManager class.
. m_currentActivePhoneme: never return to -1 value, instead OR with kPhonemeLeadoutFlag.
. Save-state: Mockingboard v13: deprecate SS_YAML_KEY_SSI263_ACTIVE_PHONEME.
2025-02-08 13:37:50 +00:00
Andrea
3a3663d9d6 More cleanup (PR #1357)
SoundBuffer: move Windows only flags to DXSoundBuffer.
Remove out of date _MSC_VER checks (pre-VS2019).
2025-01-04 12:35:31 +00:00
Jamiras
a2b03483ee Add SoundBuffer interface (PR #1352)
This replaces the LPDIRECTSOUNDBUFFER pointer with a pure virtual class and an implementation that wraps the LPDIRECTSOUNDBUFFER, allowing other sound implementations without having to simulate the exact alignment of a DIRECTSOUNDBUFFER object.

Additionally, moves the DSInit and DSUninit calls out of the SoundCore.cpp file (into a new DXSoundBuffer.cpp (for Windows)), allowing them to be appropriately reimplemented in a non-DirectSound environment.
2024-12-30 12:42:26 +00:00
Andrea
35f176e4d8 Replace DWORD -> uint32_t. (PR #1350)
Some have been left where tightly coupled with the Win32 API.
2024-12-21 12:32:00 +00:00
tomcw
a6416acb87 MB: SSI263: Don't try to create DS soundbuffer if DS is unavailable 2024-11-23 14:25:09 +00:00
tomcw
d896e1cec2 MB: Fix for SSI263 phoneme blocking enhanced disk II full-speed mode. (Fixes #1340) 2024-11-18 21:27:56 +00:00
tomcw
95a4f44977 MB: SC-01: disable phoneme playback repeat. (#1318) 2024-07-28 16:29:19 +01:00
tomcw
72f0c03981 Save-state: for MB, the SC01 sub-unit is only supported from v12 2024-06-29 12:49:10 +01:00
TomCh
a88040c3ef SSI263 - support for core functionality (#175, PR #1301)
. A phoneme will continue playing back infinitely; unless the phoneme is changed or CTL=1.
  . Reset doesn't affect SSI263/SC01 (so phonemes continue to play).
. CTL=1 sets "PD" (Power Down / "standby") mode, also set at power-on.
. CTL=0 brings device out of "PD" mode, the mode will be set to DR1,DR0 and the phoneme P5-P0 will play.
. Setting mode to DR1:0 = %00 just disables A/!R (ie. disables interrupts), but otherwise retains the previous DR1:0 mode.
. RESET is not connected to !PD/!RST pin 18.
 . Support edge-case where RESET can enable ints & assert IRQ.
. Power-on: PD=1 (so D7=0), reg4 (Filter Freq)=0xFF.
. Support SSI263 IRQ and D7 on a Phasor mode change (including Echo+).
. $Csxx I/O mapping (same for Mockingboard and Phasor mode).

Other:
. SSI263 save-state: support SC01 as a sub-unit of the card.
. 6522: Fix reg $F (ORA w/HS) to be identical to reg $1 (ORA).
2024-06-07 21:10:33 +01:00
tomcw
664d7c2d86 Phasor card: in native mode, writes to SSI263 regs 0,1 & 2 all clear the SSI263 IRQ. (#1197) 2024-04-13 13:23:10 +01:00
Andrea
7497aa9923 Minor bugs in SSI263 (PR #1270)
SSI263: avoid assertion in DSVoiceStop when running with -no-mb.
2024-01-05 22:41:38 +00:00
TomCh
71c67cf132 Refactor Mockingboard into a class (#1171)
Mockingboard or Phasor cards can be inserted into any slot.
Change Config->Sound to that slots 4+5 to be individually selected for the 3 soundcard types.
Add MockingboardCardManager class to manage multiple cards and mix the sound buffers.
2023-01-28 18:15:28 +00:00
tomcw
80c1150183 SSI263: for amplitude (reg3), now scale the samples and not SetVolume().
Reason: calling SetVolume() in Play() is too early, and the previous phoneme won't have completed.
Getting the timing right will be difficult, so better to just manipulate the samples as they get written to the playback buffer.
2022-06-05 12:10:50 +01:00
tomcw
1e65528763 SC01: use max amplitude 2022-06-03 22:16:20 +01:00
tomcw
9e9996bee7 SSI263: support reg3's amplitude 2022-06-03 22:09:32 +01:00
tomcw
16f66da594 SSI263: support phoneme zero amplitude
Refine Phasor native mode's logic for SSI263 access
2022-06-02 20:32:16 +01:00
tomcw
8f07479dad SSI263 phoneme playback bug: (fixes #1104)
Fix for rare race-condition, where a phoneme could complete immediately before SSI263's interrupt is enabled:
- resulting in A2 code failing to detect SSI263 or speech phrase never completing.
Only ever possible when debugger-stepping or in full-speed mode.
2022-05-29 10:32:11 +01:00
Kelvin Lee
2d4f60452f Add ByteToHexStr() and WordToHexStr() (PR #1064)
- Simplify common StrFormat(), especially in Debugger (changes upcoming)
- Add helpers StrAppendByteAsHex() and StrAppendWordAsHex()
- Add helpers StrBufferAppendByteAsHex() and StrBufferAppendWordAsHex() for plain string buffer
2022-03-22 19:19:50 +00:00
Kelvin Lee
dfb8802763 Replace sprintf() with StrFormat() (PR #1048) 2022-03-02 21:10:41 +00:00
Kelvin Lee
253a59fde6 Replace sprintf_s() and wsprintf() with StrFormat(). (PR #1041)
And these Debugger related:
. Improve FormatAddress() and GetSymbol().
. GetSymbol(), FindSymbolFromAddress(), FormatAddress() are changed to use std::string instead.
. Remove static variable (not nice) in FormatAddress().
. GetSymbol() returns std::string reference instead of pointer.
2022-02-26 17:54:06 +00:00
TomCh
f7c6ef397c Split 6522 out of MB code and into own class (PR #1028)
NB. Update CpuInitialize() & CriticalSection creation:
. call CpuInitialize() on WM_CREATE to create CriticalSection
. needed as MB_Initialize() needs CriticalSection
2022-02-05 18:48:36 +00:00
Andrea
47f721882e throw std::runtime_error instead of std::string (PR #1011)
+ add more information about location of yaml parser error.
2021-12-18 16:37:28 +00:00
tomcw
6a5017bf91 SSI263: fix potential buffer overrun & rename var so it's explicit that it is a byte-size 2021-07-28 12:14:22 +01:00
tomcw
0ca972954e MB: fix for SSI263/SC01 in debugger's 'gg' mode (fixes #958) 2021-05-29 21:53:18 +01:00
Henri Asseily
1b9a769332 Fix to DirectSound not working in modern environments. Need to use FAILED() instead of boolean check. (PR #951) 2021-05-16 20:03:59 +01:00
tomcw
e7a3f97bb6 SSI263: For SC01, don't change reg0.DUR value 2021-04-17 18:30:11 +01:00
tomcw
7a41ede6d9 SSI263: improve logging 2021-04-05 14:56:55 +01:00
tomcw
27fe4e5ed0 SSI263: when loading state, assert Phasor's speech IRQ if required 2021-04-01 20:52:00 +01:00
tomcw
33492ac9a2 On reset: clear Phasor speech IRQ 2021-03-31 22:09:04 +01:00
tomcw
91f2c43992 Disable SC01 logging 2021-03-28 22:18:00 +01:00
tomcw
2258d01184 MB: SC01 is only mapped to the 6522 at Cn00 2021-03-28 22:16:34 +01:00
tomcw
fea5da7872 Logging: add support for SC01 2021-03-28 12:16:57 +01:00
TomCh
96bbc0c435 Improve SSI263 (PR #939)
New class for SSI263 (2 instances per MB/Phasor card)
- support 2nd SSI263 at $Cn20 connected to 6522-A (at $Cn00)

Switch from one-shot phoneme playback to ring-buffer
Use a new dedicated ring-buffer (distinct from the AY8910 ring buffer)
Gets rid of: SSI263Thread, the 2 events, and the 64 voices

Support the 2-bit Duration b7:6 of phoneme register for both SC01 & SSI263 (to fix #929)
Updated save-state
Updated IRQ logging (output cycle & 6522 source)
2021-03-23 22:01:41 +00:00