Fixed key definitions (were removed from apple2.h)

git-svn-id: svn://svn.cc65.org/cc65/trunk@2917 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2004-03-13 21:35:47 +00:00
parent a5eb81c76b
commit 175cba5701

View File

@@ -44,6 +44,8 @@ static char GetKeyUpdate (void);
/* Data */ /* Data */
/*****************************************************************************/ /*****************************************************************************/
/* Color definitions */ /* Color definitions */
#if defined(__PLUS4__) || defined(__C16__) #if defined(__PLUS4__) || defined(__C16__)
# define COLOR_BORDER (BCOLOR_DARKBLUE | CATTR_LUMA6) # define COLOR_BORDER (BCOLOR_DARKBLUE | CATTR_LUMA6)
@@ -53,7 +55,7 @@ static char GetKeyUpdate (void);
# define COLOR_FRAMEHIGH COLOR_BLACK # define COLOR_FRAMEHIGH COLOR_BLACK
# define COLOR_FRAMELOW COLOR_GRAY2 # define COLOR_FRAMELOW COLOR_GRAY2
#else #else
# ifdef COLOR_GRAY3 # if defined(COLOR_GRAY3)
# define COLOR_BORDER COLOR_BLACK # define COLOR_BORDER COLOR_BLACK
# define COLOR_BACKGROUND COLOR_BLACK # define COLOR_BACKGROUND COLOR_BLACK
# define COLOR_TEXTHIGH COLOR_WHITE # define COLOR_TEXTHIGH COLOR_WHITE
@@ -61,7 +63,7 @@ static char GetKeyUpdate (void);
# define COLOR_FRAMEHIGH COLOR_WHITE # define COLOR_FRAMEHIGH COLOR_WHITE
# define COLOR_FRAMELOW COLOR_GRAY3 # define COLOR_FRAMELOW COLOR_GRAY3
# else # else
# ifdef __APPLE2__ # if defined(__APPLE2__) || defined(__APPLE2ENH__)
# define COLOR_BORDER COLOR_BLACK # define COLOR_BORDER COLOR_BLACK
# define COLOR_BACKGROUND COLOR_BLACK # define COLOR_BACKGROUND COLOR_BLACK
# define COLOR_TEXTHIGH COLOR_BLACK # define COLOR_TEXTHIGH COLOR_BLACK
@@ -85,7 +87,7 @@ static char GetKeyUpdate (void);
# define MAX_X 80 # define MAX_X 80
# define MAX_Y 25 # define MAX_Y 25
# define DUMP_BYTES 16 # define DUMP_BYTES 16
#elif defined(__APPLE2__) || defined(__ATARI__) #elif defined(__APPLE2__) || defined(__APPLE2ENH__) || defined(__ATARI__)
# define MAX_X 40 # define MAX_X 40
# define MAX_Y 24 # define MAX_Y 24
# define DUMP_BYTES 8 # define DUMP_BYTES 8
@@ -95,7 +97,10 @@ static char GetKeyUpdate (void);
# define DUMP_BYTES 8 # define DUMP_BYTES 8
#endif #endif
/* Replacement key definitions */
#if defined(__APPLE2__) || defined(__APPLE2ENH__)
# define CH_DEL ('H' - 'A' + 1) /* Ctrl+H */
#endif
/* Defines for opcodes */ /* Defines for opcodes */
#define OPC_BRK 0x00 #define OPC_BRK 0x00
@@ -168,13 +173,14 @@ static TextDesc HelpText [] = {
{ 1, 7, "+ Page down" }, { 1, 7, "+ Page down" },
{ 1, 8, "- Page up" }, { 1, 8, "- Page up" },
{ 1, 9, "Cursor Move up/down" }, { 1, 9, "Cursor Move up/down" },
{ 1, 10, "c Continue" }, { 1, 10, "a/z Move up/down" },
{ 1, 11, "f Follow instruction" }, { 1, 11, "c Continue" },
{ 1, 12, "o Goto origin" }, { 1, 12, "f Follow instruction" },
{ 1, 13, "p Use as new PC value" }, { 1, 13, "o Goto origin" },
{ 1, 14, "q Quit" }, { 1, 14, "p Use as new PC value" },
{ 1, 15, "r Redraw screen" }, { 1, 15, "q Quit" },
{ 1, 16, "s Skip next instruction" }, { 1, 16, "r Redraw screen" },
{ 1, 17, "s Skip next instruction" },
}; };
@@ -884,11 +890,17 @@ static char AsmHandler (void)
brk_pc = AsmAddr; brk_pc = AsmAddr;
break; break;
case 'a':
#ifdef CH_CURS_UP
case CH_CURS_UP: case CH_CURS_UP:
#endif
AsmAddr = AsmBack (AsmAddr, 1); AsmAddr = AsmBack (AsmAddr, 1);
break; break;
case 'z':
#ifdef CH_CURS_DOWN
case CH_CURS_DOWN: case CH_CURS_DOWN:
#endif
AsmAddr += DbgDisAsmLen (AsmAddr); AsmAddr += DbgDisAsmLen (AsmAddr);
break; break;
@@ -1012,11 +1024,17 @@ static char StackHandler (void)
StackHome (); StackHome ();
break; break;
case 'a':
#ifdef CH_CURS_UP:
case CH_CURS_UP: case CH_CURS_UP:
#endif
--StackAddr; --StackAddr;
break; break;
case 'z':
#ifdef CH_CURS_DOWN
case CH_CURS_DOWN: case CH_CURS_DOWN:
#endif
++StackAddr; ++StackAddr;
break; break;
@@ -1096,11 +1114,17 @@ static char CStackHandler (void)
CStackHome (); CStackHome ();
break; break;
case 'a':
#ifdef CH_CURS_UP
case CH_CURS_UP: case CH_CURS_UP:
#endif
CStackAddr -= 2; CStackAddr -= 2;
break; break;
case 'z':
#ifdef CH_CURS_DOWN
case CH_CURS_DOWN: case CH_CURS_DOWN:
#endif
CStackAddr += 2; CStackAddr += 2;
break; break;
@@ -1175,11 +1199,17 @@ static char DumpHandler (void)
DumpHome (); DumpHome ();
break; break;
case 'a':
#ifdef CH_CURS_UP
case CH_CURS_UP: case CH_CURS_UP:
#endif
DumpAddr -= 8; DumpAddr -= 8;
break; break;
case 'z':
#ifdef CH_CURS_DOWN
case CH_CURS_DOWN: case CH_CURS_DOWN:
#endif
DumpAddr += 8; DumpAddr += 8;
break; break;