Commit Graph

402 Commits

Author SHA1 Message Date
Kelvin Lee
1a4e933778
Replace StringCbPrintf() with StrFormat() (PR #1032) 2022-02-15 18:48:20 +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
aa4af5e9d5 Debugger: Fix DF E937 not checking for 0.0 correctly 2022-01-06 10:26:30 -08:00
michaelangel007
65e4859b01 Debugger: Cleanup DB DB2 DB4 DB8 DW DW2 DW4 DF DS 2022-01-06 10:18:38 -08:00
michaelangel007
ae214a1b19 Debugger: Cleanup: Add note about magic number 200 2022-01-06 10:12:37 -08:00
michaelangel007
8667c0eb32 Debugger: Cleanup: Add note about DISASM ID 2022-01-06 10:10:59 -08:00
michaelangel007
182e48e82d Debugger: Add: First pass of DF 2022-01-06 10:10:09 -08:00
michaelangel007
32ee96fb8b Debugger: Cleanup FormatNopcodeBytes() 2022-01-06 08:24:55 -08:00
michaelangel007
7c4855e631 Debugger: Cleanup DISASM_DISPLAY_ enums 2022-01-05 15:42:34 -08:00
michaelangel007
ca1bea3b97 Debugger: Add comment about DISK command 2022-01-05 15:41:47 -08:00
michaelangel007
545c79f132 Debugger: Cleanup: Nopcode_e 2022-01-05 08:55:17 -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
1613671c11 Debugger: Add note for 2.9.1.11 2022-01-04 11:29:18 -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
61d6ef58ee Debugger: Cleanup old cruft 2022-01-04 11:17:14 -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
1f5ca5d7e7 Bugfix: Is user requested which symbol table but symbol not found, mark as not in any 2022-01-04 09:24:52 -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
b3dc408195 Debugger: Cleanup 2022-01-03 22:47:25 -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
aaae1dd6a1 Debugger: 2.9.1.4 Changed: Show symbol warnings in Orange, and length of symbols in light blue 2022-01-03 22:15:41 -08:00
michaelangel007
48e0fe3a8e Debugger: 2.9.1.3 Added: DB command now optionally supports = 2022-01-03 21:11:25 -08:00
michaelangel007
3985ee9abc Debugger: 2.9.1.2: Fixed: Off by one end address when deleting DisasmData_t 2022-01-03 21:09:11 -08:00
michaelangel007
19b7d43327 Debugger: 2.9.1.1: Added: X command now supports a range and will chop off the appropiate data sections. 2022-01-03 21:07:49 -08:00
michaelangel007
561a145ab0 Debugger: Add _GetAutoSymbolName() helper 2022-01-03 21:05:37 -08:00
Andrea
177c9fec05
Make Slot 0 more consistent with other slots. (PR #1006) 2021-12-11 15:26:09 +00: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
028c041175 Debugger: fix for 6502 JMP (ABS) - compute correct NMOS target address 2021-10-15 20:36:04 +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
tomcw
ce309324bb Debugger: when displaying 6522 regs, if T1/T2 are active, then display in white 2021-05-09 13:38:16 +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
c6c427aa3d
Debugger: Fix bound on maximum bytes to move backward. (PR #937)
The higher g_nDisasmCurLine the more we will have to travel back to find the instruction at the top of the window.
2021-04-23 20:34:46 +01:00
tomcw
fb6433fb7a Debugger_Disassembler.cpp: add GPL boilerplate text 2021-03-17 20:42:40 +00: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
tomcw
0858cc3a23 Debugger: improve mem views for 6522 & AY8913 chips 2021-03-07 13:11:22 +00:00
tomcw
3766c1e014 Debugger: fix to wrap 16-bit addr for mem watch (was getting AppleWin debugger crash) 2021-03-02 18:14:36 +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
tomcw
f3b6b8665f Debugger: fixes to wrap 16-bit addr (was resulting in AppleWin debugger crashes) 2021-02-07 16:58:11 +00:00
tomcw
fcafa18340 Debugger: add red 'IRQ' after the v/h-pos when IRQ is being asserted to the 6502 2021-01-31 19:38:06 +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
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
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
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
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
e48ea095a3 Debugger: PrintGlyph() - removed magic numbers 2020-06-27 15:46:28 +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
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
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
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
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
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
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
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
8ec8fa6c5b Debugger: Correctly repaint AppleII screen when showing it from debugger. (Fixed #746) 2020-01-02 20:49:07 +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
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
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
5792107dce Debugger: fixed help for 'videoinfo' cmd 2019-11-03 09:36:33 +00:00
Kelvin Lee
cb007df40b Debugger: Symbol loading: Fix random crash upon start up. (PR #694) 2019-10-25 04:25:07 +09:00
TomCh
2f64795e2e
Debugger: BPMR & BPMW (PR #710)
Extended BPM to also support BPMR and BPMW
Fixed BPM[R|W] 0:FFFF (ie. support a range of 0x10000)
2019-10-23 05:31:53 +09:00
tomcw
13588165ff Debugger display: minor refactor 2019-10-20 21:17:40 +01:00
tomcw
52376fd664 Debugger display (#666, #702):
. Video-scanner: when invisible use yellow (instead of red) (fixes #666)
. Soft-switches: row "80:" show a red 'x' when AltZP is set (#702)
2019-10-20 11:30:31 +01:00
tomcw
75f6ab9e59 Debugger: added auto-run of 'DebuggerAutoRun.txt' on startup. (#666) 2019-10-11 21:24:01 +01:00
tomcw
319797df69 Debugger: Video-scanner info:
. moved vert,horz onto same row
. made hex & apple modes the default display config
. added 2nd line showing cycles
. moved mini-mem views over by 1 char
2019-10-10 22:21:25 +01:00
tomcw
f9a1ef04f7 Debugger: videoinfo cmd: return feedback on success 2019-09-23 01:50:18 +01:00
tomcw
604aff4bbb Debugger: added help for videoinfo cmd 2019-09-22 16:53:38 +01:00
tomcw
b3eb789e03 Debugger: added BG_INFO_WATCH|ZEROPAGE enums 2019-09-22 15:59:19 +01:00
tomcw
b5b1deeead Debugger: added & used consts for video-scanner info 2019-09-22 15:28:10 +01:00
tomcw
7261c79054 Debugger: minor refactor for VideoScanner info 2019-09-22 15:11:14 +01:00
tomcw
f84c985751 Debugger refactor: moved ConfigColorsReset() from Debug.cpp to Debugger_Color.cpp 2019-09-22 11:25:48 +01:00
tomcw
9a0617e889 Debugger: removed the now redundant Debug_UpdatePalette() func 2019-09-22 11:14:32 +01:00
tomcw
3b9dc8d0f7 Merge branch 'master' of ssh://github.com/AppleWin/AppleWin 2019-09-21 16:38:46 +01:00
tomcw
9ee9414bb6 Debugger: show video-scanner's h,v position (at the expense of losing 2 watches). (#666) 2019-09-21 16:37:45 +01:00
tomcw
e4f0a8b8d9 Debugger: fix crash in ParseSymbolTable() due to PR #687 2019-09-17 19:17:30 +01:00
tomcw
3264fd3ee9 Two fixes for the 'char* to std::string' PR #687 2019-09-15 21:26:40 +01:00
Andrea Odetti
409634d65f Use a more descriptive variable name.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2019-09-08 21:33:26 +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
michaelangel007
89eab1156c Merge branch 'master' of https://github.com/AppleWin/AppleWin 2019-07-22 12:06:53 -07: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
michaelangel007
a0f7fe46bf Merge branch 'master' of https://github.com/AppleWin/AppleWin 2019-04-18 15:58:19 -07:00
tomcw
d6f8d4edd8 Rename sg_DiskIICard to sg_Disk2Card 2019-04-14 17:01:49 +01:00
michaelangel007
c0d442dc76 Merge branch 'master' of https://github.com/AppleWin/AppleWin 2019-04-13 10:22:42 -07:00
michaelangel007
a12f4283e9 TODO: colorize output of CALC 2019-04-13 10:22:39 -07: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
8589ad2510 Fix crash when entering debugger from logo screen. (Fixes #622) 2019-02-14 21:57:53 +00:00
Raphaël Zumer
c9553d996d Convert files with special characters to UTF-8 (PR #604)
* Convert file encoding to UTF-8
* Set character sets to UTF-8 explicitly
2019-02-07 18:08:53 +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
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
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
tomcw
91a6227da1 Debugger: Fixed disasm of branch targets <000 missing leading zeros. (Fixes #587) 2018-10-13 22:35:55 +01:00
TomCh
6ed354714e
Support ClosedApple+key with Alt Gr when combined with a regular keyboard key:
. When Alt Gr is pressed, then manually post WM_CHAR message on receiving a WM_KEYDOWN (manually translate and account for shift/control/caps-lock)
. Hook filter: suppress Alt Gr's (ie. RMENU's) fake LCONTROL messages

Also:
. Hook filter: allow Ctrl+Shift+Esc (for Task Manager)
. Keyboard: refactor only use accessor functions to get the Alt/Control/Shift state
2018-07-27 21:55:53 +01:00
tomcw
1afa2490c5 Keyboard: Refactor for GetKeyState() 2018-07-23 22:27:33 +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
michaelangel007
10d68a3308 Debugger: 2.9.0.15: Cleanup: HELP CALC examples and See also. 2018-04-17 09:45:45 -07:00
michaelangel007
74c6739542 Debugger: Added HELP CALC see also: HELP OP 2018-04-17 09:43:06 -07:00
michaelangel007
c449ef12b7 Debugger: Clarify HELP CALC operators 2018-04-17 09:33:56 -07:00
michaelangel007
e852d91031 Debugger: Add examples for HELP CALC 2018-04-17 09:32:58 -07:00
michaelangel007
858586d646 Debugger: Cleanup output order of HELP CALC 2018-04-17 09:32:11 -07:00
michaelangel007
f9bc18f54c Debugger: Fix spelling 2018-04-17 09:30:59 -07:00
michaelangel007
9105019e11 Fixed: Debugger 2.9.0.14: HELP JSR 2018-04-17 07:16:21 -07:00
michaelangel007
8a9ddda46a 2.9.0.13: Add profiler cycles 2018-04-15 13:35:58 -07:00
tomcw
d7de4908cd Add comment for the reason that reset doesn't affect memmode & videomode for II and II+ models.
Add accessor for memmode, make static and replace extern refs with GetMemMode().
2018-03-19 18:49:08 -07: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