Commit Graph

114 Commits

Author SHA1 Message Date
tomcw
f801655b23 Debugger: DrawFlags() - refactored to remove unused 3rd param 2020-05-30 14:41:14 +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
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
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
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
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
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
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
Andrea Odetti
d5890e8356 Replace some char * with std::string. 2019-09-06 17:34:25 +01:00
tomcw
8589ad2510 Fix crash when entering debugger from logo screen. (Fixes #622) 2019-02-14 21:57: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
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
tomcw
d59d706e5e Merge branch 'master' into bug_479 2017-12-19 22:23:58 +00:00
tomcw
664edf5b6f Debugger: fix some static analysis issues from PR #517 2017-12-17 18:20:39 +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
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
michaelangel007
bcbcaffcf5 GH #406 Cleanup LC status in debugger - B#, and dim inactive bank 2017-05-10 09:51:45 -07:00
michaelangel007
77075a8f32 DOC: Cleanup typo 2017-05-10 09:49:48 -07:00
michaelangel007
b155872f57 Debugger: Extend ColorizeFlags() to support custom fg if not set 2017-05-10 09:47:45 -07:00
michaelangel007
23f1f46fc8 GH #406 Cleanup - remove extraBank from _DrawSoftSwitchLanguageCardBank() 2017-05-01 08:47:31 -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
8c209cfc2d Some Read/Write for Main/Aux memory 2017-04-27 16:58:43 -07:00
michaelangel007
fd2d44a349 Change debugger background for LC to be darker cyan 2017-04-27 16:41:03 -07:00
michaelangel007
335a8e5c5c Change debugger IO title to light blue for easier reading 2017-04-27 16:37:13 -07:00
michaelangel007
9fd479b976 Debugger: Show if RAMWORKS Language Card is installed, and which page is active 2017-04-27 14:06:01 -07:00
michaelangel007
93e6d668e7 Add backend to display Extended Language Card Bank for RAMWORKS or Saturn 2017-04-27 14:04:53 -07:00
michaelangel007
59702d9c74 Only draw LC staus on Bank 2 line 2017-04-27 13:39:59 -07:00
michaelangel007
baa0b08198 Bugfix: Don't over-draw LC status outside designiated info. area 2017-04-27 13:37:56 -07:00
michaelangel007
e5087a6627 Prep for LC bank 2017-04-27 13:37:19 -07:00
michaelangel007
18fd4205c9 And turn it on 2017-04-27 12:02:09 -07:00
michaelangel007
5cc4cbd26c Debugger 2.9.0.4 Language Card Status 2017-04-27 12:00:54 -07:00
michaelangel007
f4b5aa5fa5 Cleanup via factor out _DrawSoftSwitchHighlight() 2017-04-27 09:30:08 -07:00
michaelangel007
eb0890add4 Add (default) background to ColorizeFlags() 2017-04-27 09:29:22 -07: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
1bb60026a5 Debugger - Fix #345: wrap and protect debugger's video mode 2016-11-06 14:23:23 +00:00
tomcw
af196ac8ae Tidy-up for full-screen vars 2016-07-26 22:33:45 +01:00
tomcw
66e468db65 Merged in Nick's new native resolution full-screen
- old 640x480 full-screen deprecated

Fixes for:
. Logo & Debug window scaled/positioned correctly
. Buttons & disk activity (on RHS) drawn in correct position
. Crosshairs for mouse (and when using mouse as joystick)drawn in correct position
2016-07-12 22:43:31 +01:00
tomcw
d23ae15774 Removed border from:
. final rendered window
. print-screen bmps (both sizes)
Fixed full-screen so that:
. all mode (RUNNING, DEBUG and LOGO) all occupy the same screen position
. there's no intermediate data drawn out of position when first switching to full-screen
Tested on Win7 and Win10
2016-04-04 21:05:58 +01:00
tomcw
e98de27039 Manual merge from master @ c798157 2016-03-21 23:48:02 +00:00
michaelangel007
03b43bf388 Bug #227 2.8.0.8 Fixed: Showing/hiding the address and/or opcodes will show long symbolic targets without overflowing into the register info pane
File: Debugger_Display.cpp
Func: DrawDisassemblyLine()
2014-12-11 10:00:02 -08:00
michaelangel007
d6002721e5 Fix Bug #251: ASC #:# with null byte doesn't mark up properly 2014-12-11 09:41:42 -08:00
michaelangel007
c2d6f5b026 Bug #239 : Debugger 2.8.0.6: Ctrl-Print Screen while the debugger is active will copy the debugger text to the clipboard 2014-12-01 22:01:08 -08:00
tomcw
bc45812f4e Simplified and moved main-loop video update logic into Video.cpp.
Removed complex case below for:
. VideoHasRefreshed(), 'anyupdates'
. VideoCheckPage()

Detailed notes below.

---

Video updates in ContinueExecution() loop:

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

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

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

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

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

---

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

UnexpectedPage if g_bVideoDisplayPage2 != SW_PAGE2

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

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

Basically this was all about supporting FullSpeed mode, and limiting the calls to VideoRefreshScreen().
2014-09-13 22:22:27 +01:00
michaelangel007
4b7f8aab3e Debugger 2.8.0.1 Fix #227 (Debugger)[1.25] AppleSoft symbol: COPY.FAC.TO.ARG.ROUNDED overflows into registers 2014-09-08 09:19:12 -07:00
michaelangel007
346a171310 1.25 RC1 fixed ASC ellipsis 2014-08-30 10:03:00 -07:00
michaelangel007
e449da5b47 Debugger: Fix ASC overflowing _sOpCodes in FormatOpcodeBytes() 2014-08-28 16:52:41 -07:00
michaelangel007
fc5818ee34 Debugger 2.7.0.29 -- Renamed DS to ASC, fixed disassembly for ASC 2014-08-28 11:13:02 -07:00
michaelangel007
936553ab7e Cleanup misc. whitespace 2014-08-25 15:33:53 -07:00
tomcw
6a26a95487 PCH refactor: remove non-system headers from stdafx.h 2014-08-13 21:30:35 +01:00
tomcw
d591dd006b Remove the top-level AppleWin folder 2014-05-23 22:59:02 +01:00