Commit Graph

29 Commits

Author SHA1 Message Date
Andrea
4ab60cebf8
Serial comms: compilation in Linux (PR #1249)
* SerialComms: compilation in linux.
1) static variables must be defined (otherwise it becomes optimisation-dependent)
2) ensure the socket is closed if an error is detected

* SerialComms: avoid issues with order of global variables.
GetFrame() and the GetCardMgr() use global variables and the order of their destructor is not well defined.
CSuperSerialCard::CommTcpSerialCleanup() is called as part of the CardManager's destructor.
2024-01-06 14:50:10 +00:00
Andrea
12d1a0e1fe
Card: cleanup interface. (PR #1059)
1) Remove Init()
2) Call Reset() via CardManager
3) Call Destroy() via CardManager (only used by Disks/Harddisk) on WM_DESTROY

The only "real" changes are in CSuperSerialCard: ensure destructor cleans up and remove Destroy().
2022-03-11 22:17:03 +00:00
Kelvin Lee
80f3eaeb91
Various *Name() functions can simply return const std::string& (PR #1049) 2022-02-28 20:52:18 +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
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
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
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
tomcw
eed3182bef Fixed cmd line regressions: (#790)
. -s7-empty-on-exit wasn't being recognised
. -d1, -d2 weren't saving the 'Last Disk Image 1/2' & 'Starting Directory'
2020-05-25 21:59:26 +01: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
TomCh
3d4691e9bd
ADTPro not working (#707) (PR #714)
. Wrap m_vbTxEmpty in a mutex
. Check WriteFile() result & log error
2019-11-02 19:53:00 +00:00
tomcw
d23d091caa SSC: Support COM ports greater than 9 (#707) 2019-10-24 21:43:00 +01:00
Andrea Odetti
bd201202cd Some more std::string changes.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2019-09-07 19:37:19 +01:00
tomcw
eea8cb3cdf Deprecated and removed support for v1 save-state. (Fixes #603) 2019-01-05 22:20:51 +00:00
tomcw
7beaf610d2 SSC:
. Save-state: SSC unit v2 - support DCD flag, removed redundant vars
2018-05-10 13:47:26 +01:00
tomcw
2fdc270837 SSC: Make default baud-rate consistent (9600) 2018-05-05 16:56:15 +01:00
tomcw
52e7d61c7e SSC:
. DCD state is now a mirror of DSR unless -dcd switch is used. (Fixes #553)
. Removed -dsr,-dtr switches, so -modem is now an alias for -dcd.  (Also for #553)
. Wait for events (RLSD,DSR,CTS) in CommThread and call GetCommModemStatus() in CommThread.
2018-04-22 14:37:59 +01:00
TomCh
a78f1e04da
SSC: Support for TX IRQ and other SSC updates (#552)
. Support TX IRQ for both TCP and COM modes (fixes #522)
. Support CTS/RTS (fixes #311)
. Fixed reading DIPSW registers
. Fixed TCP mode which was only generating an IRQ for first byte received
. Added UpdateCommandReg() to consolidate all updates to SSC command reg
. Updated reference URLs
2018-04-08 17:37:26 +01:00
tomcw
d9accc82c5 Refactor codebase by renaming nCyclesLeft to uExecutedCycles (#540) 2018-03-03 21:27:50 +00:00
tomcw
1bd85e123e SSC: Added -modem switch (for dcd,dsr,dtr) and removed invert switches (#386) 2017-03-23 21:36:26 +00:00
tomcw
abd99d109e SSC: Experimental support for 6551's status bits: DCD and DSR via -dcd[-invert] and -dsr[-invert] args (#386) 2017-03-19 21:44:20 +00:00
tomcw
6063d8e96f SSC: Experimental support for 6551's DTR via -dtr or -dtr-invert args (#386) 2017-03-18 13:56:18 +00:00
tomcw
37ad1ebd63 Removed redundant binary v2 save-state code
Also:
. support new CpuType independently of Apple2Type
. save-state: don't save disk track image if no disk
. save-state: re-init AppleWin internals & UI to reflect changed Apple2Type
2016-02-14 16:01:30 +00:00
tomcw
2f6e86c0fa Added libyaml 0.1.5
Added yaml save-state support for:
. Main AppleII unit
. Aux memory & RawWorksIII
. Printer
. SSC
. Z80
. Mouse
. Mockingboard
. Phasor
. Disk][
. HDD
2016-02-07 15:47:15 +00:00
tomcw
559a236b14 Save-state:
. On save: append .aws if missing
. Added Pravets.cpp/h (for this clone's specific stuff)
2015-05-31 22:53:53 +01:00
tomcw
717c5cba84 New save-state (.aws) v2:
. Format now extensible for supporting new hardware types in the future
. Include missing items like Apple2Type, CyclesThisVideoFrame (#255)
Continue to support loading of old v1 format.

Added card save/load for:
. Mouse (#260)
. HDD (#260)
. Printer

Extended card support for:
. SSC

Other:
. Added save-state v1 struct size checks
. Create SaveState_Structs_v2.h and split out common into SaveState_Structs_common.h
. Refactor HardDisk.cpp to use imagehandle; and consolidate with Disk.cpp
. Fix Disk/HD_GetFullPathName() which wasn't always returning full pathname
. Consolidate common GetImageTitle() and move into DiskImage.cpp
2015-02-13 22:40:53 +00:00
tomcw
6a26a95487 PCH refactor: remove non-system headers from stdafx.h 2014-08-13 21:30:35 +01:00
tomcw
d591dd006b Remove the top-level AppleWin folder 2014-05-23 22:59:02 +01:00