Commit Graph
181 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
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
Andrea 56168d4132 Fix crash when a HD card is on a slot != 7 (PR #1498)
* Snapshot_GetDefaultFilenameAndPath(): fix segfault. SLOT7 -> i
* Disk & HardDisk: tidy up casts and iterations.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2026-05-17 19:13:11 +01:00
tomcw 0c10802d45 Fix ASSERT for loading .apl and .prg images. (#1482) 2026-04-04 18:47:16 +01:00
tomcw 91ca49f4f5 Slots config: Disk II: add option for 13-sector firmware, and save to Registry 2026-03-20 15:20:42 +00:00
tomcw ef8eef395b Rename cards: Disk II, Hard Disk Controller & Z80 SoftCard 2026-03-13 20:50:22 +00:00
tomcw 3fa34a3bdf Minor refactor for many GetSnapshotCardName() 2026-03-13 20:20:02 +00:00
TomCh 80ec6e5545 Improve Configuration GUI for better slot/card selection (#853, PR #1462)
. Add PropSheetPage: Slots (and include 'Reset to Default')
  - include config options for some cards
. Remove PropSheetPages: Sound & Disk
. Config page: refactor and add 'Reset all to Default'
. Input page: refactor
. Advanced page: refactor
2026-03-07 22:00:07 +00:00
TomCh 6d581d81f0 Disk II: motor off & stopped spinning: write back any dirty track (#1444, PR #1447) 2025-11-14 21:10:23 +00:00
tomcw ae28de062a DiskII: When a write-protected disk is ejected (and motor is on) then write-protect switch state becomes 'write enabled'. (#1433) 2025-10-03 23:21:43 +01:00
TomCh 1a68914a4a Fix all x64 warnings in the AppleWin proj (PR #1434)
NB. 10 warnings still in libyaml proj (but there's no upstream update - so will leave as-is).
2025-09-22 21:25:35 +01:00
Andrea acbef19489 Remove TEXT() and _T(). (PR #1379) 2025-02-13 20:48:37 +00:00
Andrea 168e868677 Remove TCHAR and <tchar.h> (PR #1373)
. Replace TCHAR -> char.
. Remove <tchar.h> and related functions.
2025-02-08 11:09:09 +00:00
Andrea 3033f3445b SaveState: add absolute path for disk & hdd images. (#1290, PR #1294) 2024-10-06 20:44:24 +01:00
tomcw 8739b6ba08 DiskII: C0E8 (DRIVES OFF): Improve logging & comments (#926) 2024-09-20 21:57:51 +01:00
tomcw 91eec68fff DiskII: Fix for "DRIVES OFF forces the control flipflops to clear". (@sicklittlemonkey)
. fixes Zork0 (#926) and Shogun (#1315)
2024-07-28 16:38:37 +01:00
Andrea 2759527f0d Remove some StringCb* functions and fix assertion. (PR #1239)
. Return an error for an invalid .bin image.
2023-06-17 20:41:48 +01:00
Michael "Code Poet" Pohoreski e1b0b20aad Debugger DISK INFO QoL (#1212)
* Bump debugger version 2.9.1.19

* Cleanup

* Debugger: Update DISK INFO to display disk info across 2 lines of text

* Debugger: Fix ConsolePrint() to wrap long lines of text

* Debugger: Update DISK INFO to show last nibble for non WOZ floppy image

* Replace optional pointer with reference in GetCurrentState()

* Add Log.h to Disk.h

* Cleanup GetCurrentState()

* Cleanup whitespace

* Add single line output for DISK INFO foundation. Still need CONFIG DISK #

* 2.9.1.21 Added: DISK INFO [#]
2023-04-28 16:28:49 +01:00
Andrea b2926390c8 Remove unused includes. (PR #1178) 2023-02-05 21:04:45 +00:00
TomCh 8cd51ba155 Show Disk II Slot 5 status (#1134, PR #1137)
. In 2x windowed mode: always show slot 5 Disk II LEDs.
. Add tooltips for slot 5/6 track/sector info (d1 & d2) - shows dec/hex & fractional track position.
  - but this track/sector info is now on a UI toggle in the Config -> Disk tab.
. Debugger: add 'DISK SLOT n' - to set current slot of Disk II card
  - ie. support 'DISK INFO' for slot 5
2022-11-17 21:08:11 +00:00
tomcw 69fa53ab7d Add command line: '-sN diskii13' to force the diskii card (in slot-N) to use the 13-sector firmware (#1133) 2022-10-05 21:29:57 +01:00
TomCh 4c83186545 Add jitter before track seam (under special conditions) (#1125, PR #1129)
Use FindTrackSeamWOZ() to find longest run of sync FF/10 nibbles.
Jitter added:
. only for tracks 33.0 and above
. only for tracks with long runs of sync FF/10 of more than 110

Changes:
. DumpTrackWOZ() outputs nibble then zeros (instead of zeros first)
. Debugger: 'disk info' outputs bitOffset (instead of byteOffset+mask)
2022-09-19 11:00:34 +01:00
tomcw 3f40955306 WOZ: fix obscure crash bug. (Fixes #1126) 2022-08-30 21:43:20 +01:00
tomcw 5888a2b4a6 WOZ: Change track head movement positioning to work on bit (not nibble) offset. (#1022) 2022-08-21 11:48:42 +01:00
tomcw 74a664840f WOZ: Fix for 'Balance of Power' (#1022) 2022-08-20 12:54:14 +01:00
Andrea 1095186c0c Fix printf warning. (PR #1118) 2022-06-24 22:00:31 +01:00
tomcw ccea9d55f8 Disk2: Stepper Control - update comment 2022-06-21 21:19:24 +01:00
TomCh de173b2729 Support two adjacent phases turned off in rapid sequence (#1110, PR #1116)
Fix for A2osX low-level format for 48-trackl, 192K floppy image
2022-06-20 20:40:39 +01:00
tomcw 93ea5b3e60 WOZ: Improve reading write-protect (#1078) and remove 'm_resetSequencer' var 2022-04-23 18:13:15 +01:00
tomcw cb37dd300b WOZ: Fix for reading write-protect from data register (#1078) 2022-04-18 21:13:41 +01:00
tomcw e97be1b836 Debugger: fix console output for 'disk info' cmd
. fix to ConsoleBufferPush() which was skipping a char when the line needed to output to a 2nd line
2022-04-03 18:49:36 +01:00
Andrea 231e6c6d64 Cards: remove special call to InitializeIO() for Disk and Harddisk. (PR #1061) 2022-03-13 15:45:43 +00:00
Kelvin Lee dfb8802763 Replace sprintf() with StrFormat() (PR #1048) 2022-03-02 21:10:41 +00:00
Kelvin Lee 80f3eaeb91 Various *Name() functions can simply return const std::string& (PR #1049) 2022-02-28 20:52:18 +00:00
tomcw 43b9df253a Fix build errors from PR #1039 2022-02-16 20:14:40 +00:00
Kelvin Lee 1a4e933778 Replace StringCbPrintf() with StrFormat() (PR #1032) 2022-02-15 18:48:20 +00:00
Kelvin Lee 9a3832084a Simplify the common combination of sprintf() and OutputDebugString() (PR #1031)
- Update LogOutput() and LogFileOutput().
- Add StrFormat() to produce std::string out of snprintf() & add StrFormat.cpp to projects.
- Add PTRDIFF_T_FMT in parallel to SIZE_T_FMT to StdAfx.h, for completeness.
- In Log.cpp, changed to get timestamp using posix functions.
- Removed TCHAR usage throughout - simply use char.
2022-02-13 21:37:05 +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
tomcw 24378313c3 WOZ-related changes:
. Significant bit-cells after a gap between latch access upped from 50 to 100 (#1020)
. Minor track sync mod: Update bitStream position for current track before re-calc'ing position for new track (#1022)
. Minor: for DiskII I/O regs $A/B (Select Drive 1/2) update the isWOZ variable to reflect new image-type
2022-01-29 21:27:03 +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 0b2104cc89 Card::Save/LoadSnapshot (PR #1003)
Add 2 virtual methods to Card to load and save snapshots.
2021-11-25 20:23:21 +00:00
Andrea 2e04ce348a Add Card::Update() (PR #1000)
And use it in ContinueExecution()
2021-11-13 18:13:01 +00:00
TomCh 5ed901f720 Slot-independent HDD firmware (#996, PR #998)
. Move the 'read block' command into the emulator - to mirror the write command
. With emulated time to do the DMA for the r/w block command
2021-11-09 21:04:57 +00:00
tomcw d96ed5b8c5 Refactor: move m_slot into Card class 2021-11-01 21:01:28 +00:00
tomcw 67b3c28833 Refactor: remove slot from InitializeIO() calls for card objects 2021-11-01 20:39:26 +00:00
TomCh ff7c9dc185 Make harddisk a class (#995)
. Add user-protection when unchecking HDD controller (as images aren't restored on a 'cancel')
. Fix possible crash when removing (via Config->Disk) either Disk2 card(s5) or HDD card(s7), then cancelling during emulation
. Fix m_buf[] size
2021-11-01 20:12:42 +00:00
tomcw 18f5fafb30 DiskII: Remove superfluous IsDiskImageWriteProtected() 2021-10-18 21:13:37 +01:00
TomCh ed298b4fd9 Improve save-state card management (PR #983)
Initially all cards are removed before loading save-state.

Use new Registry "Configuration/Slot 2" location to save SSC's port name.
Use new Registry "Configuration/Slot 7" location to save HDV's image names.
Use new Registry "Configuration/Slot n" (and "Configuration/Slot Auxiliary") locations to save all other card types.

Command line: -s<slot> (eg. -s7 empty) now get persisted to the Registry.

Only update 'HDV Starting Directory' for slot7 & drive1.
2021-09-17 20:43:10 +01:00
TomCh 7b55e994ec Config GUI for DiskII card in slot-5 & improved slot config in Registry (#975, #977, PR #978)
Change to using Registry's 'Configuration\Slot n' for disk ii image pathnames (was 'Preferences').
Delete Registry's 'Configuration\Slot n' section each time there's a change of card.
Add same functionality to conf.ini.
LoadConfiguration(): load from the new Slot-n section (or otherwise the old legacy key).
Only update Registry's 'Starting Directory' for s6,d1.
Update help doc.
2021-08-29 11:39:51 +01:00