2016-09-11: Updated to version 56
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
This commit is contained in:
parent
0c6fbb14ef
commit
5b61a0678e
23 changed files with 1335 additions and 1206 deletions
|
@ -1,4 +1,4 @@
|
|||
Emu48 1.55+ (based on Emu48 1.57)
|
||||
Emu48 1.56+ (based on Emu48 1.58)
|
||||
|
||||
Emu48+ is a modified version of Emu48 to add support for the ARM-based
|
||||
calculators. It does not emulate the ARM CPU, but it enhances the
|
||||
|
|
BIN
Emu48.dll
BIN
Emu48.dll
Binary file not shown.
BIN
Emu48.exe
BIN
Emu48.exe
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
Known bugs and restrictions of Emu48 V1.57
|
||||
Known bugs and restrictions of Emu48 V1.58
|
||||
------------------------------------------
|
||||
|
||||
- the following I/O bits aren't emulated (incomplete)
|
||||
|
@ -47,4 +47,4 @@ Known bugs and restrictions of Emu48 V1.57
|
|||
- quitting the emulator while programming the flash isn't allowed,
|
||||
because the content of flash state machine isn't saved so far
|
||||
|
||||
07/14/15 (c) by Christoph Gießelink, c dot giesselink at gmx dot de
|
||||
08/16/16 (c) by Christoph Gießelink, c dot giesselink at gmx dot de
|
||||
|
|
1849
source/CHANGES.TXT
1849
source/CHANGES.TXT
File diff suppressed because it is too large
Load diff
|
@ -46,13 +46,6 @@ HDDEDATA CALLBACK DdeCallback(UINT iType,UINT iFmt,HCONV hConv,
|
|||
if (*psz != 0 || nStkLvl < 1) // invalid number format
|
||||
return (HDDEDATA) DDE_FNOTPROCESSED;
|
||||
|
||||
DdeAccessData(hData,&dwSize); // fetch data size
|
||||
DdeUnaccessData(hData);
|
||||
|
||||
// reserve memory
|
||||
if ((lpData = (LPBYTE) malloc(dwSize * 2)) == NULL)
|
||||
return (HDDEDATA) DDE_FNOTPROCESSED;
|
||||
|
||||
SuspendDebugger(); // suspend debugger
|
||||
bDbgAutoStateCtrl = FALSE; // disable automatic debugger state control
|
||||
|
||||
|
@ -66,7 +59,6 @@ HDDEDATA CALLBACK DdeCallback(UINT iType,UINT iFmt,HCONV hConv,
|
|||
|
||||
if (WaitForSleepState()) // wait for cpu SHUTDN then sleep state
|
||||
{
|
||||
free(lpData); // free memory
|
||||
hReturn = DDE_FNOTPROCESSED;
|
||||
goto cancel;
|
||||
}
|
||||
|
@ -74,13 +66,32 @@ HDDEDATA CALLBACK DdeCallback(UINT iType,UINT iFmt,HCONV hConv,
|
|||
while (nState!=nNextState) Sleep(0);
|
||||
_ASSERT(nState==SM_SLEEP);
|
||||
|
||||
// fetch data and write to stack
|
||||
DdeGetData(hData,(LPBYTE) &dwIndex,sizeof(DWORD),0L);
|
||||
bSuccess = FALSE;
|
||||
|
||||
// get data and size
|
||||
lpData = DdeAccessData(hData,&dwSize);
|
||||
|
||||
// has object length header
|
||||
if (lpData && dwSize >= sizeof(DWORD))
|
||||
{
|
||||
dwIndex = *(LPDWORD) lpData; // object length
|
||||
|
||||
if (dwIndex <= dwSize - sizeof(DWORD))
|
||||
dwSize = dwIndex;
|
||||
dwSize = DdeGetData(hData,lpData+dwSize,dwSize,sizeof(DWORD));
|
||||
bSuccess = (WriteStack(nStkLvl,lpData,dwSize) == S_ERR_NO);
|
||||
free(lpData); // free memory
|
||||
{
|
||||
// reserve unpacked object length memory
|
||||
LPBYTE pbyMem = (LPBYTE) malloc(dwIndex * 2);
|
||||
|
||||
if (pbyMem != NULL)
|
||||
{
|
||||
// copy data and write to stack
|
||||
CopyMemory(pbyMem+dwIndex,lpData+sizeof(DWORD),dwIndex);
|
||||
bSuccess = (WriteStack(nStkLvl,pbyMem,dwIndex) == S_ERR_NO);
|
||||
free(pbyMem); // free memory
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DdeUnaccessData(hData);
|
||||
|
||||
SwitchToState(SM_RUN); // run state
|
||||
while (nState!=nNextState) Sleep(0);
|
||||
|
|
|
@ -237,7 +237,14 @@ DECLSPEC BOOL CALLBACK EmuInitLastInstr(
|
|||
DWORD *pdwArray) // @parm pointer to linear array
|
||||
{
|
||||
if (pdwInstrArray) // circular buffer defined
|
||||
{
|
||||
EnterCriticalSection(&csDbgLock);
|
||||
{
|
||||
free(pdwInstrArray); // free memory
|
||||
pdwInstrArray = NULL;
|
||||
}
|
||||
LeaveCriticalSection(&csDbgLock);
|
||||
}
|
||||
|
||||
if (wNoInstr) // new size
|
||||
{
|
||||
|
|
|
@ -156,50 +156,6 @@ static VOID DisableMenuKeys(HWND hDlg)
|
|||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// read edit control and decode content as hex number or if enabled as symbol name
|
||||
//
|
||||
static BOOL GetAddr(HWND hDlg,INT nID,DWORD *pdwAddr,DWORD dwMaxAddr,BOOL bSymbEnable)
|
||||
{
|
||||
TCHAR szBuffer[48];
|
||||
INT i;
|
||||
BOOL bSucc = TRUE;
|
||||
|
||||
HWND hWnd = GetDlgItem(hDlg,nID);
|
||||
|
||||
GetWindowText(hWnd,szBuffer,ARRAYSIZEOF(szBuffer));
|
||||
|
||||
if (*szBuffer != 0)
|
||||
{
|
||||
// if address is not a symbol name decode number
|
||||
if ( !bSymbEnable || szBuffer[0] != _T('=')
|
||||
|| RplGetAddr(&szBuffer[1],pdwAddr))
|
||||
{
|
||||
// test if valid hex address
|
||||
for (i = 0; bSucc && i < (LONG) lstrlen(szBuffer); ++i)
|
||||
{
|
||||
bSucc = (_istxdigit(szBuffer[i]) != 0);
|
||||
}
|
||||
|
||||
if (bSucc) // valid characters
|
||||
{
|
||||
// convert string to number
|
||||
*pdwAddr = _tcstoul(szBuffer,NULL,16);
|
||||
}
|
||||
}
|
||||
|
||||
// inside address range?
|
||||
bSucc = bSucc && (*pdwAddr <= dwMaxAddr);
|
||||
|
||||
if (!bSucc) // invalid address
|
||||
{
|
||||
SendMessage(hWnd,EM_SETSEL,0,-1);
|
||||
SetFocus(hWnd); // focus to edit control
|
||||
}
|
||||
}
|
||||
return bSucc;
|
||||
}
|
||||
|
||||
//
|
||||
// set mapping menu
|
||||
//
|
||||
|
@ -256,6 +212,50 @@ static VOID SetMappingMenu(HWND hDlg,UINT uID)
|
|||
return;
|
||||
};
|
||||
|
||||
//
|
||||
// read edit control and decode content as hex number or if enabled as symbol name
|
||||
//
|
||||
static BOOL GetAddr(HWND hDlg,INT nID,DWORD *pdwAddr,DWORD dwMaxAddr,BOOL bSymbEnable)
|
||||
{
|
||||
TCHAR szBuffer[48];
|
||||
INT i;
|
||||
BOOL bSucc = TRUE;
|
||||
|
||||
HWND hWnd = GetDlgItem(hDlg,nID);
|
||||
|
||||
GetWindowText(hWnd,szBuffer,ARRAYSIZEOF(szBuffer));
|
||||
|
||||
if (*szBuffer != 0)
|
||||
{
|
||||
// if address is not a symbol name decode number
|
||||
if ( !bSymbEnable || szBuffer[0] != _T('=')
|
||||
|| RplGetAddr(&szBuffer[1],pdwAddr))
|
||||
{
|
||||
// test if valid hex address
|
||||
for (i = 0; bSucc && i < (LONG) lstrlen(szBuffer); ++i)
|
||||
{
|
||||
bSucc = (_istxdigit(szBuffer[i]) != 0);
|
||||
}
|
||||
|
||||
if (bSucc) // valid characters
|
||||
{
|
||||
// convert string to number
|
||||
*pdwAddr = _tcstoul(szBuffer,NULL,16);
|
||||
}
|
||||
}
|
||||
|
||||
// inside address range?
|
||||
bSucc = bSucc && (*pdwAddr <= dwMaxAddr);
|
||||
|
||||
if (!bSucc) // invalid address
|
||||
{
|
||||
SendMessage(hWnd,EM_SETSEL,0,-1);
|
||||
SetFocus(hWnd); // focus to edit control
|
||||
}
|
||||
}
|
||||
return bSucc;
|
||||
}
|
||||
|
||||
//
|
||||
// get address of cursor in memory window
|
||||
//
|
||||
|
@ -713,7 +713,7 @@ static VOID UpdateMemoryWnd(HWND hDlg)
|
|||
//
|
||||
static VOID UpdateStackWnd(HWND hDlg)
|
||||
{
|
||||
INT i;
|
||||
UINT i;
|
||||
LONG nPos;
|
||||
TCHAR szBuffer[64];
|
||||
|
||||
|
@ -1168,15 +1168,15 @@ static BOOL OnStackPush(HWND hDlg)
|
|||
TCHAR szBuffer[] = _T("00000");
|
||||
DWORD dwAddr;
|
||||
HWND hWnd;
|
||||
INT i,j;
|
||||
UINT i,j;
|
||||
|
||||
if (nDbgState != DBG_STEPINTO) // not in single step mode
|
||||
return TRUE;
|
||||
|
||||
hWnd = GetDlgItem(hDlg,IDC_DEBUG_STACK);
|
||||
|
||||
i = (INT) SendMessage(hWnd,LB_GETCURSEL,0,0);
|
||||
if (LB_ERR == i) return TRUE; // no selection
|
||||
i = (UINT) SendMessage(hWnd,LB_GETCURSEL,0,0);
|
||||
if (LB_ERR == (INT) i) return TRUE; // no selection
|
||||
|
||||
if (IDOK != OnNewValue(szBuffer)) // canceled function
|
||||
return TRUE;
|
||||
|
@ -1200,15 +1200,15 @@ static BOOL OnStackPush(HWND hDlg)
|
|||
static BOOL OnStackPop(HWND hDlg)
|
||||
{
|
||||
HWND hWnd;
|
||||
INT i,j;
|
||||
UINT i,j;
|
||||
|
||||
if (nDbgState != DBG_STEPINTO) // not in single step mode
|
||||
return TRUE;
|
||||
|
||||
hWnd = GetDlgItem(hDlg,IDC_DEBUG_STACK);
|
||||
|
||||
i = (INT) SendMessage(hWnd,LB_GETCURSEL,0,0);
|
||||
if (LB_ERR == i) return TRUE; // no selection
|
||||
i = (UINT) SendMessage(hWnd,LB_GETCURSEL,0,0);
|
||||
if (LB_ERR == (INT) i) return TRUE; // no selection
|
||||
|
||||
// pop stack element
|
||||
for (j = i + 1; j < ARRAYSIZEOF(Chipset.rstk); ++j)
|
||||
|
@ -1324,11 +1324,11 @@ static BOOL OnLButtonUp(HWND hDlg, LPARAM lParam)
|
|||
break;
|
||||
case IDC_REG_OUT: // OUT
|
||||
OnNewValue(&szBuffer[4]);
|
||||
_stscanf(&szBuffer[4],_T("%3X"),&Chipset.out);
|
||||
Chipset.out = (WORD) _tcstoul(&szBuffer[4],NULL,16);
|
||||
break;
|
||||
case IDC_REG_IN: // IN
|
||||
OnNewValue(&szBuffer[3]);
|
||||
_stscanf(&szBuffer[3],_T("%4X"),&Chipset.in);
|
||||
Chipset.in = (WORD) _tcstoul(&szBuffer[3],NULL,16);
|
||||
break;
|
||||
case IDC_REG_ST: // ST
|
||||
OnNewValue(&szBuffer[3]);
|
||||
|
@ -1362,7 +1362,7 @@ static BOOL OnLButtonUp(HWND hDlg, LPARAM lParam)
|
|||
break;
|
||||
case IDC_MISC_BS: // Bank switcher setting
|
||||
OnNewValue(szBuffer);
|
||||
_stscanf(szBuffer,_T("%2X"),&Chipset.Bank_FF);
|
||||
Chipset.Bank_FF = _tcstoul(szBuffer,NULL,16);
|
||||
Chipset.Bank_FF &= 0x7F;
|
||||
RomSwitch(Chipset.Bank_FF); // update memory mapping
|
||||
|
||||
|
@ -1423,6 +1423,7 @@ static BOOL OnDblClick(HWND hWnd, WORD wId)
|
|||
ViewMemWnd(hDlg,dwAdrMem); // update memory window
|
||||
SendMessage(hWnd,LB_SETCURSEL,i,0);
|
||||
return FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -1873,6 +1874,7 @@ static INT_PTR CALLBACK Debugger(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
|||
// add Settings item to sysmenu
|
||||
_ASSERT((IDM_DEBUG_SETTINGS & 0xFFF0) == IDM_DEBUG_SETTINGS);
|
||||
_ASSERT(IDM_DEBUG_SETTINGS < 0xF000);
|
||||
|
||||
if ((hSysMenu = GetSystemMenu(hDlg,FALSE)) != NULL)
|
||||
{
|
||||
VERIFY(AppendMenu(hSysMenu,MF_SEPARATOR,0,NULL));
|
||||
|
@ -2357,7 +2359,7 @@ static VOID UpdateProfileWnd(HWND hDlg)
|
|||
|
||||
QWORD lVar;
|
||||
TCHAR szBuffer[64];
|
||||
INT i;
|
||||
UINT i;
|
||||
DWORD dwFreq, dwEndFreq;
|
||||
|
||||
if (hDlg == NULL) return; // dialog not open
|
||||
|
@ -2379,10 +2381,9 @@ static VOID UpdateProfileWnd(HWND hDlg)
|
|||
}
|
||||
dwEndFreq = ((999 * 2 - 1) * dwFreq) / (2 * 1000);
|
||||
|
||||
// search for unit
|
||||
for (i = 0; i < ARRAYSIZEOF(pcUnit) - 1; ++i)
|
||||
// search for ENG unit
|
||||
for (i = 0; i < ARRAYSIZEOF(pcUnit) - 1 && lVar <= dwEndFreq; ++i)
|
||||
{
|
||||
if (lVar > dwEndFreq) break; // found ENG unit
|
||||
lVar *= 1000; // next ENG unit
|
||||
}
|
||||
|
||||
|
@ -2983,7 +2984,7 @@ static BOOL ToggleBreakpointItem(HWND hWnd, INT nItem)
|
|||
static VOID DrawBreakpoint(HWND hWnd, INT i)
|
||||
{
|
||||
TCHAR *szText,szBuffer[32];
|
||||
INT nItem;
|
||||
LPARAM nItem;
|
||||
|
||||
switch(sBreakpoint[i].nType)
|
||||
{
|
||||
|
@ -3277,7 +3278,7 @@ static BOOL OnInfoIntr(HWND hDlg)
|
|||
//
|
||||
// view write only I/O registers
|
||||
//
|
||||
static BOOL CALLBACK InfoWoRegister(HWND hDlg, UINT message, DWORD wParam, LONG lParam)
|
||||
static INT_PTR CALLBACK InfoWoRegister(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
TCHAR szBuffer[8];
|
||||
|
||||
|
|
|
@ -15,9 +15,8 @@
|
|||
|
||||
// #define DEBUG_DISPLAY // switch for DISPLAY debug purpose
|
||||
|
||||
#define NOCOLORSGRAY 8 // no. of colors in gray scale mode
|
||||
#define NOCOLORSBW 2 // no. of colors in black and white mode
|
||||
|
||||
#define NOCOLORSGRAY 8
|
||||
#define NOCOLORSBW 2
|
||||
|
||||
#define B 0x00000000 // black
|
||||
#define W 0x00FFFFFF // white
|
||||
|
@ -541,7 +540,7 @@ VOID ResizeWindow(VOID)
|
|||
|
||||
AdjustWindowRect(&rectWindow,
|
||||
(DWORD) GetWindowLongPtr(hWnd,GWL_STYLE),
|
||||
GetMenu(hWnd) != NULL);
|
||||
GetMenu(hWnd) != NULL || IsRectEmpty(&rectWindow));
|
||||
SetWindowPos(hWnd, bAlwaysOnTop ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0,
|
||||
rectWindow.right - rectWindow.left,
|
||||
rectWindow.bottom - rectWindow.top,
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "kml.h"
|
||||
#include "debugger.h"
|
||||
|
||||
#define VERSION "1.55+"
|
||||
#define VERSION "1.56+"
|
||||
|
||||
#ifdef _DEBUG
|
||||
LPCTSTR szNoTitle = _T("Emu48 ")_T(VERSION)_T(" Debug");
|
||||
|
@ -35,9 +35,9 @@ static const LPCTSTR szLicence =
|
|||
_T("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n")
|
||||
_T("See the GNU General Public License for more details.\r\n")
|
||||
_T("\r\n")
|
||||
_T("You should have received a copy of the GNU General Public License\r\n")
|
||||
_T("along with this program; if not, write to the Free Software Foundation,\r\n")
|
||||
_T("Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA");
|
||||
_T("You should have received a copy of the GNU General Public License along\r\n")
|
||||
_T("with this program; if not, write to the Free Software Foundation, Inc.,\r\n")
|
||||
_T("51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.");
|
||||
|
||||
static BOOL bOwnCursor = FALSE;
|
||||
static BOOL bTitleBar = TRUE;
|
||||
|
@ -423,7 +423,7 @@ static VOID SetCommList(HWND hDlg,LPCTSTR szWireSetting,LPCTSTR szIrSetting)
|
|||
return;
|
||||
}
|
||||
|
||||
static BOOL CALLBACK SettingsGeneralProc(HWND hDlg, UINT uMsg, DWORD wParam, LONG lParam)
|
||||
static INT_PTR CALLBACK SettingsGeneralProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HWND hWndInsertAfter;
|
||||
|
||||
|
@ -496,7 +496,7 @@ static BOOL CALLBACK SettingsGeneralProc(HWND hDlg, UINT uMsg, DWORD wParam, LON
|
|||
UNREFERENCED_PARAMETER(wParam);
|
||||
}
|
||||
|
||||
static BOOL CALLBACK SettingsMemoryProc(HWND hDlg, UINT uMsg, DWORD wParam, LONG lParam)
|
||||
static INT_PTR CALLBACK SettingsMemoryProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
LPCTSTR szActPort2Filename = _T("");
|
||||
|
||||
|
@ -686,7 +686,7 @@ static BOOL CALLBACK SettingsMemoryProc(HWND hDlg, UINT uMsg, DWORD wParam, LONG
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static BOOL CALLBACK SettingsPeripheralProc(HWND hDlg, UINT uMsg, DWORD wParam, LONG lParam)
|
||||
static INT_PTR CALLBACK SettingsPeripheralProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
TCHAR cPort[8];
|
||||
LONG i;
|
||||
|
@ -893,6 +893,8 @@ static LRESULT OnPaint(HWND hWindow)
|
|||
PAINTSTRUCT Paint;
|
||||
HDC hPaintDC;
|
||||
|
||||
UpdateWindowBars(); // update visibility of title and menu bar
|
||||
|
||||
hPaintDC = BeginPaint(hWindow, &Paint);
|
||||
if (hMainDC != NULL)
|
||||
{
|
||||
|
@ -979,7 +981,7 @@ static LRESULT OnDropFiles(HDROP hFilesInfo)
|
|||
{
|
||||
TCHAR szFileName[MAX_PATH];
|
||||
WORD wNumFiles,wIndex;
|
||||
BOOL bSuccess = FALSE;
|
||||
BOOL bSuccess;
|
||||
|
||||
// get number of files dropped
|
||||
wNumFiles = DragQueryFile (hFilesInfo,(UINT)-1,NULL,0);
|
||||
|
@ -1327,7 +1329,7 @@ static LRESULT OnViewSettings(VOID)
|
|||
psp[0].pszTemplate = MAKEINTRESOURCE(IDD_SET_GENERAL);
|
||||
psp[0].hIcon = NULL;
|
||||
psp[0].pszTitle = NULL;
|
||||
psp[0].pfnDlgProc = (DLGPROC) SettingsGeneralProc;
|
||||
psp[0].pfnDlgProc = SettingsGeneralProc;
|
||||
psp[0].lParam = 0;
|
||||
psp[0].pfnCallback = NULL;
|
||||
|
||||
|
@ -1337,7 +1339,7 @@ static LRESULT OnViewSettings(VOID)
|
|||
psp[1].pszTemplate = MAKEINTRESOURCE(IDD_SET_MEMORY);
|
||||
psp[1].hIcon = NULL;
|
||||
psp[1].pszTitle = NULL;
|
||||
psp[1].pfnDlgProc = (DLGPROC) SettingsMemoryProc;
|
||||
psp[1].pfnDlgProc = SettingsMemoryProc;
|
||||
psp[1].lParam = 0;
|
||||
psp[1].pfnCallback = NULL;
|
||||
|
||||
|
@ -1347,7 +1349,7 @@ static LRESULT OnViewSettings(VOID)
|
|||
psp[2].pszTemplate = MAKEINTRESOURCE(IDD_SET_PERIPHERAL);
|
||||
psp[2].hIcon = NULL;
|
||||
psp[2].pszTitle = NULL;
|
||||
psp[2].pfnDlgProc = (DLGPROC) SettingsPeripheralProc;
|
||||
psp[2].pfnDlgProc = SettingsPeripheralProc;
|
||||
psp[2].lParam = 0;
|
||||
psp[2].pfnCallback = NULL;
|
||||
|
||||
|
@ -2123,10 +2125,10 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
|
|||
rectWindow.top = 0;
|
||||
rectWindow.right = 256;
|
||||
rectWindow.bottom = 0;
|
||||
AdjustWindowRect(&rectWindow, STYLE_TITLE, TRUE);
|
||||
AdjustWindowRect(&rectWindow, WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_OVERLAPPED, TRUE);
|
||||
|
||||
hWnd = CreateWindow(MAKEINTATOM(classAtom),_T("Emu48"),
|
||||
STYLE_TITLE,
|
||||
WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_OVERLAPPED,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
rectWindow.right - rectWindow.left,
|
||||
rectWindow.bottom - rectWindow.top,
|
||||
|
|
|
@ -365,9 +365,9 @@ FONT 8, "MS Sans Serif"
|
|||
BEGIN
|
||||
LTEXT "Volume",IDC_STATIC,14,21,24,8
|
||||
CONTROL "Slider1",IDC_SOUND_SLIDER,"msctls_trackbar32",
|
||||
TBS_AUTOTICKS | WS_TABSTOP,44,16,118,18
|
||||
TBS_AUTOTICKS | WS_TABSTOP,44,16,193,18
|
||||
LTEXT "Device",IDC_STATIC,13,42,24,8
|
||||
COMBOBOX IDC_SOUND_DEVICE,44,40,118,87,CBS_DROPDOWNLIST |
|
||||
COMBOBOX IDC_SOUND_DEVICE,44,40,193,87,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
GROUPBOX "Sound",IDC_STATIC,7,7,237,54
|
||||
LTEXT "IP Address:",IDC_STATIC,14,81,37,8
|
||||
|
@ -692,8 +692,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,5,5,0
|
||||
PRODUCTVERSION 1,5,5,0
|
||||
FILEVERSION 1,5,6,0
|
||||
PRODUCTVERSION 1,5,6,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -710,12 +710,12 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "Christoph Gießelink & Sebastien Carlier\0"
|
||||
VALUE "FileDescription", "HP38/39/40/48/49 Emulator\0"
|
||||
VALUE "FileVersion", "1, 5, 5, 0\0"
|
||||
VALUE "FileVersion", "1, 5, 6, 0\0"
|
||||
VALUE "InternalName", "Emu48\0"
|
||||
VALUE "LegalCopyright", "Copyright © 2015\0"
|
||||
VALUE "OriginalFilename", "Emu48.exe\0"
|
||||
VALUE "ProductName", "Emu48\0"
|
||||
VALUE "ProductVersion", "1, 5, 5, 0\0"
|
||||
VALUE "ProductVersion", "1, 5, 6, 0\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -37,13 +37,13 @@ RSC=rc.exe
|
|||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir ".\Release"
|
||||
# PROP BASE Intermediate_Dir ".\Release"
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ".\Release"
|
||||
# PROP Intermediate_Dir ".\Release"
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
|
||||
|
@ -63,13 +63,13 @@ LINK32=link.exe
|
|||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir ".\Debug"
|
||||
# PROP BASE Intermediate_Dir ".\Debug"
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir ".\Debug"
|
||||
# PROP Intermediate_Dir ".\Debug"
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
|
||||
|
@ -89,14 +89,14 @@ LINK32=link.exe
|
|||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Emu48___"
|
||||
# PROP BASE Intermediate_Dir "Emu48___"
|
||||
# PROP BASE Output_Dir "ReleaseUnicode"
|
||||
# PROP BASE Intermediate_Dir "ReleaseUnicode"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ".\ReleaseUnicode"
|
||||
# PROP Intermediate_Dir ".\ReleaseUnicode"
|
||||
# PROP Output_Dir "ReleaseUnicode"
|
||||
# PROP Intermediate_Dir "ReleaseUnicode"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /Gr /MT /W3 /GX /O2 /Ob2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "STRICT" /Yu"pch.h" /FD /c
|
||||
|
@ -116,14 +116,14 @@ LINK32=link.exe
|
|||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Emu48__0"
|
||||
# PROP BASE Intermediate_Dir "Emu48__0"
|
||||
# PROP BASE Output_Dir "DebugUnicode"
|
||||
# PROP BASE Intermediate_Dir "DebugUnicode"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir ".\DebugUnicode"
|
||||
# PROP Intermediate_Dir ".\DebugUnicode"
|
||||
# PROP Output_Dir "DebugUnicode"
|
||||
# PROP Intermediate_Dir "DebugUnicode"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "STRICT" /FR /Yu"pch.h" /FD /c
|
||||
|
@ -143,14 +143,14 @@ LINK32=link.exe
|
|||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Emu48___Win32_DebugRegDebug4x"
|
||||
# PROP BASE Intermediate_Dir "Emu48___Win32_DebugRegDebug4x"
|
||||
# PROP BASE Output_Dir "DebugRegDebug4x"
|
||||
# PROP BASE Intermediate_Dir "DebugRegDebug4x"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir ".\DebugRegDebug4x"
|
||||
# PROP Intermediate_Dir ".\DebugRegDebug4x"
|
||||
# PROP Output_Dir "DebugRegDebug4x"
|
||||
# PROP Intermediate_Dir "DebugRegDebug4x"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "STRICT" /FR /Yu"pch.h" /FD /c
|
||||
|
@ -170,14 +170,14 @@ LINK32=link.exe
|
|||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Emu48___Win32_ReleaseRegDebug4x"
|
||||
# PROP BASE Intermediate_Dir "Emu48___Win32_ReleaseRegDebug4x"
|
||||
# PROP BASE Output_Dir "ReleaseRegDebug4x"
|
||||
# PROP BASE Intermediate_Dir "ReleaseRegDebug4x"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ".\ReleaseRegDebug4x"
|
||||
# PROP Intermediate_Dir ".\ReleaseRegDebug4x"
|
||||
# PROP Output_Dir "ReleaseRegDebug4x"
|
||||
# PROP Intermediate_Dir "ReleaseRegDebug4x"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /Gr /MT /W3 /GX /O2 /Ob2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "STRICT" /Yu"pch.h" /FD /c
|
||||
|
|
|
@ -2325,7 +2325,7 @@ HBITMAP LoadBitmapFile(LPCTSTR szFilename)
|
|||
if ( Bmp.dwFileSize >= 6
|
||||
&& (memcmp(Bmp.pbyFile,"GIF87a",6) == 0 || memcmp(Bmp.pbyFile,"GIF89a",6) == 0))
|
||||
{
|
||||
hBitmap = DecodeGif(&Bmp,&dwTColor);
|
||||
hBitmap = DecodeGif(&Bmp,NULL);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
25
source/KML.C
25
source/KML.C
|
@ -76,7 +76,6 @@ static CONST KmlToken pLexToken[] =
|
|||
{TOK_VIRTUAL, 000000, 7,_T("Virtual")},
|
||||
{TOK_INCLUDE, 000002, 7,_T("Include")},
|
||||
{TOK_NOTFLAG, 000001, 7,_T("NotFlag")},
|
||||
{TOK_MENUBAR, 000001, 7,_T("Menubar")}, // for PPC compatibility reasons
|
||||
{TOK_GLOBAL, 000000, 6,_T("Global")},
|
||||
{TOK_AUTHOR, 000002, 6,_T("Author")},
|
||||
{TOK_BITMAP, 000002, 6,_T("Bitmap")},
|
||||
|
@ -86,7 +85,6 @@ static CONST KmlToken pLexToken[] =
|
|||
{TOK_ONDOWN, 000000, 6,_T("OnDown")},
|
||||
{TOK_NOHOLD, 000000, 6,_T("NoHold")},
|
||||
{TOK_LOCALE, 000001, 6,_T("Locale")},
|
||||
{TOK_TOPBAR, 000001, 6,_T("Topbar")}, // for PPC compatibility reasons
|
||||
{TOK_TITLE, 000002, 5,_T("Title")},
|
||||
{TOK_OUTIN, 000011, 5,_T("OutIn")},
|
||||
{TOK_PATCH, 000002, 5,_T("Patch")},
|
||||
|
@ -105,7 +103,6 @@ static CONST KmlToken pLexToken[] =
|
|||
{TOK_ONUP, 000000, 4,_T("OnUp")},
|
||||
{TOK_MAP, 000011, 3,_T("Map")},
|
||||
{TOK_ROM, 000002, 3,_T("Rom")},
|
||||
{TOK_VGA, 000001, 3,_T("Vga")}, // for PPC compatibility reasons
|
||||
{TOK_LCD, 000000, 3,_T("Lcd")},
|
||||
{TOK_END, 000000, 3,_T("End")},
|
||||
{TOK_NONE, 000000, 0,_T("")}
|
||||
|
@ -1335,8 +1332,7 @@ static KmlLine* InitLcd(KmlBlock* pBlock)
|
|||
nLcdY = (UINT) pLine->nParam[1];
|
||||
break;
|
||||
case TOK_ZOOM:
|
||||
nLcdZoom = (UINT) pLine->nParam[0];
|
||||
if (!(nLcdZoom >= 1 && nLcdZoom <= 4))
|
||||
if ((nLcdZoom = (UINT) pLine->nParam[0]) == 0)
|
||||
nLcdZoom = 1;
|
||||
break;
|
||||
case TOK_COLOR:
|
||||
|
@ -1740,20 +1736,21 @@ static DWORD GetIntegerParam(KmlBlock* pBlock, TokenId eBlock, TokenId eCommand,
|
|||
//#
|
||||
//################
|
||||
|
||||
static INT iSqrt(INT nNumber) // integer y=sqrt(x) function
|
||||
static UINT iSqrt(UINT nNumber) // integer y=sqrt(x) function
|
||||
{
|
||||
INT m, b = 0, t = nNumber;
|
||||
UINT b, t;
|
||||
|
||||
b = t = nNumber;
|
||||
|
||||
if (nNumber > 0)
|
||||
{
|
||||
do
|
||||
{
|
||||
m = (b + t + 1) / 2; // median number
|
||||
if (m * m - nNumber > 0) // calculate x^2-y
|
||||
t = m; // adjust upper border
|
||||
else
|
||||
b = m; // adjust lower border
|
||||
b = t;
|
||||
t = (t + nNumber / t) / 2; // Heron's method
|
||||
}
|
||||
while (t < b);
|
||||
}
|
||||
while (t - b > 1);
|
||||
|
||||
return b;
|
||||
}
|
||||
|
||||
|
|
45
source/KML.H
45
source/KML.H
|
@ -39,29 +39,28 @@ typedef enum eTokenId
|
|||
TOK_NOHOLD, //23
|
||||
TOK_LOCALE, //24
|
||||
TOK_TOPBAR, //25
|
||||
TOK_MENUBAR, //26
|
||||
TOK_TITLE, //27
|
||||
TOK_OUTIN, //28
|
||||
TOK_PATCH, //29
|
||||
TOK_PRINT, //30
|
||||
TOK_DEBUG, //31
|
||||
TOK_COLOR, //32
|
||||
TOK_MODEL, //33
|
||||
TOK_CLASS, //34
|
||||
TOK_PRESS, //35
|
||||
TOK_IFMEM, //36
|
||||
TOK_TYPE, //37
|
||||
TOK_SIZE, //38
|
||||
TOK_DOWN, //39
|
||||
TOK_ZOOM, //40
|
||||
TOK_ELSE, //41
|
||||
TOK_ONUP, //42
|
||||
TOK_EOL, //43
|
||||
TOK_MAP, //44
|
||||
TOK_ROM, //45
|
||||
TOK_VGA, //46
|
||||
TOK_LCD, //47
|
||||
TOK_END //48
|
||||
TOK_TITLE, //26
|
||||
TOK_OUTIN, //27
|
||||
TOK_PATCH, //28
|
||||
TOK_PRINT, //29
|
||||
TOK_DEBUG, //30
|
||||
TOK_COLOR, //31
|
||||
TOK_MODEL, //32
|
||||
TOK_CLASS, //33
|
||||
TOK_PRESS, //34
|
||||
TOK_IFMEM, //35
|
||||
TOK_TYPE, //36
|
||||
TOK_SIZE, //37
|
||||
TOK_DOWN, //38
|
||||
TOK_ZOOM, //39
|
||||
TOK_ELSE, //40
|
||||
TOK_ONUP, //41
|
||||
TOK_EOL, //42
|
||||
TOK_MAP, //43
|
||||
TOK_ROM, //44
|
||||
TOK_VGA, //45
|
||||
TOK_LCD, //46
|
||||
TOK_END //47
|
||||
} TokenId;
|
||||
|
||||
#define TYPE_NONE 00
|
||||
|
|
|
@ -244,9 +244,9 @@
|
|||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 132
|
||||
#define _APS_NEXT_RESOURCE_VALUE 130
|
||||
#define _APS_NEXT_COMMAND_VALUE 40072
|
||||
#define _APS_NEXT_CONTROL_VALUE 1136
|
||||
#define _APS_NEXT_SYMED_VALUE 109
|
||||
#define _APS_NEXT_SYMED_VALUE 108
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue