2006-05-14: Updated to version 1.41

Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
This commit is contained in:
Gwenhael Le Moine 2024-03-19 23:35:29 +01:00
parent 2cc9402f4d
commit 6b7873f5d8
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
23 changed files with 1429 additions and 150 deletions

View file

@ -220,6 +220,22 @@ Sets the cursor to the actual position of the D1 register.
Sets the cursor to the return address placed in the top level of the stack. Sets the cursor to the return address placed in the top level of the stack.
- Follow
Follow is a Pop-up menu to change the address behavior of the memory window. Normally the address of the memory window is static and only change by entering a new address. With Follow the memory window view follow the content of a selected address or register. In follow mode the memory window is only updated after an emulation step.
- Follow none
This is the default mode. The address of the memory window is static.
- Follow Address Content
This is a special mode of indirect addressing. You can specify an address which content will we interpreted as memory pointer. The memory window follow this memory pointer.
- Follow Register PC/D0/D1
The memory window follow the content of the selected register.
- Find... F - Find... F
Calls the "Find" dialog box, allowing you to search for a data sequence in hexadecimal or ASCII mode. The search area is selected by the memory view Mapping mode described in the following section. When you close the "Find" dialog box, you will loose all saved strings in the data combo box. Calls the "Find" dialog box, allowing you to search for a data sequence in hexadecimal or ASCII mode. The search area is selected by the memory view Mapping mode described in the following section. When you close the "Find" dialog box, you will loose all saved strings in the data combo box.
@ -294,4 +310,4 @@ The Miscellaneous window show you the internal state of the interrupt flag, the
You can change the values by pressing the left mouse button over the old content. You can change the values by pressing the left mouse button over the old content.
02/03/04 (c) by Christoph Gießelink 02/24/06 (c) by Christoph Gießelink

BIN
EMU48.EXE

Binary file not shown.

View file

@ -1,4 +1,4 @@
Known bugs and restrictions of Emu48 V1.40 Known bugs and restrictions of Emu48 V1.41
------------------------------------------ ------------------------------------------
- the following I/O bits aren't emulated (incomplete) - the following I/O bits aren't emulated (incomplete)
@ -17,8 +17,7 @@ Known bugs and restrictions of Emu48 V1.40
- the baudrates 1920, 3840, 7680 and 15360 aren't emulated on most - the baudrates 1920, 3840, 7680 and 15360 aren't emulated on most
operating systems operating systems
Windows 95a 1920, 3840, 7680 work, 15360 fail Windows 95a 1920, 3840, 7680 work, 15360 fail
Windows 98 all baudrates fail Windows 98, NT4.0, 2000, XP all baudrates fail
Windows NT4.0 SP3 all baudrates fail
- problems when receiving a break signal on the serial port - problems when receiving a break signal on the serial port
Windows 98, NT4.0 SP4 no retrigger on port open Windows 98, NT4.0 SP4 no retrigger on port open
Windows 98 timing problems setting the RER bit Windows 98 timing problems setting the RER bit
@ -54,4 +53,4 @@ Known bugs and restrictions of Emu48 V1.40
- quitting the emulator while programming the flash isn't allowed, - quitting the emulator while programming the flash isn't allowed,
because the content of flash state machine isn't saved so far because the content of flash state machine isn't saved so far
12/13/05 (c) by Christoph Gießelink, c dot giesselink at gmx dot de 04/18/06 (c) by Christoph Gießelink, c dot giesselink at gmx dot de

View file

@ -1,3 +1,81 @@
Service Pack 41 for Emu48 Version 1.0
DDESERV.C
- bugfix in function DdeCallback(), used wrong return in XTYP_POKE
case for calculator models without stack
DEBUGGER.C
- changed function UpdateMemoryWnd(), added follow dispatcher
- new function OnMemFollow() to handle follow menu entries
- changed function OnDblClick() and OnKeyUpDown(), replaced all
function calls of UpdateMemoryWnd() with ViewMemWnd() because of
the modified behavior of UpdateMemoryWnd()
- changed function Debugger(), added "Follow" menu entry
initialization in WM_INITDIALOG and menu commands handler in
WM_COMMAND section
DISPLAY.C
- added Zoom 3 to all nLcdZoom range assertions
- changed function UpdateMainDisplay(), UpdateMenuDisplay(),
WriteToMainDisplay() and WriteToMenuDisplay(), added Zoom factor 3
handling
EMU48.H
- added definition with valid calculator models
- added macro with model validation code
EMU48.RC
- changed IDD_KMLLOG, replaced "Always" text with "Show Script
compilation result next time"
- added "Follow" menu entries in debugger "Memory" context menu
- changed version and copyright
FILES.C
- bugfix in function NewDocument(), the backup now behave like with
function OpenDocument() -> the backup now contain the emulator
state before the new session and not the new session itself
- bugfix in function OpenDocument(), after reading CPU state, port
pointers must immediately be deleted because on error condition
function ResetDocument() tries to free this memory; added check
for valid calculator model
- bugfix in function RestoreBackup(), window title wasn't updated
- bugfix in function CreateBIPalette(), for 16 and 32 bitcount
bitmaps no logical palette was created
- bugfix in function LoadBitmapFile(), function blocked loading
bitmap when ROM file was missing
KML.C
- changed table szLexDelim[], removed first element
- added new table eIsGlobalBlock[] with valid block tokens
- added new function IsGlobalBlock(), checking if token inside
eIsGlobalBlock[] table
- changed function Lex(), added assertion for mode checking
- changed function ParseLines(), added syntax checking for command
tokens and removed "Open block." message
- changed function ParseBlocks(), added syntax checking for block
tokens
- changed function InitLcd(), added zoom factor 3 to range check of
TOK_ZOOM
- bugfix in function InitButton(), nested scancode block commands
hadn't handled correctly
- bugfix in function LoadKMLGlobal(), keyword "Global" had only been
detected as first command in KML script
- changed function InitKML(), changed checking for valid Model
argument and changed the corresponding error message
KML.H
- adjusted definitions of LEX_BLOCK, LEX_COMMAND and LEX_PARAM to
modified table szLexDelim[]
RESOURCE.H
- added several definitions
RPL.C
- added new function RPL_GarbageCol() for doing a garbage collection
- changed function RPL_CreateTemp(), added garbage collection on low
memory condition
Service Pack 40 for Emu48 Version 1.0 Service Pack 40 for Emu48 Version 1.0
DISPLAY.C DISPLAY.C
@ -38,9 +116,9 @@ KML.C
at string end at string end
- bugfix in function ParseBlocks(), stopped script parsing without - bugfix in function ParseBlocks(), stopped script parsing without
error at unknown block token error at unknown block token
- bugfix in function SkipLines(), TOK_END was handeled wrong -> - bugfix in function SkipLines(), TOK_END was handled wrong -> this
this caused a RunKey end if condition of TOK_IFPRESSED or caused a RunKey end if condition of TOK_IFPRESSED or TOK_IFFLAG
TOK_IFFLAG was false and there was no TOK_ELSE inside this level was false and there was no TOK_ELSE inside this level
- bugfix in function KillKML(), ROM type wasn't reset to the preset - bugfix in function KillKML(), ROM type wasn't reset to the preset
value at the end value at the end

View file

@ -33,10 +33,8 @@ HDDEDATA CALLBACK DdeCallback(UINT iType,UINT iFmt,HCONV hConv,
return (HDDEDATA) (0==lstrcmp(szBuffer,szTopic)); return (HDDEDATA) (0==lstrcmp(szBuffer,szTopic));
case XTYP_POKE: case XTYP_POKE:
if (!bStackEnable) return NULL; // only models with stack, ignore on others // quit on models without stack or illegal data format or not in running state
if (!bStackEnable || iFmt != uCF_HpObj || nState != SM_RUN)
// illegal data format or not in running state
if (iFmt != uCF_HpObj || nState != SM_RUN)
return (HDDEDATA) DDE_FNOTPROCESSED; return (HDDEDATA) DDE_FNOTPROCESSED;
DdeAccessData(hData,&dwSize); // fetch data size DdeAccessData(hData,&dwSize); // fetch data size
@ -96,10 +94,8 @@ cancel:
return hReturn; return hReturn;
case XTYP_REQUEST: case XTYP_REQUEST:
if (!bStackEnable) return NULL; // only models with stack, ignore on others // quit on models without stack or illegal data format or not in running state
if (!bStackEnable || iFmt != uCF_HpObj || nState != SM_RUN)
// illegal data format or not in running state
if (iFmt != uCF_HpObj || nState != SM_RUN)
return NULL; return NULL;
if (WaitForSleepState()) // wait for cpu SHUTDN then sleep state if (WaitForSleepState()) // wait for cpu SHUTDN then sleep state

View file

@ -149,6 +149,9 @@ static INT nRplBreak; // RPL breakpoint
static DWORD dwAdrLine[MAXCODELINES]; // addresses of disassember lines in code window static DWORD dwAdrLine[MAXCODELINES]; // addresses of disassember lines in code window
static DWORD dwAdrMem = 0; // start address of memory window static DWORD dwAdrMem = 0; // start address of memory window
static UINT uIDFol = ID_DEBUG_MEM_FNONE; // follow mode
static DWORD dwAdrMemFol = 0; // follow address memory window
static UINT uIDMap = ID_DEBUG_MEM_MAP; // current memory view mode static UINT uIDMap = ID_DEBUG_MEM_MAP; // current memory view mode
static LPBYTE lbyMapData; // data static LPBYTE lbyMapData; // data
static DWORD dwMapDataSize; // data size static DWORD dwMapDataSize; // data size
@ -640,6 +643,17 @@ static VOID UpdateRegisterWnd(HWND hDlg)
// //
static VOID UpdateMemoryWnd(HWND hDlg) static VOID UpdateMemoryWnd(HWND hDlg)
{ {
// check follow mode setting for memory window
switch(uIDFol)
{
case ID_DEBUG_MEM_FNONE: break;
case ID_DEBUG_MEM_FADDR: dwAdrMem = Read5(dwAdrMemFol); break;
case ID_DEBUG_MEM_FPC: dwAdrMem = Chipset.pc; break;
case ID_DEBUG_MEM_FD0: dwAdrMem = Chipset.d0; break;
case ID_DEBUG_MEM_FD1: dwAdrMem = Chipset.d1; break;
default: _ASSERT(FALSE);
}
ViewMemWnd(hDlg,dwAdrMem); ViewMemWnd(hDlg,dwAdrMem);
return; return;
} }
@ -976,7 +990,7 @@ static BOOL OnCodeGoPC(HWND hDlg)
} }
// //
// set pc to selction // set pc to selection
// //
static BOOL OnCodeSetPcToSelection(HWND hDlg) static BOOL OnCodeSetPcToSelection(HWND hDlg)
{ {
@ -1010,6 +1024,28 @@ static BOOL OnMemGoAdr(HWND hDlg)
return -1; // call windows default handler return -1; // call windows default handler
} }
//
// view from address in memory window
//
static BOOL OnMemFollow(HWND hDlg,UINT uID)
{
if (ID_DEBUG_MEM_FADDR == uID) // ask for follow address
{
DWORD dwAddress = -1; // no address given
OnEnterAddress(hDlg, &dwAddress);
if (dwAddress == -1) return -1; // return at cancel button
dwAdrMemFol = dwAddress;
}
CheckMenuItem(hMenuMem,uIDFol,MF_UNCHECKED);
uIDFol = uID;
CheckMenuItem(hMenuMem,uIDFol,MF_CHECKED);
UpdateMemoryWnd(hDlg); // update memory window
return -1; // call windows default handler
}
// //
// clear all breakpoints // clear all breakpoints
// //
@ -1299,7 +1335,7 @@ static BOOL OnDblClick(HWND hWnd, WORD wId)
byData = (byData >> 4) | (byData << 4); // change nibbles for writing byData = (byData >> 4) | (byData << 4); // change nibbles for writing
Write2(dwAddress, byData); // write data Write2(dwAddress, byData); // write data
UpdateMemoryWnd(GetParent(hWnd)); // update memory window ViewMemWnd(GetParent(hWnd),dwAdrMem); // update memory window
SendMessage(hWnd,LB_SETCURSEL,i,0); SendMessage(hWnd,LB_SETCURSEL,i,0);
return FALSE; return FALSE;
} }
@ -1394,13 +1430,13 @@ static __inline BOOL OnKeyUpDown(HWND hWnd, WPARAM wParam)
{ {
case VK_NEXT: case VK_NEXT:
dwAdrMem = (dwAdrMem + MAXMEMITEMS * MAXMEMLINES) & (dwMapDataSize - 1); dwAdrMem = (dwAdrMem + MAXMEMITEMS * MAXMEMLINES) & (dwMapDataSize - 1);
UpdateMemoryWnd(GetParent(hWnd)); ViewMemWnd(GetParent(hWnd),dwAdrMem);
SendMessage(hWnd,LB_SETCURSEL,wY,0); SendMessage(hWnd,LB_SETCURSEL,wY,0);
return -2; return -2;
case VK_PRIOR: case VK_PRIOR:
dwAdrMem = (dwAdrMem - MAXMEMITEMS * MAXMEMLINES) & (dwMapDataSize - 1); dwAdrMem = (dwAdrMem - MAXMEMITEMS * MAXMEMLINES) & (dwMapDataSize - 1);
UpdateMemoryWnd(GetParent(hWnd)); ViewMemWnd(GetParent(hWnd),dwAdrMem);
SendMessage(hWnd,LB_SETCURSEL,wY,0); SendMessage(hWnd,LB_SETCURSEL,wY,0);
return -2; return -2;
@ -1408,7 +1444,7 @@ static __inline BOOL OnKeyUpDown(HWND hWnd, WPARAM wParam)
if (wY+1 >= MAXMEMLINES) if (wY+1 >= MAXMEMLINES)
{ {
dwAdrMem = (dwAdrMem + MAXMEMITEMS) & (dwMapDataSize - 1); dwAdrMem = (dwAdrMem + MAXMEMITEMS) & (dwMapDataSize - 1);
UpdateMemoryWnd(GetParent(hWnd)); ViewMemWnd(GetParent(hWnd),dwAdrMem);
SendMessage(hWnd,LB_SETCURSEL,wY,0); SendMessage(hWnd,LB_SETCURSEL,wY,0);
return -2; return -2;
} }
@ -1418,7 +1454,7 @@ static __inline BOOL OnKeyUpDown(HWND hWnd, WPARAM wParam)
if (wY == 0) if (wY == 0)
{ {
dwAdrMem = (dwAdrMem - MAXMEMITEMS) & (dwMapDataSize - 1); dwAdrMem = (dwAdrMem - MAXMEMITEMS) & (dwMapDataSize - 1);
UpdateMemoryWnd(GetParent(hWnd)); ViewMemWnd(GetParent(hWnd),dwAdrMem);
SendMessage(hWnd,LB_SETCURSEL,wY,0); SendMessage(hWnd,LB_SETCURSEL,wY,0);
return -2; return -2;
} }
@ -1714,6 +1750,9 @@ static BOOL CALLBACK Debugger(HWND hDlg, UINT message, DWORD wParam, LONG lParam
wInstrSize = INSTRSIZE; // size of last instruction array wInstrSize = INSTRSIZE; // size of last instruction array
wInstrWp = wInstrRp = 0; // write/read pointer wInstrWp = wInstrRp = 0; // write/read pointer
// init "Follow" menu entry in debugger "Memory" context menu
CheckMenuItem(hMenuMem,uIDFol,MF_CHECKED);
InitMemMap(hDlg); // init memory mapping table InitMemMap(hDlg); // init memory mapping table
InitBsArea(hDlg); // init bank switcher list box InitBsArea(hDlg); // init bank switcher list box
DisableMenuKeys(hDlg); // set debug menu keys into run state DisableMenuKeys(hDlg); // set debug menu keys into run state
@ -1807,6 +1846,11 @@ static BOOL CALLBACK Debugger(HWND hDlg, UINT message, DWORD wParam, LONG lParam
case ID_DEBUG_MEM_GOD0: return OnMemGoDx(hDlg,Chipset.d0); case ID_DEBUG_MEM_GOD0: return OnMemGoDx(hDlg,Chipset.d0);
case ID_DEBUG_MEM_GOD1: return OnMemGoDx(hDlg,Chipset.d1); case ID_DEBUG_MEM_GOD1: return OnMemGoDx(hDlg,Chipset.d1);
case ID_DEBUG_MEM_GOSTACK: return OnMemGoDx(hDlg,Chipset.rstk[(Chipset.rstkp-1)&7]); case ID_DEBUG_MEM_GOSTACK: return OnMemGoDx(hDlg,Chipset.rstk[(Chipset.rstkp-1)&7]);
case ID_DEBUG_MEM_FNONE:
case ID_DEBUG_MEM_FADDR:
case ID_DEBUG_MEM_FPC:
case ID_DEBUG_MEM_FD0:
case ID_DEBUG_MEM_FD1: return OnMemFollow(hDlg,LOWORD(wParam));
case ID_DEBUG_MEM_FIND: return OnMemFind(hDlg); case ID_DEBUG_MEM_FIND: return OnMemFind(hDlg);
case ID_DEBUG_MEM_MAP: case ID_DEBUG_MEM_MAP:
case ID_DEBUG_MEM_NCE1: case ID_DEBUG_MEM_NCE1:

View file

@ -34,7 +34,8 @@
|((((c)-1)>>1)<<8) \ |((((c)-1)>>1)<<8) \
|((((c)-1)>>1))) |((((c)-1)>>1)))
#define DIBPIXEL(d,p) *(((DWORD*)(d))++) = ((*((DWORD*)(d)) & dwGrayMask) << 1) | (p) #define DIBPIXEL4(d,p) *(((DWORD*)(d))++) = ((*((DWORD*)(d)) & dwGrayMask) << 1) | (p)
#define DIBPIXEL3(d,p) *(d+2) = *(d+1) = *d = ((*d & (BYTE) dwGrayMask) << 1) | (p); (BYTE *) d += 3
BOOL bGrayscale = FALSE; BOOL bGrayscale = FALSE;
UINT nBackgroundX = 0; UINT nBackgroundX = 0;
@ -91,7 +92,7 @@ static struct
static __inline VOID BuildPattern(VOID) static __inline VOID BuildPattern(VOID)
{ {
_ASSERT(nLcdZoom == 1 || nLcdZoom == 2 || nLcdZoom == 4); _ASSERT(nLcdZoom >= 1 && nLcdZoom <= 4);
if (nLcdZoom == 1) if (nLcdZoom == 1)
{ {
@ -189,7 +190,7 @@ VOID SetLcdMode(BOOL bMode)
VOID CreateLcdBitmap(VOID) VOID CreateLcdBitmap(VOID)
{ {
// create LCD bitmap // create LCD bitmap
_ASSERT(nLcdZoom == 1 || nLcdZoom == 2 || nLcdZoom == 4); _ASSERT(nLcdZoom >= 1 && nLcdZoom <= 4);
bmiLcd.Lcd_bmih.biWidth = LCD_ROW * nLcdZoom; bmiLcd.Lcd_bmih.biWidth = LCD_ROW * nLcdZoom;
bmiLcd.Lcd_bmih.biHeight = -64 * nLcdZoom; bmiLcd.Lcd_bmih.biHeight = -64 * nLcdZoom;
_ASSERT(hLcdDC == NULL); _ASSERT(hLcdDC == NULL);
@ -312,7 +313,7 @@ VOID UpdateMainDisplay(VOID)
} }
#endif #endif
_ASSERT(nLcdZoom == 1 || nLcdZoom == 2 || nLcdZoom == 4); _ASSERT(nLcdZoom >= 1 && nLcdZoom <= 4);
if (!(Chipset.IORam[BITOFFSET]&DON)) if (!(Chipset.IORam[BITOFFSET]&DON))
{ {
nLines = 64; nLines = 64;
@ -331,10 +332,10 @@ VOID UpdateMainDisplay(VOID)
Npeek(Buf,d+Chipset.start1,36); Npeek(Buf,d+Chipset.start1,36);
for (x = 0; x < 36; ++x) // every 4 pixel for (x = 0; x < 36; ++x) // every 4 pixel
{ {
DIBPIXEL(p,Pattern[Buf[x]&1]); DIBPIXEL4(p,Pattern[Buf[x]&1]);
DIBPIXEL(p,Pattern[(Buf[x]>>1) & 1]); DIBPIXEL4(p,Pattern[(Buf[x]>>1) & 1]);
DIBPIXEL(p,Pattern[(Buf[x]>>2) & 1]); DIBPIXEL4(p,Pattern[(Buf[x]>>2) & 1]);
DIBPIXEL(p,Pattern[(Buf[x]>>3) & 1]); DIBPIXEL4(p,Pattern[(Buf[x]>>3) & 1]);
} }
CopyMemory(p, p-LCD_ROW*4, LCD_ROW*4); CopyMemory(p, p-LCD_ROW*4, LCD_ROW*4);
p+=LCD_ROW*4; p+=LCD_ROW*4;
@ -343,6 +344,26 @@ VOID UpdateMainDisplay(VOID)
d+=Chipset.width; d+=Chipset.width;
} }
} }
if (nLcdZoom == 3)
{
for (y = 0; y < nLines; ++y)
{
// read line with actual start1 address!!
Npeek(Buf,d+Chipset.start1,36);
for (x = 0; x < 36; ++x) // every 4 pixel
{
DIBPIXEL3(p,(Buf[x]>>0) & 1);
DIBPIXEL3(p,(Buf[x]>>1) & 1);
DIBPIXEL3(p,(Buf[x]>>2) & 1);
DIBPIXEL3(p,(Buf[x]>>3) & 1);
}
CopyMemory(p, p-LCD_ROW*3, LCD_ROW*3);
p+=LCD_ROW*3;
CopyMemory(p, p-LCD_ROW*3, LCD_ROW*3);
p+=LCD_ROW*3;
d+=Chipset.width;
}
}
if (nLcdZoom == 2) if (nLcdZoom == 2)
{ {
for (y = 0; y < nLines; ++y) for (y = 0; y < nLines; ++y)
@ -351,8 +372,8 @@ VOID UpdateMainDisplay(VOID)
Npeek(Buf,d+Chipset.start1,36); Npeek(Buf,d+Chipset.start1,36);
for (x = 0; x < 36; ++x) // every 4 pixel for (x = 0; x < 36; ++x) // every 4 pixel
{ {
DIBPIXEL(p,Pattern[Buf[x]&3]); DIBPIXEL4(p,Pattern[Buf[x]&3]);
DIBPIXEL(p,Pattern[Buf[x]>>2]); DIBPIXEL4(p,Pattern[Buf[x]>>2]);
} }
CopyMemory(p, p-LCD_ROW*2, LCD_ROW*2); CopyMemory(p, p-LCD_ROW*2, LCD_ROW*2);
p+=LCD_ROW*2; p+=LCD_ROW*2;
@ -367,7 +388,7 @@ VOID UpdateMainDisplay(VOID)
Npeek(Buf,d+Chipset.start1,36); Npeek(Buf,d+Chipset.start1,36);
for (x = 0; x < 36; ++x) // every 4 pixel for (x = 0; x < 36; ++x) // every 4 pixel
{ {
DIBPIXEL(p,Pattern[Buf[x]]); DIBPIXEL4(p,Pattern[Buf[x]]);
} }
d+=Chipset.width; d+=Chipset.width;
} }
@ -402,7 +423,7 @@ VOID UpdateMenuDisplay(VOID)
nLines = LINES(Chipset.lcounter); nLines = LINES(Chipset.lcounter);
if (nLines == 64) return; // menu disabled if (nLines == 64) return; // menu disabled
_ASSERT(nLcdZoom == 1 || nLcdZoom == 2 || nLcdZoom == 4); _ASSERT(nLcdZoom >= 1 && nLcdZoom <= 4);
// calculate bitmap offset // calculate bitmap offset
p = pbyLcd + (nLines*nLcdZoom*LCD_ROW*nLcdZoom); p = pbyLcd + (nLines*nLcdZoom*LCD_ROW*nLcdZoom);
d = 0; // pixel offset counter d = 0; // pixel offset counter
@ -413,10 +434,10 @@ VOID UpdateMenuDisplay(VOID)
Npeek(Buf,d+Chipset.start2,34); // 34 nibbles are viewed Npeek(Buf,d+Chipset.start2,34); // 34 nibbles are viewed
for (x = 0; x < 34; ++x) // every 4 pixel for (x = 0; x < 34; ++x) // every 4 pixel
{ {
DIBPIXEL(p,Pattern[Buf[x]&1]); DIBPIXEL4(p,Pattern[Buf[x]&1]);
DIBPIXEL(p,Pattern[(Buf[x]>>1) & 1]); DIBPIXEL4(p,Pattern[(Buf[x]>>1) & 1]);
DIBPIXEL(p,Pattern[(Buf[x]>>2) & 1]); DIBPIXEL4(p,Pattern[(Buf[x]>>2) & 1]);
DIBPIXEL(p,Pattern[(Buf[x]>>3) & 1]); DIBPIXEL4(p,Pattern[(Buf[x]>>3) & 1]);
} }
// adjust pointer to 36 DIBPIXEL drawing calls // adjust pointer to 36 DIBPIXEL drawing calls
p += (36-34) * 4 * sizeof(DWORD); p += (36-34) * 4 * sizeof(DWORD);
@ -427,6 +448,27 @@ VOID UpdateMenuDisplay(VOID)
d+=34; d+=34;
} }
} }
if (nLcdZoom == 3)
{
for (y = nLines; y < 64; ++y)
{
Npeek(Buf,d+Chipset.start2,34); // 34 nibbles are viewed
for (x = 0; x < 34; ++x) // every 4 pixel
{
DIBPIXEL3(p,(Buf[x]>>0) & 1);
DIBPIXEL3(p,(Buf[x]>>1) & 1);
DIBPIXEL3(p,(Buf[x]>>2) & 1);
DIBPIXEL3(p,(Buf[x]>>3) & 1);
}
// adjust pointer to 36 DIBPIXEL drawing calls
p += (36-34) * 3 * sizeof(DWORD);
CopyMemory(p, p-LCD_ROW*3, LCD_ROW*3);
p+=LCD_ROW*3;
CopyMemory(p, p-LCD_ROW*3, LCD_ROW*3);
p+=LCD_ROW*3;
d+=34;
}
}
if (nLcdZoom == 2) if (nLcdZoom == 2)
{ {
for (y = nLines; y < 64; ++y) for (y = nLines; y < 64; ++y)
@ -434,8 +476,8 @@ VOID UpdateMenuDisplay(VOID)
Npeek(Buf,d+Chipset.start2,34); // 34 nibbles are viewed Npeek(Buf,d+Chipset.start2,34); // 34 nibbles are viewed
for (x = 0; x < 34; ++x) // every 4 pixel for (x = 0; x < 34; ++x) // every 4 pixel
{ {
DIBPIXEL(p,Pattern[Buf[x]&3]); DIBPIXEL4(p,Pattern[Buf[x]&3]);
DIBPIXEL(p,Pattern[Buf[x]>>2]); DIBPIXEL4(p,Pattern[Buf[x]>>2]);
} }
// adjust pointer to 36 DIBPIXEL drawing calls // adjust pointer to 36 DIBPIXEL drawing calls
p += (36-34) * 2 * sizeof(DWORD); p += (36-34) * 2 * sizeof(DWORD);
@ -451,7 +493,7 @@ VOID UpdateMenuDisplay(VOID)
Npeek(Buf,d+Chipset.start2,34); // 34 nibbles are viewed Npeek(Buf,d+Chipset.start2,34); // 34 nibbles are viewed
for (x = 0; x < 34; ++x) // every 4 pixel for (x = 0; x < 34; ++x) // every 4 pixel
{ {
DIBPIXEL(p,Pattern[Buf[x]]); DIBPIXEL4(p,Pattern[Buf[x]]);
} }
// adjust pointer to 36 DIBPIXEL drawing calls // adjust pointer to 36 DIBPIXEL drawing calls
p += (36-34) * 1 * sizeof(DWORD); p += (36-34) * 1 * sizeof(DWORD);
@ -503,7 +545,7 @@ VOID WriteToMainDisplay(LPBYTE a, DWORD d, UINT s)
_ASSERT(y0 >= 0 && y0 < (INT) nLines); _ASSERT(y0 >= 0 && y0 < (INT) nLines);
// illegal zoom factor // illegal zoom factor
_ASSERT(nLcdZoom == 1 || nLcdZoom == 2 || nLcdZoom == 4); _ASSERT(nLcdZoom >= 1 && nLcdZoom <= 4);
// calculate memory position in LCD bitmap // calculate memory position in LCD bitmap
p = (DWORD*) (pbyLcd + y0*LCD_ROW*nLcdZoom*nLcdZoom p = (DWORD*) (pbyLcd + y0*LCD_ROW*nLcdZoom*nLcdZoom
@ -516,9 +558,25 @@ VOID WriteToMainDisplay(LPBYTE a, DWORD d, UINT s)
if (nLcdZoom == 4) if (nLcdZoom == 4)
{ {
p[432] = p[288] = p[144] = p[0] = Pattern[(*a)&1]; p[432] = p[288] = p[144] = p[0] = Pattern[(*a)&1];
p[433] = p[289] = p[145] = p[1] = Pattern[((*a)>>1) &1]; p[433] = p[289] = p[145] = p[1] = Pattern[((*a)>>1)&1];
p[434] = p[290] = p[146] = p[2] = Pattern[((*a)>>2) &1]; p[434] = p[290] = p[146] = p[2] = Pattern[((*a)>>2)&1];
p[435] = p[291] = p[147] = p[3] = Pattern[((*a)>>3) &1]; p[435] = p[291] = p[147] = p[3] = Pattern[((*a)>>3)&1];
}
if (nLcdZoom == 3)
{
LPBYTE b = (LPBYTE) p;
b[216*4+2] = b[216*4+1] = b[216*4+0] =
b[108*4+2] = b[108*4+1] = b[108*4+0] =
b[ 0*4+2] = b[ 0*4+1] = b[ 0*4+0] = (*a)&1;
b[216*4+5] = b[216*4+4] = b[216*4+3] =
b[108*4+5] = b[108*4+4] = b[108*4+3] =
b[ 0*4+5] = b[ 0*4+4] = b[ 0*4+3] = ((*a)>>1)&1;
b[216*4+8] = b[216*4+7] = b[216*4+6] =
b[108*4+8] = b[108*4+7] = b[108*4+6] =
b[ 0*4+8] = b[ 0*4+7] = b[ 0*4+6] = ((*a)>>2)&1;
b[216*4+11] = b[216*4+10] = b[216*4+9] =
b[108*4+11] = b[108*4+10] = b[108*4+9] =
b[ 0*4+11] = b[ 0*4+10] = b[ 0*4+9] = ((*a)>>3)&1;
} }
if (nLcdZoom == 2) if (nLcdZoom == 2)
{ {
@ -569,10 +627,10 @@ VOID WriteToMainDisplay(LPBYTE a, DWORD d, UINT s)
y = y0 + 1; // draw one line y = y0 + 1; // draw one line
} }
x0 <<= nLcdZoom / 2; // adjust dimensions to pixel size x0 *= nLcdZoom; // adjust dimensions to pixel size
x <<= nLcdZoom / 2; x *= nLcdZoom;
y0 <<= nLcdZoom / 2; y0 *= nLcdZoom;
y <<= nLcdZoom / 2; y *= nLcdZoom;
EnterCriticalSection(&csGDILock); EnterCriticalSection(&csGDILock);
{ {
@ -609,10 +667,14 @@ VOID WriteToMenuDisplay(LPBYTE a, DWORD d, UINT s)
y0 = y = (d / 34) + nLines; y0 = y = (d / 34) + nLines;
x0 = x = d % 34; x0 = x = d % 34;
if (x0 > 32) return; // position out of viewed area if (x0 > 32) return; // position out of viewed area
_ASSERT(nLcdZoom == 1 || nLcdZoom == 2 || nLcdZoom == 4); _ASSERT(nLcdZoom >= 1 && nLcdZoom <= 4);
// calculate memory position in LCD bitmap
p = (DWORD*) (pbyLcd + y0*LCD_ROW*nLcdZoom*nLcdZoom
+ x0*sizeof(*p)*nLcdZoom);
if (nLcdZoom == 4) if (nLcdZoom == 4)
{ {
p = (DWORD*)(pbyLcd + y0*LCD_ROW*16 + x0*16);
while (s--) while (s--)
{ {
if (x<34) if (x<34)
@ -641,9 +703,47 @@ VOID WriteToMenuDisplay(LPBYTE a, DWORD d, UINT s)
y0<<=2; y<<=2; y0<<=2; y<<=2;
if (x>524) x=524; if (x>524) x=524;
} }
if (nLcdZoom == 3)
{
while (s--)
{
if (x<34)
{
LPBYTE b = (LPBYTE) p;
b[216*4+2] = b[216*4+1] = b[216*4+0] =
b[108*4+2] = b[108*4+1] = b[108*4+0] =
b[ 0*4+2] = b[ 0*4+1] = b[ 0*4+0] = (*a)&1;
b[216*4+5] = b[216*4+4] = b[216*4+3] =
b[108*4+5] = b[108*4+4] = b[108*4+3] =
b[ 0*4+5] = b[ 0*4+4] = b[ 0*4+3] = ((*a)>>1)&1;
b[216*4+8] = b[216*4+7] = b[216*4+6] =
b[108*4+8] = b[108*4+7] = b[108*4+6] =
b[ 0*4+8] = b[ 0*4+7] = b[ 0*4+6] = ((*a)>>2)&1;
b[216*4+11] = b[216*4+10] = b[216*4+9] =
b[108*4+11] = b[108*4+10] = b[108*4+9] =
b[ 0*4+11] = b[ 0*4+10] = b[ 0*4+9] = ((*a)>>3)&1;
}
a++;
x++;
if ((x==34)&&s)
{
x=0;
y++;
if (y==64) break;
p=(DWORD*)(pbyLcd+y*LCD_ROW*9);
} else p+=3;
}
if (y0!=y) // modified more than 1 line
{
x = 34; // full line
x0 = 0; // no offset
}
x0*=12; x*=12; // calculate pixel address
y0*=3; y*=3;
if (x>393) x=393;
}
if (nLcdZoom == 2) if (nLcdZoom == 2)
{ {
p = (DWORD*)(pbyLcd + y0*LCD_ROW*4 + x0*8);
while (s--) while (s--)
{ {
if (x<34) if (x<34)
@ -672,7 +772,6 @@ VOID WriteToMenuDisplay(LPBYTE a, DWORD d, UINT s)
} }
if (nLcdZoom == 1) if (nLcdZoom == 1)
{ {
p = (DWORD*)(pbyLcd + y0*LCD_ROW + x0*4);
while (s--) while (s--)
{ {
if (x<34) *p = Pattern[*a]; if (x<34) *p = Pattern[*a];

View file

@ -13,7 +13,7 @@
#include "kml.h" #include "kml.h"
#include "debugger.h" #include "debugger.h"
#define VERSION "1.40" #define VERSION "1.41"
#define CF_HPOBJ "CF_HPOBJ" // clipboard format for DDE #define CF_HPOBJ "CF_HPOBJ" // clipboard format for DDE
#define MAXPORTS 256 // number of COM ports #define MAXPORTS 256 // number of COM ports

View file

@ -9,6 +9,7 @@
#include "types.h" #include "types.h"
#define HARDWARE "Yorke" // emulator hardware #define HARDWARE "Yorke" // emulator hardware
#define MODELS "6AEGSX" // valid calculator models
#define ARRAYSIZEOF(a) (sizeof(a) / sizeof(a[0])) #define ARRAYSIZEOF(a) (sizeof(a) / sizeof(a[0]))
@ -56,6 +57,9 @@
#define DISP_MENUE 0x04 #define DISP_MENUE 0x04
#define DISP_ANNUN 0x08 #define DISP_ANNUN 0x08
// macro to check for valid calculator model
#define isModelValid(m) (m != 0 && strchr(MODELS,m) != NULL)
// values for mapping area // values for mapping area
enum MMUMAP { M_IO, M_ROM, M_RAM, M_P1, M_P2, M_BS }; enum MMUMAP { M_IO, M_ROM, M_RAM, M_P1, M_P2, M_BS };

View file

@ -225,7 +225,7 @@ FONT 8, "MS Sans Serif"
BEGIN BEGIN
ICON IDI_EMU48,IDC_STATIC,7,6,20,20,SS_REALSIZEIMAGE ICON IDI_EMU48,IDC_STATIC,7,6,20,20,SS_REALSIZEIMAGE
LTEXT "",IDC_VERSION,29,6,151,8,NOT WS_GROUP LTEXT "",IDC_VERSION,29,6,151,8,NOT WS_GROUP
LTEXT "Copyright © 2005 Sébastien Carlier && Christoph Gießelink", LTEXT "Copyright © 2006 Sébastien Carlier && Christoph Gießelink",
IDC_STATIC,29,18,181,8 IDC_STATIC,29,18,181,8
DEFPUSHBUTTON "OK",IDOK,215,12,39,14 DEFPUSHBUTTON "OK",IDOK,215,12,39,14
EDITTEXT IDC_LICENSE,7,33,247,112,ES_MULTILINE | ES_AUTOHSCROLL | EDITTEXT IDC_LICENSE,7,33,247,112,ES_MULTILINE | ES_AUTOHSCROLL |
@ -307,10 +307,11 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "KML Script Compilation Result" CAPTION "KML Script Compilation Result"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
DEFPUSHBUTTON "OK",IDOK,86,146,50,14 DEFPUSHBUTTON "OK",IDOK,188,146,50,14
PUSHBUTTON "Cancel",IDCANCEL,164,146,50,14 PUSHBUTTON "Cancel",IDCANCEL,244,146,50,14
CONTROL "Always",IDC_ALWAYSDISPLOG,"Button",BS_AUTOCHECKBOX | CONTROL "Show Script compilation result next time",
WS_TABSTOP,258,146,36,14 IDC_ALWAYSDISPLOG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
7,146,139,14
GROUPBOX "",IDC_STATIC,7,7,287,36 GROUPBOX "",IDC_STATIC,7,7,287,36
CTEXT "Title of the Script",IDC_TITLE,71,14,158,8 CTEXT "Title of the Script",IDC_TITLE,71,14,158,8
CTEXT "by",IDC_STATIC,71,22,158,8 CTEXT "by",IDC_STATIC,71,22,158,8
@ -548,8 +549,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,4,0,0 FILEVERSION 1,4,1,0
PRODUCTVERSION 1,4,0,0 PRODUCTVERSION 1,4,1,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -566,12 +567,12 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "Sebastien Carlier & Christoph Gießelink\0" VALUE "CompanyName", "Sebastien Carlier & Christoph Gießelink\0"
VALUE "FileDescription", "HP38/39/40/48/49 Emulator\0" VALUE "FileDescription", "HP38/39/40/48/49 Emulator\0"
VALUE "FileVersion", "1, 4, 0, 0\0" VALUE "FileVersion", "1, 4, 1, 0\0"
VALUE "InternalName", "Emu48\0" VALUE "InternalName", "Emu48\0"
VALUE "LegalCopyright", "Copyright © 2005\0" VALUE "LegalCopyright", "Copyright © 2006\0"
VALUE "OriginalFilename", "Emu48.exe\0" VALUE "OriginalFilename", "Emu48.exe\0"
VALUE "ProductName", "Emu48\0" VALUE "ProductName", "Emu48\0"
VALUE "ProductVersion", "1, 4, 0, 0\0" VALUE "ProductVersion", "1, 4, 1, 0\0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"
@ -709,6 +710,15 @@ BEGIN
MENUITEM "Go to D&0", ID_DEBUG_MEM_GOD0 MENUITEM "Go to D&0", ID_DEBUG_MEM_GOD0
MENUITEM "Go to D&1", ID_DEBUG_MEM_GOD1 MENUITEM "Go to D&1", ID_DEBUG_MEM_GOD1
MENUITEM "Go to &Stack", ID_DEBUG_MEM_GOSTACK MENUITEM "Go to &Stack", ID_DEBUG_MEM_GOSTACK
POPUP "Follo&w"
BEGIN
MENUITEM "&none", ID_DEBUG_MEM_FNONE
MENUITEM SEPARATOR
MENUITEM "&Address Content", ID_DEBUG_MEM_FADDR
MENUITEM "Register &PC", ID_DEBUG_MEM_FPC
MENUITEM "Register D&0", ID_DEBUG_MEM_FD0
MENUITEM "Register D&1", ID_DEBUG_MEM_FD1
END
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Find...\tF", ID_DEBUG_MEM_FIND MENUITEM "&Find...\tF", ID_DEBUG_MEM_FIND
MENUITEM SEPARATOR MENUITEM SEPARATOR

View file

@ -565,6 +565,7 @@ VOID ResetDocument(VOID)
BOOL NewDocument(VOID) BOOL NewDocument(VOID)
{ {
SaveBackup();
ResetDocument(); ResetDocument();
if (!DisplayChooseKml(0)) goto restore; if (!DisplayChooseKml(0)) goto restore;
@ -643,7 +644,6 @@ BOOL NewDocument(VOID)
} }
LoadBreakpointList(NULL); // clear debugger breakpoint list LoadBreakpointList(NULL); // clear debugger breakpoint list
RomSwitch(0); // boot ROM view of HP49G and map memory RomSwitch(0); // boot ROM view of HP49G and map memory
SaveBackup();
return TRUE; return TRUE;
restore: restore:
RestoreBackup(); RestoreBackup();
@ -770,10 +770,16 @@ BOOL OpenDocument(LPCTSTR szFilename)
SetFilePointer(hFile, lSizeofChipset-sizeof(Chipset), NULL, FILE_CURRENT); SetFilePointer(hFile, lSizeofChipset-sizeof(Chipset), NULL, FILE_CURRENT);
lSizeofChipset = sizeof(Chipset); lSizeofChipset = sizeof(Chipset);
} }
if (lBytesRead != lSizeofChipset) goto read_err; Chipset.Port0 = NULL; // delete invalid port pointers
Chipset.Port0 = NULL;
Chipset.Port1 = NULL; Chipset.Port1 = NULL;
Chipset.Port2 = NULL; Chipset.Port2 = NULL;
if (lBytesRead != lSizeofChipset) goto read_err;
if (!isModelValid(Chipset.type)) // check for valid model in emulator state file
{
AbortMessage(_T("Emulator state file with invalid calculator model."));
goto restore;
}
SetWindowLocation(hWnd,Chipset.nPosX,Chipset.nPosY); SetWindowLocation(hWnd,Chipset.nPosX,Chipset.nPosY);
@ -1064,6 +1070,7 @@ BOOL RestoreBackup(VOID)
MapPort2((nArgc < 3) ? szPort2Filename : ppArgv[2]); MapPort2((nArgc < 3) ? szPort2Filename : ppArgv[2]);
} }
} }
SetWindowTitle(szCurrentFilename);
SetWindowLocation(hWnd,Chipset.nPosX,Chipset.nPosY); SetWindowLocation(hWnd,Chipset.nPosX,Chipset.nPosY);
UpdateWindowStatus(); UpdateWindowStatus();
Map(0x00,0xFF); Map(0x00,0xFF);
@ -1376,9 +1383,9 @@ static HPALETTE CreateBIPalette(BITMAPINFOHEADER CONST *lpbi)
} }
else else
{ {
if (lpbi->biBitCount == 24) // create halftone palette for 16, 24 and 32 bitcount bitmaps
{
// A 24 bitcount DIB has no color table entries so, set the // 16, 24 and 32 bitcount DIB's have no color table entries so, set the
// number of to the maximum value (256). // number of to the maximum value (256).
nNumColors = 256; nNumColors = 256;
pPal = HeapAlloc(hHeap,0,sizeof(LOGPALETTE) + nNumColors * sizeof(PALETTEENTRY)); pPal = HeapAlloc(hHeap,0,sizeof(LOGPALETTE) + nNumColors * sizeof(PALETTEENTRY));
@ -1405,7 +1412,6 @@ static HPALETTE CreateBIPalette(BITMAPINFOHEADER CONST *lpbi)
hpal = CreatePalette(pPal); hpal = CreatePalette(pPal);
HeapFree(hHeap,0,pPal); HeapFree(hHeap,0,pPal);
} }
}
return hpal; return hpal;
} }
@ -1418,7 +1424,6 @@ HBITMAP LoadBitmapFile(LPCTSTR szFilename)
LPBITMAPFILEHEADER pBmfh; LPBITMAPFILEHEADER pBmfh;
LPBITMAPINFO pBmi; LPBITMAPINFO pBmi;
if (pbyRom == NULL) return NULL;
SetCurrentDirectory(szEmuDirectory); SetCurrentDirectory(szEmuDirectory);
hFile = CreateFile(szFilename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); hFile = CreateFile(szFilename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
SetCurrentDirectory(szCurrentDirectory); SetCurrentDirectory(szCurrentDirectory);

View file

@ -55,10 +55,9 @@ static LPTSTR szLexString;
static LPTSTR szText; static LPTSTR szText;
static LPCTSTR szLexDelim[] = static LPCTSTR szLexDelim[] =
{ {
_T(""), _T(" \t\n\r"), // valid whitespaces for LEX_BLOCK
_T(" \t\n\r"), _T(" \t\n\r"), // valid whitespaces for LEX_COMMAND
_T(" \t\n\r"), _T(" \t\r") // valid whitespaces for LEX_PARAM
_T(" \t\r")
}; };
static KmlToken pLexToken[] = static KmlToken pLexToken[] =
@ -107,6 +106,16 @@ static KmlToken pLexToken[] =
{0, 000000, 0,_T("")}, {0, 000000, 0,_T("")},
}; };
static CONST TokenId eIsGlobalBlock[] =
{
TOK_GLOBAL,
TOK_BACKGROUND,
TOK_LCD,
TOK_ANNUNCIATOR,
TOK_BUTTON,
TOK_SCANCODE
};
static CONST TokenId eIsBlock[] = static CONST TokenId eIsBlock[] =
{ {
TOK_IFFLAG, TOK_IFFLAG,
@ -536,6 +545,17 @@ static VOID CleanLex(VOID)
return; return;
} }
static BOOL IsGlobalBlock(TokenId eId)
{
UINT i;
for (i = 0; i < ARRAYSIZEOF(eIsGlobalBlock); ++i)
{
if (eId == eIsGlobalBlock[i]) return TRUE;
}
return FALSE;
}
static BOOL IsBlock(TokenId eId) static BOOL IsBlock(TokenId eId)
{ {
UINT i; UINT i;
@ -675,6 +695,9 @@ static LPTSTR ParseString(VOID)
static TokenId Lex(UINT nMode) static TokenId Lex(UINT nMode)
{ {
_ASSERT(nMode >= LEX_BLOCK && nMode <= LEX_PARAM);
_ASSERT(nMode >= 0 && nMode < ARRAYSIZEOF(szLexDelim));
SkipWhite(nMode); SkipWhite(nMode);
if (_istdigit(*szText)) if (_istdigit(*szText))
{ {
@ -820,6 +843,11 @@ static KmlLine* ParseLines(VOID)
while ((eToken = Lex(LEX_COMMAND))) while ((eToken = Lex(LEX_COMMAND)))
{ {
if (IsGlobalBlock(eToken)) // check for block command
{
PrintfToLog(_T("%i: Invalid Command %s."), nLexLine, GetStringOf(eToken));
goto abort;
}
if (IsBlock(eToken)) nLevel++; if (IsBlock(eToken)) nLevel++;
if (eToken == TOK_INCLUDE) if (eToken == TOK_INCLUDE)
{ {
@ -874,7 +902,6 @@ static KmlLine* ParseLines(VOID)
if (pLine) pLine->pNext = NULL; if (pLine) pLine->pNext = NULL;
return pFirst; return pFirst;
} }
AddToLog(_T("Open block."));
abort: abort:
if (pFirst) if (pFirst)
{ {
@ -1014,6 +1041,12 @@ static KmlBlock* ParseBlocks(VOID)
while (pBlock->pNext) pBlock=pBlock->pNext; while (pBlock->pNext) pBlock=pBlock->pNext;
continue; continue;
} }
if (!IsGlobalBlock(eToken)) // check for valid block commands
{
PrintfToLog(_T("%i: Invalid Block %s."), nLexLine, GetStringOf(eToken));
FatalError();
goto abort;
}
if (pFirst) if (pFirst)
pBlock = pBlock->pNext = ParseBlock(eToken); pBlock = pBlock->pNext = ParseBlock(eToken);
else else
@ -1162,7 +1195,7 @@ static KmlLine* InitLcd(KmlBlock* pBlock)
break; break;
case TOK_ZOOM: case TOK_ZOOM:
nLcdZoom = pLine->nParam[0]; nLcdZoom = pLine->nParam[0];
if (nLcdZoom != 1 && nLcdZoom != 2 && nLcdZoom != 4) if (!(nLcdZoom >= 1 && nLcdZoom <= 4))
nLcdZoom = 1; nLcdZoom = 1;
break; break;
case TOK_COLOR: case TOK_COLOR:
@ -1230,6 +1263,7 @@ static VOID InitButton(KmlBlock* pBlock)
{ {
if (nLevel) if (nLevel)
{ {
if (IsBlock(pLine->eCommand)) nLevel++;
if (pLine->eCommand == TOK_END) nLevel--; if (pLine->eCommand == TOK_END) nLevel--;
pLine = pLine->pNext; pLine = pLine->pNext;
continue; continue;
@ -2085,11 +2119,14 @@ static KmlBlock* LoadKMLGlobal(LPCTSTR szFilename)
InitLex(lpBuf); InitLex(lpBuf);
pBlock = NULL; pBlock = NULL;
eToken = Lex(LEX_BLOCK); while ((eToken = Lex(LEX_BLOCK)) != TOK_NONE)
{
if (eToken == TOK_GLOBAL) if (eToken == TOK_GLOBAL)
{ {
pBlock = ParseBlock(eToken); pBlock = ParseBlock(eToken);
if (pBlock) pBlock->pNext = NULL; if (pBlock) pBlock->pNext = NULL;
break;
}
} }
CleanLex(); CleanLex();
ClearLog(); ClearLog();
@ -2163,9 +2200,9 @@ BOOL InitKML(LPCTSTR szFilename, BOOL bNoLog)
pBlock = pBlock->pNext; pBlock = pBlock->pNext;
} }
if (cCurrentRomType == 0) if (!isModelValid(cCurrentRomType))
{ {
AddToLog(_T("This KML Script doesn't specify the model.")); AddToLog(_T("This KML Script doesn't specify a valid model."));
goto quit; goto quit;
} }
if (pbyRom == NULL) if (pbyRom == NULL)

View file

@ -7,9 +7,9 @@
* *
*/ */
#define LEX_BLOCK 1 #define LEX_BLOCK 0
#define LEX_COMMAND 2 #define LEX_COMMAND 1
#define LEX_PARAM 3 #define LEX_PARAM 2
typedef enum eTokenId typedef enum eTokenId
{ {

View file

@ -195,27 +195,32 @@
#define ID_DEBUG_MEM_GOD0 40045 #define ID_DEBUG_MEM_GOD0 40045
#define ID_DEBUG_MEM_GOD1 40046 #define ID_DEBUG_MEM_GOD1 40046
#define ID_DEBUG_MEM_GOSTACK 40047 #define ID_DEBUG_MEM_GOSTACK 40047
#define ID_DEBUG_MEM_FIND 40048 #define ID_DEBUG_MEM_FNONE 40048
#define ID_DEBUG_MEM_MAP 40049 #define ID_DEBUG_MEM_FADDR 40049
#define ID_DEBUG_MEM_NCE1 40050 #define ID_DEBUG_MEM_FPC 40050
#define ID_DEBUG_MEM_NCE2 40051 #define ID_DEBUG_MEM_FD0 40051
#define ID_DEBUG_MEM_CE1 40052 #define ID_DEBUG_MEM_FD1 40052
#define ID_DEBUG_MEM_CE2 40053 #define ID_DEBUG_MEM_FIND 40053
#define ID_DEBUG_MEM_NCE3 40054 #define ID_DEBUG_MEM_MAP 40054
#define ID_DEBUG_STACK_PUSH 40055 #define ID_DEBUG_MEM_NCE1 40055
#define ID_DEBUG_STACK_POP 40056 #define ID_DEBUG_MEM_NCE2 40056
#define ID_DEBUG_STACK_MODIFY 40057 #define ID_DEBUG_MEM_CE1 40057
#define ID_INTR_STEPOVERINT 40058 #define ID_DEBUG_MEM_CE2 40058
#define ID_INFO_LASTINSTRUCTIONS 40059 #define ID_DEBUG_MEM_NCE3 40059
#define ID_INFO_PROFILE 40060 #define ID_DEBUG_STACK_PUSH 40060
#define ID_INFO_WRITEONLYREG 40061 #define ID_DEBUG_STACK_POP 40061
#define ID_DEBUG_STACK_MODIFY 40062
#define ID_INTR_STEPOVERINT 40063
#define ID_INFO_LASTINSTRUCTIONS 40064
#define ID_INFO_PROFILE 40065
#define ID_INFO_WRITEONLYREG 40066
// Next default values for new objects // Next default values for new objects
// //
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS #ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 123 #define _APS_NEXT_RESOURCE_VALUE 123
#define _APS_NEXT_COMMAND_VALUE 40062 #define _APS_NEXT_COMMAND_VALUE 40067
#define _APS_NEXT_CONTROL_VALUE 1122 #define _APS_NEXT_CONTROL_VALUE 1122
#define _APS_NEXT_SYMED_VALUE 108 #define _APS_NEXT_SYMED_VALUE 108
#endif #endif

View file

@ -65,6 +65,8 @@
#define DOROMP 0x02E92 // XLIB Name #define DOROMP 0x02E92 // XLIB Name
#define SEMI 0x0312B // ; #define SEMI 0x0312B // ;
#define GARBAGECOL 0x0613E // =GARBAGECOL entry for HP48S/G and HP49G
// check for Metakernel version // check for Metakernel version
#define METAKERNEL Metakernel() #define METAKERNEL Metakernel()
@ -95,6 +97,32 @@ static BOOL Metakernel(VOID)
return bMkDetect; return bMkDetect;
} }
static DWORD RPL_GarbageCol(VOID) // RPL variables must be in system RAM
{
CHIPSET OrgChipset;
DWORD dwAVMEM;
// only for HP48SX, HP48GX and HP49G
_ASSERT(cCurrentRomType == 'S' || cCurrentRomType == 'G' || cCurrentRomType == 'X');
OrgChipset = Chipset; // save original chipset
// entry for =GARBAGECOL
Chipset.P = 0; // P=0
Chipset.mode_dec = FALSE; // hex mode
Chipset.pc = GARBAGECOL; // =GARBAGECOL entry
rstkpush(0xFFFFF); // return address for stopping
while (Chipset.pc != 0xFFFFF) // wait for stop address
{
EvalOpcode(FASTPTR(Chipset.pc)); // execute opcode
}
dwAVMEM = Npack(Chipset.C,5); // available AVMEM
Chipset = OrgChipset; // restore original chipset
return dwAVMEM;
}
BOOL RPL_GetSystemFlag(INT nFlag) BOOL RPL_GetSystemFlag(INT nFlag)
{ {
DWORD dwAddr; DWORD dwAddr;
@ -311,10 +339,16 @@ DWORD RPL_CreateTemp(DWORD l)
BYTE *p; BYTE *p;
l += 6; // memory for link field (5) + marker (1) and end l += 6; // memory for link field (5) + marker (1) and end
a = Read5(TEMPTOP); // tail address of top object
b = Read5(RSKTOP); // tail address of rtn stack b = Read5(RSKTOP); // tail address of rtn stack
c = Read5(DSKTOP); // top of data stack c = Read5(DSKTOP); // top of data stack
if ((b+l)>c) return 0; // check if there's enough memory to move DSKTOP if ((b+l)>c) // there's not enough memory to move DSKTOP
{
RPL_GarbageCol(); // do a garbage collection
b = Read5(RSKTOP); // reload tail address of rtn stack
c = Read5(DSKTOP); // reload top of data stack
}
if ((b+l)>c) return 0; // check if now there's enough memory to move DSKTOP
a = Read5(TEMPTOP); // tail address of top object
Write5(TEMPTOP, a+l); // adjust new end of top object Write5(TEMPTOP, a+l); // adjust new end of top object
Write5(RSKTOP, b+l); // adjust new end of rtn stack Write5(RSKTOP, b+l); // adjust new end of rtn stack
Write5(AVMEM, (c-b-l)/5); // calculate free memory (*5 nibbles) Write5(AVMEM, (c-b-l)/5); // calculate free memory (*5 nibbles)

View file

@ -307,10 +307,11 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "KML Script Compilation Result" CAPTION "KML Script Compilation Result"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
DEFPUSHBUTTON "OK",IDOK,86,146,50,14 DEFPUSHBUTTON "OK",IDOK,188,146,50,14
PUSHBUTTON "Cancel",IDCANCEL,164,146,50,14 PUSHBUTTON "Cancel",IDCANCEL,244,146,50,14
CONTROL "Always",IDC_ALWAYSDISPLOG,"Button",BS_AUTOCHECKBOX | CONTROL "Show Script compilation result next time",
WS_TABSTOP,258,146,36,14 IDC_ALWAYSDISPLOG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
7,146,139,14
GROUPBOX "",IDC_STATIC,7,7,287,36 GROUPBOX "",IDC_STATIC,7,7,287,36
CTEXT "Title of the Script",IDC_TITLE,71,14,158,8 CTEXT "Title of the Script",IDC_TITLE,71,14,158,8
CTEXT "by",IDC_STATIC,71,22,158,8 CTEXT "by",IDC_STATIC,71,22,158,8
@ -576,8 +577,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,4,0,0 FILEVERSION 1,4,1,0
PRODUCTVERSION 1,4,0,0 PRODUCTVERSION 1,4,1,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -594,12 +595,12 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "Sebastien Carlier & Christoph Gießelink\0" VALUE "CompanyName", "Sebastien Carlier & Christoph Gießelink\0"
VALUE "FileDescription", "HP38/39/40/48/49 Emulator\0" VALUE "FileDescription", "HP38/39/40/48/49 Emulator\0"
VALUE "FileVersion", "1, 4, 0, 0\0" VALUE "FileVersion", "1, 4, 1, 0\0"
VALUE "InternalName", "Emu48\0" VALUE "InternalName", "Emu48\0"
VALUE "LegalCopyright", "Copyright © 2005\0" VALUE "LegalCopyright", "Copyright © 2005\0"
VALUE "OriginalFilename", "Emu48.exe\0" VALUE "OriginalFilename", "Emu48.exe\0"
VALUE "ProductName", "Emu48\0" VALUE "ProductName", "Emu48\0"
VALUE "ProductVersion", "1, 4, 0, 0\0" VALUE "ProductVersion", "1, 4, 1, 0\0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"
@ -737,6 +738,15 @@ BEGIN
MENUITEM "Go to D&0", ID_DEBUG_MEM_GOD0 MENUITEM "Go to D&0", ID_DEBUG_MEM_GOD0
MENUITEM "Go to D&1", ID_DEBUG_MEM_GOD1 MENUITEM "Go to D&1", ID_DEBUG_MEM_GOD1
MENUITEM "Go to &Stack", ID_DEBUG_MEM_GOSTACK MENUITEM "Go to &Stack", ID_DEBUG_MEM_GOSTACK
POPUP "Follo&w"
BEGIN
MENUITEM "&none", ID_DEBUG_MEM_FNONE
MENUITEM SEPARATOR
MENUITEM "&Address Content", ID_DEBUG_MEM_FADDR
MENUITEM "Register &PC", ID_DEBUG_MEM_FPC
MENUITEM "Register D&0", ID_DEBUG_MEM_FD0
MENUITEM "Register D&1", ID_DEBUG_MEM_FD1
END
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Find...\tF", ID_DEBUG_MEM_FIND MENUITEM "&Find...\tF", ID_DEBUG_MEM_FIND
MENUITEM SEPARATOR MENUITEM SEPARATOR

View file

@ -43,4 +43,4 @@ Many thanks to Pedro A. Arranda Guti
compatible. compatible.
12/05/05 (c) by Christoph Gießelink 04/16/06 (c) by Christoph Gießelink

BIN
Wombat3 48GX.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

470
Wombat3 48GX.kml Normal file
View file

@ -0,0 +1,470 @@
Global
Print "======================================================="
Print "KML script by Christoph Giesselink, c.giesselink@gmx.de"
Print "http://privat.swol.de/ChristophGiesselink/"
Print "Wombat3 base on the design of Wombat2 by"
Print "Victor Chow & Pete Wilson"
Print "======================================================="
Title "Wombat3 48Gx"
Author "Christoph Giesselink"
Hardware "Yorke"
Model "G"
Rom "ROM.48G"
Patch "beep.48"
Bitmap "Wombat3 48GX.bmp"
Debug 0
End
Background
Vga 1
Offset 0 0
Size 480 536
End
Lcd
Zoom 3
Offset 20 9
Color 0 255 255 255 # character color table
Color 1 255 255 255
Color 2 255 255 255
Color 3 255 255 255
Color 4 255 255 255
Color 5 255 255 255
Color 6 255 255 255
Color 7 255 255 255
Color 8 255 255 255
Color 9 223 223 223
Color 10 179 171 171
Color 11 135 135 135
Color 12 91 91 91
Color 13 47 47 47
Color 14 0 0 0
Color 15 0 0 0
Color 16 0 0 0
Color 17 0 0 0
Color 18 0 0 0
Color 19 0 0 0
Color 20 0 0 0
Color 21 0 0 0
Color 22 0 0 0
Color 23 0 0 0
Color 24 0 0 0
Color 25 0 0 0
Color 26 0 0 0
Color 27 0 0 0
Color 28 0 0 0
Color 29 0 0 0
Color 30 0 0 0
Color 31 0 0 0
Color 32 255 255 255 # background color table
Color 33 255 255 255
Color 34 255 255 255
Color 35 255 255 255
Color 36 255 255 255
Color 37 255 255 255
Color 38 255 255 255
Color 39 255 255 255
Color 40 255 255 255
Color 41 255 255 255
Color 42 255 255 255
Color 43 255 255 255
Color 44 255 255 255
Color 45 255 255 255
Color 46 255 255 255
Color 47 232 232 232
Color 48 209 209 209
Color 49 186 186 186
Color 50 163 163 163
Color 51 140 140 140
Color 52 117 117 117
Color 53 94 94 94
Color 54 71 71 71
Color 55 48 48 48
Color 56 25 25 25
Color 57 2 2 2
Color 58 0 0 0
Color 59 0 0 0
Color 60 0 0 0
Color 61 0 0 0
Color 62 0 0 0
Color 63 0 0 0
End
Annunciator 1
Size 30 22
Offset 424 17
Down 1 537
End
Annunciator 2
Size 30 22
Offset 424 50
Down 36 537
End
Annunciator 3
Size 22 22
Offset 427 83
Down 73 537
End
Annunciator 4
Size 20 16
Offset 429 115
Down 104 537
End
Annunciator 5
Size 18 20
Offset 430 141
Down 130 537
End
Annunciator 6
Size 23 18
Offset 428 172
Down 155 537
End
Button 01 # LCD "button" 1
Type 3
Size 63 21
Offset 20 180
OutIn 1 16
End
Button 02 # LCD "button" 2
Type 3
Size 63 21
Offset 86 180
OutIn 8 16
End
Button 03 # LCD "button" 3
Type 3
Size 63 21
Offset 152 180
OutIn 8 8
End
Button 04 # LCD "button" 4
Type 3
Size 63 21
Offset 218 180
OutIn 8 4
End
Button 05 # LCD "button" 5
Type 3
Size 63 21
Offset 284 180
OutIn 8 2
End
Button 06 # LCD "button" 6
Type 3
Size 63 21
Offset 350 180
OutIn 8 1
End
Button 91 # ON, should be the first defined key
Type 3
Size 86 33
Offset 18 495
OutIn 0 32768
End
Button 11
Type 3
Size 72 33
Offset 18 215
OutIn 1 16
End
Button 12
Type 3
Size 72 33
Offset 92 215
OutIn 8 16
End
Button 13
Type 3
Size 72 33
Offset 166 215
OutIn 8 8
End
Button 14
Type 3
Size 72 33
Offset 240 215
OutIn 8 4
End
Button 15
Type 3
Size 72 33
Offset 314 215
OutIn 8 2
End
Button 16
Type 3
Size 72 33
Offset 388 215
OutIn 8 1
End
Button 21
Type 3
Size 72 33
Offset 18 250
OutIn 2 16
End
Button 22
Type 3
Size 72 33
Offset 92 250
OutIn 7 16
End
Button 23
Type 3
Size 72 33
Offset 166 250
OutIn 7 8
End
Button 24
Type 3
Size 72 33
Offset 240 250
OutIn 7 4
End
Button 25
Type 3
Size 72 33
Offset 314 250
OutIn 7 2
End
Button 26
Type 3
Size 72 33
Offset 388 250
OutIn 7 1
End
Button 31
Type 3
Size 72 33
Offset 18 285
OutIn 0 16
End
Button 32
Type 3
Size 72 33
Offset 92 285
OutIn 6 16
End
Button 33
Type 3
Size 72 33
Offset 166 285
OutIn 6 8
End
Button 34
Type 3
Size 72 33
Offset 240 285
OutIn 6 4
End
Button 35
Type 3
Size 72 33
Offset 314 285
OutIn 6 2
End
Button 36
Type 3
Size 72 33
Offset 388 285
OutIn 6 1
End
Button 41
Type 3
Size 72 33
Offset 18 320
OutIn 3 16
End
Button 42
Type 3
Size 72 33
Offset 92 320
OutIn 5 16
End
Button 43
Type 3
Size 72 33
Offset 166 320
OutIn 5 8
End
Button 44
Type 3
Size 72 33
Offset 240 320
OutIn 5 4
End
Button 45
Type 3
Size 72 33
Offset 314 320
OutIn 5 2
End
Button 46
Type 3
Size 72 33
Offset 388 320
OutIn 5 1
End
Button 51
Type 3
Size 146 33
Offset 18 355
OutIn 4 16
End
Button 52
Type 3
Size 72 33
Offset 166 355
OutIn 4 8
End
Button 53
Type 3
Size 72 33
Offset 240 355
OutIn 4 4
End
Button 54
Type 3
Size 72 33
Offset 314 355
OutIn 4 2
End
Button 55
Type 3
Size 72 33
Offset 388 355
OutIn 4 1
End
Button 61
Type 3
Size 86 33
Offset 18 390
OutIn 3 32
End
Button 62
Type 3
Size 86 33
Offset 110 390
OutIn 3 8
End
Button 63
Type 3
Size 86 33
Offset 198 390
OutIn 3 4
End
Button 64
Type 3
Size 86 33
Offset 286 390
OutIn 3 2
End
Button 65
Type 3
Size 86 33
Offset 374 390
OutIn 3 1
End
Button 71
Type 3
Size 86 33
Offset 18 425
OutIn 2 32
End
Button 72
Type 3
Size 86 33
Offset 110 425
OutIn 2 8
End
Button 73
Type 3
Size 86 33
Offset 198 425
OutIn 2 4
End
Button 74
Type 3
Size 86 33
Offset 286 425
OutIn 2 2
End
Button 75
Type 3
Size 86 33
Offset 374 425
OutIn 2 1
End
Button 81
Type 3
Size 86 33
Offset 18 460
OutIn 1 32
End
Button 82
Type 3
Size 86 33
Offset 110 460
OutIn 1 8
End
Button 83
Type 3
Size 86 33
Offset 198 460
OutIn 1 4
End
Button 84
Type 3
Size 86 33
Offset 286 460
OutIn 1 2
End
Button 85
Type 3
Size 86 33
Offset 374 460
OutIn 1 1
End
Button 92
Type 3
Size 86 33
Offset 110 495
OutIn 0 8
End
Button 93
Type 3
Size 86 33
Offset 198 495
OutIn 0 4
End
Button 94
Type 3
Size 86 33
Offset 286 495
OutIn 0 2
End
Button 95
Type 3
Size 86 33
Offset 374 495
OutIn 0 1
End
Include "Keyboard.kmi"

BIN
Wombat3 48SX.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

470
Wombat3 48SX.kml Normal file
View file

@ -0,0 +1,470 @@
Global
Print "======================================================="
Print "KML script by Christoph Giesselink, c.giesselink@gmx.de"
Print "http://privat.swol.de/ChristophGiesselink/"
Print "Wombat3 base on the design of Wombat2 by"
Print "Victor Chow & Pete Wilson"
Print "======================================================="
Title "Wombat3 48Sx"
Author "Christoph Giesselink"
Hardware "Yorke"
Model "S"
Rom "ROM.48S"
Patch "beep.48"
Bitmap "Wombat3 48SX.bmp"
Debug 0
End
Background
Vga 1
Offset 0 0
Size 480 536
End
Lcd
Zoom 3
Offset 20 9
Color 0 255 255 255 # character color table
Color 1 255 255 255
Color 2 255 255 255
Color 3 240 240 240
Color 4 216 216 216
Color 5 192 192 192
Color 6 168 168 168
Color 7 144 144 144
Color 8 120 120 120
Color 9 96 96 96
Color 10 72 72 72
Color 11 48 48 48
Color 12 24 24 24
Color 13 0 0 0
Color 14 0 0 0
Color 15 0 0 0
Color 16 0 0 0
Color 17 0 0 0
Color 18 0 0 0
Color 19 0 0 0
Color 20 0 0 0
Color 21 0 0 0
Color 22 0 0 0
Color 23 0 0 0
Color 24 0 0 0
Color 25 0 0 0
Color 26 0 0 0
Color 27 0 0 0
Color 28 0 0 0
Color 29 0 0 0
Color 30 0 0 0
Color 31 0 0 0
Color 32 255 255 255 # background color table
Color 33 255 255 255
Color 34 255 255 255
Color 35 255 255 255
Color 36 255 255 255
Color 37 255 255 255
Color 38 255 255 255
Color 39 255 255 255
Color 40 255 255 255
Color 41 255 255 255
Color 42 255 255 255
Color 43 255 255 255
Color 44 255 255 255
Color 45 255 255 255
Color 46 230 230 230
Color 47 205 205 205
Color 48 180 180 180
Color 49 155 155 155
Color 50 130 130 130
Color 51 105 105 105
Color 52 80 80 80
Color 53 55 55 55
Color 54 30 30 30
Color 55 5 5 5
Color 56 0 0 0
Color 57 0 0 0
Color 58 0 0 0
Color 59 0 0 0
Color 60 0 0 0
Color 61 0 0 0
Color 62 0 0 0
Color 63 0 0 0
End
Annunciator 1
Size 30 22
Offset 424 17
Down 1 537
End
Annunciator 2
Size 30 22
Offset 424 50
Down 36 537
End
Annunciator 3
Size 22 22
Offset 427 83
Down 73 537
End
Annunciator 4
Size 20 16
Offset 429 115
Down 104 537
End
Annunciator 5
Size 18 20
Offset 430 141
Down 130 537
End
Annunciator 6
Size 23 18
Offset 428 172
Down 155 537
End
Button 01 # LCD "button" 1
Type 3
Size 63 21
Offset 20 180
OutIn 1 16
End
Button 02 # LCD "button" 2
Type 3
Size 63 21
Offset 86 180
OutIn 8 16
End
Button 03 # LCD "button" 3
Type 3
Size 63 21
Offset 152 180
OutIn 8 8
End
Button 04 # LCD "button" 4
Type 3
Size 63 21
Offset 218 180
OutIn 8 4
End
Button 05 # LCD "button" 5
Type 3
Size 63 21
Offset 284 180
OutIn 8 2
End
Button 06 # LCD "button" 6
Type 3
Size 63 21
Offset 350 180
OutIn 8 1
End
Button 91 # ON, should be the first defined key
Type 3
Size 86 33
Offset 18 495
OutIn 0 32768
End
Button 11
Type 3
Size 72 33
Offset 18 215
OutIn 1 16
End
Button 12
Type 3
Size 72 33
Offset 92 215
OutIn 8 16
End
Button 13
Type 3
Size 72 33
Offset 166 215
OutIn 8 8
End
Button 14
Type 3
Size 72 33
Offset 240 215
OutIn 8 4
End
Button 15
Type 3
Size 72 33
Offset 314 215
OutIn 8 2
End
Button 16
Type 3
Size 72 33
Offset 388 215
OutIn 8 1
End
Button 21
Type 3
Size 72 33
Offset 18 250
OutIn 2 16
End
Button 22
Type 3
Size 72 33
Offset 92 250
OutIn 7 16
End
Button 23
Type 3
Size 72 33
Offset 166 250
OutIn 7 8
End
Button 24
Type 3
Size 72 33
Offset 240 250
OutIn 7 4
End
Button 25
Type 3
Size 72 33
Offset 314 250
OutIn 7 2
End
Button 26
Type 3
Size 72 33
Offset 388 250
OutIn 7 1
End
Button 31
Type 3
Size 72 33
Offset 18 285
OutIn 0 16
End
Button 32
Type 3
Size 72 33
Offset 92 285
OutIn 6 16
End
Button 33
Type 3
Size 72 33
Offset 166 285
OutIn 6 8
End
Button 34
Type 3
Size 72 33
Offset 240 285
OutIn 6 4
End
Button 35
Type 3
Size 72 33
Offset 314 285
OutIn 6 2
End
Button 36
Type 3
Size 72 33
Offset 388 285
OutIn 6 1
End
Button 41
Type 3
Size 72 33
Offset 18 320
OutIn 3 16
End
Button 42
Type 3
Size 72 33
Offset 92 320
OutIn 5 16
End
Button 43
Type 3
Size 72 33
Offset 166 320
OutIn 5 8
End
Button 44
Type 3
Size 72 33
Offset 240 320
OutIn 5 4
End
Button 45
Type 3
Size 72 33
Offset 314 320
OutIn 5 2
End
Button 46
Type 3
Size 72 33
Offset 388 320
OutIn 5 1
End
Button 51
Type 3
Size 146 33
Offset 18 355
OutIn 4 16
End
Button 52
Type 3
Size 72 33
Offset 166 355
OutIn 4 8
End
Button 53
Type 3
Size 72 33
Offset 240 355
OutIn 4 4
End
Button 54
Type 3
Size 72 33
Offset 314 355
OutIn 4 2
End
Button 55
Type 3
Size 72 33
Offset 388 355
OutIn 4 1
End
Button 61
Type 3
Size 86 33
Offset 18 390
OutIn 3 32
End
Button 62
Type 3
Size 86 33
Offset 110 390
OutIn 3 8
End
Button 63
Type 3
Size 86 33
Offset 198 390
OutIn 3 4
End
Button 64
Type 3
Size 86 33
Offset 286 390
OutIn 3 2
End
Button 65
Type 3
Size 86 33
Offset 374 390
OutIn 3 1
End
Button 71
Type 3
Size 86 33
Offset 18 425
OutIn 2 32
End
Button 72
Type 3
Size 86 33
Offset 110 425
OutIn 2 8
End
Button 73
Type 3
Size 86 33
Offset 198 425
OutIn 2 4
End
Button 74
Type 3
Size 86 33
Offset 286 425
OutIn 2 2
End
Button 75
Type 3
Size 86 33
Offset 374 425
OutIn 2 1
End
Button 81
Type 3
Size 86 33
Offset 18 460
OutIn 1 32
End
Button 82
Type 3
Size 86 33
Offset 110 460
OutIn 1 8
End
Button 83
Type 3
Size 86 33
Offset 198 460
OutIn 1 4
End
Button 84
Type 3
Size 86 33
Offset 286 460
OutIn 1 2
End
Button 85
Type 3
Size 86 33
Offset 374 460
OutIn 1 1
End
Button 92
Type 3
Size 86 33
Offset 110 495
OutIn 0 8
End
Button 93
Type 3
Size 86 33
Offset 198 495
OutIn 0 4
End
Button 94
Type 3
Size 86 33
Offset 286 495
OutIn 0 2
End
Button 95
Type 3
Size 86 33
Offset 374 495
OutIn 0 1
End
Include "Keyboard.kmi"

2
beep.48 Normal file
View file

@ -0,0 +1,2 @@
;01477:6300; disable 10 min auto off (internal, undocumented)
017A6:81B1

Binary file not shown.