Commit Graph

151 Commits

Author SHA1 Message Date
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
Andrea
8cc04e2b86
Cumulative changes required to enable / ease compilation in Linux with gcc. (PR #861)
Split MouseInterface to isolate DirectInput code.
Avoid overflow in platforms where RAND_MAX is a big integer constant.
Fix include files for gcc (where enums cannot be forward declared).
2020-11-10 20:33:55 +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
tomcw
1a11c65d37 Replaced global g_CardMgr with a singleton object & GetCardMgr() call. (Fixes #843) 2020-10-11 17:34:44 +01:00
TomCh
6125c2b12d
Support for synchronous events (PR #841)
Switched Mockingboard/6522 Timer interrupts & Mousecard's VBlank interrupt to use synchronous events.
This is a linked-list of ordered timer-based event, where only the head of the list needs updating after every opcode.
2020-10-11 16:08:05 +01:00
tomcw
59d0d5bdfa UI: Ctrl+F3/F4 will also show drive pop-up menu (#817) 2020-08-22 14:58:06 +01:00
tomcw
039ad8a547 Small refactor for app window's title 2020-08-17 19:26:06 +01:00
tomcw
221e35edc7 Changed app window's title to reflect NTSC or PAL for 'Color (xxx Monitor)' 2020-08-17 18:29:18 +01:00
tomcw
e69a54832c Added a comment for the leak fix 2020-08-16 18:44:21 +01:00
tomcw
caf90c427a Fixed GDI Object DC leak & crash when app window is minimised (#820) 2020-08-16 18:34:57 +01:00
tomcw
b35ba0b04a RESET: reset annunciators for //e and Base64A 2020-07-07 20:54:46 +01:00
Iván Izaguirre
36e318e344
Support 'Copam Base 64A' - a Taiwanese Apple II clone (#806) (PR #807)
. It's an Apple II plus clone.
. The 48K bank-switched Rom is controlled with AN0 and AN1.
. The character generation video Rom has two full character sets: English and German (F10 to switch).
NB. At the prompt, "TEST" runs the ROM self-test.
2020-07-06 20:24:16 +01:00
tomcw
6d85c1b6bd NSC: Reset NSC on power-cycle. (Fixes #751) 2020-06-08 21:11:12 +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
TomCh
21d16d3a0c
Auto-switch DiskII firmware to 13 or 16 sector depending on disk in drive-1 (#734) (PR #761)
. The auto-switch is done on each reset, or on inserting a disk at the start-up screen (MODE_LOGO).
. The Window's title include '(S6-13)' if DiskII card has 13-sector f/w.
. The debugger's 'disk info' cmd will show FW13 or FW16 depending on f/w.
2020-02-22 11:38:25 +00:00
tomcw
0f681de531 Fixed regression for CTRL+ALT+BREAK (where ALT wasn't recognised). (Fixes #752) 2020-01-26 11:57:40 +00:00
tomcw
53342d5550 Speed control using Ctrl+n: ignore if ALT is pressed. (Fixes #749) 2020-01-18 17:15:54 +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
tomcw
8ec8fa6c5b Debugger: Correctly repaint AppleII screen when showing it from debugger. (Fixed #746) 2020-01-02 20:49:07 +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
3264fd3ee9 Two fixes for the 'char* to std::string' PR #687 2019-09-15 21:26:40 +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
f5f60310c1 More std::strings.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2019-09-07 09:02:39 +01:00
Andrea Odetti
d5890e8356 Replace some char * with std::string. 2019-09-06 17:34:25 +01:00
tomcw
fe375534cf NTSC: Commit to the improved TV modes. (#650) 2019-08-31 15:02:32 +01:00
tomcw
bad963026c 1.29.1.1: test improved TV modes for #650. Use Ctrl-9 to toggle 1.29.1.0 and 1.29.1.1. 2019-08-30 21:58:03 +01:00
tomcw
bae7208852 Removed the old EXTEND_14M_VIDEO_BY_1_PIXEL rejected solution for #555 2019-08-29 21:38:00 +01:00
tomcw
2cc0f91fbf Minor: changed a REGLOAD() to REGLOAD_DEFAULT() 2019-08-29 19:19:47 +01:00
Michael "Code Poet" Pohoreski
9e3f7b0ffc
Merge pull request #679 from AppleWin/bug_678_toggle_speed
Bug 678 toggle speed
2019-08-27 08:53:09 -07:00
tomcw
af8257eefc Updated implementation to reflect my comment in #678. 2019-08-26 20:52:40 +01:00
tomcw
1ee2261c60 Improved comments 2019-08-24 12:35:59 +01:00
tomcw
b488961fca Removed comment 2019-08-24 12:11:09 +01:00
michaelangel007
5e9b8fe2ae Set Ctrl-0 Toggle Fastest/100%, Ctrl-3 Always fastest 2019-08-23 19:33:56 -07:00
michaelangel007
32b42b2aeb Add Ctrl-0, Ctrl-1, Ctrl-3 for #678 2019-08-23 08:46:43 -07: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
ec74b9de6b F2 now resets keyboard. (Fixes #639) 2019-04-16 21:24:32 +01:00
tomcw
d6f8d4edd8 Rename sg_DiskIICard to sg_Disk2Card 2019-04-14 17:01:49 +01:00
tomcw
249b15b02d Get rid of duplicate func 2019-04-09 19:29:58 +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
tomcw
8c7d45bd8e Fixed occasional flicker when changing video mode with F9. (Fixes #611) 2019-03-16 14:27:40 +00:00
TomCh
082b22d753
Support vertical blending for 'RGB (Color Monitor)' for hires (#616) (PR #624)
Support the old AppleWin 1.25 vertical blending for hires:
- extended Config dialog to include 'Vertical Blend' checkbox
- Persist 'Video Styles' to Registry
- new cmd line options to select this style & also select 'RGB (Color Monitor)'
- code refactor to support enum VideoStyle_e (and replaced g_uHalfScanLines with a bit in g_eVideoStyles)

Bumped version to 1.28.2.0.
2019-02-24 15:59:35 +00:00
tomcw
037adb7f98 Change Windows Subsystem to 5.01 for VS2013,VS2015,VS2017 to fix clipped window. (Fixes #571) 2019-02-14 21:55:38 +00:00
tomcw
d0f03fc90c Removed CTRL+F10 functionality to reveal mouse cursor (fixes #597) 2018-12-09 10:05:46 +00:00
TomCh
aa59c71847
Add support for PAL/European or custom 8K video ROMs (#596)
Added new cmd-line switch: -videorom <file> to replace the video ROM for the Enhanced //e.
- Support video ROM sizes of 4K, 8K and 16K (top 8K only).
- NB. The rocker switch is set to European video ROM.
F10 (for //e or Enhanced //e models) emulates the PAL //e's rocker switch (under the keyboard) to toggle between European or US video ROM.

Other:
- Fixed debugger's view of the AltCharSet soft-switch (it was showing the opposite state).
2018-11-17 16:29:17 +00:00
tomcw
14e0bb7b71 Added new switch: '-no-hook-alt' - used to prevent left/right ALT from emulating open/closed apple keys (#583) 2018-11-10 15:55:20 +00:00
tomcw
7d100a349b NTSC: Merge-squash from 'GH555-1-pixel' branch for the 1 pixel shift for 14M video modes (#555) 2018-09-09 13:56:55 +01:00
tomcw
e4bd6162c5 Refactor: move code for WM_CLOSE next to WM_DESTROY, and WM_KEYDOWN next to WM_CHAR 2018-07-31 18:17:42 +01:00
tomcw
898f30f08a Fixed save-state on exit not working if there was a VM restart (eg. config h/w change). Fixes #564 2018-07-31 18:06:53 +01:00