* 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.
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().
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.
- 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.
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.
* Interface.h: ensure that functions in the interface are not exported by other header files.
This is generally harmless, except for the presence of default arguments, in which case the version with default arguments must come first.
To avoid the issue, these functions are only ever exported in the Interface.h header file.
. 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.
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.
. 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.
. SSC: For TCP mode, support DSR, DCD & CTS status bits (#308).
. SSC: Now DTR must also be set to enable interrupts (in addition to the respective Tx/Rx interrupt bit).
. SSC: When reading the Status register, throttle calls to GetCommModemStatus() to a maximum of once every 8ms.
. 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
Changes to ease code compilation in GCC.
Disk_t and HDD contain a std::string and for this reason they need a proper constructor, ZeroMemory is not guaranteed to work.
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