Commit Graph

80 Commits

Author SHA1 Message Date
Peter Ibbotson
2cbecdda68
ProDOS HDD Controller firmware returns volume size in Y:X for STATUS command (PR #1272)
* New command line option to force a size for autoexpanding use.
* New HDD Controller firmware uses a separate v2 name and folder.
* Harddisk.cpp now loads HDD Controller firmware v2 by default.
* Save-state for 'Generic HDD' bumped to v4
2024-02-06 21:32:30 +00: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
tomcw
d612972e6c Add command line support for hard disk controller (hdc) in slot-5 (#1033)
. -s5 hdc
. -s5h1 <pathname>
NB. No GUI config support, so no way to plug/unplug HDDs.
2023-02-26 20:42:21 +00:00
Andrea
b2926390c8
Remove unused includes. (PR #1178) 2023-02-05 21:04:45 +00:00
tomcw
bb56b99af5 HDD: change writes so they are done in units of PAGE_SIZE(256B) to match reads
. making it easier to reason about DMA breakpoints (as they are now consistent for reads & writes)
2022-06-05 19:41:06 +01:00
TomCh
22065c6325
Debugger memory breakpoint support for HDD DMA r/w (#1103, PR #1109)
When the debugger is active (eg. breakpoints enabled) then trap on HDD r/w's that match the BPM[R|W].
NB. the breakpoint will fire after the whole HDD r/w operation has completed.
2022-06-03 15:34:37 +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
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
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
tomcw
651b57fdae HDD: fix for slowdown during r/w block operations
. firmware does busy-wait RMW (rol abs,x)
. the IORead then IOWrite was flipping the LED status each access, with a huge performance penalty!
2021-12-12 11:53:37 +00:00
tomcw
010d3525d3 HDD read: error if reading block to ROM (#1007) 2021-12-11 15:11:13 +00:00
tomcw
1ab0d56558 HDD: remove magic numbers & add GH ref (#1007) 2021-12-10 19:37:58 +00:00
tomcw
bb6fa80335 HDD r/w: error if r/w overlaps with I/O memory
. break to debugger if single-stepping
HDD write: support memory accesses across 64KiB boundary
2021-12-09 21:22:13 +00:00
TomCh
443545b0f6
Support SHR video modes with a VidHD card (#997, PR #1004)
Support VidHD in slot 3 (via Config GUI or '-s3 vidhd') for SHR video modes only.
- AppleWin window is slightly enlarged when VidHD card is inserted.
Support IIgs 320x200 (and fill mode) and 640x200 video modes.
Debugger: add 'shr' command to view video
CUI: Allow user to specify width & height (for full-screen); and allow separate x,y scaling in full-screen mode.
2021-11-30 21:41:02 +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
tomcw
abc631432d HDD: fix edge-case for old save-state m_buf_ptr 2021-11-15 20:26:53 +00:00
Andrea
8662a99179
Add InitializeIO() to Card and CardManager (PR #999)
. Card::InitializeIO() is pure virtual
. CardManager::InitializeIO() initialises all cards
2021-11-11 21:45:55 +00:00
tomcw
6282790c3d Add comments to both Harddisk.cpp & the firmware code about 'sta abs16,x' false-reads, etc.
Harddisk.cpp: Fix typos and update the notes on the r/w commands' operation.
2021-11-11 21:20:54 +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
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
Andrea
4375418506
Move some "char *"to "const char *", and avoid unnecessary c_str(). (PR #973) 2021-07-25 11:55:25 +01:00
tomcw
71bea52419 Disk/Harddisk: Insert() - fix comment and rename var 2021-07-15 19:23:01 +01:00
Andrea
4f45202baf
Save full pathname to registry. (#960 PR #959)
This was already happening for Hard Disks (although in a convoluted way).
Extend to Floppy Disks.
2021-07-13 21:24:29 +01:00
tomcw
05b9668f72 Use enum SLOTS and remove pre-processor SLOTn defines 2021-05-19 21:26:23 +01:00
Andrea
de7f35e6bd
Make path separator OS-dependent (PR #954) 2021-05-19 21:10:22 +01:00
Andrea
cdf1cb9106
Remove usages of g_hFrameWindow and g_hInstance from core emulator files. And Resource related Win32 functions. (PR #915)
. Win32Frame: remove WM_USER_RESTART.
2021-01-19 20:37:43 +00:00
Andrea
6cffb30330
FrameBase: some changes to ease implementations (PR #910)
. simplify the interface FrameBase to make it easier to implement it for different cases (remove HDC and make parameters more explicit)
. remove functions which are only called on a Win32Frame (in which case a cast is guaranteed to succeed)
. otherwise there is the risk that every FrameBase implementation wants to add its own variants.
. FrameBase::FrameRefreshStatus() simplify implementation: pass all flags explicitly
2021-01-10 16:33:06 +00:00
TomCh
3aa5750dcf
Make Video.cpp and WinVideo.cpp into a dependent class hierarchy (PR #898)
. class hierarchy: WinVideo IS_A Video (ie. WinVideo is a subclass of Video)
. GetVideo() singleton instance of WinVideo in AppleWin.cpp, exposed via Interface.h
2020-12-28 16:25:29 +00:00
Andrea
e27879ac99
Move interface into a class FrameBase. (PR #893)
. Move the Win32  implementation into Win32Frame.
2020-12-24 15:08:50 +00:00
Andrea
30d3269fbf
Remove a few more Win32 memory functions. (PR #888)
CopyMemory, MoveMemory, FillMemory.
2020-12-12 11:09:14 +00:00
Andrea
d2a34e1f91
Remove VirtualAlloc, VirtualFree & ZeroMemory. (PR #884)
. Allocation in Memory.cpp: keep VirtualAlloc of size=64KiB (alignment=64KiB) to ease debugging.
2020-12-10 21:08:15 +00:00
Andrea
7ca547479b
Move Windows related functions to Interface.h (PR #882)
This is not complete as header files from Windows/.. are still included in:

Keyboard.cpp
SerialComms.cpp
Joystick.cpp

But probably these are arch specific and will have to be completely reimplemented elsewhere.
2020-11-29 17:30:06 +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
Andrea
c455488b50
Split Frame.cpp to WinFrame.cpp (PR #874) 2020-11-23 19:21:20 +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
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
TomCh
43455eb4fe
Improved determining path & filename when saving/loading a save-state (#691) (PR #849)
Whenever harddisks/disks are inserted (or removed) and *if path has changed* then:
. Then the internal save-state's path & filename will be updated to reflect the new defaults.
. LoadConfiguration(): Read the save-state pathname from Registry before harddisks/disks.

Also:
. CiderPress: only save pathname on OK.
. Refactored CPropertySheetHelper::BrowseToFile().
. Extended support for -d1,-d2,-h1, etc such that if the param is "", then it will eject/unplug the disk/harddisk.
2020-10-25 17:14:23 +00:00
tomcw
1a11c65d37 Replaced global g_CardMgr with a singleton object & GetCardMgr() call. (Fixes #843) 2020-10-11 17:34:44 +01:00
Andrea
af720f7352 Correct way to clear a std::string. (PR #723) 2020-01-09 22:12:51 +00:00
TomCh
769d4c6927
Support 2nd Disk][ card and improved card management (#726) (PR #741)
Support 2nd Disk][ in slot-5, via command line:
- -s5 diskii
- -s5d1 \<imagefile\>
- -s5d2 \<imagefile\>

NB. there's currently no Configuration UI support, except the Drive icons' tooltips show what's in slot-5 & slot-6 (for drive-n). So there's no way to eject the disks or insert new disks. The use-case I'm supporting it Wasteland which just has the 4 disks in the 4 drives.

Improved card management:
- Added `class Card` (in Card.h) which all other cards (that exist as classes) derive from (eg. LC,SSC,Mouse,Disk2).
- Added `class CardManager` (in CardManager.cpp\h) which now manages the 8 slots (and aux slot).
- Added `class Disk2CardManager` (in Disk2CardManager.cpp\h) which provides methods for operations that act on all Disk2 instances at the same time.
- Currently limited to just 1x SSC and 1x Mouse card (why would you need more?). This simplifies things, meaning there's no need to have dedicated SSCManager / MouseCardManager objects.
- Currently the 2nd Disk2 card can only be put into slot-5. This limitation is just due to the complexity of the Configuration UI. Having a more general drop-down per slot UI would remove this limitation.
2019-12-19 19:42:30 +00:00
tomcw
3cd4ead90d Disk: minor refactor 2019-10-13 16:01:00 +01:00
tomcw
1472f25bad Save-state: show an error MsgBox if old HDD v1 save-state and PC is in $Cnss HDD firmware 2019-10-13 15:48:07 +01:00
tomcw
31b78aa09a HDD: Fixed not being able to enable HDDs - regression introduced at 506a52f359 2019-10-05 16:56:38 +01:00