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.
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.
This change does two things:
1. Updates the registry APIs to reduce the likelihood of uninitialized
variables.
The code wasn't always checking the return value of registry load operations.
In some cases, this led to uninitialized memory being used, and crashes could
result. For example, LoadConfiguration in Applewin.cpp was using an
uninitialized value for the computer type if no registry variable for the
"Apple 2 type" was set.
New registry reading methods and macros have also been introduced, allowing
default value fallbacks for the cases where a registry variable is not found.
This makes registry access simpler and safer when a default value is known in
advance.
The registry code's style has also been updated to conform with the rest of
the code base (tabs instead of spaces, naming conventions, etc.)
2. Introduces string safety improvements.
A number of code paths have been modified to use safe-string functions instead
of their unsafe counterparts (e.g., strcpy, sprintf). In the process, some
strings were converted from "char" to "TCHAR". This was done mostly for
consistency with the rest of the code-base.
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.