Commit Graph

1121 Commits

Author SHA1 Message Date
tomcw
a3666edf48 MB: read fix 2021-01-28 20:15:23 +00:00
Andrea
baad40f3b8
SpkrSetEmulationType(): simplify logic and remove unreachable code. (PR #919) 2021-01-20 21:30:34 +00:00
Andrea
cdf1cb9106
Remove usages of g_hFrameWindow and g_hInstance from core emulator files. And Resource related Win32 functions. (PR #915)
. Win32Frame: remove WM_USER_RESTART.
2021-01-19 20:37:43 +00:00
tomcw
81279904e2 Pravets: fix bug in ctor 2021-01-18 20:30:51 +00:00
tomcw
44fa610ef6 Pravets.cpp: convert to UTF8 to allow VS2019 to build 2021-01-17 22:21:33 +00:00
tomcw
5d46298dcc Mockingboard: support AY-3-8913 read 2021-01-17 19:51:25 +00:00
TomCh
daa0675694
Pravets refactor: move all specialisations into new Pravets class. (PR #914)
Mainly for keyboard & printer specialisations.
2021-01-17 10:48:06 +00:00
tomcw
fc3a0f57ce Win32Frame: Fixes for VS2008 2021-01-16 22:13:02 +00:00
Andrea
61db149eab
Move last remaining globals from WinFrame.cpp to class Win32Frame. (PR #913) 2021-01-16 21:57:28 +00:00
tomcw
440831179f Keyboard: improve illegal keycodes handling for II/II+ and clones. 2021-01-16 11:01:18 +00:00
tomcw
7d2ddb3556 Base 64A: support special F2 key via the Delete key (GH#912) 2021-01-14 21:32:59 +00:00
Andrea
816e22524f
VideoReinitialize(): remove default arg & refactor out common code (PR #911) 2021-01-13 22:02:48 +00:00
Andrea
6cffb30330
FrameBase: some changes to ease implementations (PR #910)
. simplify the interface FrameBase to make it easier to implement it for different cases (remove HDC and make parameters more explicit)
. remove functions which are only called on a Win32Frame (in which case a cast is guaranteed to succeed)
. otherwise there is the risk that every FrameBase implementation wants to add its own variants.
. FrameBase::FrameRefreshStatus() simplify implementation: pass all flags explicitly
2021-01-10 16:33:06 +00:00
Andrea
159cde7d64
Video & FrameBase: better split (PR #908)
* Video / FrameBase: move arch specific code to FrameBase.
* Video::Initialize & SetFrameBuffer.
Ensure initialization and SetBuffer can only happen in the right order.
* Video: move virtual functions to FrameBase.
With these changes all the virtual functions are in FrameBase and Video gets closer to be (only) the Apple ][ Video device.
* Move a few more functions from Video to FrameBase (snapshot related)
Now, the inclusion is one way with Video *not* including FrameBase.
* FrameBase::VideoRefreshScreen move Video related code to Video.
And only leave management to FrameBase.
2021-01-03 16:21:24 +00:00
Kelvin Lee
0139878dd7
x64 enabling (PR #747)
Here are a few changes to make 64-bit build possible.
The changes are mainly to use windows api in the correct way that works for both 32-bit and 64-bit builds.
2021-01-01 12:57:40 +00:00
Andrea
9d7aa7d309
Move VideoRedrawScreen() to Video. (PR #904) 2021-01-01 12:42:24 +00:00
tomcw
c7d9a780bb Minor tweaks + comment for GCC needing header file 2020-12-29 21:45:56 +00:00
Andrea
d0cd7ca090
WinVideo: share some generic code (PR #901)
* WinVideo: move some generic functions back to Video.

Introduce a new virtual function (VideoPresentScreen) to draw the video buffer to video memory.

* Move Win32Frame::VideoRedrawScreen() to FrameBase as it is generic.
2020-12-29 21:30:17 +00:00
Andrea
b226bdfd53
Small changes to improve compatibility with GCC. (PR #902)
* Fix GCC build.

1) do not fwd declare enums
2) include only base class header file IPropertySheet.

* DSInit(): make sure sound devices are cleaned before the 2nd call.

And use std::string to avoid need of memory management.
2020-12-29 21:17:03 +00:00
Andrea
6cf907f303
In Linux, save logfile to /tmp. (PR #900) 2020-12-29 21:13:35 +00:00
TomCh
3aa5750dcf
Make Video.cpp and WinVideo.cpp into a dependent class hierarchy (PR #898)
. class hierarchy: WinVideo IS_A Video (ie. WinVideo is a subclass of Video)
. GetVideo() singleton instance of WinVideo in AppleWin.cpp, exposed via Interface.h
2020-12-28 16:25:29 +00:00
Kevin Marty
3c6f0c1145
Add option to disable warning when PrintScreen key can't be captured (PR #891)
NB. Windows XP or higher
2020-12-27 19:21:46 +00:00
Andrea
b8296e6c9c
Frame.h: merge into Video.h. (PR #896)
. The functions GetFrameBufferXXX() have been moved next to g_pFramebufferbits.
2020-12-27 19:01:35 +00:00
Andrea
e27879ac99
Move interface into a class FrameBase. (PR #893)
. Move the Win32  implementation into Win32Frame.
2020-12-24 15:08:50 +00:00
tomcw
8d7d2b9647 VS2019: new debug/release configurations for v141_xp (#693)
. NB, the Microsoft SDK 7.1A doesn't contain dxguid.lib & ddraw.lib, so they are linked against these two dx libs that are already part of the AppleWin repo.
2020-12-20 18:44:25 +00:00
tomcw
97643e304f Fix build for missing include of Interface.h 2020-12-20 15:39:53 +00:00
Andrea
2d2ba86f4f
IPropertySheet: make it a standard C++ class with pure virtual functions (PR #892)
* Interface.h: ensure that functions in the interface are not exported by other header files.

This is generally harmless, except for the presence of default arguments, in which case the version with default arguments must come first.
To avoid the issue, these functions are only ever exported in the Interface.h header file.
2020-12-20 15:32:51 +00:00
tomcw
469f9ba807 Support disconnecting drives from DiskII Interface card: -d1-disconnected, -d2-disconnected 2020-12-12 20:49:46 +00:00
TomCh
1e35d4448c
Improved support for latch when drive is empty or disconnected (#864) (PR #870)
. NB. Not hooked up any way to configure the drive as disconnected (nor fixed the GUI to disallow inserting a disk).
2020-12-12 20:05:29 +00:00
tomcw
b1b441952b NTSC: removed unused typedefs 2020-12-12 19:17:59 +00:00
tomcw
954d7c1731 Cmd line: support -fs-height=nnnn starting in Windowed mode. (#876) 2020-12-12 18:23:23 +00:00
tomcw
0ddb1917aa SyncEvents: ensure MB & Mouse have removed their events for a restart 2020-12-12 17:46:36 +00:00
Andrea
30d3269fbf
Remove a few more Win32 memory functions. (PR #888)
CopyMemory, MoveMemory, FillMemory.
2020-12-12 11:09:14 +00:00
tomcw
50a0e81941 Rename ms_pWorkBuffer to m_pWorkBuffer (as it's no longer static) 2020-12-10 21:28:12 +00:00
Andrea
d2a34e1f91
Remove VirtualAlloc, VirtualFree & ZeroMemory. (PR #884)
. Allocation in Memory.cpp: keep VirtualAlloc of size=64KiB (alignment=64KiB) to ease debugging.
2020-12-10 21:08:15 +00:00
tomcw
86851d86e5 YamlHelper: minor change 2020-12-09 20:31:21 +00:00
Andrea
8304c5738f
Fix memory leaks in Yaml parsing (PR #886) 2020-12-09 20:24:36 +00:00
tomcw
65b8f5fdbf CardManager: small refactor 2020-12-09 20:19:49 +00:00
Andrea
0d741d0b9f
Fix memory leak in CardManager (PR #885) 2020-12-06 18:43:18 +00:00
Andrea
59294d9d72
Move CtrlReset() and ResetMachineState() to Utilities.cpp (PR #883) 2020-11-29 21:11:05 +00:00
tomcw
e2d7eb7406 Removed (the now) unused alarm.h 2020-11-29 17:39:52 +00:00
Andrea
7ca547479b
Move Windows related functions to Interface.h (PR #882)
This is not complete as header files from Windows/.. are still included in:

Keyboard.cpp
SerialComms.cpp
Joystick.cpp

But probably these are arch specific and will have to be completely reimplemented elsewhere.
2020-11-29 17:30:06 +00:00
Andrea
93346c215f
Cleanup types and include's to ease GCC compilation. (PR #881)
. Do not include alarm.h as it is not needed.
The code in alarm.h is not complete: all the extern functions are missing and different linkers might complain about this.

. Do not redefine some windows.h types in VICE/types.h as it becomes harder to keep them consistent.
Biggest problem is DWORD_IS_LONG as the best way to define it in linux 64 bit is as an int. Prefer to use StdAfx.h.
2020-11-29 17:22:50 +00:00
TomCh
5d90b64829
Use _stat64() to support file size >2G (PR #880) 2020-11-29 15:48:23 +00:00
Kelvin Lee
4c19069d8b Remove unnecessary conditional compile for _MSC_VER 2020-11-30 01:05:25 +11:00
Kelvin Lee
a7353aa7f1 Use _stat64() to support file size >2G
1. Newer VC runtime stat(), when using 32-bit file size, returns error
   if file size is >2G. For file existence check, using 64-bit file
   size is more accurate as files bigger than 2G would be reported as
   non-existing otherwise.
2. <sys/stat.h> is required for VS2013 or before.
2020-11-29 10:12:03 +11:00
Andrea Odetti
ed178d8b1c Move GetAppleWindowTitle() to Utilities.cpp as it is generic and useful to other archs. 2020-11-28 15:49:19 +00:00
Andrea Odetti
63e5c5c9ff Select a value of the Alpha mask that works at the same time in Windows and Linux (qt / sdl).
In Windows it does not seem to make any difference, so 0xFF is selected for maximum compatibility.
2020-11-28 14:13:20 +00:00
Andrea
3d70a9dd35
Some small changes to ensure code compiles with GCC. (PR #877) 2020-11-27 20:57:35 +00:00
Andrea
bbe88da787
AppleWin.cpp split (PR #875)
. Split AppleWin -> Core with the functionality really needed by the emulator.
. Split AppleWin -> Utilities for generic code not called by other emulator components.
. Split AppleWin -> CmdLine for the command line option parsing.
2020-11-26 21:50:06 +00:00
TomCh
6e166dfff6
Support NSC for Apple II/II+ via F8-ROM (#827 PR #873) 2020-11-25 21:57:34 +00:00
Andrea
c455488b50
Split Frame.cpp to WinFrame.cpp (PR #874) 2020-11-23 19:21:20 +00:00
tomcw
c79abb45eb Renamed DirectVideoInitialize/Destroy() to WinVideoInitialize/Destroy() 2020-11-21 21:13:21 +00:00
Andrea
2a7191f5ce
Split Video.cpp to WinVideo.cpp to remove most of the Win32 specific functions (PR #872)
. Moved DirectInput.cpp/h and WinVideo.cpp/h to a new "Windows" folder.
2020-11-21 20:57:56 +00:00
tomcw
8fbf09d1c7 Fixed minor Coverity issue (CID 1446646) 2020-11-21 17:05:02 +00:00
tomcw
d6a2339ff0 Coverity SA: Fixed the 2 new Impact=High issues:
. CID 1499553: UNINIT
. CID 1499560: OVERRUN (out of bounds access in CmdBookmarkAdd)
Fixed bug in CmdBookmarkClear() too.
2020-11-17 21:31:57 +00:00
tomcw
f35f1e7fda DiskII: only call CpuCalcCycle() at start of disk IORead()/IOWrite() routines 2020-11-14 14:54:39 +00:00
tomcw
6f38260b10 Renamed Applewin.cpp to AppleWin.cpp 2020-11-12 20:59:22 +00:00
tomcw
da383033a1 VS2008: fixed after recent include changes 2020-11-12 20:55:28 +00:00
tomcw
bd1d65ce4f Renamed Applewin.h to AppleWin.h across entire project 2020-11-11 22:12:39 +00:00
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
tomcw
9cc49af0dc VS2008 vcproj: added DirectInput.cpp/h 2020-11-10 20:47:25 +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
tomcw
e6e16a3c0b Removed NSC support for II/II+ models. (#827) 2020-11-02 21:41:02 +00:00
tomcw
1e43b331f3 RGB Card support: treat AppleColor card as an alias of SL7 (#851) 2020-11-01 16:39:53 +00:00
tomcw
fb0871672c RGB card support: (#850)
. removed the precondition for enabling the extra RGB DHIRES modes
. changed IOUDIS soft-switch so that it's for //c only
2020-10-31 16:10:18 +00:00
tomcw
e24436f7ec Fixed issue during TRIBU (cycle-accurate demo) if: Config->uncheck 50Hz & OK, but cancel emulator restart 2020-10-25 21:35:17 +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
TomCh
43455eb4fe
Improved determining path & filename when saving/loading a save-state (#691) (PR #849)
Whenever harddisks/disks are inserted (or removed) and *if path has changed* then:
. Then the internal save-state's path & filename will be updated to reflect the new defaults.
. LoadConfiguration(): Read the save-state pathname from Registry before harddisks/disks.

Also:
. CiderPress: only save pathname on OK.
. Refactored CPropertySheetHelper::BrowseToFile().
. Extended support for -d1,-d2,-h1, etc such that if the param is "", then it will eject/unplug the disk/harddisk.
2020-10-25 17:14:23 +00:00
tomcw
aa322dbd53 Fixed loading a save-state where both Phasor 6522's Timer1s are active (eg. DIGIDREAM demo) 2020-10-18 19:32:18 +01:00
tomcw
37009e287d Renamed enum: VT_COLOR_MONITOR_RGB to VT_COLOR_IDEALIZED 2020-10-17 14:26:33 +01:00
tomcw
a3f5989176 Idealized video: support Double-Hires-40 for FT DIGIDREAM demo 2020-10-17 12:31:44 +01:00
tomcw
4defaa80fb Help docs: updated for RGB card/monitor support 2020-10-15 21:41:14 +01:00
tomcw
cfe482cd52 NTSC: fix rare crash in NTSC_SetVideoMode() after a VM restart 2020-10-11 21:29:26 +01:00
tomcw
6f39869f8c Minor: make Spkr_DSUninit() static 2020-10-11 18:55:28 +01:00
tomcw
1a11c65d37 Replaced global g_CardMgr with a singleton object & GetCardMgr() call. (Fixes #843) 2020-10-11 17:34:44 +01:00
ThorstenB
b0b033da49
Source clean-up, portability and debugger fixes. (PR #842)
And fix two general issues:
- confusing behavior when entering the builtin (mini) assembler mode,
- and also fixes the "cl" (clear flag) command - which was documented, but did not work at all (due to an "interesting" command/syntax conflict...).
2020-10-11 17:14:03 +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
ThorstenB
7d7aa17a47
Debugger: minor clean-up: compiler warnings, unused variables etc (#840) 2020-10-01 19:55:29 +01:00
tomcw
b5739b862a Adjusted the Config PropSheetPage to widen the Video Mode's combo box.
Renamed a few globals & made static.
Removed a few VS2008 'int to bool' perf warnings.
2020-09-28 20:27:41 +01:00
Cyril Lambin
08458a9d29
Extended support for RGB cards (#819) (PR #837)
Video mode: "Color (RGB Card/Monitor)"
. RGB HGR rendering (no half-dot-shift, no vertical blend)
. RGB DHGR rendering
  - Color 140-mode is a real 140x192 mode with no color fringe (Video7 patent, shows that way on real hardware)
  - Mixed mode: correct transition for Color 140-mode <-> B&W (validated on a real IIc adapter.)
. Complete Féline support (eg. 2 distinct greys)
. Fixed Video7 SL7 inverse text
. Fixed DHIRES mixed mode detection
. NB. Prince of Persia will switch to B&W (560-mode) when going from HGR back to DHGR (same on real hardware).

Video mode: "Color (Composite Idealized)"
. Previously this was "Color (RGB Monitor)" (and before that, the AppleWin 1.25 "Color (Standard)")
. Now this mode does not support the extra RGB cards' video modes
2020-09-27 14:09:02 +01:00
tomcw
b9d80a0317 Save-state ANSI support: small refactor for new/delete char buffers (#838) 2020-09-25 21:25:46 +01:00
tomcw
09a5ac4761 libyaml supports UTF-8 and not accented ANSI characters - so convert to UTF-8 (Fixes GH#838) 2020-09-25 18:17:03 +01:00
Cyril Lambin
3e33d7f6d1
Added support for RGB cards & Video7 SL7 RGB extra modes (#819) (PR #826)
Currently only Apple Color Card and Video7 SL7 are supported.

The RGB card can be defined through the command-line:
-rgb-card-type: apple (default), sl7, eve, feline

The default text color can be modified when SL7 is selected. On the actual card this was defined by dip switches.
-rgb-card-foreground <color>
can be 6 (blue), 9 (amber), 12 (green) and white (15)

Details:
. Added RGB FG/BG Text + mixed GR mode
. Added Color Text80
. Added Duochrome HGR
. RGB card defaults to Apple Color Card + B&W text
2020-09-01 21:32:44 +01:00
TomCh
ef913fe827
Removed 65d02 and used the regular 65c02/6502 headers instead (PR #825)
Removed 65d02.h and reconstructed this code using a combination of existing 6502.h/65c02.h and extra C Pre-Processor macros to include (or omit) the extra heatmap functionality.

We still end up with a normal 65c02 instance and also a debug 65c02 instance, but both will derive from the same 65c02.h file (+ same for the 6502 normal/debug instances).

Also:
. Added cpu_heatmap.inl for the built-in debugger's read/write operations.
. Support CpuRead/Write() from Z80 to hook the heatmap r/w.
2020-08-31 10:03:29 +01:00
tomcw
06f8ccb384 MB false read of 6522: limit to only the no-PX variants 2020-08-22 16:06:26 +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
24e6b7c132 1.29.14.0 tweak:
. 50Hz, PAL Monitor: blank out stale pixel (ANSI STORY, end credits)
. Added new test switch: -video-mode=composite-monitor
2020-08-18 17:40:56 +01:00
tomcw
bcd8fcc726 Fixed multi-zip regression (numTracks was getting zeroed). (Fixes #824) 2020-08-17 20:24:53 +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
4d611c20d9 Added a few comment-refs to GH#763 2020-08-17 18:15:41 +01:00
TomCh
21b0fbf97a
Support for PAL killing color-burst during TEXT video mode (#763, PR #823)
tested with:
. AppleWin-Test repo -> Tests-Various.dsk (tests E, F)
. FT's ANSI STORY & TRIBU demos
2020-08-17 18:11:31 +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
225296635a Uthernet card: added support for Npcap for Win10 (#822)
. log the version of wpcap.dll (Npcap or WinPcap)
2020-08-16 17:05:49 +01:00
tomcw
3651ca0cb8 NIB disk image: added warning if any track's first D5-nibble isn't an addr prologue (#139) 2020-08-05 13:58:17 +01:00
tomcw
b93de29ff1 Fixed the 6502/65C02 false-read of 6522 issue for Willy Byte! (fixes #52) 2020-07-24 19:39:31 +01:00
tomcw
52ff9d5b99 Fixed MB looping sound after 'OK' in Configuration (#813) 2020-07-17 22:53:17 +01:00
tomcw
b35ba0b04a RESET: reset annunciators for //e and Base64A 2020-07-07 20:54:46 +01:00
tomcw
f1f16d4fc2 Minor tweaks for previous Base64A merge:
. added dedicated IsCopamBase64A() function
. added comments to identify Copam Base64A specific vars
. added some missing const keywords
2020-07-06 20:52:31 +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
6dd129532f Fixed mem leak after a VM restart. (Fixes #809) 2020-07-04 21:39:56 +01:00
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
951f7f5258 Minor: added missing static keywords 2020-06-28 10:25:59 +01:00
tomcw
9bf0cf98d4 Fixed crash in debugger's PrintGlyph() when restarting AppleII virtual machine
Fixed mem leaks for debugger's Font & Mem frame buffers
2020-06-28 10:18:59 +01:00
tomcw
60d54d6f3b Fix for 'IRQ occurring on last cycle of opcode' not always true. (Fixes #796)
. FT demo MAD2.DSK - original version now correctly crashes at start of full-screen scroller
. FT demo MADEF.DSK - graphics glitch on vertical edge where it transitions from GR to HGR mode
2020-06-27 19:29:29 +01:00
tomcw
e48ea095a3 Debugger: PrintGlyph() - removed magic numbers 2020-06-27 15:46:28 +01:00
Andrea
fe62271ef9
Some minor c++ correctness changes. (#803)
Added const, static forward declaration.
Removed some unneeded header files.
2020-06-27 14:32:09 +01:00
tomcw
42d265a25c Fixed timing for 6502 opcodes: rol abs,x; lsr abs,x; ror abs,x. (Fixes #801) 2020-06-19 19:40:23 +01:00
Cyril Lambin
af9568cbbf
Improved debugger video performance (#800)
Removed very slow BitBlt() GDI calls in PrintGlyph() - now 18x faster in Release config!
. Replaced GDI call FillRect() with new FillBackground()
. Added missing bitmap declarations in GetDebuggerMemDC()
Fixed AdditionalIncludeDirectories for Debugger source files
2020-06-17 21:56:35 +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
f491bb19cd Improved fix for 80eb330
. During init: only need to call IoHandlerCardsOut() when loading save-state
. MemInitialize() -> MemReset() -> ResetPaging() which always inits memmode
2020-06-08 22:06:17 +01:00
tomcw
6d85c1b6bd NSC: Reset NSC on power-cycle. (Fixes #751) 2020-06-08 21:11:12 +01:00
tomcw
80eb33012f Fixed an edge case when switching from IIe to II+, and the Mockingboard wasn't visible in memory.
. Due to INTCXROM still being set and it not being excluded when in II+ mode.
. Fix is to reinit memmode on restart and only check INTCXROM if IIe or above.
2020-06-07 18:25:34 +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
f238be27e8 Use SetCursor() to busy when loading state file. (Fixes #781)
Fixed typos in dbg-bookmarks.html.
2020-06-03 20:26:06 +01:00
tomcw
f801655b23 Debugger: DrawFlags() - refactored to remove unused 3rd param 2020-05-30 14:41:14 +01:00
TomCh
037c338303
Debugger: Extend 'tf' command to add cycles for trace (#783) (PR #793)
Also don't call DrawFlags(), speeding up tracing by 10 times.
Authored-by: Nick Westgate
2020-05-30 14:12:36 +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
cca3ecd436 Full-speed: fix for occasional speaker clicks 2020-05-23 22:34:15 +01:00
TomCh
a8671f7a6a
Debugger: Extend 'cycles' command to do (partial) timings relative to a user-specified instruction (#787) (PR #789) 2020-05-23 18:40:12 +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
michaelangel007
2b9adac338 Debugger: 2.9.1.0 Bookmarks now have their own indicator 2020-05-19 08:37:15 -07:00
michaelangel007
dfbb63934c Debugger 2.9.0.18 2020-05-19 08:29:23 -07:00
michaelangel007
0c0e2f6bdd Debugger fixes for 2.9.0.16 and 2.9.0.17 2020-05-19 08:28:44 -07:00
tomcw
58df8ea1e6 MB/SSI263 - alt logging via LOG_SSI263B 2020-05-10 18:21:34 +01:00
tomcw
61a3f06172 MB/Phasor: SSI263 - improved save-state for different speech cards' IRQs 2020-04-26 18:07:38 +01:00
tomcw
358573a9db Fix for when joystick not connected (fixes #778) 2020-04-26 16:19:50 +01:00
tomcw
f201294451 MB/Phasor: SSI263
. extend for 6522 PCR CA1 input control=0, which sets IFR.b1 on phoneme complete
2020-04-26 10:10:39 +01:00
tomcw
389b6e6d23 Mockingboard: replicate 6522 I/O across entire $Cnxx I/O space
. SSI263.b7 not readable
. SSI263 writes also written to 6522 in low addr
2020-04-25 16:42:50 +01:00
tomcw
9f49820a8d Phasor: support SSI263 speech for Mockingboard mode (#777)
. Improved DEVICE_SELECT' I/O support (including Echo+).
. SSI263_Read() only for Phasor in Phasor mode.
. save-state: v6 (Phasor unit): phasor mode extended.
SSI263 (MB/Phasor) bug fix for when RESET/Power-cycle during phoneme playback.
Logging:
. improved for SSI263
. in CPU.cpp, added 'IRQ' / 'ISR-end'
2020-04-19 21:00:37 +01:00
tomcw
22806c6c59 Phasor: support both kinds of speech interrupts (#777) 2020-04-07 22:11:31 +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
tomcw
1739a84b0f Fixed CmdCursorSetPC command: (PR #775)
. Hitting "=" in the debugger should set PC to the current cursor address
2020-04-03 21:15:17 +01:00
tomcw
e6a8c75f6c Fixed J-Plus issue with -load-state 2020-04-02 23:39:18 +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
427cb9312b 1.29.11.0: Updated version 2020-03-27 20:31:06 +00:00
tomcw
ec8e758c79 Custom ROM: minor refactor 2020-03-26 22:16:00 +00:00
tomcw
3659603228 Added cmd line arg -rom <file> for 12KB & 16KB roms (#771) 2020-03-25 23:05:02 +00:00
tomcw
c204783816 MB/6522: IER doesn't start/stop timers 2020-03-07 18:08:50 +00:00
tomcw
ef4ee4ed16 Fixed 6522.T2 interrupt for Lancaster (#765) 2020-02-29 18:48:46 +00:00
tomcw
2f9ba13216 Fixed warning when LOG_DISK_ENABLED isn't defined 2020-02-23 13:23:48 +00:00
tomcw
b84bb97aa1 Disk logging: Improved info & formatting for DumpTrackWOZ() 2020-02-23 13:19:38 +00:00
tomcw
3dc0aae5b2 Removed assert & added repro comment 2020-02-22 12:04:13 +00: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
fc8753501f 1.29.10.0: Updated version 2020-02-13 19:39:35 +00:00
tomcw
ad599680d2 Small refactor for WOZ2 write track 2020-02-11 21:29:27 +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
TomCh
4956957ca1
Write support for WOZ1/WOZ2 images (#756)
Also:
- Allow creation of a blank (WOZ2) image
- multi-zip support extended to scan for the first valid image (useful for most woz-a-day zips which have at least 2 entries and were previously failing)
2020-02-09 21:23:15 +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
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
53342d5550 Speed control using Ctrl+n: ignore if ALT is pressed. (Fixes #749) 2020-01-18 17:15:54 +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
78337c06bb WOZ: Removed version check on INFO section 2020-01-14 20:32:46 +00:00
tomcw
1e57ad7464 DiskII: data latch returns a rand() value when no disk is in drive. (Fixes #748) 2020-01-12 22:41:40 +00:00
tomcw
68eb7ea1e1 Debugger: Added new 'cycles <abs|rel>' command to show cycles as absolute or relative.
. removed this functionality from 'videoinfo'
2020-01-11 17:38:00 +00:00
Andrea
af720f7352 Correct way to clear a std::string. (PR #723) 2020-01-09 22:12:51 +00:00
tomcw
40522204ad Joystick: support redefined button0/1 keys when not using keyboard for joystick 2020-01-09 22:04:26 +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
0f473d44b6 VS2019: include <stdexcept> for std::runtime_error 2020-01-06 21:08:00 +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
tomcw
c280d43e75 DiskImageHelper: small refactor 2020-01-02 21:01:10 +00:00
tomcw
8ec8fa6c5b Debugger: Correctly repaint AppleII screen when showing it from debugger. (Fixed #746) 2020-01-02 20:49:07 +00:00
tomcw
b37095715f Save-state: refactor: added a LoadMemory() specialisation for vector<BYTE> 2019-12-31 12:52:47 +00:00
tomcw
a28803cbf9 WOZ: Support large tracks (fixes #745) 2019-12-31 12:07:45 +00:00
tomcw
183ec2bc8c WOZ: Alternate fix for Wasteland (#733)
. apply extraLatchDelay on the last bitCell (if there's a latchDelay)
Debugger: Extended 'videoinfo' command to show cycles as absolute or relative.
2019-12-30 19:52:49 +00:00
tomcw
960af9bda0 MB: Moved MB_StartOfCpuExecute() to Snapshot_LoadState_v2(), since it's only needed there 2019-12-24 13:58:20 +00:00
tomcw
e03b68b7f0 MB: removed redundant g_n6522TimerPeriod variable 2019-12-24 13:19:35 +00:00
tomcw
8567f0a651 MB: include 1-cycle 65C02 opcodes 2019-12-24 12:51:43 +00:00
tomcw
75bc648f01 1.29.7.0: Updated version, History.txt and Help 2019-12-20 15:23:54 +00:00
tomcw
7eee2467c5 Disk2: DumpTrackWOZ() - extended to start each line with bitOffset 2019-12-20 12:49:02 +00:00
tomcw
418687e3d8 Debugger: 'cycles' now shows step-cycle-count (before was abs cumulative cycles) (Fixes #737)
And fixed single-step to only UpdateDisplay() once.
2019-12-20 09:15:24 +00:00
tomcw
82f6bf35a5 Debugger: GR/HGR/DGR/DHGR cmds should honour the MIXED mode. (Fixes #740) 2019-12-19 20:45:55 +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
d2010860ef Debugger: refactor common code into GetTargets_IgnoreDirectJSRJMP() 2019-12-09 21:00:58 +00:00
tomcw
87677ed4c3 Debugger: In _6502_GetTargets() removed the bool bIgnoreJSRJMP parameter. 2019-12-09 20:42:16 +00:00
tomcw
f0e840f8e0 Debugger: Support BPMR for JMP (abs) and JMP (abs,x). (#451) 2019-12-09 19:13:24 +00:00
tomcw
b1316dc3da Debugger: Fixed regression at prior commit dd274bc000 for bpm addr16 not triggering.
. Extended debugger regression tests to catch this (and test many other variants).
2019-12-09 16:27:13 +00:00
tomcw
ba7a4005b0 DiskII: fixes for Wasteland for both .nib & .woz images (#733) 2019-12-08 16:23:29 +00:00
Andrea
6af3b0b028 Color (RGB Monitor): speed up 'Pure CPU MHz (video update)'. (PR #730) 2019-11-28 22:06:34 +00:00
tomcw
dd274bc000 Debugger: BPMR|W - ignore next opcode's fetch address as a candidate for memory trap address (#451) 2019-11-27 22:14:16 +00:00
tomcw
4d12a23c68 Make soundtype default to WAVE (not NONE)! (#355) 2019-11-24 15:57:33 +00:00
tomcw
7d38b1ba38 CPU save-state: added 'Defer IRQ By 1 Opcode' (v5) and comments for why the other state doesn't need saving 2019-11-18 15:08:59 +00:00
tomcw
b82de931a1 Fixed 6522 timer interrupt which was occurring 1 cycle late (#711) 2019-11-17 12:26:14 +00:00
TomCh
d1b595f7bd
Fix for "Mad Effect 1&2" demos (PR #725)
. 6502 interrupt delays 1 opcode when interrupt occurs on last cycle of opcode (#724).
. Only 1-cycle delay for VF_TEXT & VF_MIXED mode changes (#656).
NB. Mad Effect 1 still has a bit of flicker on Space Invader (left edge)
2019-11-16 23:49:21 +00:00
tomcw
97e73c632d Full-speed: new VideoGetVblBarEx() required when called from main loop 2019-11-11 19:55:46 +00:00
tomcw
3c6d5d1e76 Phasor: fixed noisy playback for AE's player. (Fixes #659) 2019-11-11 17:35:10 +00:00
Andrea
d6d76ae6bc Memory fix for struct ImageInfo (PR #715)
ImageInfo is not a POD and cannot simply be initialised with ZeroMemory()
. the std::string constructor must be called.
. ImageInfo: simplify code using new / delete vs VirtualAlloc
Also fixed mismatching new / delete [] reported by valgrind
2019-11-11 14:09:29 +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
eb59c52dc4 Mockingboard: Fix initial fast (weird) music playback issue (#711) 2019-11-03 21:37:55 +00:00
tomcw
4ad0923399 Fix video tearing by only updating during the Apple II VBL (#711) 2019-11-03 15:05:28 +00:00