Commit Graph

192 Commits

Author SHA1 Message Date
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
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
87677ed4c3 Debugger: In _6502_GetTargets() removed the bool bIgnoreJSRJMP parameter. 2019-12-09 20:42:16 +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
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
75f6ab9e59 Debugger: added auto-run of 'DebuggerAutoRun.txt' on startup. (#666) 2019-10-11 21:24:01 +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
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
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
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
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
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
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
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
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
839812ab7d Debugger: OutputTraceLine() - add single-step comment 2018-02-02 21:10:46 +00:00
tomcw
2c8f5ce864 Support floating-bus in full-speed mode (#508, #519, #532) 2018-02-02 20:19:48 +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
efa9ab8aaa Updated Debugger_Changelog.txt for a handful of issues 2018-01-06 16:26:07 +00:00
tomcw
607165cc9e Debugger: default to Shift+Click to toggle diasm columns (#462) 2017-12-19 23:07:12 +00:00
tomcw
d59d706e5e Merge branch 'master' into bug_479 2017-12-19 22:23:58 +00:00
tomcw
018e338612 Frame.cpp: move header constants into Frame.cpp and expose with accessor functions 2017-10-11 17:38:36 +01:00
michaelangel007
cf743203ce #483 click to toggle flags 2017-08-25 09:29:30 -07:00
michaelangel007
be41616359 Implements #462 sans: help disasm 2017-08-25 07:22:08 -07:00
michaelangel007
eed603f116 Debugger: Bugfix #479 2017-08-24 09:21:15 -07:00
tomcw
c35b863bd9 Debugger: BPM cmd: trigger on stack access for BRK,JSR,PLn,PHn,RTI,RTS (#445) 2017-08-04 21:07:02 +01:00
tomcw
0a60a0a8aa Video.cpp: remove redundant code 2017-07-06 21:36:56 +01:00
tomcw
b5e78b59a0 Debugger: Fix for 'tf' (trace-file) cmd, so that exiting debugger with F7 doesn't close the trace file and continues in MODE_STEPPING 2017-05-24 22:40:22 +01:00
michaelangel007
158b5212e6 Debugger 2.9.0.8 2017-05-11 05:44:42 -07:00
michaelangel007
d243425c20 2.9.0.7 Memory softswitches are now in chronological order, and their background is a dark grey 2017-04-27 17:13:34 -07:00
michaelangel007
d3e620fcd4 Add command line to init Saturn memory size 2017-04-27 14:50:15 -07:00
michaelangel007
5cc4cbd26c Debugger 2.9.0.4 Language Card Status 2017-04-27 12:00:54 -07:00
michaelangel007
785fe505b6 Debugger 2.9.0.3 internal cleanup of drawing soft switches 2017-04-27 09:31:34 -07:00
tomcw
41286cd29f Debugger: Remove DebugDisplay()'s unused first parameter: bDrawBackground because it was unused and in some cases it was being passed a bitfield, not a BOOL 2017-04-22 20:52:21 +01: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
5e6a445bab Debugger: When MODE_STEPPING (eg. g or gg mode), prevent ESC from exiting back to the debugger. F7 or Pause keys can still be used. (#217) 2017-04-22 17:13:41 +01:00
Michaelangel007
a5274ca7d0 Fix comment typo 2017-04-17 21:44:30 -07:00
tomcw
3db755c2b4 Fixed #316 - For g cmd: don't set regular BP when also doing g_nDebugStepUntil 2017-03-21 21:25:24 +00:00
tomcw
1c3838ab8f Debugger: removed unused var 2017-03-12 21:56:42 +00:00
tomcw
30d8b7716a Debugger: Mute sound when entering debugger from MODE_STEPPING:
. ie: ESC, F7 and Pause key
Debugger: Fix for MODE_STEPPING when jump from $C3xx to $C8xx:
. Don't break on floating-bus, as Expansion ROM will be switched in on
this access.
IORead_Cxxx(): Fix the logic for IO_SELECT when not slot-3
2017-03-12 21:54:08 +00:00
tomcw
3a2313c52e Debugger:
. Improved break on FB or IO: account for slot empty (or not) & if expansion ROM enable
Memory:
. IORead_Cxxx(): Fix for Apple II support for when slot-3 is empty
. Apple II type was erroneously testing //e soft-switches
2017-03-10 22:00:01 +00:00
tomcw
3d6c10bad9 Debugger:
. Move the BRK and invalid opcodes checks out of main emulation's Fetch() and into DebugContinueStepping()
. Added a new break condition: when PC reads floating bus or I/O memory
. On a break condition, output a 'Stop Reason' message to the console
2017-03-07 21:35:38 +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
29b7fa15b8 Merge branch 'master' of https://github.com/AppleWin/AppleWin 2017-02-25 22:48:07 +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
tomcw
8c4f451557 Remove old, unused _Video_SetupBanks() 2017-02-17 16:00:22 +00:00
Kelvin Lee
0992cf16c4 Added variadic variants of ConsolePrint(), ConsoleBufferPush() to make code cleaner. Also added ConsoleColorizePrint() and variants. 2016-12-29 12:07:54 -05:00
tomcw
b8b90a6bd9 NTSC_VideoGetScannerAddress(): remove redundant 'long cycle6502' parameter
MemReadFloatingBus(): Make consistent by making one call the other
2016-11-17 19:52:49 +00:00
tomcw
074acce2ae Debugger: Extend tf cmd to optionally output video scanner info: tf <file.txt> [v] (#359) 2016-11-07 21:48:17 +00:00
tomcw
ab8ae7f3a0 Debugger: tf cmd - add video scanner addr & floating bus data (#359) 2016-11-07 21:12:18 +00:00
tomcw
981b711fef Refactor: int bVideoMode -> uint32_t uVideoMode 2016-11-06 21:59:45 +00:00
tomcw
1bb60026a5 Debugger - Fix #345: wrap and protect debugger's video mode 2016-11-06 14:23:23 +00:00
tomcw
7f3cc09217 Fix #363: Redraw screen whilst debug stepping 2016-10-17 22:10:33 +01:00
TomCh
bcd4c7c7fa Merge pull request #362 from AppleWin/Release-1.26.0.1
Merge all the changes & fixes from the Release-1.26.0.1 branch back into master.
2016-10-16 21:15:03 +01:00
michaelangel007
515e66ca7d Debugger: NTSC: Import 16x1 and 64x1 bmp for palette for #357 2016-10-14 12:12:19 -07:00
tomcw
5f0ccfc75c Added new function NTSC_VideoRedrawWholeScreen() to fix #352 2016-09-25 10:42:14 +01:00
michaelangel007
c96b935fff Fix Bug #349 [Debugger] NTSC LOAD or SAVE without filename crash 2016-09-20 10:03:13 -07:00
tomcw
41b2547acb Fix to get GR2 working, but #345 still not complete 2016-09-17 10:04:32 +01:00
tomcw
5fdc879a05 Merge from branch 'NTSC_PreMerge':
1.26.0.1
. NTSC video modes (TV Color, TV B&W, Monitor Color, Monitor B&W)
. Full Screen using native resolution (not 640x480)

NB. 6502 emulation is slower now, which means disk loading (ie. full-speed) is slower.
. EG. Aztec.dsk: from F2 boot to "Press any key". (Release build, 50% "TV Color", not run in VS, VAIO laptop)
  ~4 secs: AppleWin 1.25.0.3 (built with VS2005)
  ~7 secs: AppleWin 1.26.0.1 (built with VS2008 or VS015)
2016-09-04 21:14:26 +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
e98de27039 Manual merge from master @ c798157 2016-03-21 23:48:02 +00:00
tomcw
5c16c3642a Merged master to savestate branch 2015-09-13 11:39:58 +01:00
michaelangel007
8d4cb8de35 Fix uninit var in CmdMemoryLoad() 2015-07-30 09:25:53 -07:00
michaelangel007
550b230ad8 Cleanup warning unreachable code 2015-07-30 09:10:28 -07:00
michaelangel007
04702ee7c5 [PVS-Studio] Fix potential security issue sprintf() Bug #301 2015-07-30 08:26:18 -07:00
michaelangel007
b62758636b Cleanup unused variables 2015-07-30 08:12:55 -07:00