Commit Graph

153 Commits

Author SHA1 Message Date
Andrea 82c09abd54
Minor fixes (#805)
* Add missing Riff.h include and fix const correctness of arguments.
* Cosmetic improvements to Perf breakdown in LogPerfTimings().
* Logging - removed unnecessary cast.
2020-07-01 21:08:18 +01:00
tomcw c9ef6ecee1 NoSlotClock:
. added to save-state (v6) via a new unit type 'Miscellaneous'
. added cmd line switch '-no-nsc' to configure AppleII without an NSC
2020-06-10 20:56:00 +01:00
tomcw 41203f5d2d Fixes for image loading switches (-d1,-d2,-h1,-h2,-s5d1,-s5d2):
. support relative paths (#663)
. updated the current directory with the path for each loaded image (#663) & saving state (#691)
. added a new switch -current-dir <path>
2020-06-06 16:32:58 +01:00
tomcw 4f340fa264 Revert previous fa04797:
. again '-s7 empty' doesn't persist this state to Registry/conf.ini
. consistent with other '-sn empty' cmds
2020-05-29 21:58:53 +01:00
tomcw fa047974ec Fixed cmd line '-s7 empty' so that 'Harddisk Enable' is updated in Registry/conf.ini file
. this matches -s7-empty-on-exit and the -d1,-d2,-h1,-h2 switches
2020-05-28 21:41:15 +01:00
tomcw b132b0d0a8 Added cmd line switch: -power-on 2020-05-26 21:37:56 +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
tomcw 13a4043118 Added a new PerfMarker class: used to instrument emulation sub-systems and log timings (#788)
To enable this uncomment the #define LOG_PERF_TIMINGS in AppleWin.h.
2020-05-23 16:41:19 +01:00
tomcw 2fa22d220b Merge branch 'feature/no-registry' of ssh://github.com/taeber/AppleWin into taeber-feature/no-registry 2020-04-03 21:29:54 +01:00
TomCh dd2914a38e
Support Apple II J-Plus model (#773, PR #776)
. Added II-JPlus rom & video rom
. Added new apple2jp model
. Fixed support for AN3 for II/II+ models (nothing to do with J-Plus support)
2020-04-02 20:17:32 +01:00
tomcw 3659603228 Added cmd line arg -rom <file> for 12KB & 16KB roms (#771) 2020-03-25 23:05:02 +00:00
Taeber Rapczak c7d2fef62f Allow use of an INI-file instead of the Registry
This change adds the `-conf` switch which, if specified, will use an
INI-file instead of the Windows Registry.

This addresses AppleWin/AppleWin#709 and AppleWin/AppleWin#446.
2020-02-09 21:18:31 -05:00
tomcw fcd1b2aa68 Fix for double-clicking an associated filetype 2020-01-21 19:27:13 +00:00
tomcw 84e0ef4ef8 Cmd line: Ensure that -swap-buttons takes priority over Registry 2020-01-19 17:09:24 +00:00
tomcw 045d7b6509 Config: Input: Added 'Swap 0/1' toggle for swapping buttons 0 & 1 2020-01-18 19:06:06 +00:00
tomcw ddbc1a8aa9 ProcessCmdLine()
. Display MessageBox with all unsupported commands that were passed in.
. MessageBox yes/no response will either continue or exit AppleWin.
Changed -left-control-alt-buttons to -left-alt-control-buttons (for consistency with -right-alt-control-buttons) (#743)
. The MessageBox will now confirm whether you typed it correctly or not.
Fixed DHIRESON/OFF typo in comment!
2020-01-18 16:47:20 +00:00
tomcw 29c0f1e4f0 Cmd line support for remapping button0&1: (#743)
. -left-control-alt-buttons : l-ctrl=button0, l-alt=button1
. -right-alt-control-buttons : r-alt=button0, r-ctrl=button1
. -swap-buttons
2020-01-07 22:04:37 +00:00
tomcw 087616db29 Fixed Coverity 'High Impact Outstanding' issues:
1489113
1489111
1489105
1489096
1489093
1489092
1486059
1486055 (false positive)
1486054
1486051 (false positive)
1486050
1486047 (false positive)
1486043
1446684
2020-01-04 17:43:20 +00:00
tomcw edf65762cd CardManager refactor:
. replaced most GetObj() with GetRef()
. so dynamic_cast'ing to a reference now (instead of a pointer)
2020-01-04 13:58:59 +00:00
tomcw d3faae69fb CardManager:
. added GetRef(), which can throw a std::runtime_error
. NB. dynamic_cast for a reference will throw a std::bad_cast error on failure
Added try/catch around main VM restart loop
. split the loop into ProcessCmdLine(), GetAppleWinVersion(), OneTimeInitialization() RepeatInitialization() & Shutdown()
. catch std::runtime_error & std::exception
2020-01-04 12:32:13 +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 4d12a23c68 Make soundtype default to WAVE (not NONE)! (#355) 2019-11-24 15:57:33 +00:00
tomcw 97e73c632d Full-speed: new VideoGetVblBarEx() required when called from main loop 2019-11-11 19:55:46 +00:00
tomcw 20b8515b7b Full-speed: Only redraw video screen during VBl (support VBl in full-speed) 2019-11-10 23:52:29 +00:00
tomcw d4e01643fa Mockingboard: improved sound-buffer updating
. Changed to 6522.TIMER underflowing at 0x0000 -> 0xFFFF (#652)
. Changed MB_Update() to be based on cycle delta (was TIMER1 interval)
  . this improves support for small 6522.T1C interval
  . removed MB_GetFramePeriod()
  . removed overly-complex dual-timer support
. Replaced MB_EndOfVideoFrame() with MB_PeriodicUpdate()
2019-11-10 15:52:07 +00:00
tomcw 4ad0923399 Fix video tearing by only updating during the Apple II VBL (#711) 2019-11-03 15:05:28 +00:00
tomcw df4ed7b964 Added new cmd-line switch: -model <apple2|apple2p|apple2e|apple2ee>. (Fixes #689) 2019-10-12 18:07:51 +01:00
tomcw ad9dd28942 Added new cmd-line switch: -clock-multiplier. 2019-10-12 16:40:36 +01:00
tomcw dc8a22169e Added new cmd-line switch: -s7-empty-on-exit. (Fixes #692) 2019-10-12 16:01:55 +01:00
tomcw 7265dee506 Fixes:
. loading disk state (v5)
. string append bug introduced in 'char* to std::string' PR #687
2019-10-06 16:39:43 +01:00
tomcw 31b78aa09a HDD: Fixed not being able to enable HDDs - regression introduced at 506a52f359 2019-10-05 16:56:38 +01:00
tomcw 660c75617b Merge branch 'strings' of ssh://github.com/audetto/AppleWin into audetto-strings 2019-09-15 20:45:05 +01:00
tomcw 506a52f359 Refactor slots & allow empty slots for s1(printer), s6(disk2)
. NB. can't empty s3(uthernet) yet
2019-09-15 20:37:20 +01:00
tomcw 94556b5eaf SSC: Added support for '-s2 empty' to remove SSC from slot-2 (#668) 2019-09-09 22:12:51 +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
Andrea Odetti be476f9a9c Fix a couple of issues around std::string.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2019-09-07 18:51:07 +01:00
Andrea Odetti dced4793b7 Next iteration of the string project.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2019-09-07 10:16:51 +01:00
Andrea Odetti d5890e8356 Replace some char * with std::string. 2019-09-06 17:34:25 +01:00
tomcw 05f86f3e59 Changed _snprintf() to StringCbPrintf() (#268) 2019-08-25 19:21:33 +01:00
tomcw 2f52206e1e Merge branch 'master' of ssh://github.com/beevik/AppleWin into beevik-master 2019-08-25 17:18:23 +01:00
tomcw e09cd21703 Added experiment code for DirectDraw & WaitForVerticalBlank() - #680 2019-08-25 17:07:08 +01:00
Brett Vickers 9e5e21b8c9 Prevent uninitialized value bugs and improve string safety.
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.
2019-08-09 13:38:50 -07:00
tomcw 7987883847 WOZ: Register .woz extension and improved logging for all extensions. Also updated DELREG.INF and help. (Fixes #671) 2019-07-28 17:13:39 +01:00
TomCh 4bc75093b8
Support (read-only) WOZ1/WOZ2 images (#544) (PR #653)
Supports:
- all "woz test images" v1.3 (WOZ1, WOZ2) are working, except 3.5"
- additionally: Frogger (spiradisc), Choplifter (not Enhanced //e!), Lode Runner, Marble Madness, Skyfox.
- woz images can be .gz or .zip compressed (ie. same as other supported images)
- save-state

Limitations:
- read-only, so WOZ images are forced to be write-protected
  . as a result, games that need r/w images won't work (Stickybear Town Builder, Wizardry)
- 5.25" only (not 3.5")
2019-07-05 23:01:19 +01:00
TomCh bd86088c59
Support 50Hz(PAL) (#648) (PR #658)
- Added Configuration GUI to include checkbox for "50Hz"
- Implicitly use PAL or NTSC base 6502 clocks depending on video refresh rate
- Added new -50hz and -60hz command line switches
- Updated save-state for video refresh rate

1.28.8.0: Updated version & history.txt
2019-06-28 21:34:34 +01:00
tomcw d6f8d4edd8 Rename sg_DiskIICard to sg_Disk2Card 2019-04-14 17:01:49 +01:00
tomcw 97ded90a1c Rename DiskIIInterfaceCard to Disk2InterfaceCard 2019-04-14 17:00:15 +01:00
tomcw aa1e4cab09 Remove redundant Initialize() 2019-04-09 18:13:05 +01:00
tomcw 4235f08f7a Remove the 'Disk' prefix from method names 2019-04-08 10:41:47 +01:00
tomcw e7d6eac04d Class-ify disk.cpp into DiskIIInterfaceCard 2019-04-07 14:22:05 +01:00