Commit Graph
177 Commits
Author SHA1 Message Date
Kelvin Lee 3e8054b462 Replace BOOL (almost all) with bool (PR #1509)
. Remove uses of !!
2026-07-26 21:49:53 +01:00
tomcw d5db8e84a6 AY: support empty socket
AY regs: ENABLE(bits 7-6), PORTA, PORTB: support depends on AY chip type
Add cmd line: -sN ay-socketX <empty|ay8910|ay8912|ay8913|ym2149>
Save-state: Mockingboard v15: add type for AY/YM
2026-07-18 15:42:12 +01:00
Kelvin Lee 8193cc1fd1 Remove void argument lists (PR #1505) 2026-07-05 16:43:36 +01:00
Kelvin Lee 926c592f75 Replace some BOOL usages with proper bool (PR #1500)
1. Registry functions
   The set of functions are changed to consistently use bool arguments.
   The macros are changed to inline functions to improve type checking.
   RegSaveValue() are overloaded with help of templates to reduce
   typecasting at call sites. For instance, bool value would be converted
   consistently instead of relying on call sites to convert bool to int values.
2. Memory functions
   BOOL usages were unnecessary. Mostly internal usages which can simply be bool.
3. FrameBase
   Some member variables are changed to bool.
   BOOL was used because of those Registry functions.

Additional changes:
- Some expressions are forced to be bool when assigning to bool variables.
2026-06-06 14:12:42 +01:00
tomcw 599e81d07f Config Slots: Reset to Default: set MB's speech chips to defaults
On loading save-state: Save any MBs's speech chips to Registry
2026-03-23 20:52:23 +00:00
tomcw 10369ed93c MB/Phasor: default to SSI263AP in socket-1 and socket-0 empty 2026-03-22 11:14:44 +00:00
tomcw 75e04ba54a Minor: Fix/improve some comments 2026-03-17 21:54:28 +00:00
tomcw abbf5d996a Slots config: Mockingboard/Phasor cards: add option for speech chips, and save to Registry 2026-03-15 13:25:19 +00:00
tomcw c245494859 Update firmware/BootSector batch files.
Fix out-of-date comment.
2025-06-13 19:48:16 +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
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
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
tomcw 80af06db77 Debug: fix MB IRQ logging 2025-01-02 21:04:15 +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 000b546613 MB: Refactor: rename m_phasorEnable to m_isPhasorCard 2024-11-23 15:05:02 +00:00
tomcw d1d026f7ab MB: Refactor: add SetPhasorMode() 2024-11-23 14:57:16 +00:00
tomcw b5544142e0 MB: Refactor IsActive() to IsActiveToPreventFullSpeed() (#1340) 2024-11-20 21:00:38 +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 e8641555e8 Debugger: visually show that a 6522 is configured as bad in mini-mem window's title 2024-09-28 16:46:28 +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
TomCh 001f04c706 Phasor in Echo+ mode: fix the chip-select polarity (PR #1276) 2024-02-03 21:07:29 +00:00
TomCh 53fddfe41a Fix SD Music card for mb-audit v1.50 (PR #1275)
. Fix for mb-audit's TestAYReadHiZ (bus-state wasn't being set correctly for SD Music's 6522 accessed via $Cs8x)
2024-01-30 19:48:34 +00:00
tomcw 56cc779351 MegaAudio card: Reads of 6522 IRB & IRA always return 0x00
. generalise the implementation: move AY READ logic down to 6522 read
2024-01-21 20:43:02 +00:00
tomcw 43daabec54 MegaAudio card: AY READ always drives bus with 0x00 2024-01-21 15:03:33 +00:00
tomcw 0888a25710 Small refactor for AY(s) driving bus for 6522 PortA 2024-01-06 18:20:33 +00:00
tomcw 69151a2aff MB/Phasor: support AY(s) driving bus for 6522 PortA (ie. for the PSG READ function)
. Bump MB/Phasor save-state unit to v11
. Tested against mb-audit v1.50
2024-01-03 21:22:25 +00:00
tomcw a8de7f2030 6522: fix reading IRB - used as MB detection by Werewolf! (#1260) 2023-12-29 10:16:51 +00:00
tomcw be427a6a30 Phasor: AY RESET resets both AYs attached to 6522 regardless of Phasor mode & CS bits. (#1197) 2023-09-07 21:40:13 +01:00
TomCh 5ba153c244 Add support for SD Music card (PR #1217)
Differences compared to Mockingboard:
. Only one 6522
. AY8913 is selected by address b7

Add cmd line: -sN sdmusic
Add cmd line: -mb-audit (to enable selection of additional sound cards, eg. for mb-audit)
2023-04-28 16:41:22 +01:00
TomCh 273d07d83f Support MegaAudio card for testing mb-audit (PR #1211)
Differences compared to Mockingboard:
. TIMER1 underflows to $FFFE before it's reloaded with latch.
. TIMER1's LATCH=$0000 gets interpreted as $FFFF.
. Partial TIMER2 support: IFR.T2 gets set on underflow. But T2 reads as 0x00FF.
. AY register reads are unsupported (always read as 0).

Config->Sound: show 'MEGA Audio' in drop-down menus only if it was specified on the cmd line.
2023-04-12 18:19:18 +01:00
tomcw 5a7076135e Debugger: mini-view for AYs: show AY PSG function: RD, WR, LA (or '--' if INACTIVE) 2023-03-11 13:56:44 +00:00
tomcw 1416cc1676 Debugger: mini-mem views: support Phasor's AY1&AY2 pair in a single view.
. use: AYsn, where s=0-7 (slot), n=A|B (6522)
2023-03-09 22:53:09 +00:00
tomcw 055c299bb4 Debugger: use dedicated MB structs to populate mini-mem views.
Remove old v1 save-state header files.
2023-03-09 20:16:21 +00:00
tomcw 3f2f071fa6 MB: rename consts AY0/AY1 to AY1/AY2 (for consistency with mb-audit code) 2023-03-07 21:51:24 +00:00
tomcw 57c26c59b2 Update History.txt & some Phasor-related comments 2023-03-07 18:06:06 +00:00
tomcw fb37310acd Phasor: support AY READ from both AYs (#1192) 2023-03-06 22:25:30 +00:00
tomcw df0f4356ec Fix so that MB can still read AY regs after setting INACTIVE state (#1193) 2023-03-05 21:09:08 +00:00
tomcw a3a89ad156 Phasor/MB: For AY INACTIVE state, bus floats high - so reflect this in 6522 PortA (fixes #1193) 2023-03-05 15:43:13 +00:00
tomcw 500f32071b Phasor/MB (#1192)
. For MB: isChipSelected[0] = true. So do this on Reset() or for Phasor when switching to MB mode.
. Add "Notes on Phasor's AY-3-8913 chip-select & r/w"
. Refactor some common code into SY6522::UpdatePortAForHiZ()
2023-03-05 15:37:52 +00:00
tomcw 7110e92f14 MB/Phasor save-state: persist 'Chip Select' & 'Reg Address Latch Valid' for MB card too 2023-03-04 23:25:53 +00:00
tomcw d8e30e56be Phasor: support discrete LATCH & READ PSG functions (#1192)
. Recode 'MB_SUBUNIT::state' as a 2-element array
2023-03-04 22:41:07 +00:00
tomcw 3b53c882ab Phasor: improve odd Phasor logic for AY1 & AY2 chip select (#1192) 2023-03-04 19:38:11 +00:00
tomcw 34141b0c1d Phasor:
. add 2nd nAYCurrentRegister (Reg. Address Latch) for 2nd AY8913.
. add support for the odd Phasor logic when doing discrete LATCH and WRITE PSG functions.
(keep in sync with mb-audit v1.3)
2023-03-04 18:14:00 +00:00
tomcw 89eb0cb07b Mockingboard: After AY is reset, then latched addr isn't valid
. Save-state: save all 8 bits of latched addr.
. Debugger: for mini-AY dump, show latched addr (current register shown in white)
2023-03-01 21:01:59 +00:00
tomcw db44b15c37 For Phasor (native/Echo+ modes) improve support for null AY chip-select case 2023-02-28 20:42:53 +00:00
tomcw 9cf3d00288 For Phasor (native/Echo+ modes) support the null AY chip-select case (for eg. mb-audit v0.9) 2023-02-26 21:52:46 +00:00
tomcw 0d0adc1f22 Phasor's Echo+: support dual-mono (R copied to L) 2023-02-25 21:25:46 +00:00
tomcw bca99278b6 Simplify Phasor's Echo+ mode's chip-select (#1183) 2023-02-21 21:32:11 +00:00
tomcw dc029a4700 Fix Phasor's Echo+ mode's dual chip-select (#1183) 2023-02-21 21:08:20 +00:00