Commit Graph

153 Commits

Author SHA1 Message Date
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
tomcw
f9b7d9326e Fixed Coverity 'High Impact Outstanding' issues:
CIDs in main code:
1446691
1446688 (false positive)
1446672 (false positive)
1446643
1446642
1446641
1446635 (false positive)

CIDs in debugger:
1472410
1446728 (false positive)
1446684
1446673
1472409
1446693
1446692
1446726
1446687
1446685
1446683
2018-11-06 19:13:28 +00:00
TomCh
13c393624b
Apple II original: default to 48K (ie. no Language Card) (PR #592)
Added support for #590:
* Changed Apple II original to default to no LC
* Added new cmd-line switch: -s0 <languagecard|lc>
* Changed so when LC is in slot-0, it now use Apple II+'s F8 (auto-start) ROM
2018-11-04 15:07:46 +00:00
tomcw
034337cb28 Saturn: Change cmd-line to -s0 <saturn|saturn64|saturn128> 2018-10-27 18:49:50 +01:00
TomCh
46274d4d1c
Apple II: Language Card and Saturn support for slot-0 (PR #589)
Support for #408:
* added slot-0 LC and Saturn 128K for Apple II and II+
* added save-state support
  - for slot-0 LC/Saturn, save the LC state in the slot-0 card, not the //e MMU; and switch to a new Apple2 unit ver2
* added g_Slot0, g_SlotAux
* added new LanguageCard.cpp/h to project and moved Saturn code into these new files.
* updated VS2013,2015,2017 projects
2018-10-26 11:23:30 -07:00
TomCh
53d1d04988
DiskII: Support partial nibble reads for very close disk latch reads (#586)
Support partial reads for sequential accesses of 6 or less cycles.
- And 31 or less cycles when in "Disk Access Speed" = "Authentic Speed"
Save-state support for partial read cycle (Disk][ unit v3)
Added boot-time logging for Phasor1.dsk (ProDOS 1.1.1)
2018-10-02 22:08:54 +01:00
tomcw
396c55d8a3 Coverity: tackled a few CIDs (#470) 2018-08-12 12:48:08 +01:00
tomcw
140d505fe9 Keyboard:
. reverted default so that ALT+TAB is not hooked (#556)
. reverted default so that ALT GR's fake LCONTROL is not hooked (#558)
. added new switches: -hook-alt-tab and -hook-altgr-control to support hooking these key combo's (#556)
2018-07-29 22:34:09 +01:00
tomcw
97b07eaee4 Keyboard hook filter:
. Created a dedicated thread with message loop (#570)
HookFilter dll: Only call GetKeyState() if keycode is ESC (instead of every time)
DebuggerCursorUpdate(): reduce sleep from 10ms to 1ms
2018-07-15 21:00:01 +01:00
tomcw
c457241229 Keyboard:
. When in MODE_LOGO, don't pass WM_CHAR to Apple II keyboard (now consistent with WM_KEYDOWN)
. Small refactor for Apple II keyboard's WM_KEYDOWN handler
Move code for log init & done to Log.cpp
2018-07-15 15:38:37 +01:00
tomcw
881e51874b Fix for other apps having sluggish key response - fixes #569 2018-06-30 18:21:28 +01:00
tomcw
51669f36f3 Hook system keys: (#556)
. added -no-hook-system-key to prevent hooking system keys
. updated help
. HookFilter.dll: changed to directly send virtual key code
2018-06-16 10:24:05 +01:00
tomcw
4a0e93fe28 Added new -alt-enter cmd-line switch to allow configuration of Alt+Enter behaviour (#556) 2018-06-10 18:14:34 +01:00
tomcw
6b53adde55 SysKey hook filter:
. Also suppress ALT+SPACE
. PostMessage to AppleWin message-pump for WM_KEYDOWN, WM_KEYUP for these special key combos
. Add special any-key-down (AKD) handling for these special key combos
2018-05-28 17:27:38 +01:00
tomcw
19b90800cf Add hook filter for system keys (eg. ALT+TAB, ALT+ESC, CTRL+ESC) - #145, #556 2018-05-27 10:56:35 +01:00
tomcw
52e7d61c7e SSC:
. 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.
2018-04-22 14:37:59 +01:00
TomCh
a78f1e04da
SSC: Support for TX IRQ and other SSC updates (#552)
. 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
2018-04-08 17:37:26 +01:00
tomcw
419238bb54 Added cmd-line option: -s7 empty to remove the HDD Controller card from slot 7 2018-04-05 21:33:36 +01:00
tomcw
9be3864f32 Added cmd-line options -h1,-h2 for specifying HDDs - #398 2018-04-02 12:38:05 +01:00
tomcw
93f57c0970 Logging: allowing logging of PrintScreen even when switch is used to suppress MsgBox 2018-02-28 21:23:20 +00:00
tomcw
d4a3c5c28f PrintScreen key: Improve UI feedback when any of the 3 registrations fails & log failures (fixes #547)
Also tweak to full-speed: consolidating 2 calls to DiskII module into 1 call.
2018-02-27 21:07:16 +00:00
tomcw
6c031e7930 Disk II: changing 'enhancedisk' doesn't cause a restart + added accessors (fixes #546) 2018-02-25 15:09:25 +00:00
Andrea
70540bd6dc Fix the following errors reported by VS2017 Code Analysis. (#414)
* Fix the following errors reported by VS2017 Code Analysis.

applewin\source\applewin.cpp(761): warning C6385: Reading invalid data from '"Disk Image"':  the readable size is '11' bytes, but '21' bytes may be read.
applewin\source\debugger\debug.cpp(6624): warning C6386: Buffer overrun while writing to 'sName':  the writable size is '31' bytes, but '32' bytes might be written.
applewin\source\debugger\debugger_display.cpp(3715): warning C6053: The prior call to 'strncpy' might not zero-terminate string 'sText'.
applewin\source\log.cpp(42): warning C6053: The prior call to '_vsnprintf' might not zero-terminate string 'output'.
applewin\source\debugger\debug.cpp(2759): warning C6011: Dereferencing NULL pointer 'pFont'.
applewin\source\debugger\debugger_symbols.cpp(243): warning C6053: The prior call to '_tcsncpy' might not zero-terminate string 'pText'.
applewin\source\diskimagehelper.cpp(1132): warning C6053: The prior call to '_tcsncpy' might not zero-terminate string 'pszExt'.
applewin\source\diskimagehelper.cpp(1141): warning C6053: The prior call to '_tcsncpy' might not zero-terminate string 'szFilename'.
applewin\source\parallelprinter.cpp(242): warning C6053: The prior call to '_tcsncpy' might not zero-terminate string 'g_szPrintFilename'.

The one about RegSetValue(), according to Microsoft

https://msdn.microsoft.com/en-us/library/windows/desktop/ms724922(v=vs.85).aspx

the last argument cbData is ignored, so I set it to 0, as in some cases was anyway wrong (see "DiskImage").


Signed-off-by: Andrea Odetti <mariofutire@gmail.com>

* Use sizeof() rather than hardcoded value.
Fix one more case on non terminated string.


Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2018-02-24 15:24:37 +00:00
Andrea
6051bc55d0 Changes to ease code compilation in gcc. (#541)
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.
2018-02-24 15:12:40 +00:00
tomcw
b324f43a15 Added more logging when Apple2 Tyoe changes 2018-01-26 11:03:44 +00:00
tomcw
4a69ba8a97 git merge --squash GH125-ProDOS-Format. Fix for disk formatting #125, #196, #338:
. .dsk / .nib images
. ProDOS format / DOS 3.3 init
. authentic / enhanced disk access speed

For zero-length files, resize to the complete file size when first opened (#506)
. Support both .dsk and .nib

Created a new class FormatTrack to encapsulate the new track formatting logic

Improved precision of 'authentic' drive mode's spin emulation (#125)

Save-state: (save-state DiskII unit v2)
. support Format Track state
. save DiskLastCycle

DenibblizeTrack(): added some debug asserts and comments

Updated for VS2008/VS2013/2015/2017 projs & remove dependency on ddraw.lib for VS2013/2015

Updated disk logging:
. Moved all LOG_DISK_xx macros to new DiskLog.h (since shared by Disk.cpp and DiskFormatTrack.cpp)
. For write nibble: option to log cycle count & sync byte count
. For written track: option to log gap1/2/3 and track size
. For disk latch r/w: option to log when D5AA96 detected

Other:
. Debugger: Fix CD cmd to support absolute paths (#505)
2018-01-14 18:01:22 +00:00
tomcw
5505ff696f HDD error wasn't cleared on a reset or power-cycle - fixes #515 2017-12-03 21:05:05 +00:00
tomcw
a551af020d Fix so that on emu restart, mousecard state is now reset (#514) 2017-11-29 06:56:14 +09:00
tomcw
018e338612 Frame.cpp: move header constants into Frame.cpp and expose with accessor functions 2017-10-11 17:38:36 +01:00
tomcw
9616df504e Full-screen: Added Config UI checkbox for the display of subunit status (ie. keyboard caps, disk activity, paused/stepping state) - #224 2017-10-02 22:22:26 +01:00
tomcw
c5bbf9a2c2 Cmd-line: Remove old -fs8bit switch 2017-09-30 09:47:48 +01:00
tomcw
3cf50d01ba Cmd-line: support new -fs-height=<best|nnn> (#488) 2017-09-29 20:33:30 +01:00
michaelangel007
2ec3255863 Add comment backlink to F.R. #469 2017-08-24 16:40:21 -07:00
michaelangel007
cb138c97d4 Bug #469 added command line switch to disable PrintScreen key capture 2017-08-24 16:33:03 -07:00
tomcw
dd510801fc Fix strange speaker clicks when changing configuration - DirectSound wasn't being uninitialised on a restart (fixes #456) 2017-08-10 22:10:59 +01:00
tomcw
1c145ff154 1.26.3.0: Apply bounds and error checking for the joystick configuration (fixes #434) 2017-07-03 21:48:21 +01:00
tomcw
eb21f34ace Fixed not being able to select Pravets82, improved code robustness & improved UX when loading an unsupported Apple2Type config (fixes #415) 2017-05-08 22:32:01 +01:00
tomcw
739afea01a Remove redundant code relating to SetCharseType() and g_nCharsetType 2017-04-30 18:50:27 +01:00
michaelangel007
7f88196d3e Cleanup formatting 2017-04-27 14:59:41 -07:00
michaelangel007
f8f881d41a Fix missing brace for SATURN 2017-04-27 14:51:34 -07:00
michaelangel007
d3e620fcd4 Add command line to init Saturn memory size 2017-04-27 14:50:15 -07:00
michaelangel007
cd88c40719 Save extended Language Card memory type if RAMWORKS 2017-04-27 14:03:17 -07:00
tomcw
124eca4546 Debugger: Allow MODE_DEBUG and MODE_STEPPING states to persist across an F2 ResetMachineState() call (#217) 2017-04-22 20:42:42 +01:00
tomcw
1bd85e123e SSC: Added -modem switch (for dcd,dsr,dtr) and removed invert switches (#386) 2017-03-23 21:36:26 +00:00
tomcw
abd99d109e SSC: Experimental support for 6551's status bits: DCD and DSR via -dcd[-invert] and -dsr[-invert] args (#386) 2017-03-19 21:44:20 +00:00
tomcw
6063d8e96f SSC: Experimental support for 6551's DTR via -dtr or -dtr-invert args (#386) 2017-03-18 13:56:18 +00:00
tomcw
743add80f0 Improve ContinueExecution() whilst MODE_STEPPING:
. GetKeyState(VK_SCROLL) is slow, so only call periodically
. Account for g_nCpuCyclesFeedback before calling SpkrUpdate()
2017-02-26 13:45:06 +00:00
tomcw
0b6c5bbb91 Support for #384:
. Debug 'G(o)' cmd now defaults to normal speed (and precise video updates)
. New debug 'GG' cmd enables full speed (and periodic video updates)
. Single-stepping (normal or full speed) now routed through ContinueExecution()
. Removed Cpu6502()/Cpu65C02() check for debug breakpoints
. Removed the (undocumented) SHIFT+F7 feature to exit debugger for 'normal speed breakpoints'
. Removed the g_bDebugNormalSpeedBreakpoints variable
2017-02-25 22:32:46 +00:00
Kelvin Lee
56570960ef Renamed g_restart to g_bRestart. 2016-12-29 12:10:25 -05:00
Kelvin Lee
e0cac15ede Renamed global variable restart to g_restart. Made it proper bool. 2016-12-29 12:10:03 -05:00
tomcw
421d9a77f6 VideoRefreshScreen(): Use default args instead of passing 0 for arg0 2016-11-06 14:33:14 +00:00
tomcw
d9246c0841 Save-state: support TK3000 clone 2016-10-23 10:35:18 +01:00
tomcw
86ba0b0407 Apply fixes and enhancements to PR #285 (Support for TK3000 //e) 2016-10-22 23:20:23 +01:00
tomcw
30160583cb For full-speed: update every 16ms of real-time (close #351) 2016-09-22 22:34:16 +01:00
tomcw
0a7a0e9e5c Fixed #348 (>800KiB HDD images not mountable) 2016-09-19 22:14:57 +01:00
tomcw
1d34497d2d Speed-up booting AZTEC.DSK (#347) 2016-09-18 15:56:22 +01:00
tomcw
efcf06c285 Removed unsupported PC speaker sound types 2016-09-07 22:20:15 +01:00
tomcw
31ba57b7c7 Debug logging: add log message for time from boot until first key read (for AZTEC.DSK).
+ Remove an unused var.
2016-09-06 21:38:00 +01:00
tomcw
3cf54e6fa3 Calculate full-screen scale using borderless dimensions & allow more than 2x scale 2016-07-25 21:19:00 +01:00
tomcw
02b0d7419a Fixed screen update when running at full-speed
. Specifically IBIZA.DSK demo which streams data from the disk throughout (ie. so runs at full-speed all the time)
. Update the screen every frame, but only if video memory has changed (check AZTEC.DSK loading time)
. NB. When running at full-speed, then 6502 emulation doesn't do cycle-accurate video updates
Fixed crash that could occur when switch video mode (F9) when running at full-speed
. Occured when g_nVideoClockVert was >= 192
2016-07-23 22:53:29 +01:00
tomcw
04c9d09e38 When FullSpeed: don't do cycle-accurate graphics update
. means that disk accesses (eg. loading) is much quicker
Correct naming of video modes (in UI and code)
Pixel adjust for NTSC B&W and Color video modes to align with other video modes
2016-05-17 22:07:27 +01:00
tomcw
c4dfbaf988 -load-state: set CWD to path of .aws.yaml file 2016-04-20 22:46:12 +01:00
tomcw
749e1514bd Use correct resource BMP for each model's character set (Apple ][, original //e and Pravets)
Also resized the Pravets BMPs to be either 256 or 512 pixels in height.
2016-04-12 23:21:05 +01:00
tomcw
e98de27039 Manual merge from master @ c798157 2016-03-21 23:48:02 +00:00
michaelangel007
82fc84ccd2 Change SetCurrentImageDir() to return true/false 2015-01-10 16:56:47 -08:00
michaelangel007
801fa4db03 don't call unused VideoEndOfVideoFrame, directly call VideoRefreshScreen(0) 2015-01-03 11:42:00 -08:00
michaelangel007
88a7ab7b0b Fix video configuration initialization order not being applied for 50% scan lines 2015-01-02 02:45:47 -08:00
michaelangel007
75c5cc8151 Fix broken MIXED mode, fix Debugger view output, change main loop to call VideoRefresh() 2015-01-01 11:48:59 -08:00
michaelangel007
28cd63fc84 Fix: 50% Half Scan Lines wasn't being applied on intial setup 2015-01-01 09:59:09 -08:00
michaelangel007
1fc2c0f2b2 Remove most of the old unused Video rendering functions 2014-12-31 17:57:57 -08:00
michaelangel007
2dedaf0158 NTSC: fix Debugger View Output commands: TEXT, HGR, etc 2014-12-31 17:15:36 -08:00
michaelangel007
e116014742 First pass of NTSC integration 2014-12-31 14:13:36 -08:00
tomcw
8c019bcd35 More main-loop reduction & removal of redundant globals.
Fixed JoyUpdateButtonLatch() to debounce in 5mecs instead of 5secs!

SpkrToggle() was using redundant global ('cyclenum') when using the PC speaker.
. I reworked the code (as it looked out-of-date),
    but probably better to just remove all the PC speaker support.
2014-09-14 21:23:54 +01:00
tomcw
1f892a27d4 Simplified main-loop a bit more, and removed more globals from AppleWin.cpp 2014-09-14 16:12:55 +01:00
tomcw
bc45812f4e Simplified and moved main-loop video update logic into Video.cpp.
Removed complex case below for:
. VideoHasRefreshed(), 'anyupdates'
. VideoCheckPage()

Detailed notes below.

---

Video updates in ContinueExecution() loop:

'anyupdates' gets set if there were any page-flip(s) in last ~17030 cycles:
	anyupdates |= VideoHasRefreshed();
ie. VideoRefreshScreen() was called outside of this loop.

If there's been a call to VideoRefreshScreen() outside of this loop,
  and then the video framebuffer gets written to, ie. VideoApparentlyDirty() returns TRUE,
then don't call VideoRefreshScreen() from this loop for 3 frames.
(If a VideoRefreshScreen() is called outside of this loop then restart the 3 frame count.)

So..
 if the game is flipping, the VideoApparentlyDirty() will return FALSE (since game writes to other framebuffer).
 if the game is not flipping, then VideoHasRefreshed() will return FALSE (since no flips occur).

Therefore this complex case above probably only arises at a boundary eg. when the game is transitioning between these 2 modes,
and so if the emulator does the very occasional screen update in this main loop, it is of no consequence.

(I guess this extra logic was to throttle video updates on very old slow machines)

---

VideoCheckPage(BOOL bForce) was called twice in main-loop:

UnexpectedPage if g_bVideoDisplayPage2 != SW_PAGE2

Once each time through the loop (ie. every 1ms), with bForce=0
	if UnexpectedPage && >500ms since last flip then VideoRefreshScreen()

Once each video frame (ie. ~17030 cycles) when not flipping, with bForce=1
	if UnexpectedPage then VideoRefreshScreen()

Basically this was all about supporting FullSpeed mode, and limiting the calls to VideoRefreshScreen().
2014-09-13 22:22:27 +01:00
tomcw
d1dddbe813 1.25.0.3: Restore MIP_FF_FF_00_00 as memory init default (see GH Bug#225) 2014-09-08 22:25:29 +01:00
michaelangel007
ce2f0b75cb Fix: SetCurrentImageDir() to always make sure g_sCurrentDir has trailing backslash 2014-09-03 17:14:06 -07:00
michaelangel007
807fcce1ef 1.25.0.2 Fixed: F12 Snapshot_LoadState() -> Snapshot_SetFilename() not keeping trailing backslash on path 2014-09-02 08:48:46 -07:00
michaelangel007
ae762762e7 #206 Based on FaceBook poll, changed memory initialization pattern to: MIP_FF_00_FULL_PAGE 2014-08-28 10:43:32 -07:00
michaelangel007
9b8151b12e #206 Based on FaceBook poll, changed memory initialization pattern to: MIP_FF_00_FULL_PAGE 2014-08-28 10:39:29 -07:00
michaelangel007
24e581ba2c Added: Ctrl-PrintScreen will copy the text screen (auto detect 40/80 columns) to the clipboard. 2014-08-25 08:35:43 -07:00
tomcw
cbdad2a02f Qualified all STL refs with std:: to get rid of the 'using namespace std' mismatch between the main code & debugger code 2014-08-14 20:29:01 +01:00
tomcw
6a26a95487 PCH refactor: remove non-system headers from stdafx.h 2014-08-13 21:30:35 +01:00
michaelangel007
50ed260710 #199 #215 Cleanup: "Confirm Reset" to "Confirm reboot" 2014-07-27 14:31:00 -07:00
michaelangel007
825b7cddcb #199 Added option to skip reset 2014-07-26 14:51:23 -07:00
tomcw
5d64ea5673 Merge branch 'master' of github.com:AppleWin/AppleWin 2014-07-20 10:30:21 +01:00
tomcw
a75555d21c Simplified ContinueExecution(): video refresh part. 2014-07-20 10:24:50 +01:00
michaelangel007
f4b09e1f8f Feature Request #206 Command line switch: -memclear # 2014-07-17 20:18:59 -07:00
michaelangel007
9ded7f0926 Cleanup: Removed unused variable: g_bResetTiming 2014-07-17 19:52:56 -07:00
michaelangel007
8090dd3933 Cleanup: Removed unused variable: needsprecision 2014-07-17 19:50:39 -07:00
tomcw
8637dfa7af Removed the _DEBUG-only experimental video modes (eg. Emboss, Psychedelic, etc) 2014-07-10 22:52:26 +01:00