Commit Graph

192 Commits

Author SHA1 Message Date
Kelvin Lee 5a5d0e2df4
Debugger: Simplify console print (PR #1038)
. Simplify console display functions using StrFormat()
. Update TestDebugger that needs StrFormat() now
2022-02-17 22:12:04 +00:00
Andrea 48dd638d33
Synchronize Linux build. (PR #1037)
. remove OutputDebugStringA()
. push changes to StdAfx.h
. mention g_strSaveStatePathname in the error message for loading save-state
2022-02-14 20:37:18 +00:00
Kelvin Lee 9a3832084a
Simplify the common combination of sprintf() and OutputDebugString() (PR #1031)
- Update LogOutput() and LogFileOutput().
- Add StrFormat() to produce std::string out of snprintf() & add StrFormat.cpp to projects.
- Add PTRDIFF_T_FMT in parallel to SIZE_T_FMT to StdAfx.h, for completeness.
- In Log.cpp, changed to get timestamp using posix functions.
- Removed TCHAR usage throughout - simply use char.
2022-02-13 21:37:05 +00:00
michaelangel007 ae214a1b19 Debugger: Cleanup: Add note about magic number 200 2022-01-06 10:12:37 -08:00
michaelangel007 ca1bea3b97 Debugger: Add comment about DISK command 2022-01-05 15:41:47 -08:00
michaelangel007 7853c1cfcc Debugger: Cleanup 2022-01-05 08:54:54 -08:00
michaelangel007 98a4481c7d Debugger: 2.9.1.13 Added: CD now detects .. to change to the previous directory and chops the trailing sub-directory from the current path. 2022-01-04 23:37:06 -08:00
michaelangel007 2a5e156f5e Debugger: 2.9.1.12 Added: New commands HGR0, HGR3, HGR4, HGR5 to see pages /usr/bin/bash0, 0, 0, respectively. 2022-01-04 21:40:23 -08:00
michaelangel007 5e70f7949c Debugger: 2.9.1.11 Fixed: Right justify signed decimal values. 2022-01-04 11:21:42 -08:00
michaelangel007 f3c0e151ab Debugger: 2.9.1.10 Fixed: Immedate #80 was not showing -128 for the signed decimal value. 2022-01-04 11:20:54 -08:00
michaelangel007 6b11e24a28 Debugger: 2.9.1.9 Fixed: Immediate #0 was showing '#' prefix but not showing zero for the signed decimal value. Changed to show the signed decimal value only if non zero. 2022-01-04 11:20:08 -08:00
michaelangel007 18b4581099 Debugger: 2.9.1.8 Changed: Disassembly window now lists symbol labels and symbol target address from User2 in orange. 2022-01-04 09:28:33 -08:00
michaelangel007 17686df3df Debugger: 2.9.1.7 Added: Extended SYM command to auto-generate symbol names when reverse engineering. NOTE: These symbols will be placed in User2. 2022-01-04 09:27:10 -08:00
michaelangel007 ba9388d1d8 Debugger: 2.9.1.6 Added: Branch instructions now show target address 2022-01-03 22:48:12 -08:00
michaelangel007 65ab105d76 Debugger: 2.9.1.5 Added: Disassembly window now shows signed decimal values for immediate values. 2022-01-03 22:18:12 -08:00
michaelangel007 48e0fe3a8e Debugger: 2.9.1.3 Added: DB command now optionally supports = 2022-01-03 21:11:25 -08:00
tomcw 010d3525d3 HDD read: error if reading block to ROM (#1007) 2021-12-11 15:11:13 +00:00
tomcw 0ac210b132 Debugger: Extend 'brk' cmd:
. brk all <on|off>
Fix 'brk' cmd for invalid opcodes of length 2 & 3
2021-12-11 13:41:34 +00:00
tomcw bb6fa80335 HDD r/w: error if r/w overlaps with I/O memory
. break to debugger if single-stepping
HDD write: support memory accesses across 64KiB boundary
2021-12-09 21:22:13 +00:00
TomCh 443545b0f6
Support SHR video modes with a VidHD card (#997, PR #1004)
Support VidHD in slot 3 (via Config GUI or '-s3 vidhd') for SHR video modes only.
- AppleWin window is slightly enlarged when VidHD card is inserted.
Support IIgs 320x200 (and fill mode) and 640x200 video modes.
Debugger: add 'shr' command to view video
CUI: Allow user to specify width & height (for full-screen); and allow separate x,y scaling in full-screen mode.
2021-11-30 21:41:02 +00:00
tomcw ac2233149b Debugger: Change 'brkint' params to on/off for consistency 2021-10-28 21:00:18 +01:00
Andrea f2843d4d71
Collections of changes to facilitate compilation on Linux and macOS. (PR #992) 2021-10-18 20:23:46 +01:00
TomCh 9553106f4e
Debugger: Add IRQ support to LBR and new command to Break on Interrupt (#987, PR #990)
Extend LBR so that it includes the control-flow on a taken interrupt
Add a new command 'brkint <0|1>' to support Break on Interrupt

Internal: in core emulation loop, moved IRQ/NMI check to start of loop so that just the "interrupt vectoring" case can be single-stepped (instead of previously opcode + interrupt vector).

Debugger help chm: update Breakpoints section to include BRK, BRKOP and BRKINT
2021-10-16 16:57:00 +01:00
tomcw 4f8b30506d Debugger: Fix LBR so it's updated only if branch is taken (#987) 2021-10-16 11:58:09 +01:00
tomcw 8575238d69 Debugger: Add a simple LBR command 2021-10-15 21:58:17 +01:00
tomcw c20c9c2c9c Fix Coverity CID 1506067 in Debug.cpp 2021-07-28 14:09:22 +01:00
tomcw 405de2be14 Fix Coverity - High Impact defects:
. uninitialised vars in Debug & Win32Frame
2021-07-28 12:47:05 +01:00
Andrea de7f35e6bd
Make path separator OS-dependent (PR #954) 2021-05-19 21:10:22 +01:00
Andrea 41778aa472
Debugger: move Win32 functions to separate file. (PR #941)
* Debug.cpp: move Win32 functions to separate file.
* Move _tcscat -> strcat to maximise portability.
* Remove unneeded Win32 check.
2021-04-23 20:39:24 +01:00
Andrea c7f515015b
Debugger: Separate disassembler functions from display (PR #933)
Makes it easier to use them in different environments.
2021-03-17 20:32:19 +00:00
Andrea 8c2b38d19d
Enable ConformanceMode in VS2019. (PR #923)
This reduces the chances of incompatibility between gcc and vs.

99% is "const char *" literals.
1 case of a goto jumping over a variable declaration (but it is not needed).
2021-02-10 21:05:00 +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
Andrea 61db149eab
Move last remaining globals from WinFrame.cpp to class Win32Frame. (PR #913) 2021-01-16 21:57:28 +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
Andrea 9d7aa7d309
Move VideoRedrawScreen() to Video. (PR #904) 2021-01-01 12:42:24 +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
Andrea e27879ac99
Move interface into a class FrameBase. (PR #893)
. Move the Win32  implementation into Win32Frame.
2020-12-24 15:08:50 +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
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
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
Andrea c455488b50
Split Frame.cpp to WinFrame.cpp (PR #874) 2020-11-23 19:21:20 +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 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 bd1d65ce4f Renamed Applewin.h to AppleWin.h across entire project 2020-11-11 22:12:39 +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
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
ThorstenB 7d7aa17a47
Debugger: minor clean-up: compiler warnings, unused variables etc (#840) 2020-10-01 19:55:29 +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