Merge pull request #679 from AppleWin/bug_678_toggle_speed

Bug 678 toggle speed
This commit is contained in:
Michael "Code Poet" Pohoreski 2019-08-27 08:53:09 -07:00 committed by GitHub
commit 9e3f7b0ffc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 60 additions and 1 deletions

View File

@ -1,6 +1,24 @@
Requests (Wishlist):
====================
* [ ] HELP BPM on read/write
Nail down syntax:
BPM A7 = R
BPM A7 = W
BPM R A7
BPM W A7
Add support 65D02 to break on read/write memory location
* [ ] HELP BPM
Add help document and examples
* [ ] Fix BUG: (partial) symbols starting with E not parsed propery
sym ErasePlayer1 = 65D3
sym ErasePlayer
Address not found: $000E
* [ ] Color code error messages in red foreground
- HELP CD: Document examples
Helps needs to list:
SEE: HELP PWD

View File

@ -6157,6 +6157,12 @@ Update_t CmdOutputCalc (int nArgs)
nBit |= (1 << (iBit * 4)); // 4 bits per hex digit
}
// TODO: Colorize output
// CHC_NUM_HEX
// CHC_NUM_BIN -- doesn't exist, use CHC_INFO
// CHC_NUM_DEC
// CHC_ARG_
// CHC_STRING
wsprintf( sText, TEXT("$%04X 0z%08X %5d '%c' "),
nAddress, nBit, nAddress, c );
@ -6176,6 +6182,10 @@ Update_t CmdOutputCalc (int nArgs)
_tcscat( sText, TEXT(")") );
ConsoleBufferPush( sText );
// If we colorize then w must also guard against character ouput $60
// ConsolePrint( sText );
return ConsoleUpdate();
}

View File

@ -1392,7 +1392,38 @@ LRESULT CALLBACK FrameWndProc (
if (!IsJoyKey &&
(g_nAppMode != MODE_LOGO)) // !MODE_LOGO - not emulating so don't pass to the VM's keyboard
{
KeybQueueKeypress(wparam, NOT_ASCII);
// GH#678 Alternate key(s) to toggle max speed
// . Ctrl-0: Toggle speed: custom speed / Full-Speed
// . Ctrl-1: Speed = 1 MHz
// . Ctrl-3: Speed = Full-Speed
bool keyHandled = false;
if( KeybGetCtrlStatus() && wparam >= '0' && wparam <= '9' )
{
switch (wparam)
{
case '0': // Toggle speed: custom speed / Full-Speed
if (g_dwSpeed == SPEED_MAX)
REGLOAD(TEXT(REGVALUE_EMULATION_SPEED), &g_dwSpeed);
else
g_dwSpeed = SPEED_MAX;
keyHandled = true; break;
case '1': // Speed = 1 MHz
g_dwSpeed = SPEED_NORMAL;
REGSAVE(TEXT(REGVALUE_EMULATION_SPEED), g_dwSpeed);
keyHandled = true; break;
case '3': // Speed = Full-Speed
g_dwSpeed = SPEED_MAX;
keyHandled = true; break;
default:
break;
}
if (keyHandled)
SetCurrentCLK6502();
}
if (!keyHandled)
KeybQueueKeypress(wparam, NOT_ASCII);
if (!autorep)
KeybAnyKeyDown(WM_KEYDOWN, wparam, extended);