Commit Graph

117 Commits

Author SHA1 Message Date
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 32c7babf51 Phasor load save-state:
. Fix regression when switched to using correct primary AY8913 (regressed at 1.30.10 and 1.30.11)
. Specifically fixes AppleWin-Test: phasor-fugue.aws.yaml
. NB. bumps Mockingingboard version in save-state to v8
2022-09-24 20:16:19 +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 5236bb95b6 Phasor: use correct primary AY8913 for Phasor & MB modes (now checked in mb-audit v1.2) 2022-05-21 11:15:01 +01:00
tomcw 08c730c647 Cmd line: add -wav-speaker <file> & -wav-mockingboard <file> 2022-04-17 16:23:51 +01:00
Kelvin Lee 80f3eaeb91
Various *Name() functions can simply return const std::string& (PR #1049) 2022-02-28 20:52:18 +00:00
tomcw 3fe06faf65 MB/6522: remove the legacy g_nMBTimerDevice variable.
Fix ASSERT from previous commit as SY6522.Reset() needs CriticalSection.
2022-02-12 18:42:58 +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 7ab65492c6
Load save-state for Cards: improve error messages. (#1025)
. better error message for (unlikely) slot mismatch.
. better error message if load state version is invalid.
2022-01-30 21:25:40 +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
Andrea f2843d4d71
Collections of changes to facilitate compilation on Linux and macOS. (PR #992) 2021-10-18 20:23:46 +01:00
tomcw f4650fb850 MB: Make AY voice & mix buffers the same size to prevent buffer overrun
(Voice buffer reduced from 1s to 0.37s)
2021-07-28 12:22:58 +01:00
tomcw 05b9668f72 Use enum SLOTS and remove pre-processor SLOTn defines 2021-05-19 21:26:23 +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 110a706535 SC-01: fix DDRB support for #952 2021-05-16 19:49:34 +01:00
tomcw 21146cb65e AY8913: Fix regression at 2d086e87
- Phasor does support reading regs in MB mode & Phasor native mode (but not Echo+ mode).
2021-05-16 19:27:04 +01:00
tomcw ce309324bb Debugger: when displaying 6522 regs, if T1/T2 are active, then display in white 2021-05-09 13:38:16 +01:00
tomcw 5bc1261281 Logging: add more logging to Speaker code
Debug: add a debug-enabled MB S/S card
2021-05-03 19:58:13 +01:00
tomcw 60ddf0fa35 6522: Support cycle accurate reads from IFR for T1/T2 bits 2021-04-30 22:23:20 +01:00
tomcw 6fefce553a MB: Support old save-states where 6522 T1 latch is 0x0000 2021-04-18 18:33:16 +01:00
tomcw 363193ba33 MB: get rid of CriticalSection, as MB support is now single-threaded 2021-04-10 16:26:51 +01:00
Andrea a37d0b078f
Add constructor for SY6522_AY8910 for correct initialisation (PR #940)
Avoid leaks when the destructor of SY6522_AY8910 is not called.
2021-04-05 17:44:59 +01:00
tomcw 2258d01184 MB: SC01 is only mapped to the 6522 at Cn00 2021-03-28 22:16:34 +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
tomcw 0858cc3a23 Debugger: improve mem views for 6522 & AY8913 chips 2021-03-07 13:11:22 +00:00
tomcw 2d086e87ec Support 2nd SSI263 at $Cn20
Phasor doesn't support reading AY8913 regs
2021-02-21 19:12:36 +00:00
tomcw a709e9dbdf MB/SSI263: improve logging to include phoneme duration 2021-02-17 21:53:15 +00:00
tomcw 4e88163430 MB/6522: better reset support - only ACR,IFR,IER affected 2021-02-13 16:56:29 +00:00
tomcw 84a705d20d MB/6522: improve T1 underflow with latch 2021-02-12 19:16:14 +00:00
tomcw ff29b055ce MB/6522: fix timer1 underflow for very small values 2021-02-11 22:44:40 +00:00
tomcw 776a48fc01 MB/6522: support for T1 latch in one-shot mode 2021-02-10 20:51:11 +00:00
tomcw c492004e8d 6522 read: support non 4-cycle read opcodes (#833)
. ie. addr modes: (zp,x), (zp),y and (zp)
2021-02-06 18:02:35 +00:00
tomcw f302e88f55 Add 6522 support for stz abs16 and stz abs16,x 2021-02-05 22:30:05 +00:00
tomcw 5d46298dcc Mockingboard: support AY-3-8913 read 2021-01-17 19:51:25 +00:00
tomcw 0ddb1917aa SyncEvents: ensure MB & Mouse have removed their events for a restart 2020-12-12 17:46:36 +00:00
Andrea bbe88da787
AppleWin.cpp split (PR #875)
. Split AppleWin -> Core with the functionality really needed by the emulator.
. Split AppleWin -> Utilities for generic code not called by other emulator components.
. Split AppleWin -> CmdLine for the command line option parsing.
2020-11-26 21:50:06 +00:00
tomcw d6a2339ff0 Coverity SA: Fixed the 2 new Impact=High issues:
. CID 1499553: UNINIT
. CID 1499560: OVERRUN (out of bounds access in CmdBookmarkAdd)
Fixed bug in CmdBookmarkClear() too.
2020-11-17 21:31:57 +00:00
tomcw bd1d65ce4f Renamed Applewin.h to AppleWin.h across entire project 2020-11-11 22:12:39 +00:00
Andrea 01ad5d1882
Ensure all header files can be included (in any order) after stdafx.h. (PR #866) 2020-11-11 21:15:27 +00:00
Andrea 8cc04e2b86
Cumulative changes required to enable / ease compilation in Linux with gcc. (PR #861)
Split MouseInterface to isolate DirectInput code.
Avoid overflow in platforms where RAND_MAX is a big integer constant.
Fix include files for gcc (where enums cannot be forward declared).
2020-11-10 20:33:55 +00:00
ThorstenB 4543117f81
More clean-up, portability and another debugger fix (PR #847)
Fixed debugger main "data" window behaviour:
. When activating the main data display ("data" command) the cursor keys wouldn't work until the minidump ("md1") was also enabled. NB. The cursor keys should work in the main data window, independently of whether the minidump is active.
2020-10-25 17:27:59 +00:00
tomcw aa322dbd53 Fixed loading a save-state where both Phasor 6522's Timer1s are active (eg. DIGIDREAM demo) 2020-10-18 19:32:18 +01:00
tomcw 1a11c65d37 Replaced global g_CardMgr with a singleton object & GetCardMgr() call. (Fixes #843) 2020-10-11 17:34:44 +01:00
TomCh 6125c2b12d
Support for synchronous events (PR #841)
Switched Mockingboard/6522 Timer interrupts & Mousecard's VBlank interrupt to use synchronous events.
This is a linked-list of ordered timer-based event, where only the head of the list needs updating after every opcode.
2020-10-11 16:08:05 +01:00
tomcw 06f8ccb384 MB false read of 6522: limit to only the no-PX variants 2020-08-22 16:06:26 +01:00
tomcw b93de29ff1 Fixed the 6502/65C02 false-read of 6522 issue for Willy Byte! (fixes #52) 2020-07-24 19:39:31 +01:00
tomcw 52ff9d5b99 Fixed MB looping sound after 'OK' in Configuration (#813) 2020-07-17 22:53:17 +01:00
Andrea 82c09abd54
Minor fixes (#805)
* Add missing Riff.h include and fix const correctness of arguments.
* Cosmetic improvements to Perf breakdown in LogPerfTimings().
* Logging - removed unnecessary cast.
2020-07-01 21:08:18 +01:00
tomcw 60d54d6f3b Fix for 'IRQ occurring on last cycle of opcode' not always true. (Fixes #796)
. FT demo MAD2.DSK - original version now correctly crashes at start of full-screen scroller
. FT demo MADEF.DSK - graphics glitch on vertical edge where it transitions from GR to HGR mode
2020-06-27 19:29:29 +01:00