Commit Graph

143 Commits

Author SHA1 Message Date
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
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
tomcw
dad590b8c1 Bumped to 1.28.5.0 and updated History.txt
Updates for DHGR MIX (#633):
. Support new switch -rgb-card-invert-bit7 to invert bit7 for Dragon Wars.
  - Reverted DHGR MIX mode and AN2 off to invert bit7
2019-04-06 17:31:26 +01:00
tomcw
ffa41e35cc Added test cmd-line switch: -screenshot-and-exit <file.bmp> 2019-03-17 15:01:51 +00:00
tomcw
cd9a207bee Added cmd line switch (-altgr-sends-wmchar) to enable sending WM_CHAR for key presses, when AltGr is down. (Fixes #625) 2019-03-03 14:32:19 +00:00
tomcw
c3f0653bfa Added cmd line switch to disable vertical blend (#616) 2019-02-24 22:00:14 +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
TomCh
25c7c41b07
Reinstate support for old AppleWin 1.25 "Color (Standard)" video mode (#357) (PR #614)
Renamed this video mode to: "Color (RGB Monitor)"
Also renamed "Color (Monitor)" to "Color (NTSC Monitor)".

As for the colours: I've changed them from the original 1.25 colours. Instead I runtime-generate the colours from the NTSC code. See NTSC.cpp's GenerateBaseColors(). This shifts the same 4-bit pattern in, combining with NTSC color phase, until the colour stabilises. Then I average the next 4 RGB values to get the final colour. The reason for this is that we now have consistent colours between NTSC and this simplified rendering mode.

NB. The 2 greys (in GR,DGR,DHGR) are now the same RGB value.
2019-01-09 21:29:36 +00:00
tomcw
54fffdf25a 1.27.13: Bump version & update History.txt + help 2018-12-08 13:29:48 +00:00
tomcw
af899fa90a Added support for Apple II/II+ 2K video ROMs (fixes #205) 2018-11-19 22:15:04 +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