Commit Graph

402 Commits

Author SHA1 Message Date
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
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
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
cf743203ce #483 click to toggle flags 2017-08-25 09:29:30 -07:00
michaelangel007
6cabe7740f #481 Extend arguments from 55 chars to 127 chars 2017-08-25 08:56:23 -07:00
michaelangel007
1612269093 #462 Added for click 2017-08-25 07:36:31 -07:00
michaelangel007
be41616359 Implements #462 sans: help disasm 2017-08-25 07:22:08 -07:00
michaelangel007
d9e9ef34ab Add note about vector clear() insert() at() 2017-08-24 18:43:54 -07:00
michaelangel007
df8d6c06a6 Fix #473 read debugger script file not being properly zero-terminated 2017-08-24 18:43:10 -07:00
michaelangel007
efdce696fc Fix off-by-one bug wrapping in debugger console #476 2017-08-24 16:59:19 -07:00
michaelangel007
1728b7b668 Bug #466 Update HELP SYM to double-quote symbols 2017-08-24 12:36:46 -07:00
michaelangel007
dc7b99c006 #479 Fix off-by-one display bug for warning long symbols name 2017-08-24 09:47:05 -07:00
michaelangel007
975230b46d #479 (b) Add Warning for long symbols when symbol table is loaded 2017-08-24 09:40:28 -07:00
michaelangel007
a276bef7df 2.9.0.10 Change Warning to Info for symbols that alias 2017-08-24 09:37:07 -07:00
michaelangel007
eed603f116 Debugger: Bugfix #479 2017-08-24 09:21:15 -07:00
tomcw
0fef6516f4 Debugger: fix _6502_GetTargets() when abs addr16 wraps over 64K boundary (crash bug) & extend debugger unit-tests 2017-08-15 22:12:51 +01: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
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
d3e620fcd4 Add command line to init Saturn memory size 2017-04-27 14:50:15 -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
785fe505b6 Debugger 2.9.0.3 internal cleanup of drawing soft switches 2017-04-27 09:31:34 -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
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
Michaelangel007
4325900b2d DOC: Fix 6502 cheat sheet x2 x6 ZP 2017-04-05 07:51:16 -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
Kelvin Lee
bb25fb702e Fixed compiler warning about too many arguments for sprintf. 2016-12-29 11:36:43 -05:00
Kelvin Lee
9ec4012209 Fixed format typo. 2016-12-29 11:01:46 -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
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
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
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
86802bef16 Add VS2015 proj files & fix for building under VS2015 in Release (closes #296) 2016-03-24 22:55:36 +00:00
tomcw
99219a71ec Add VS2015 proj files & fix for building under VS2015 in Release 2016-03-24 22:25:35 +00: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
6fac2483ef [PVS-Studio] Fix redundant var init in GetConsoleLineHeightPixels() Bug #301 2015-07-30 08:55:07 -07:00
michaelangel007
04702ee7c5 [PVS-Studio] Fix potential security issue sprintf() Bug #301 2015-07-30 08:26:18 -07:00
michaelangel007
6f8b75e443 [PVS-Studio] Code cleanup - fix potential security issues with wsprintf( bufffer, string ) -> wspritnf( buffer, "%s", string ) Bug #301 2015-07-30 08:20:27 -07:00
michaelangel007
8aa8f347ae Cleanup assignment in while in ConsoleBufferPush() 2015-07-30 08:14:05 -07:00
michaelangel007
b62758636b Cleanup unused variables 2015-07-30 08:12:55 -07:00
michaelangel007
2381734256 [PVS-Studio] Fix extra argument in fprintf() OutputTraceLine() and bad logic in DebuggerMouseClick() bug #301 2015-07-30 07:58:34 -07:00
michaelangel007
56c52beac9 [PVS-Studio] Fix false positive extra parameters to wsprintf() in CmdBreakOpcode() 2015-07-30 07:29:20 -07:00
michaelangel007
5a112ee9ed Fixed some issuses mentioned in #301 2015-07-30 07:08:18 -07:00
tomcw
498f01edde New save-state (.aws) v2:
Added card save/load for:
. Phasor (#260)
. CP/M (#260)
. 80 column card:
  . aux memory now saved separately from main memory
  . extended memory (RAMworks) (#260)

Mockingboard & Phasor:
. Full AY8910 internal state now preserved.
  . needed for eg. envelope, ay_change[], etc
  . also Phasor player only updates AY regs that have changed

Other:
. On restore error, then PostMessage(WM_USER_RESTART), so that emulator not left in intermediate state
. Fix: Start Dir wasn't set when drag & dropping an image onto a drive icon or double-clicking an image file
2015-04-11 22:24:54 +01:00
tomcw
04cd0b4018 Fix for sprintf buffer overflow - #268 2015-02-17 22:00:52 +00:00
tomcw
717c5cba84 New save-state (.aws) v2:
. Format now extensible for supporting new hardware types in the future
. Include missing items like Apple2Type, CyclesThisVideoFrame (#255)
Continue to support loading of old v1 format.

Added card save/load for:
. Mouse (#260)
. HDD (#260)
. Printer

Extended card support for:
. SSC

Other:
. Added save-state v1 struct size checks
. Create SaveState_Structs_v2.h and split out common into SaveState_Structs_common.h
. Refactor HardDisk.cpp to use imagehandle; and consolidate with Disk.cpp
. Fix Disk/HD_GetFullPathName() which wasn't always returning full pathname
. Consolidate common GetImageTitle() and move into DiskImage.cpp
2015-02-13 22:40:53 +00:00
michaelangel007
f5869776dd DOC: Fix swizzle resolution (64x256) comment 2015-01-11 08:46:51 -08:00
michaelangel007
f794f3f4c6 Debugger 2.9.0.1: implemented cd command 2015-01-10 22:50:07 -08:00
michaelangel007
ba1a08b96b Add ntsc .bmp import 2015-01-10 22:47:55 -08:00
michaelangel007
9ffc6b7491 Clean ntsc export bmp, WIP: import bmp 2015-01-10 12:14:38 -08:00
michaelangel007
8876044d3a Fixed debugger ntsc save .bmp to save as 64x256 raw image 2015-01-10 11:23:46 -08:00
michaelangel007
2a54240372 Fix: force ntsc export alpha=255 2015-01-10 09:28:23 -08:00