Emu42 v1.10 DEBUGGER.C - changed function SetMappingMenu(), added control of memory menu items ID_DEBUG_MEM_LOAD and ID_DEBUG_MEM_SAVE - changed function OnLButtonUp(), NewValue(), EnterAddr() and EnterBreakpoint(), replaced WM_GETTEXT message call with function GetWindowText() - changed function Debugger(), added calls of Load/Save Memory Data handling functions - added functions for Load/Save Memory Data handling DISASM.C - bugfix in function disassemble(), the NOP5 opcode returned wrong address for next instruction (GOTO opcode skipping one nibble) DISPLAY.C - bugfix in function StopDisplay(), the assumption that WM_PAINT always redraw the complete display area was wrong; because calculating the used display region is quite difficult the complete emulator windows will be redrawn EMU42.C - bugfix in function SaveChanges(), function GetSaveAsFilename() returns a boolean and not a button id and removed call of last document saving - changed function OnPaint(), removed mixture of BitBlt() calls with argument hPaintDC and hWindowDC inside critical section - bugfix in function OnFileNew(), function SaveBackup() was called when emulator engine was running -> this may caused inconsistent backup data - changed function OnFileOpen(), added MruAdd() call - added new function OnFileMruOpen(), command handler for MRU menu selections - bugfix in function OnFileSaveAs(), function GetSaveAsFilename() returns a boolean and not a button id, minor optimizations, removed call of last document saving and added MruAdd() call - changed function OnFileClose(), removed call of DisableDebugger() because it's now done in function ResetDocument() - changed function OnObjectSave(), minor optimization - changed function OnTopics(), minor optimization by replacing ShellExecuteEx() with ShellExecute() - changed function MainWndProc(), added MRU message handler - changed function WinMain(), added StartupBackup handling, added MRU handling and added last document saving at end of program EMU42.DSP - added mru.c sources EMU42.H - extern declaration of global variables and functions EMU42.RC - added dialogs IDD_DEBUG_MEMSAVE and IDD_DEBUG_MEMLOAD - added Menuitem Files "Recent Files..." - added "Load Memory Data..." and "Save Memory Data..." menu entries in debugger "Memory" context menu - changed version and copyright FILES.C - changed function GetCutPathName(), better support for UNC names - changed function ResetDocument(), added call of DisableDebugger() - changed function SaveBackup(), added assertion for checking emulator engine state - changed function GetLoadObjectFilename() and GetSaveObjectFilename(), changed default file filter from *.* to *.HP LOWBAT.C - changed function GetBatteryState(), added possibility to disable low battery detection MOPS.C - bugfix in function MapNCE(), if MMU controller configuration requests more ROM data than current ROM file size, memory pointers outside the ROM data buffer were generated -> this may cause a memory access violation later MRU.C - new module for MRU routines OPCODES.C - changed function o83n(), o88n() and o89n(), speed optimization OPS.H - changed function Tbit0(), Tbit1(), Ta(), Tb(), Tae() and Tbe(), speed optimization RESOURCE.H - added definition for MRU handling - added definitions for Load/Save Memory Data handling SETTINGS.C - added function DelReg() for deleting a registry item - changed function ReadSettings() and WriteSettings(), added item "StartupBackup" in section [Files] and item "Disable" in section [LowBat] in the INI-File - added functions ReadSettingsString(), WriteSettingsString(), ReadSettingsInt(), WriteSettingsInt() and DelSettingsKey(), universal settings interface used for MRU data handling TIMER.C - bugfix in function TimeProc(), under certain conditions this function is called with a zero uEventId and this may clash with a reset timer event identifier Emu42 v1.09 DDESERV.C - changed function DdeCallback(), case XTYP_POKE and XTYP_REQUEST now decode the item name for the stack level and changed to new BINARYHEADER28S defintion DEBUGGER.C - added new function OnSetCursor(), message handler for "Activation Follows Mouse" implementation - changed function Debugger(), added "Always On Top" and "Activation Follows Mouse" handling - bugfix in function OnToolDebug(), argument for owner window handle was wrong, but over the years I has liked this debugger dialog behavior so I put in the correct argument for this behavior DISASM.C - disabled automatic inline code - fixed source file formatting error - changed function append_field(), defined as inline code - changed function append_r_addr(), code optimization DISPLAY.C - changed function ResizeWindow(), added "Always on top" feature EMU42.C - moved CF_HPOBJ definition to EMU42.H - removed global variable bClassicCursor - added function ForceForegroundWindow() forcing window to foreground - changed function SettingsProc(), added "Always On Top" and "Activation Follows Mouse" handling - changed function OnMouseMove(), added "Activation follows mouse" feature - added function OnNcMouseMove() for "Activation follows mouse" feature in non client area - changed function MainWndProc(), added WM_NCMOUSEMOVE message handler - bugfix in function WinMain(), moved additional DDE stuff just behind DDE server initialization, adjusted length for cut filenames preventing negative values and call ShowWindow() before asking for a new document preventing a KML script dialog without a parent window EMU42.H - added CF_HPOBJ definition from EMU42.C - renamed define BINARYHEADER28 into BINARYHEADER28S and the definition to "HPHP28-S" to separate it from Emu28 - removed declaration of bClassicCursor - changed function prototypes - extern declaration of global variables and functions EMU42.RC - added item "Always On Top" and "Activation Follows Mouse" in settings dialog - cosmetic changes in dialog IDD_CHOOSEKML to improve WinXP style - changed version and copyright FILES.C - added global variable saving the patched ROM checksum - changed function SetWindowPathTitle(), adjusted length for cut filename - changed function CrcRom(), change function prototype, added unpacked data check and made function public - bugfix in function CrcRom(), hadn't detected address content changes at addresses ending with a 0x2 and 0x3 because only lower 16 bit of checksum was used -> modified function cause a warmstart because of new checksum - changed function UnmapRom(), added reset of ROM checksum variable - new function IsDataPacked() for unpacked data check - changed function OpenDocument(), use ROM checksum made in InitKML() and added checks for packed memory data - changed function SaveDocument(), adjusted to new prototype of CrcRom() - changed function WriteStack(), now checking the complete binary header "HPHP28-S" to distinguish them from Emu28 object files, added stack level argument, adjusted to new prototype of function RPL28_ObjectSize() and added new error state for bad objects - changed function LoadObject(), adjusted call of WriteStack() to new function prototype and added error message for bad objects - changed function SaveObject(), changed to new BINARYHEADER28S defintion KML.C - bugfix in function KillKML(), class member variable wasn't reset - bugfix in function TransparentCircle(), there was no radius value check for preventing division by 0 and color low adjust value wasn't reached because of wrong color offset divisor -> adjusted LOWADJ definition to get similar output to buggy earlier version - changed function MouseMovesTo(), removed bClassicCursor switch - changed function InitKML(), added full check for unpacked ROM image and build checksum of patched ROM OPCODES.C - bugfix in function o807(), Chipset.in register must be refreshed before checking for a pressed key PCH.H - added include stddef.h - restricted DWORD_PTR type definition for MSVC6.0 and earlier RESOURCE.H - added some definitions RPL.C - bugfix in RPL28_ObjectSize() and RPL42_ObjectSize(), changed function prototype for adding buffer size parameter preventing reading outside buffer area when decoding bad objects - changed function RPL_ObjectSize(), adjusted to new prtotypes of function RPL28_ObjectSize() and RPL42_ObjectSize() - added function RPL_Depth() returning stack depth - changed function RPL_Pick(), added check of stack depth - changed function RPL_Push(), new implementation with stack level argument RPL.H - added definition of O_EDITLINE SETTINGS.C - changed function ReadSettings() and WriteSettings(), added item "ActFollowsMouse" and "AlwaysOnTop" in section [Emulator], removed item "ClassicCursor" from [KML] section in the INI-File STACK.C - adjusted calls of RPL_Push() to new function prototype TIMER.C - changed function CalcT2(), in the case of a pending timer2 interrupt return always the timer2 value 0xFFFFFFFF Emu42 v1.08 DDESERV.C - removed warnings when compiling under VS2005 DEBUGGER.C - removed warnings when compiling under VS2005 DISASM.C - bugfix in function disasm_8(), the ?HS=0 n opcode showed always as ?=0 opcode DISPLAY.C - bugfix in function StopDisplay(), in most times display wasn't cleared in calculator off state (bug introduced in v1.07) EMU42.C - removed warnings when compiling under VS2005 - changed function OnCreate() and OnDestroy(), added Critical Section initialization - changed function OnFileClose(), removed call of KillKML() because will be done in ResetDocument() - bugfix in function OnViewScript(), removed error message because it's wrong when script is ok, but log report was leaved with Cancel button, also if clause of error message box was never reached because error message box had no Cancel button - changed function OnViewScript(), added call of SetWindowPathTitle() to adjust length of window title - changed function WinMain(), simplified document loading at startup and replaced full filename title with length cut filename EMU42.DSP - added lowbat.c sources EMU42.H - extern declaration of global variable and functions EMU42.RC - changed version - replaced CREATEPROCESS_MANIFEST_RESOURCE_ID definition in manifest declaration by 1 ENGINE.C - changed function WorkerThread(), added control of battery measurement thread EXTERNAL.C - changed function BeepWave(), removed VS2005 warning - changed function BeepWin9x(), disabled implementation for IA64 architecture FETCH.C - changed function EvalOpcode(), included assertion for detecting access to packed memory data FILES.C - moved function WriteStack() inside file - added new function GetCutPathName(), creating a length cut filename - added new function SetWindowPathTitle(), replacement for calling SetWindowTitle() for getting length cut filenames as title - changed function PatchRom(), removed VS2005 warning - changed function MapRom(), removed some useless variable settings and optimized ROM unpacking - changed function OpenDocument(), SaveDocumentAs() and RestoreBackup(), replaced call of function SetWindowTitle() with SetWindowPathTitle() - changed function GetOpenFilename(), GetSaveAsFilename(), GetLoadObjectFilename() and GetSaveObjectFilename(), moved storage place of local file buffer from heap to stack KEYBOARD.C - bugfix in function ScanKeyboard(), if keyboard reading wasn't active a released ON key wasn't cleared in the "in" register KEYMACRO.C - removed warnings when compiling under VS2005 - changed function OnToolMacroNew(), minor optimization writing macro file header KML.C - removed warnings when compiling under VS2005 - added keyword "Menubar" to pLexToken[] table -> scripts using this keyword are parsed with a warning but not with a fatal error - bugfix in function CreateKmlList(), fixed possible call of API function lstrcmpi() with NULL pointer at Hardware detection and select only KML files with a valid Model statement - changed function DisplayChooseKml(), changed return type of dialog box - bugfix in function Lex(), EOF without LF at end of non empty line wasn't detected as EOL - changed function ParseLine(), change typecast of szLexString from DWORD to DWORD_PTR KML.H - added TOK_MENUBAR definition - changed variable type of nParam[] element of KmlLine structure because element is also used as pointer LOWBAT.C - new modul with battery measurement MOPS.C - added function ChipResetMaster(), new function for reset master chip (derivated from function CpuReset()) - added function ChipResetSlave(), new function for reset slave chip (derivated from function CpuReset()) - bugfix in function CpuReset(), display update wasn't stopped and moved implementation to functions ChipResetMaster() and ChipResetSlave() for complete reset - added new function IOBit() for thread safe setting of IO bits - bugfix in function ReadIO(), added GRAM, VLBI and LBI bit implementation in the LPD (0x308) register - bugfix in function ReadSlaveIO(), the VLBI and LBI bit are always off in the slave chip and added GRAM implementation in the LPD (0x308) register - changed function WriteIO(), new implemention of display sync error for the DON bit in the DSPCTL (0x303) register because of modified CpuReset() function - bugfix in function WriteIO() and WriteSlaveIO(), added GRAM, VLBI and LBI bit implementation in the LPD (0x308) register and the EGRAM bit implementation in the LPE (0x309) register - bugfix in function WriteSlaveIO(), a DON bit change in the DSPCTL (0x303) register hadn't affect on the annunciators of Clamshell calculators PCH.H - added _CRT_SECURE_NO_DEPRECATE definition - added DWORD_PTR type definition RESOURCE.H - removed CREATEPROCESS_MANIFEST_RESOURCE_ID and RT_MANIFEST definition STACK.C - changed function RPL_SetBcd(), removed compiler warning - bugfix in function OnStackPaste(), case "any other format" must be treated as string and not as binary object TIMER.C - removed warnings when compiling under VS2005 - bugfix in function StopTimers(), on stopping master timer slave timers wasn't stopped automatically Emu42 v1.07 DISPLAY.C - changed function CreateLcdBitmap(), WritePixelQuad() and WritePixelRect(), added Zoom factor 3 handling - changed function StopDisplay(), removed display clear EMU42.H - added definition with valid calculator models - added macro with model validation code EMU42.RC - changed IDD_KMLLOG, replaced "Always" text with "Show Script compilation result next time" - changed version 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 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(), TOK_ZOOM argument wasn't checked, on illegal zoom values use 1 as default now - 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[] Emu42 v1.06 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 fuction 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 - bugfix in function UpdateContrast(), used background Color 0 in calculator off state even if Color 32 was defined - bugfix in function CreateLcdBitmap(), DIB section shouldn't created from the memory DC EMU42.C - changed function SettingsProc(), added sound handling - changed function SaveChanges(), default button for confirming the "Do you want to save changes ?" message depends now on the "SaveDefaultConfirm" INI-File setting (1=yes / 0=no button) EMU42.H - extern declaration of global variable EMU42.RC - added "Sound" group in Settings dialog - added "Follow" menu entries in debugger "Memory" context menu - changed version and copyright ENGINE.C - bugfix in function WorkerThread(), when changing into SM_RUN state display contrast must also be restored FILES.C - bugfix in function LoadBitmapFile(), function blocked loading bitmap when ROM file was missing KML.C - added keywords "Topbar" and "Vga" to pLexToken[] table -> scripts using these keywords now are parsed with warnings and not quit with a fatal error any more - bugfix in function SkipWhite(), skipping remark text hadn't stop at string end - bugfix in function ParseBlocks(), stopped script parsing without error at unknown block token - bugfix in function SkipLines(), TOK_END was handled wrong -> this caused a RunKey end if condition of TOK_IFPRESSED or TOK_IFFLAG was false and there was no TOK_ELSE inside this level - bugfix in function KillKML(), ROM type wasn't reset to the preset value at the end KML.H - added TOK_TOPBAR and TOK_VGA definition RESOURCE.H - added several definitions RPL.C - added new function RPL28_GarbageCol() for doing a garbage collection - changed function RPL_CreateTemp(), added garbage collection in HP28S section on low memory condition RPL.H - added O_GARBAGECOL definition SETTINGS.C - changed function ReadSettings() and WriteSettings(), added item "SaveDefaultConfirm" in section [Files] in the INI-File TIMER.C - changed function CheckT1() and CheckT2(), minor optimization in checking if INT or WAKE bit is set Emu42 v1.05 DISPLAY.C - bugfix in function CreateMainBitmap(), in error case hMainDC variable wasn't cleared EMU42.H - extern declaration of global variables EMU42.RC - changed version EXTERNAL.C - added function BeepWave(), beeper function using sound card - added function BeepWin9x(), PC speaker function for working on Win9x - added function Beeper(), helper function calling OS dependent beeper implementation or wave sound - changed function External0() and External1(), removed range checking of duration and call the new function Beeper instead of Beep() - bugfix in function External1(), got DWORD overflow in calculation of RATE dependend frequency and duration values KML.C - bugfix in function InitKML(), changed log message for no "Model" definition found and a missing "Bitmap" definition wasn't detected PCH.H - added include conio.h SETTINGS.C - changed function ReadSettings() and WriteSettings(), added item "WaveBeep" and "WaveVolume" in section [Emulator] in the INI-File TIMER.C - bugfix in function SetT1(), fixed unsynchronized access to timer1 value, stop timer1 only if running and restart timer1 only when timer2 is running Emu42 v1.04 DDESERV.C - changed function DdeCallback(), removed delays after ON key state change DISPLAY.C - bugfix in function CreateLcdBitmap(), set UpdateDisplayMem function pointer with wrong referenced function EMU42.C - changed function UpdateWindowStatus(), enabled stack copy/paste for the HP42S - changed function OnStackCopy() and OnStackPaste(), moved function body to STACK.C - changed function OnDropFiles() and OnObjectLoad(), removed delays after ON key state change - bugfix in function WinMain(), szCurrentKml wasn't initialized - changed function WinMain(), added accelerator key access for menus EMU42.DSP - added rpl.h and stack.c sources EMU42.H - extern declaration of global functions EMU42.RC - changed menu text "Copy String" to "Copy Stack" and menu text "Paste String" to "Paste Stack" - changed menu text order from "Copy Stack/Copy Screen/Paste Stack" to "Copy Screen/Copy Stack/Paste Stack" - added accelerator resource - changed version FILES.C - changed function WriteStack(), minor optimization when saving as string - changed function PatchRom(), changed ASCII string handling from BYTE to CHAR data type - bugfix in function OpenDocument(), check for empty KML file name was wrong, so the error handler of the following InitKML() was always called in this case - changed function LoadObject(), file access is now shared KML.C - changed variable qualifier of eIsBlock[] table and removed TOK_NONE item from it - bugfix, global variables pKml and pKmlList hadn't be initialized - removed usage of global variables bKmlLogOkEnabled and nKmlFiles - changed function AddToLog(), changed argument qualifier and minor code optimization - changed function PrintfToLog(), use a local buffer instead of the heap for the output buffer of the wvsprintf() function, this helps to reduce fragmentation of the heap - changed function KMLLogProc(), minor code optimization and removed use of global variable bKmlLogOkEnabled and windows redraw in the WM_INITDIALOG case - changed function DisplayKMLLog(), removed use of global variable bKmlLogOkEnabled and transfer state of bOkEnabled over the lParam argument to the dialog box procedure - bugfix in function CreateKmlList(), fixed a memory leak in the case of no title - changed function ChooseKMLProc(), minor code optimization - changed function IsBlock(), minor code optimization - bugfix in function ParseString(), fixed memory leak in error case and optimized implementation - changed function IncludeLines(), IncludeBlocks(), LoadKMLGlobal() and InitKML(), file access is now shared OPS.H - bugfix in function Nsub() and Nrsub(), in some situations wrong results in dec mode with illegal decimal number entry as 2nd operator - changed function Nsrb(), speed optimization RPL.C - moved HP28S RPL constants to file RPL.H - changed function RPL_SkipOb() and RPL_ObjectSize(), prepared for HP42S implementation - changed function RPL_CreateTemp(), added HP42S implementation - added function RPL_PushX(), push object into HP42S x-register RPL.H - new modul with memory addresses and RPL constants STACK.C - new modul with stack manipulation parts of the HP28S, prior located in EMU42.C, and manipulation parts for the HP42S x-register - the HP28S can now also copy real numbers from and to the clipboard - changed function StackPaste(), removed delays after ON key state change USRPRG42.C - moved HP42S RPL constants to file RPL.H - bugfix in function SelectProgram(), hadn't checked for selected items in the IDOK case so it was possible to write an empty user code file Emu42 v1.03 CHECKBOX.BMP - fixed one pixel with wrong color DEBUGGER.C - bugfix in function Debugger(), used function to set icon which hasn't worked properly under WinXP DISPLAY.C - removed remainders of DEBUG_DISPLAY stuff EMU42.C - changed function declaration of function OnTopics() EMU42.RC - changed "Always" checkbox in "KML Script Compilation Result" dialog from a pushlike to normal one for better readability under WinXP style - changed version and copyright ENGINE.C - bugfix in function AdjustSpeed(), on large operations the workaround condition for Win2k was detected and the following synchronizing failed because the CPU didn't got the free running cycles for the waited time FILES.C - bugfix in function OpenDocument(), reload KML button state from last document close - changed function DibNumColors() and CreateBIPalette(), changed argument qualifier KML.C - added function ReloadButtons(), update internal button state from chip keyboard matrix content KML.H - added ReloadButtons() function prototype TIMER.C - bugfix in function RescheduleT2(), better accuracy on conversation of timer2 ticks into multimedia timer ms - changed function StartTimers(), added calculation of maximum timer2 ticks that can be handled by one timer event - changed function StartTimers() and StopTimers(), changed multimedia timer to best possible timer resolution instead of risking to fail with 1 ms resolution preset Emu42 v1.02 EMU42.RC - changed version USRPRG42.C - changed function PrevGlobal(), minor optimization - bugfix in function Catalog(), a FOCAL program begins not at the global label, it begins behind the global end of the prior program - bugfix in function GetUserCode(), was only able to load FOCAL programs beginning with a global label - changed function GetUserCode(), added FOCAL program packing Emu42 v1.01 DISPLAY.C - changed function UpdateContrast(), added UpdateAnnunciators() call to adjust annunciator color on display contrast change - changed function LcdProc(), removed UpdateAnnunciators() call to save execution time - changed function StartDisplay(), added UpdateAnnunciators() call to switch on every set annunciator EMU42.C - changed function UpdateWindowStatus(), added macro specifiy menu control - changed function CopyItemsToClipboard(), simplified implementation in UNICODE mode by saving the data in the CF_UNICODETEXT format - added function OnTopics() to call help file - changed function OnLButtonDown(), OnLButtonUp(), OnMouseMove(), OnKeyDown() and OnKeyUp(), disable function handling when in macro play mode - changed function MainWndProc(), added some macro and help command handler functions EMU42.DSP - added keymacro.c sources EMU42.H - extern declaration of global variables and functions EMU42.RC - added Menuitem Tools "Macro..." - added Menuitem Help "Help Topics" in main menu - changed version ENGINE.C - changed function WorkerThread(), close running keyboard macros when switching into invalid state KEYBOARD.C - changed function KeyboardEvent(), added call to key recording function KeyMacroRecord() - bugfix in function KeyboardEvent(), prevent buffer overflow with too big out codes on Chipset.Keyboard_Row array KEYMACRO.C - new modul supporting keyboard macro functions KML.C - added function PlayKey(), handle button with OutIn code KML.H - added PlayKey() function prototype MOPS.C - bugfix in function WriteIO() and WriteSlaveIO(), writing to timer2 failed if first writing address was before the timer2 address area - changed function WriteIO() and WriteSlaveIO(), update annunciators now here on every access to the annunciator registers PCH.H - added VERIFY macro RESOURCE.H - added several definitions SETTINGS.C - changed function ReadSettings() and WriteSettings(), added section [Macro] in INI-File Emu42 v1.00 - first public version (c) by Christoph Gießelink, c dot giesselink at gmx dot de