Commit Graph

118 Commits

Author SHA1 Message Date
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
michaelangel007
ae6f1c9f0f Debugger: Added: ntsc save [filename], ntsc load [filename] 2015-01-08 12:15:19 -08:00
michaelangel007
94193215b9 Cleanup whitespace 2015-01-08 12:05:53 -08:00
michaelangel007
1fb2e412fd The mother of all debugger cleanups 2015-01-07 19:03:06 -08:00
michaelangel007
de00db9cf8 Debugger: Fixed view output Double Lo-Res and Double Hi-Res 2015-01-01 22:47:55 -08:00
michaelangel007
75c5cc8151 Fix broken MIXED mode, fix Debugger view output, change main loop to call VideoRefresh() 2015-01-01 11:48:59 -08:00
michaelangel007
d0b067f8d2 Fix BLOAD 'filename.hgr' so an address can be specified and used as an over-ride 2015-01-01 05:51:06 -08:00
michaelangel007
581bb332fe Debugger 2.8.0.9b: BLOAD now recognizes the extensions .hgr or .hgr2 to load to $2000, or $4000 respectfully 2014-12-31 19:38:36 -08:00
michaelangel007
07be4dfa1d Debugger 2.8.0.9: BLOAD now recognizes the extensions .hgr or .hgr2 to load to $2000, or $4000 respectfully 2014-12-31 19:24:04 -08:00
michaelangel007
2dedaf0158 NTSC: fix Debugger View Output commands: TEXT, HGR, etc 2014-12-31 17:15:36 -08:00
michaelangel007
a509cc511a Add: proper OPCODE_NOP enum 2014-12-11 10:00:51 -08: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
michaelangel007
4102fd91f9 DEBUG: 2.8.0.5: FIX: Bug #244 -- print warning about duplicate symbol's address(es) aliasing existing ones 2014-11-30 18:58:15 -08:00
michaelangel007
4e582b2431 Add: CHC_INFO, CHC_PATH 2014-11-30 18:39:04 -08:00
michaelangel007
ac56455f61 Cleanup: remove commented out broken long symbol table header description
FIX: Prevent buffer overflow in CmdSymbolsInfo()
2014-11-30 17:51:11 -08:00
michaelangel007
d5a58ef206 ADD: ConsoleColor_StringLength() to get the normal string length that doesn't count the escape/markup 2014-11-30 17:47:26 -08:00
michaelangel007
7345b017aa FIX: Bug #246 (Debugger) Memory (Changing Memory) command in CHM help files
- fixed EXITBENCH from being matched with 'E'
- fixed out of date documentation with MEB, MEW
2014-11-29 17:42:12 -08:00
michaelangel007
763b8172f0 DEBUGGER: Cleanup error message for invalid symbol table for: syminfo
(cherry picked from commit ca5002dfa3807f6b5fea33c14bd6ee5c9c879456)
2014-11-28 23:33:54 -08:00
michaelangel007
0910f05817 Cleanup - added note about CmdSymbolsLoad() zero args
(cherry picked from commit 9de7a1ca922046542cc998a04993012569e9fb54)
2014-11-28 23:33:36 -08:00
michaelangel007
6e5ff918c4 Cleanup: ParseSymbolTable() renamed arg to be more descriptive: pPathFileName
(cherry picked from commit 99a675b3b4b930071498b3ee1437f4d7d14594f4)
2014-11-28 23:33:25 -08:00
michaelangel007
d5c646a2bc Cleanup whitespace
(cherry picked from commit b5af168257f3f1fee19a314ed7d88c31bf345750)
2014-11-28 23:33:04 -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
95a2c855f4 Cleanup: remove dead comments in debugger_parser.cpp 2014-09-08 12:15:37 -07: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
0c06520dc5 Added note about g_sCurrentDir to use g_sDebugDir 2014-09-02 08:44:21 -07:00
michaelangel007
cf7de38720 2.7.0.36 Fixed: empty command was re-triggering previous command. Example: DW 6062, // test 2014-09-01 12:47:43 -07:00
michaelangel007
3a0d2697e4 Debugger 2.7.0.35
.35 Added: DW address -- round the length up to even number for convenience. Example: DW 6062 is equivalent to: DW 6062:6063
.34 Fixed: Unified auto-defined name: B_, W_, T_ for byte, word, or text respectively
2014-09-01 09:49:55 -07:00
michaelangel007
346a171310 1.25 RC1 fixed ASC ellipsis 2014-08-30 10:03:00 -07:00
michaelangel007
1b1009ee07 2.7.0.33 Fixed ASC range, DW range to auto-define T_#### and W_#### 2014-08-29 08:51:29 -07:00
michaelangel007
be1ae810fc Debugger 2.7.0.31 fix: DB range to auto-generate symbol name: B_#### 2014-08-28 22:27:24 -07:00
michaelangel007
65cfe89e00 Debugger 2.8.0.1 fix: DB range to auto-generate symbol name: B_#### 2014-08-28 22:23:47 -07:00
michaelangel007
d5cf2d1de2 Debugger 2.8.0.0 AppleWin 1.25 2014-08-28 16:55:16 -07:00
michaelangel007
e449da5b47 Debugger: Fix ASC overflowing _sOpCodes in FormatOpcodeBytes() 2014-08-28 16:52:41 -07:00
tomcw
a05979a6d1 Bump version to 1.25 & added comment to History.txt stating dropping Win98/ME support 2014-08-28 22:34:25 +01:00
michaelangel007
fc5818ee34 Debugger 2.7.0.29 -- Renamed DS to ASC, fixed disassembly for ASC 2014-08-28 11:13:02 -07:00
tomcw
313e7bdcc8 TSAVE: Remap control chars to printable ones 2014-08-27 22:13:14 +01:00
michaelangel007
77aef24880 Cleanup code conventions 2014-08-25 17:12:16 -07:00
michaelangel007
1bcf5b29ee Fix TSAVE and Ctrl-PrintScreen -- convert inverse control characters to space 2014-08-25 15:35:09 -07:00
michaelangel007
936553ab7e Cleanup misc. whitespace 2014-08-25 15:33:53 -07:00
michaelangel007
24e581ba2c Added: Ctrl-PrintScreen will copy the text screen (auto detect 40/80 columns) to the clipboard. 2014-08-25 08:35:43 -07:00
michaelangel007
9d36d6d007 Added new Debugger command: TSAVE to save the text screen to a file 2014-08-23 23:08:22 -07:00
michaelangel007
eea9110649 Update History.txt with Debugger 2.7.0.23 2014-08-23 17:09:48 -07:00
michaelangel007
8119e22f08 BUGFIX: MemoryFill and MemoryMove: Fix infinite hang if target memory address ends with FFFF due to 16-bit address wrapping around to zero instead of using length.
i.e. F D000:FFFF 0
2014-08-23 12:52:14 -07:00
tomcw
cbdad2a02f Qualified all STL refs with std:: to get rid of the 'using namespace std' mismatch between the main code & debugger code 2014-08-14 20:29:01 +01:00
tomcw
c1bfb8075c Created new DebugDefs.h for memory defs 2014-08-14 18:14:39 +01:00
tomcw
4d40590fbf Renamed DiskConsts.h to DiskDefs.h + other header refactoring 2014-08-14 17:48:38 +01:00
tomcw
d21bb2cc3b Move Util_* files into Debugger subfolder & update all vcproj files 2014-08-13 22:25:22 +01:00
tomcw
6ce0f6c77f Split some of Debugger_parser.h into Util_Text.h (now Util_MemoryTextFile.cpp isn't dependent on any Debugger headers 2014-08-13 22:03:33 +01:00
tomcw
6a26a95487 PCH refactor: remove non-system headers from stdafx.h 2014-08-13 21:30:35 +01:00
michaelangel007
9ded7f0926 Cleanup: Removed unused variable: g_bResetTiming 2014-07-17 19:52:56 -07:00
tomcw
d591dd006b Remove the top-level AppleWin folder 2014-05-23 22:59:02 +01:00