Emu42 v1.30 DEBUGGER.C - changed function SetMappingMenu(), added eMode variable initialization to prevent Clang warning caused by the default case of the switch structure - changed function OnStackPush(), OnStackModify() and OnLButtonUp(), added (UINT *) typecast for Clang compatibility DISASM.C - disabled pragma inline_depth for CLang DISPLAY.C - changed function CreateLcdBitmap(), on Lewis hardware call function CreateAnnunBitmapFromMain() to create a pure B&W annunciator bitmap - bugfix in function CreateAnnunBitmapFromMain(), fixed unsequenced modification of 'pdwRGBPixel' and stop creation when any annunciator is defined as opaque DISPNUM.C - changed table sSegtabBert[], sSegtabSaca[] and sGraphictabLewis[], added braces around each table element for Clang compatibility DISRPL.C - changed table ObjDecode[], added braces around each table element for Clang compatibility - changed function PutSn(), BINx(), DoSemiStream(), RplDecodeObject() and RplCreateObjView(), added error handling for memory allocation failed - changed function DoArry(), added UNREFERENCED_PARAMETER statement EMU42.C - changed function WinMain(), added disable of TIMER_RESOLUTION throttling for Windows 11 and added a more flexible CPU binding for the Saturn core emulation thread on Windows Vista and later with function GetCurrentProcessorNumber() EMU42.DSP - added pngcrc.c sources - added "LODEPNG_NO_COMPILE_CRC" to lodepng.c definitions EMU42.H - changed function prototype EMU42.RC - changed version and copyright ENGINE.C - changed function WorkerThread(), changed function prototype by adding WINAPI to function definition FETCH.C - changed all tables, added braces around each table element for Clang compatibility FILES.C - changed function CheckForBeepPatch(), removed unused typedef 'PBEEPPATCH' - changed function MapRomBmp(), NewDocument(), SaveBackup(), RestoreBackup() and CreateRgnFromBitmap(), added error handling for memory allocation failed - changed function UnmapRom(), removed check for ROM NULL pointer - changed function DecodeGif(), ignore pixel aspect ratio setting instead of returning a decoding error - changed function DecodePng(), removed NULL pointer check for freeing allocated PNG image data KML.C - changed function AddToLog(), optimized implementation - changed function DestroyKmlList(), minor optimization - changed function CreateKmlList(), added error handling for memory allocation failed - changed function ParseString(), optimized memory allocation and added error handling for memory allocation failed - changed function ParseLine(), ParseLines() and ParseBlock(), added error handling for memory allocation failed LODEPNG.C - changed implementation file to LodePNG version 20230410 with unmarked typecast patches for x64 compatibility, Copyright (c) 2005-2023 Lode Vandevenne LODEPNG.H - changed header file to LodePNG version 20230410 PCH.H - added definitions, emum and struct for calling function SetProcessInformation() - added macro for using Clang __builtin_unreachable() function - added Clang pragma to suppress include file warnings with wrong written upper/lower-case letters PNGCRC.C - new module for generating the PNG CRC32 replacing the CRC generation in LODEPNG.C RPL.C - added Clang pragma to suppress unused code warninig SOUND.C - changed function WaveLevel(), added byWaveLevel variable initialization to prevent Clang warning caused by the default case of the switch structure STACK.C - changed function OnStackCopy(), initialized variable dwObject TIMER.C - changed function StartTimerBert() and StopTimerBert(), use result of timeGetDevCaps() for minimum period of multimedia timer UDP.C - replaced static IN_ADDR by SOCKADDR_IN structure - changed function ResetUdp(), invalidate IP address inside SOCKADDR_IN structure - changed function SendByteUdp(), replaced local SOCKADDR_IN by the global static SOCKADDR_IN structure Emu42 v1.29 EMU42.RC - changed version FILES.C - renamed pbySignature[] to bySignature[] and defined signature as constant - changed function Checksum(), using pointer for speed optimization - added function UnpackRom(), subroutine for unpacking ROM image - changed function MapRom() and MapRomBmp(), speed optimization unpacking ROM image using UnpackRom() - changed function OpenDocument(), simplified file signature check - changed function SaveDocument(), adjusted to bySignature[] - changed function GetSaveAsFilename(), changed model specific file filter selection to table implementation LODEPNG.C - changed implementation file to LodePNG version 20220717 with unmarked typecast patches for x64 compatibility, Copyright (c) 2005-2022 Lode Vandevenne LODEPNG.H - changed header file to LodePNG version 20220717 STACK.C - bugfix in function OnStackPaste(), moved HP32SII stack lift enable behind the restart because the restart disabled the stack lift USRPRG32.C - changed function Catalog(), a non conditional GTO to the active label wasn't detected as end of label like a RTN Emu42 v1.28 DISPLAY.C - changed table sSegtabSaca[], added character 'c' - moved table sSegtabSaca[] and the functions GetLcdNumberBert() and GetLcdNumberSaca() to module DISPNUM.C - changed function CreateLcdBitmap(), on Bert and Sacajawea hardware call function CreateAnnunBitmapFromMain() to create a pure B&W annunciator bitmap - added new function CreateAnnunBitmapFromMain(), create a B&W annunciator bitmap from background bitmap DISPNUM.C - new module for decoding text in the LCD for all models, non displayable characters are shown as MIDDLE DOT U+00B7 now EMU42.C - changed function SaveChanges(), added document name to MRU list - changed function OnFileMruOpen(), modified implementation taking care of the SaveChanges() modification adding a filename to the MRU list after saving a document - changed function OnViewCopy(), get display text for all calculator models now EMU42.DSP - added dispnum.c sources EMU42.H - expanded STACK_P_EN definition list with HP32S and HP32SII calculator model - changed function prototype - extern declaration of global functions - removed extern declaration of global functions EMU42.RC - changed version and copyright ENGINE.C - changed function AdjustSpeed(), minor optimization - changed function InitAdjustSpeed(), AdjKeySpeed() and SetSpeed(), restored implementation from v1.25 FILES.C - changed function DibNumColors(), CreateBIPalette() and DecodeBmp(), marked BITMAPINFOHEADER pointer as unaligned - changed function CreateBIPalette() and DecodeBmp(), minor optimization at input data check - changed function DecodePng(), simplified destination row pointer calculation in main loop and removed dead code in function cleanup LODEPNG.C - changed implementation file to LodePNG version 20220109 with unmarked typecast patches for x64 compatibility, Copyright (c) 2005-2022 Lode Vandevenne LODEPNG.H - changed header file to LodePNG version 20220109 MOPS.C - changed function ReadT2Acc(), restored implementation from v1.25 MRU.C - added some remarks - added function MruID(), return ID of the given entry - changed function MruFilename(), changed function interface writing found filename into a buffer instead of returning a pointer to the filename PCH.H - added __unaligned definition for MSVC6.0 SDK and earlier RPL.H - added L_UserFlags and N_UserFlags entry - modified L_SysFlags entry SOUND.C - changed function SoundOut(), restored implementation from v1.25 STACK.C - changed function GetRadix(), adjusted L_SysFlags definition use - changed function OnStackPaste(), added HP32S and HP32SII real number handling STEGANO.C - bugfix in function SteganoEncodeDib(), fixed signed/unsigned mismatch Emu42 v1.27 EMU42.C - changed function OnViewScript(), removed complete CPU reset at different ROM image detection and changed to OpenDocument() solution setting PC address to 0 - changed function WinMain(), changed initialization default number of maximum MRU entries from 4 to 6 EMU42.RC - changed version FILE.C - added function ChecksumChk(), calculatate checksum for Bert ROM - changed function RebuildRomCrc(), added Bert ROM checksum calculation - changed function OpenDocument(), the prior implementation made a complete CPU reset when the function detected a different ROM image, but the HP32SII don't restore the contrast setting, so reset implementation reduced to set PC address to 0 for all calculator models MOPS.C - changed function CpuReset(), removed StopTimerBert() function call STEGANO.C - added support for 3 bit/byte encode/decode - added function CodingLength(), calculate the number of necessary pixel channels to encode the input data with a given bit/byte setting - bugfix in function SteganoDecodeDib(), bitmap size check was incomplete, so a buffer overrun was possible STEGANO.H - added config for disabling 3bit/byte encoding USRPRG32.C - checked if the HP32SII rev. A and B ROM using the same RAM entries Emu42 v1.26 DEBUGGER.C - bugfix in function EnterBreakpoint(), returned an uninitialized address value on empty breakpoint edit control - bugfix in function OnDrawBreakWnd(), modified implementation and fixed background color of highlighted selection DISASM.C - bugfix in function disasm_1() and disasm_8(), fixed decoding of r=ss, ss=r and rssEX with ss = 5, 6, 7, D, E or F register select DISPLAY.C - changed table sSegtabSaca[], added character 'e' EMU42.C - changed function OnObjectLoad() and OnObjectSave(), added HP32S calculator - changed function OnContextMenu(), when the context menu was generated from the keyboard it opened at a fix position, now when the mouse cursor position is inside the client window, at the mouse cursor position EMU42.H - expanded OBJECT_EN definition list with HP32S calculator model - expanded STACK_C_EN definition list with HP22S and HP32S calculator model EMU42.RC - changed version and copyright ENGINE.C - changed function InitAdjustSpeed(), added critical section for writing reference CPU cycles and reference time - bugfix in function AdjKeySpeed() and SetSpeed(), removed critical section handling for initializing CPU slow down, because this section is locked when the CPU emulation thread already slow down the CPU speed FETCH.C - bugfix in table o81Af2_, o81Af1_ and o81Af0_, replaced o_invalid6 function pointers by their corresponding opcode function - bugfix in table o12_, o11_ and o10_, replaced o_invalid3 function pointers by their corresponding opcode function LODEPNG.C - changed implementation file to LodePNG version 20210627 with unmarked typecast patches for x64 compatibility, Copyright (c) 2005-2021 Lode Vandevenne LODEPNG.H - changed header file to LodePNG version 20210627 MOPS.C - bugfix in function ReadT2Acc(), moved critical section because InitAdjustSpeed() part is already protected RPL.H - added some HP22S and HP32S RAM entries SOUND.C - bugfix in function SoundOut(), removed critical section handling because InitAdjustSpeed() is already protected STACK.C - changed function GetRadix() and OnStackCopy(), added HP22S and HP32S implementation USRPRG32.C - added HP32S variant to current HP32SII implementation Emu42 v1.25 DISPLAY.C - changed function UpdateContrastLewis() and StartDisplay(), changed call of function UpdateAnnunciators() updating all annunciators - changed function UpdateAnnunciators(), changed function prototype with an additional argument to get information which annunciators have changed, so only the annunciators which have changed are redrawn now EMU42.C - changed function OnPaint(), changed call of function UpdateAnnunciators() updating all annunciators EMU42.DSP - removed external.c sources EMU42.H - changed function prototype - removed extern declaration of global functions EMU42.RC - changed version and copyright EXTERNAL.C - file deleted FETCH.C - changed table o81B_, replaced beep patch opcodes o81B0 and o81B1 by o_invalid4 FILES.C - changed function OpenDocument(), when KML script file name is longer than the file buffer, skip the name heading until the name remainder fits into the buffer, this cause a KML script error with the selection of a new KML script instead of a general document file read error before KML.C - changed function InitKML(), changed warning to error at ROM beep patch detection LODEPNG.C - changed implementation file to LodePNG version 20200306 with unmarked typecast patches for x64 compatibility, Copyright (c) 2005-2020 Lode Vandevenne LODEPNG.H - changed header file to LodePNG version 20200306 MOPS.C - changed function WriteLewisIO() and WriteLewisSlaveIO(), the annunciator access variable now contain bit coded the annunciators which have changed and is the argument for the modified UpdateAnnunciators() function OPCODES.C - removed function o81B0() and o81B1() as part of the beep patch OPCODES.H - removed extern declaration of function o81B0() and o81B1() Emu42 v1.24 EMU42.DSP - added "LODEPNG_NO_COMPILE_ALLOCATORS" to lodepng.c definitions EMU42.H - extern declaration of global function EMU28.RC - changed version FILES.C - added lodepng allocator functions lodepng_malloc(), lodepng_realloc() and lodepng_free() - added function MapRomBmp(), loading a ROM image from stenographic bitmaps with uncompressing - bugfix in function NewDocument(), for the Pioneer series calculators the ROM sizes were calculated from the actual loaded ROM image file size, this is wrong for some cases; the ROM size is now a model dependent preset value of 10, 16 or 64KB for the ROM inside the CPU chip and all High-End Pioneers are prepared with a 32KB extra ROM necessary for the international versions of the HP17B and HP17BII KML.C - bugfix in function ParseLines() and ParseBlocks(), if loading of an include file failed the KML script line number at the error message was wrong - changed function InitGlobal(), replaced ROM image loading in the TOK_ROM and TOK_BITMAP block by calling function MapRomBmp() LODEPNG.C - changed implementation file to LodePNG version 20191109 with unmarked typecast patches for x64 compatibility, Copyright (c) 2005-2019 Lode Vandevenne LODEPNG.H - changed header file to LodePNG version 20191109 MOPS.C - bugfix in function MapNCE(), ROM page mapping stops at end of ROM file now STACK.C - changed function OnStackPaste(), added HP42S alpha string handling Emu42 v1.23 DEBUGGER.C - added enum type, static variables and static function prototypes for trace implementation - removed all occurrences of UNREFERENCED_PARAMETER(wParam); - changed function NotifyDebugger(), added flush trace buffer - changed function Debugger(), added trace implementation in case WM_INITDIALOG, WM_DESTROY and WM_COMMAND - changed function UpdateProfileWnd(), added Bert chip handling - added functions StartTrace(), StopTrace(), FlushTrace(), PrintTrace(), OutTrace(), OnBrowseTraceSettings(), TraceSettings(), OnTraceSettings() and OnTraceEnable() for trace implementation DISMEM.C - changed function GetMemAvail(), added Bert chip handling DISPLAY.C - preset variables hMaskDC and hBmpBkDC with NULL - added Bert display segment table - added function prototypes - added function GetDimLcdBitmapBert(), calculate size of Bert LCD - renamed function GetDimLcdBitmap() to GetDimLcdBitmapSaca() - added function UpdateContrastBert(), contrast handler for Bert hardware - changed function CreateLcdBitmap(), added Bert display initialization - changed function DestroyLcdBitmap(), free hMaskDC and hBmpBkDC resources if they had been allocated - changed function CreateMainBitmap(), changed LoadBitmapFile() function call loading a bitmap with realizing a palette - changed function CreateAnnunBitmap(), changed LoadBitmapFile() function call loading a bitmap without realizing a palette - added function UpdateDisplayBert(), display drawing for Bert chip - changed function StartDisplay(), added Bert chip specific parts - added function GetLcdNumberBert(), interpret characters of Bert display - bugfix in function GetLcdNumberSaca(), return string must be empty when display is off EMU42.C - added variable bMouseButton saving if mouse button was pressed when mouse cursor was inside a virtual button hit area - changed function OnInitMenu(), changed detection of menu item enable and enabled the HP10B, HP20S and HP21S for Stack Copy - changed function OnViewCopy(), added Bert display reading - removed function OnNcHitTest(), replaced by additional OnLButtonDown() implementation - changed function OnLButtonDown(), added part for windows movement when having no title bar prior done over the WM_NCHITTEST message handler which caused side effects - changed function OnLButtonUp() and OnKeyDown(), added reset of variable bMouseButton - changed function MainWndProc(), added WM_ENDSESSION handler for document saving, WM_CONTEXTMENU calls the context menu only when the right mouse button was not pressed over a virtual button hit area before, removed the WM_NCRBUTTONUP case and removed the WM_NCHITTEST message handler EMU42.DSP - added stegano.c and stegano.h sources EMU42.H - expanded definitions for valid calculator models - added definitions and macros for menu item control - removed MMU bit setting definitions - added Bert hardware platform and map definitions - changed function prototype - extern declaration of global variables and functions EMU42.RC - added dialog IDD_TRACE - changed version info "FileDescription" text - changed menu IDR_DEBUG, added ID_TRACE_SETTINGS and ID_TRACE_ENABLE menu items - changed version and copyright ENGINE.C - changed function Debugger(), added function fnOutTrace() call and Bert timer control - changed function WorkerThread(), added Bert timer control FILES.C - added function CheckForBeepPatch() looking for ROM beep patches at known positions - bugfix in function NewDocument(), initialize the ROM fingerprint after loading the KML script and added Bert initialization - changed function GetOpenFilename() and GetSaveAsFilename(), added Bert specific file extensions - changed function DecodeBmp(), DecodeGif(), DecodePng() and LoadBitmapFile(), changed function prototype by adding an argument if a palette should realized IO.H - added Bert hardware definitions KML.C - changed function InitGlobal(), added Bert hardware to TOK_MODEL block and added possibility of ROM image loading from stenographic bitmaps in TOK_ROM and TOK_BITMAP block - changed function KillKML(), added preset global variable - changed function ResizeMainBitmap(), added Bert hardware handling - changed function InitKML(), added error check ROM beep patches LODEPNG.C - changed implementation file to LodePNG version 20190914 with unmarked typecast patches for x64 compatibility, Copyright (c) 2005-2019 Lode Vandevenne LODEPNG.H - changed header file to LodePNG version 20190914 MOPS.C - added Bert MMU definitions - added function prototypes - changed MMU bit settings from definitions to variables to made them hardware platform specific - changed function MapNCE(), added special handling if module size is not a power of 2 multiple - added function MapRAMBert() for Bert RAM mapping - changed function InitIO(), added Bert MMU initialization - added function MapBert(), mapping function for Bert hardware - renamed function Map() to MapLewis() - changed function CpuReset(), MapData(), NreadEx() and Nwrite(), added Bert specific adjustments - added function ReadBertIO() and WriteBertIO(), Bert specific IO functions OPCODES.C - changed function o0F(), o807() and o80E(), made SREQ handling hardware specific OPS.H - changed function FASTPTR(), modifications for variable based MMU bit settings PCH.H - added definitions to disable stegano disk interface and stegano encoder RESOURCE.H - added definitions - removed ID_Menu and ID_FIND_N garbage definitions from file RPL.H - added some HP10B, HP20S and HP21S RAM entries STACK.C - changed function GetRadix() and OnStackCopy(), added HP10B, HP20S and HP21S implementation - added function DoReal42(), decode real number object with special alpha string decoding when mantissa sign nibble is 1 - changed function OnStackCopy(), added special handling for HP42S real object which also could contain an alpha string STEGANO.C STEGANO.H - new modules to encode/decode data in bitmap images TIMER.C - changed function SetHPTime() and StartTimers(), disable function operation for Bert hardware - added function TimeProcBert(), StartTimerBert() and StopTimerBert() for Bert timer handling TYPES.H - added variable SReq to save respond state for SREQ? command - made a union around variable IORam to reuse this RAM area for Bert hardware specific registers USRPRG32.C - added some HP32SII program code definitions Emu42 v1.22 DISPLAY.C - added function SetAnnunBitmap(), setting a created annunciator bitmap DISRPL.C - changed function DoHexStream() and DoHxs(), removed trailing space if data length is zero - bugfix in function DoIntStream(), =DOINT stream with zero data length crashed decoder EMU42.C - bugfix in function OnViewCopy(), fixed unsynchronized GDI operation EMU42.DSP - added lodepng.h and lodepng.c sources EMU42.H - extern declaration of global function EMU42.RC - changed version and copyright FILES.C - added function DecodePng() as wrapper for decoding PNG image files - changed function LoadBitmapFile(), added PNG image file support - added function EncodeColorBits() returning bitfield position encoded color bits - bugfix in function CreateRgnFromBitmap(), removed GetObject() call for getting the image properties, they are get over a GetDIBits() query now, removed creating a memory DC because it's unused and added bitfield decoding which is important for the 16 bit (5:6:5) color setting KML.C - changed function AdjustPixel(), changed function prototype using a buffer position instead of device context pixel coordinate to locate the adjustable pixel - changed function TransparentCircle(), complete new implementation with changed function prototype; the prior implementation used the GetPixel()/SetPixel() method to adjust the pixel color of a single pixel, this method was extremely slow on some PC configurations, the current method is creating a byte copy of the complete target area, does the pixel adjustments on byte level and finally copy the result back to the target device context - changed function DrawButton(), adjusted implementation to new prototype of function TransparentCircle() - bugfix in function DrawAnnunciator(), used wrong device context on external annunciator bitmap for getting background pixel color (buggy implementation only worked with external bitmaps having a white background color) - changed function ResizeMainBitmap(), added annunciator resize handling for annunciator definitions inside main bitmap LODEPNG.C - new module for decoding PNG files LodePNG version 20180910 with unmarked typecast patches for x64 compatibility, Copyright (c) 2005-2018 Lode Vandevenne LODEPNG.H - header file for decoding PNG files LodePNG version 20180910, Copyright (c) 2005-2018 Lode Vandevenne PCH.H - added include limits.h USRPRG32.C - renamed typedef CatLabel and all references to CatLabel32, identical typedef name usage in USRPRG42.C confused VS debugger USRPRG42.C - renamed typedef CatLabel and all references to CatLabel42, identical typedef name usage in USRPRG32.C confused VS debugger - expanded UC byte enum table with LOCAL1 and LOCAL2 for 2 byte GTO detection - changed function DecodeUCByte(), added LOCAL1 and LOCAL2 decoding - added function IsPrevGlobalEnd(), checking if previous global object is a GLOBAL_END and returning the address behind the GLOBAL_END or if not the adddress of the global object itself - changed function Catalog(), added code to the catalog which has a GLOBAL_END and additional code, but no GLOBAL_LBL inside - bugfix in function GetUserCode42(), for proper import of HP41 FOCAL programs the jump offsets of GTO and XEQ must be set to zero to force a recalculation of these offsets at program runtime Emu42 v1.21 DEBUGGER.C - changed function UpdateStackWnd(), OnStackPush() and OnStackPop(), fixed signed/unsigned mismatch - changed function UpdateProfileWnd(), fixed signed/unsigned mismatch and optimized ENG unit search break DISPLAY.C - removed global variable hSelAnnunDC - changed function SetBkBitmap(), CreateMainBitmap(), DestroyMainBitmap(), CreateAnnunBitmap(), DestroyAnnunBitmap() and UpdateDisplaySacajawea(), removed usage of global variable hSelAnnunDC - bugfix in function ResizeWindow(), added Critical Section for GDI access EMU42.H - changed window style for disabled title bar, added system menu with minimize in task bar - extern declaration of global variable and functions EMU42.RC - changed IDD_CHOOSEKML, enlarged width of dialog to get an enlarged "Current KML Script" combo box - changed IDD_KMLLOG, enlarged width of "Title of the Script", "by" and "The Author" text boxes - changed version and copyright FILES.C - changed function NewDocument(), removed SetWindowLocation() call in restore case because on a valid document the window position was already restored in function RestoreBackup() - changed function GetSaveObjectFilename(), changed function behavior with file extensions; the old implementation added the default extension always when the file had no extension or the given extension wasn't in the file filter list, the actual implementation adds the default extension for the case of no extension only - added function LoadIconFromFile(), load icon file and activate the icons - added function LoadIconDefault(), activate the window class default icons KML.C - added keyword "Opaque", "Scale" and "Icon" to pLexToken[] table - changed function InitGlobal(), added implementation of keyword "Scale" and "Icon" - bugfix in function InitLcd(), added 2nd parameter check for keyword "Zoomxy" and added implementation of keyword "Bitmap" - changed function InitAnnunciator(), added implementation of keyword "Opaque" - changed function KillKML(), added LoadIconDefault() to disable custom icons and preset of some global variables - changed function DrawAnnunciator(), added alternative annunciator bitmap and opaque bitmap drawing - added function ResizeMainBitmap(), resize main bitmap and main bitmap dependend variables like size, offset, ... - changed function InitKML(), added scaling main bitmap KML.H - added TOK_OPAQUE, TOK_SCALE and TOK_ICON definition - added bOpaque in KmlAnnunciator structure MOPS.C - changed function NreadEx(), removed conditional jump for speed optimization SOUND.C - bugfix in function SoundOut(), changed second M_NCE2S in if clause to M_NCE3S Emu42 v1.20 DDESERV.C - bugfix in function DdeCallback(), improved input data checking and avoided multiple DDE data fetch in XTYP_POKE case DEBUGGER.C - bugfix in function OnLButtonUp(), fixed a buffer overflow when converting a 3 byte hexadecimal string to variable Chipset.out which overwrite the content of variable Chipset.in and fixed a buffer overflow when converting a 4 byte hexadecimal string to variable Chipset.in which overwrite the following two padding bytes DISMEM.C - changed function SetMemRomType(), fixed signed/unsigned mismatch DISPLAY.C - changed function WritePixelZoom4(), WritePixelZoom3(), WritePixelZoom2() and WritePixelZoom1(), optimized implementation by pointer usage and constant folding - changed function WritePixelDWORD(), WritePixelWORD() and WritePixelBYTE(), changed order of operands to enable constant folding of compiler - bugfix in function ResizeWindow(), the WM_PAINT message wasn't generated by the InvalidateRect() call when the title and menu bar was disabled and the client area was empty, so we got a main window with zero size which could not be activated any more -> issue solved by forcing a menu bar when client area is empty DISRPL.C - changed function PutSn(), minor optimization - changed function DoHexStream(), DoIntStream(), DoBint(), DoReal(), DoERel(), DoCmp(), DoECmp(), DoChar(), DoCStr(), DoHxs(), DoIdnt(), DoLam(), DoRomp(), Semi() and DoFlashPtr(), added UNREFERENCED_PARAMETER statement - changed function DoERel(), made function static - changed function Getfp(), fixed signed/unsigned mismatch EMU42.C - changed szLicence string, updated to the latest revision of the GPLv2 - moved function SetSoundDeviceList() to SNDENUM.C EMU42.DSP - added snddef.h and sndenum.c sources EMU42.H - extern declaration of global function EMU42.RC - changed IDD_SETTINGS, removed text "Device" and enlarged width of combo box IDC_SOUND_DEVICE - changed version and copyright FILES.C - changed function OpenDocument(), removed switcher for document format version KML.C - changed function iSqrt(), changed implementation to Heron's method for speed optimization REDEYE.C - changed function CreateCorrectionBits(), fixed signed/unsigned mismatch SNDDEF.H - include files and interface definitions for SNDENUM.C for compilers without installed DirectX SDK SNDENUM.C - new module with implementation of function SetSoundDeviceList() prior located in EMU48.C for sound device enumeration showing the full device name used since Windows Vista STACK.C - removed include resource.h - bugfix in function RPL_GetComplex(), function arguments nMantLen and nExpLen hadn't been used TIMER.C - removed include ops.h Emu42 v1.19 DEBUGGER.C - bugfix in function OnContextMenu(), when the context menu was generated from the keyboard it was opened at the wrong position - bugfix in function Debugger(), use critical section for secure deletion of the last instruction buffer DISPLAY.C - changed function ResizeWindow(), optimized implementation now works independent from window style and menu bar setting EMU42.C - added global variable dwTColor and dwTColorTol for the background transparency color matching - added global variable hRgn to hold a region resource handle for a transparent background bitmap - added global variables bTitleBar, bShowTitle, bShowMenu and bClientWinMove - added Critical Section initialization - added function UpdateWindowBars(), helper function to update state of title and menu bar - changed function SettingsProc(), added "Show Title" and "Show Menu" checkbox handling - changed function OnPaint(), added UpdateWindowBars() call - changed function OnInitMenu(), added MRU list update - added function OnContextMenu(), context menu implementation - added function OnNcHitTest(), when no title bar check if mouse position is in client not over a button area - changed function MainWndProc(), minor change in WM_PALETTECHANGED implementation and added WM_CONTEXTMENU, WM_NCRBUTTONUP and WM_NCHITTEST message handler - changed function WinMain(), changed method of memory leak detection by adding _CrtSetDbgFlag() at begin and removing _CrtDumpMemoryLeaks() at end of program EMU42.H - added window styles definition - changed function prototypes - extern declaration of global variables and function EMU42.RC - changed IDD_SETTINGS, added "Show Title" and "Show Menu" checkbox - added menu IDM_MENU - changed version and copyright ENGINE.C - bugfix in function SaveInstrAddr(), added critical section to be sure that last instruction buffer is still available FETCH.C - added typecast to all pLnk entries for compatibility with C++ compiling on GCC 4.8.1 FILES.C - defined abs() and labs() as intrinsic - changed function DecodeGif(), changed function prototype by adding an argument overwritten by the transparent color if found - changed function LoadBitmapFile(), adjusted to new prototype of function DecodeGif() - added function AbsColorCmp() and LabColorCmp(), compare colors with tolerance - added function CreateRgnFromBitmap(), create opaque bitmap region KML.C - added keyword "SysItem" to pLexToken[] table - changed function InitGlobal(), added implementation of keyword "Color" - changed function RunLine(), added implementation of keyword "SysItem" - changed function KillKML(), added reset of variables hRgn, dwTColor and dwTColorTol - added function MouseIsButton() to check if mouse over button area - changed function MouseMovesTo(), changed _ASSERT implementation to make sure that class cursor is NULL and use function MouseIsButton() to select cursor type now KML.H - added TOK_SYSITEM definition - changed structure KmlToken, replaced TCHAR array szName[20] with LPCTSTR szName pointer - added MouseIsButton() function prototype MRU.C - changed all function argument types from INT to UINT - removed global variables hMruMenu and nMruPos - removed all update menu calls in this module and made functions robust against non initialized MRU list and ID index out of range - changed function GetMenuPosForId(), changed function prototype so the resulting menu handle and menu position aren't global variables any more - changed function MruInit(), changed return value from FALSE to TRUE for success and changed implementation like used in the PPC emulator variants - changed function MruUpdateMenu(), changed function prototype by adding the HMENU argument for updating the selected menu and added initialization prior done in function MruInit() - changed function MruWriteList(), if there are no entries don't write the "FileCount" setting any more PCH.H - added _WINSOCK_DEPRECATED_NO_WARNINGS definition - added GCLP_HCURSOR, SetClassLongPtr, GetClassLongPtr and ULONG_PTR definitions for MSVC6.0 SDK and earlier RESOURCE.H - added definitions SETTINGS.C - changed function ReadSettings() and WriteSettings(), added item "ShowTitle", "ShowMenu" and "ClientWinMove" in section [Emulator] in the INI-File SOUND.C - bugfix in function DestroyWaveThread(), the WM_QUIT message may failed and so the sound message thread wasn't shut down - changed function SoundOpen(), added additional check if the sound device support the necessary audio format STACK.C - changed function SetBcd(), fixed signed/unsigned mismatch SYMBFILE.C - changed function RplLoadTable(), made optimizations and added integrity checks Emu42 v1.18 DEBUGGER.C - removed INSTRSIZE definition - changed function GetAddr(), made function more general by adding address range check and the ability of decoding a symbolic entry into an address - bugfix in function OnSetCursor(), on "Activation follows mouse" enabled child dialogs lost focus when cursor moved over parent debugger dialog - changed function Debugger(), removed initialization of global variable wInstrSize - changed function EnterAddr(), changed parameter storage from static variable to window user data and replaced address decoder code by GetAddr() function call - changed function EnterBreakpoint(), replaced address decoder code by GetAddr() function call and so added decoding a symbolic entry into an address - bugfix in function LoadMemData(), forgot to check if file content fit into Saturn address range, loading now stops also after last Saturn address written - changed function SaveMemData(), added assertion for Saturn address verification - bugfix in function DebugMemLoad() and DebugMemSave(), adjusted to new prototype of function GetAddr() and so added checking if the given addresses are in the Saturn address range because Saturn read/write functions don't do the range check; this also cause a change in behavior, on empty address fields the operation fails and the dialog still remains open DISPLAY.C - changed table sSegtabSaca[], added 64bit qualifier to image constants - changed function UpdateContrastLewis(), replaced BitBlt() by PatBlt() function call - changed function CreateLcdBitmap(), the height of a Lewis chip Pioneer calculator pixel is now calculated by formula and added implementation to select the pixel drawing routine over function pointer, Zoom factors 1-4 still using the old implementation, greater Zoom factors are using a more generic approach - changed DestroyLcdBitmap(), added reset of variables x-zoom factor and function pointer WritePixel - replaced function WritePixel() by the new functions WritePixelZoom4(), WritePixelZoom3(), WritePixelZoom2() and WritePixelZoom1() and WritePixelDWORD(), WritePixelWORD() and WritePixelBYTE() with new implementation to support nLcdZoom values > 4 - changed function UpdateDisplayClamshell() and UpdateDisplayPioneer(), removed zoom factor assertion - changed function UpdateAnnunciators(), changed to a more efficient bitcount implementation EMU42.C - changed function SetSoundDeviceList(), replaced "Standard Audio" device ID from constant to definition - bugfix in function SettingsProc(), restart the sound engine by calling the clean up and initialization functions now and on "Activation follows mouse" enabled debugger dialog maybe got focus even if it's not the last active one - changed function OnFileNew(), removed call of function SaveBackup() which is already a part of function NewDocument() - changed function OnFileNew(), OnFileOpen(), OnFileMruOpen(), OnFileSave(), OnFileSaveAs() and OnFileClose(), switched detection of document is available from variable pbyRom (ROM image loaded) to variable bDocumentAvail - changed function WinMain(), added sound engine initialization and clean up EMU42.RC - changed version and copyright ENGINE.C - initialized variable wInstrSize with size of last instruction array (the circular buffer can hold (wInstrSize-1) instructions) - bugfix in function WorkerThread(), moved sound engine initialization and clean up from SM_RUN state to main function, this prevents a non responding Saturn CPU emulation when changing from SM_SLEEP to SM_RUN state during sound engine initialization FETCH.C - made typedef of jump table struct constant, so the const keyword was removed from all references of JMPTAB - changed function EvalOpcode(), minor code optimization FILES.C - bugfix in function PatchRom(), removed limitation that patch file must have 6 characters minimum, fixed a buffer overflow when end of patch file consists of white space characters, recalculate CRC's only on address patch written and return failture on syntax errors now KML.C - changed function InitLcd(), removed Zoom factor 4 limitation PCH.H - added MSVC6.0 compatible 64bit constant qualifier macro - added GWLP_USERDATA, SetWindowLongPtr, GetWindowLongPtr and LONG_PTR definitions for MSVC6.0 SDK and earlier REDEYE.C - changed function IrPrinter(), changed to a more efficient bitcount implementation for missed bits SETTINGS.C - changed function ReadSettings() and WriteSettings(), added item "LastInstrBufSize" in section [Debugger] in the INI-File STACK.C - added function Trim(), create a trimmed copy of the input string - added function SetBcd(), contain implementation of prior function RPL_SetBcd() - changed function RPL_SetBcd(), wrapper for function SetBcd() to trim data before decoding - changed function RPL_SetComplex(), create a trimmed working copy before decoding the outline brackets and because of the changed function RPL_SetBcd() the real number arguments are accepted with white spaces around now - removed disabled function IsRealNumber(), it was more or less functional compatible with actual modified function RPL_SetBcd() TIMER.C - removed UNIX_0_TIME definition UDP.C - changed function SendByteUdp(), replaced malloc() by _alloca() call for UNICODE wchar to char string translation to get rid of freeing the allocated memory manually Emu42 v1.17 DDESERV.C - prepared for C++ compiling DEBUGGER.C - prepared for C++ compiling - added new function OnCodeFindPCO(), search for a PCO object in the code window - changed function Debugger(), added context menu commands handler in the WM_COMMAND section - changed function OnFindOK(), added downwards search direction - changed function Find(), added and changed message handler for the "Previous" and "Next" buttons DISMEM.C - prepared for C++ compiling EMU42.C - prepared for C++ compiling - replaced global variable lThreadId with local variable dwThreadId - added global variable with the identifier for the waveform-audio output device - added function SetSoundDeviceList(), helper function for filling sound device combo box with waveform-audio output devices - changed function SettingsProc(), removed sound radio button handlers and added implementation of sound device combo box - bugfix in function OnViewScript(), ROM image change wasn't handled - bugfix in function OnCopyData(), state file loading is only allowed when the current instance has already a document available EMU42.DSP - added sound.c sources EMU42.H - prepared for C++ compiling - extern declaration of global variables and functions - removed extern declaration of global variable EMU42.RC - changed IDD_FIND, added a "Previous" button for previous search, shorten the text of the "Find Next" button to "Next" and changed the ID of the next search button - changed IDD_SETTINGS, removed "Speaker" and "Wave" radio buttons and added "Device" combo box in the sound section - added "Previous PCO" and "Next PCO" menu entries in debugger "Code" context menu - changed version and copyright ENGINE.C - added global variable bEnableSlow for global disabling slowing down the CPU - added global variable bSoundSlow slowing down the CPU core at sound output - changed function AdjustSpeed() and InitAdjustSpeed, added sound slow down implementation - changed function WorkerThread(), added sound engine control EXTERNAL.C - removed global variable bWaveBeep - moved global variable dwWaveVol to module sound.c - removed functions BeepWave(), BeepWin9x() and Beeper() - changed function External0() and External1(), removed PC speaker support and used function SoundBeep() instead of Beeper() for beep output over sound card FETCH.C - prepared for C++ compiling FILES.C - prepared for C++ compiling - changed function MapRom(), modified minimum file size detection and replaced VirtualAlloc() with malloc() memory request - changed function UnmapRom(), adjusted memory deallocation - changed function SaveBackup(), improved document available detection KML.C - prepared for C++ compiling - added global variable wKeybLocId to hold the keyboard layout input locale at begin of KML loading - changed function ParseBlocks(), use variable wKeybLocId instead of input locale reading - bugfix in function KillKML(), key mapping state table wasn't cleared at the end and added reset of variable wKeybLocId - bugfix in function InitKML(), changed implementation by reading the current keyboard layout and convert the layout data to the input locale setting MRU.C - prepared for C++ compiling OPCODES.C - changed function o801(), call beeper handler function on beeper port change PCH.H - added include malloc.h RESOURCE.H - added definitions - removed IDC_SOUND_SPEAKER and IDC_SOUND_WAVE RPL.C - prepared for C++ compiling SETTINGS.C - bugfix in function GetRegistryString(), ignored target buffer size when copying the default to the target string buffer - changed function ReadSettings() and WriteSettings(), added item "WaveDeviceId" and "WaveTime" and deleted item "WaveBeep" in section [Emulator] in the INI-File SOUND.C - new module for native beeper emulation over wave output device STACK.C - prepared for C++ compiling SYMBFILE.C - prepared for C++ compiling USRPRG32.C - prepared for C++ compiling USRPRG42.C - prepared for C++ compiling Emu42 v1.16 EMU42.C - added function OnCopyData() as WM_COPYDATA message handler implementation for changing the state file to the given state file name - changed function MainWndProc(), added WM_COPYDATA message handler - changed function WinMain(), expanded single instance case by transmitting the given state file name to the already opened program instance and made more flexible CPU binding for the Saturn core emulation thread on Windows NT4.0 and later EMU42.H - added WM_COPYDATA identifier definition EMU42.RC - changed version KML.C - added global variable bLocaleInc for checking if locale block content already included - added keyword "Locale" to pLexToken[] and token TOK_LOCALE to eIsGlobalBlock[] table - changed function ParseLine() and ParseBlock(), preset szLexString variable with NULL after freeing - changed function IncludeLines() and IncludeBlocks(), changed function prototype by adding a boolean argument for selecting the text message "Including" or "Parsing" in the log file - bugfix in function ParseLines(), return a TOK_NONE line for an empty block instead of a NULL pointer which regular stands for a syntax error - bugfix in function ParseLines() and ParseBlocks(), changed function prototype by adding a boolean argument for selecting the mode "include" or "parse" for the next lines or blocks and verifying the "Include" argument was incomplete and may caused memory leaks at error condition - bugfix in function ParseBlock(), verifying the block commmand argument was incomplete and may caused a memory leak at error condition - changed function ParseBlocks(), changed function prototype by adding a boolean argument if an "End" token is also valid and added implementation of block "Locale" - changed function KillKML(), added reset of variable bLocaleInc - changed function ReleaseButton(), for speed optimization skip function if button is already released - bugfix in function LoadKMLGlobal(), fixed a memory leak caused by the error condition that expected block command is a string - changed function InitKML(), added current keyboard input locale setting log file text KML.H - added TOK_LOCALE definition TIMER.C - changed function SetHPTime(), time calculation now work properly for host system dates before 1970/01/01 and after 2106/02/07 Emu42 v1.15 DEBUGGER.C - removed structure MODEL_MAP_T, variables MemMap[], pbyMapData, dwMapDataSize and pMapping, the implementation behind moved to module DISMEM.C - changed function SetMappingMenu(), InitMemMap() and OnFindOK(), changed to DISMEM.C implementation - changed function GetMemCurAddr(), OnMemGoAdr(), OnKeyUpDown() and OnKeyPlusMinus(), variable dwMapDataSize isn't global any more, use function GetMemDataMask() instead - changed function ViewCodeWnd(), set disassembler to memory mapped mode - changed function ViewMemWnd(), removed initialized but unused variable and changed to DISMEM.C implementation - bugfix in function OnDblClick(), fixed buffer overflow when converting a 2 byte hexadecimal string to a byte and added an update of code window - changed function Debugger(), changed disassembler mode setting and added initialization of RPL object viewer get nibble function in WM_INITDIALOG message - bugfix in function UpdateRplObjViewWnd(), show entry point names only in mapped mode and end address for RPL object viewer depend on the actual memory mapping mode and with the design change to the DISMEM.C implementation in all debugger and disassembler related parts, the RPL object viewer also works in all memory mapping modes properly now DISASM.C - changed function read_nibble(), call function GetMemNib() from the new module DISMEM.C for mapping mode memory access and made function static DISPLAY.C - initialized the color array in variable bmiLcd now - changed function UpdateContrastSaca(), new brush is only necessary for an initialized KML contrast palette entry - changed function CreateLcdBitmap(), preset KML contrast palette with black on background for the case of a complete uninitialized KML contrast palette - changed function WritePixel(), draw only the pixel that have to be switched on - changed function UpdateContrastLewis(), CreateLcdBitmap(), DestroyLcdBitmap(), UpdateDisplayClamshell(), UpdateDisplayPioneer(), UpdateAnnunciators() and StopDisplay(), added support for real image LCD background - changed function UpdateDisplaySacajawea(), don't draw display pattern on uninitialized KML foreground contrast palette entry - changed function UpdateMainDisplay(), exchanged StretchBlt() back to BitBlt() because the bug in the WineHQ BitBlt() implementation was fixed in Wine 1.4 DISRPL.C - the get nibble function is not hard referenced as read_nibble() call any more, it's now called over RplReadNibble() function pointer - changed function PrintTail(), expanded to handle 6 digit addresses - changed function RplCreateObjView(), defined end pointer also as constant DISRPL.H - added extern declaration of RplReadNibble() function pointer EMU42.C - changed function SettingsProc(), added "Single Instance" checkbox handling - changed function OnPaint(), exchanged StretchBlt() back to BitBlt() in display redraw part because the bug in the WineHQ BitBlt() implementation was fixed in Wine 1.4 - bugfix in function OnDropFiles(), changed function prototype to the correct structure type of dropped file names and initialized the bSuccess variable for the case the wNumFiles variable is 0 - changed function Disasm(), changed to DISMEM.C implementation - changed function MainWndProc(), made correct type cast to argument of function OnDropFiles() - changed function WinMain(), replaced multiple class name usage with atom variable, added current directory reading, moved read settings before window creation added check for setting "SingleInstance" to switch to an already running program instance instead of creating a new one and added more flexible CPU binding for the Saturn core emulation thread on Windows Vista and later EMU42.DSP - added dismem.c sources EMU42.H - added enum MEM_MAPPING - removed FullFilename() declaration - extern declaration of global variables and functions - removed extern declaration of global variable EMU42.RC - added item "Single Instance" in settings dialog - changed version and copyright FILES.C - added szCurrentDirectory[] variable holding the current directory at program start - removed function FullFilename() - changed function PatchRom(), MapRom() and LoadBitmapFile(), relaced call of function FullFilename() by calling SetCurrentDirectory() twice - bugfix in function DecodeBmp() and DecodeGif(), a 2nd bitmap load allocated and bound a 2nd palette to the main window, now only the 1st bitmap (mostly the KML background bitmap) bound his palette to the main window KML.C - changed table pLexToken[], defined table as constant and changed last token id table preset from constant number to member of token id enumerator - changed function DestroyKmlList() and CreateKmlList(), changed function prototype explicit setting VOID as argument - changed function CreateKmlList(), IncludeLines(), IncludeBlocks(), LoadKMLGlobal() and InitKML(), relaced call of function FullFilename() by calling SetCurrentDirectory() twice - bugfix in function ParseString(), decoding the \" sequence as quotation mark inside a string was incomplete, so every single '\' character was also removed - bugfix in function ReloadButtons(), ON key button wasn't handled MRU.C - changed function MruUpdateMenu(), changed variable type of variable hMenu - changed function MruReadList(), removed initialized but unused variable RESOURCE.H - added definition SETTINGS.C - changed function ReadSettings(), moved current directory reading and CPU speed setting to MainWndProc() - changed function ReadSettings() and WriteSettings(), added item "SingleInstance" in section [Emulator] in the INI-File UDP.C - added function ResetUdp(), reset UDP address - bugfix in function SendByteUdp(), fixed memory leak at error condition and optimized IP address decoding USRPRG32.C - bugfix in function ReadBuffer3(), function return type was missing Emu42 v1.14 DDESERV.C - replaced all HeapAlloc() with malloc() memory requests DEBUGGER.C - replaced all HeapAlloc() with malloc() memory requests - changed function ToggleBreakpoint() and EditBreakpoint(), minor code optimization purging breakpoint - bugfix in function LoadBreakpointList(), added check of breakpoint entries against breakpoint table size DISRPL.C - replaced all HeapAlloc() with malloc() memory requests - bugfix in function BCDx(), fixed possible uninitialized bExpflag variable - bugfix in function DoRrp(), fixed possible uninitialized bErr variable EMU42.C - removed global variable hHeap - replaced all HeapAlloc() with malloc() memory requests - changed function SettingsProc(), added infrared printer settings - changed function SaveChanges(), detect if document is available now over the variable bDocumentAvail and not over the variable pbyRom any more; in the case of an illegal KML script there maybe a document loaded, but no ROM image, so pbyRom will be NULL in this case - bugfix function OnViewScript(), when quitted the dialog "Choose Your KML Script" with the Cancel button when chosen an invalid script the function returned without the possibility of saving the current document; now the function try to reload the primarily KML script and if this also fails then the current document is saved - changed function MainWndProc(), added call of _CrtDumpMemoryLeaks() at end of program to detect malloc() memory leaks EMU42.DSP - added redeye.c and udp.c sources - added library Ws2_32.lib EMU42.H - removed extern declaration of hHeap - extern declaration of global variables and functions - added MMU bit definitions PAGE_BITS, ADDR_BITS and ADDR_SIZE - changed variable prototypes of RMap[] and WMap[] - replaced all HeapAlloc() with malloc() memory requests EMU42.RC - added "Infrared Printer" group in Settings dialog - changed version and copyright ENGINE.C - added global variable nOpcSlow to hold the number of CPU opcodes slowing down the CPU core - changed function AdjustSpeed(), added CPU opcode slow down implementation - added function InitAdjustSpeed(), initialize CPU slow down part if necessary - changed function AdjKeySpeed() and SetSpeed(), use function InitAdjustSpeed() to initialize the CPU slow down variables EXTERNAL.C - replaced all HeapAlloc() with malloc() memory requests FILES.C - replaced all HeapAlloc() with malloc() memory requests - changed function CrcRom(), if no ROM available return without modifying the checksum - changed function ResetDocument(), NewDocument(), OpenDocument() and RestoreBackup(), added state variable if document is available - bugfix in function OpenDocument(), added check of KML script name length against target buffer size and fixed a bug calculating the number of key rows from the Chipset.Keyboard_Row buffer IO.H - changed PROW_END definition to 0x087, I'm mostly sure that the row driver buffer has only a size of 16 nibbles; the =InitDisplay routine in the HP32SII initialize 18 nibbles (16 relevant + 00 at the end) for easier coding KEYMACRO.C - changed function EventThread(), added minimum key hold time for keyboard macro playing and subtract minimum key hold time from saved waiting time, this is more accurate when the user has selected a different minimum key hold time than the default one - changed function KeyMacroRecord(), now saving the complete waiting time including the key state holding time, the key state holding time is now subtract in the player function thread EventThread() - changed function OnToolMacroNew(), removed adding the key state holding time to the reference time, this is not necessary any more KML.C - replaced all HeapAlloc() with malloc() memory requests - bugfix in function ParseBlock(), string argument wasn't freed in error case MOPS.C - changed MMU page size bits from code constants to definitions - added function NreadEx() as replacement for the functions Npeek() and Nread() - changed function Npeek() and Nread(), coded as inline to call the replacement function NreadEx() - added function ReadT2Acc(), reading timer2 value with checking for CPU speed measurement behaviour - changed function ReadSacajaweaIO(), ReadLewisIO() and ReadLewisSlaveIO(), the timer2 register content is now read by function ReadT2Acc() to analyze the read access scheme - bugfix in function WriteLewisIO(), added implementation of the STL bit in the LEDOUT (0x30D) register MRU.C - replaced all HeapAlloc() with malloc() memory requests OPS.H - changed MMU page size bits from code constants to definitions - bugfix in function FASTPTR(), longest opcode calculation from buffer size was wrong, so MMU boundary fixup wasn't working properly PCH.H - added include winsock2.h REDEYE.C - new module for decoding the redeye data stream for a HP82240B printer RESOURCE.H - added some definitions RPL.C - replaced all HeapAlloc() with malloc() memory requests SETTINGS.C - changed function ReadSettings() and WriteSettings(), added item "KeyMinDelay" in section [Macro] and the items "Address" and "Port" in section [IrPrinter] in the INI-File STACK.C - replaced all HeapAlloc() with malloc() memory requests - bugfix in function RPL_GetBcd(), fixed possible uninitialized bExpflag variable - bugfix in function OnStackCopy(), fixed possible uninitialized uClipboardFormat variable in DOCSTR case SYMBFILE.C - replaced all HeapAlloc() with malloc() memory requests UDP.C - new module for sending a byte over UDP USRPRG32.C - replaced all HeapAlloc() with malloc() memory requests USRPRG42.C - replaced all HeapAlloc() with malloc() memory requests Emu42 v1.13 DEBUGGER.C - changed table MemMap[], replaced Chipset memory pointer NCE2 and NCE3 by new variables - changed function Debugger(), removed all UpdateWindowStatus() function calls DISPLAY.C - added RGBtoCOLORREF definition - bugfix in function SetBkBitmap(), UpdateContrastSaca() and CreateLcdBitmap(), the color argument of function CreateSolidBrush() must be in COLORREF and not in RGBQUAD format EMU42.C - renamed function UpdateWindowStatus() to OnInitMenu() and modified it to a WM_INITMENU message handler - changed function OnFileNew() and WinMain(), removed all UpdateWindowStatus() function calls - changed function MainWndProc(), added WM_INITMENU message handler - changed function Disasm(), added if opcode should be interpreted as PCO EMU42.DSP - changed the resource natural language to English EMU42.H - extern declaration of global variables - removed declaration of global function UpdateWindowStatus() EMU42.RC - changed IDD_DEBUG_SETTINGS, replaced "Ok" with "OK" and removed accelerator keys from "OK" and "Cancel" - changed IDR_DEBUG_MEM, added several accelerator keys - changed version and copyright ENGINE.C - changed function SwitchToState(), removed all UpdateWindowStatus() function calls FILES.C - added global variables to hold the memory module pointers prior located in the Chipset and ChipsetS structure - bugfix in function PatchRom(), if first patch address in a line was outside the ROM area, the emulator crashed with an access violation, removed the patch address wrap around - changed function ResetDocument(), NewDocument(), OpenDocument(), SaveDocument(), SaveBackup(), RestoreBackup() and ResetBackup(), replaced Chipset memory pointer NCE2 and NCE3 by new variables - changed function ResetDocument(), OpenDocument(), SaveDocumentAs(), SaveBackup(), RestoreBackup() and ResetBackup(), removed all UpdateWindowStatus() function calls - changed function DibNumColors(), changed function prototype from UINT to WORD return - changed function CreateBIPalette(), changed variable UINT nNumColors to WORD wNumColors to avoid variable overflow loading palNumEntries of LOGPALETTE structure KEYMACRO.C - changed function OnToolMacroNew(), OnToolMacroPlay() and OnToolMacroStop(), removed all UpdateWindowStatus() function calls KML.C - changed function ParseLines(), BOOL expression was missing in main while() loop, worked because TOK_NONE is 0 - changed function RunLine(), removed warning when compiling for x64 architecture - changed function KillKML(), removed UpdateWindowStatus() function call - changed function LoadKMLGlobal(), used wrong variable type for variable eToken MOPS.C - changed table NCE[], replaced Chipset memory pointer NCE2 and NCE3 by new variables OPCODES.C - changed function o802() and o803(), replaced Chipset memory pointer NCE2 and NCE3 by new variables - bugfix in function o807(), a pressed ON key prevented the CPU going into shutdown mode OPS.H - bugfix in function FASTPTR(), longest opcode is 21 nibbles long and fixed problem executing an opcode over a MMU boundary - changed function Nunpack(), new coding for speed optimization, this solved also a bug in the code optimizer of VS2010 (the optimizer generated wrong code, another possible workaround for this problem was declaring the function argument "BYTE *a" as "volatile BYTE *a") PCH.H - added INVALID_FILE_ATTRIBUTES definition - enabled WinXP style under VS2005, VS2008 and VS2010 SETTINGS.C - changed function WriteReg() and DelReg(), changed function protoytypes to make them compatible with the functions WritePrivateProfileString() and WritePrivateProfileInt() - changed function GetRegistryInt(), changed function protoytype to make it compatible with function GetPrivateProfileInt() STACK.C - bugfix in function OnStackCopy(), local target buffer was too small to hold a large complex number TYPES.H - changed structures CHIPSET_M and CHIPSET_S, replaced NCE2 and NCE3 with a DWORD placeholder each, because when compiling for x64 architecture these 4 byte pointers grow up to 8 bytes and destroy the state file structure USRPRG42.C - changed function SelectProgram(), removed warnings when compiling UNICODE for x64 architecture Emu42 v1.12 DDESERV.C - bugfix in function DdeCallback(), readded delay at XTYP_POKE after ON key state change switching calculator on and made ON key hold time variable DEBUGGER.C - added backup breakpoint list - changed function ViewCodeWnd() and UpdateCodeWnd(), calculators base on Sacajawea hardware don't use PCO in there firmware - changed function UpdateProfileWnd(), added Sacajawea hardware time calculation to profiler - changed function EnterAddr(), expanded hex address range from 6 to 8 digits - added functions SaveBreakpointList() and CreateBackupBreakpointList() to handle the backup breakpoint list DEBUGGER.H - extern declaration of global functions DISPLAY.C - made variable nLcdyZoom public - added definitions and global variables - changed initialization of dwKMLColor[] table - added sSegtabSaca[] table - added *UpdateContrast() function pointer - added function GetDimLcdBitmap(), calculate size of Sacajawea LCD - added function SetBkBitmap(), create background bitmap with segments - added function UpdateContrastSaca(), contrast handler for Sacajawea hardware - renamed function UpdateContrast() to UpdateContrastLewis() - changed function GetSizeLcdBitmap(), return calculated sizes now - changed function CreateLcdBitmap(), set variable nLcdyZoom only when it's not initialized and added initialization for Sacajawea display type - changed function DestroyLcdBitmap(), changed contrast palette setting to new startup colors and added cleanup for Sacajawea display type - changed function CreateMainBitmap(), added initialization for annunciator DC - changed function DestroyMainBitmap(), added reset of annunciator DC - added function CreateAnnunBitmap(), load Sacajawea annunciator bitmap - added function DestroyAnnunBitmap(), destroy Sacajawea annunciator bitmap - added function WritePixel(), a replacement for the removed functions WritePixelQuad() and WritePixelRect() - changed function UpdateDisplayClamshell() and UpdateDisplayPioneer(), adjusted to the new function WritePixel() - added function UpdateDisplaySacajawea(), display drawing routine for Sacajawea hardware - changed function UpdateMainDisplay(), removed assertion for zoom factor because the Sacajawea implementation don't use this factor -> the assertions are now in the Lewis drawing routines, use calculated display size for BitBlt() operation and exchanged BitBlt() with StretchBlt() because of a serious bug in the WineHQ BitBlt() implementation (in this environment StretchBlt() is ~5us slower than BitBlt() so it doesn't really matter from the speed aspect) - changed function StartDisplay() and StopDisplay(), added special handling for Sacajawea display type - changed function UpdateAnnunciators(), return function immediately if not emulating a Lewis chip - added function GetLcdNumberSaca(), interpret characters of Sacajawea display DISRPL.C - bugfix in function BCDx(), detection for exponent writing was wrong -> on negative exponents sometimes the result format was wrong, on positive exponents sometimes the result itself was wrong - added variable bRplViewAsm to enable showing ASM code instead of hex data - changed function PrintHead(), changed function prototype and changed binary data view for use in disassembler - added function PrintLevel() for writing level depending blanks - added function AssemblyOutput(), ASM code viewer for "RPL Object Viewer" module - changed function RplCreateObjView(), adjusted to new prototype of function PrintHead(), replaced level depending blank drawing by calling function PrintLevel() and added a call to replace the decoded CODE hex string object by a ASM code disassembly DISRPL.H - extern declaration of global variable EMU42.C - changed function UpdateWindowStatus(), added separated enable for Copy and Paste functionality, added Copy Stack enable for the HP14B, HP17B, HP17BII, HP19BII, HP27S and HP32SII - changed function OnPaint(), exchanged BitBlt() with StretchBlt() in display redraw part because of a serious bug in the WineHQ BitBlt() implementation - changed function OnDropFiles(), OnViewCopy(), OnObjectLoad() and OnObjectSave(), added HP32SII user code handling - bugfix in function OnDropFiles() and OnObjectLoad(), readded delay after ON key state change switching calculator on and made ON key hold time variable - changed function OnFileMruOpen(), on success move selected entry to top of MRU table EMU42.DSP - changed to REGISTRY (HKCU/Software/Emu42) saving - added usrprg32.c sources EMU42.H - separated MODELS definition to Sacajawea and Lewis hardware - changed T2CYCLES definition - added defines isModelLewis() and isModelSaca() for detecting the hardware type from the model type - added enum for the emulator hardware platform - changed function UpdateContrast() to function pointer declaration - extern declaration of global variables and function - removed extern declaration of global functions EMU42.RC - changed IDD_SETTINGS, replaced "Ok" with "OK" and removed accelerator keys from "OK" and "Cancel" - changed version info "FileDescription" text - changed version ENGINE.C - added global variable dwSacaCycles - renamed variable dwLewisCyclesRate to dwCyclesRate - changed function WorkerThread(), added initialization for Sacajawea CPU speed FILES.C - added global variable nCurrentHardware - changed function RebuildRomCrc(), added Sacajawea ROM CRC calculation - changed function NewDocument(), added hardware initialization for Sacajawea based calculators - bugfix in function SaveBackup(), a backup of the debugger breakpoint list wasn't created - bugfix in function RestoreBackup(), the debugger breakpoint list wasn't restored so the breakpoints got lost when saving the state file and added preserving debugger open state, this feature was lost as a result of a bugfix in an earlier version - changed function GetOpenFilename() and GetSaveAsFilename(), added Sacajawea based calculators to file list and put HP17B and HP17BII together to one item - changed function DecodeGif(), fixed a GCC type mismatch warning KEYBOARD.C - renamed variable dwLewisCyclesRate to dwCyclesRate - changed function KeyboardEvent(), only the Lewis hardware has the RATE control and made key switch time variable KML.C - increased pAnnunciator array and made variable public - added keywords "Distance", "Zoomxy", "Digit" and "IfMem" to pLexToken[] table - added token TOK_DIGIT to eIsGlobalBlock[] table - added token TOK_IFMEM to eIsBlock[] table - removed function FatalError() - bugfix in function ParseString(), replaced error text - bugfix in function IncludeLines(), removed fatal error message text - bugfix in function ParseLines(), in some cases parsing hadn't stopped with an error inside a block with an unreferenced include file and removed a fatal error message text - bugfix in function ParseBlock(), block argument checking generated wrong error messages in the case of syntax errors - bugfix in function IncludeBlocks(), removed fatal error message text - changed function ParseBlocks(), removed "Invalid block." message text and made some code optimizations calling the function FatalError() - changed function InitGlobal(), added decoder code to detect hardware platform, changed some punctuation and capital letters - changed function InitLcd(), added "Zoomxy" keyword - added function InitDigit(), implementation for token TOK_DIGIT - changed function InitButton(), source code improvement checking the size of button array - changed function RunLine(), added implementation of "IfMem" command - changed function KillKML(), added DestroyAnnunBitmap() and preset of some global variables - bugfix in function ReloadButtons(), global variable bKeyPressed wasn't updated - changed function InitKML(), added initialization of TOK_DIGIT, annunciator bitmap and IO hardware, added dropped files support for the HP32SII KML.H - added TOK_DISTANCE, TOK_ZOOMXY, TOK_DIGIT and TOK_IFMEM definition - extern declaration of global function MOPS.S - renamed variable dwLewisCyclesRate to dwCyclesRate - added function prototypes - added function pointer for IO memory access - added function InitIO() for initializing the IO memory access function pointer - added function ChipResetMaster(), code adjust for Sacajawea hardware - changed function Npeek() and Nread(), changed function call of ReadSlaveIO() to ReadLewisSlaveIO() - changed function Nwrite(), changed function call of WriteSlaveIO() to WriteLewisSlaveIO() - added function ReadSacajaweaIO() and WriteSacajaweaIO(), Sacajawea specific IO functions - renamed function ReadIO() to ReadLewisIO(), WriteIO() to WriteLewisIO(), ReadSlaveIO() to ReadLewisSlaveIO() and WriteSlaveIO() to WriteLewisSlaveIO() - made function ReadLewisIO(), WriteLewisIO(), ReadLewisSlaveIO() and WriteLewisSlaveIO() static MRU.C - changed function MruAdd(), added entry moving to top when the entry is already in the table - added function MruMoveTop(), move MRU entry to top of table RESOURCE.H - reordered some definitions RPL.H - added some HP14B, HP17BII, HP19BII, HP27S and HP32SII RAM entries SETTINGS.C - changed function ReadSettings() and WriteSettings(), added items "SacaCycles", "WakeupDelay" and "KeyMinDelay" in section [Emulator] in the INI-File STACK.C - bugfix in function RPL_GetBcd(), detection for exponent writing was wrong -> on negative exponents sometimes the result format was wrong, on positive exponents from E12 until E14 with 12 digit mantissa setting the result itself was wrong - added helper functions RPL_GetComplex() and RPL_SetComplex() to handle complex number objects - changed function GetRadix(), added HP14B, HP17B, HP17BII, HP19BII, HP27S and HP32SII implementation - added function DoComplex() to handle a complex number object - changed function OnStackCopy(), added HP14B, HP17B, HP17BII, HP19BII and HP27S implementation and added complex number support - bugfix in function OnStackPaste(), readded delay after ON key state change switching calculator on, made ON key hold time variable, added flag to disable automatic clipboard object detection and added complex number support USRPRG32.C - new module for load/save HP32SII user programs Emu42 v1.11 DDESERV.C - bugfix in function DdeCallback(), readded delay after ON key state change, bug introduced in v1.04 and added stack level adjust at XTYP_REQUEST for the case that the calculator is off DEBUGGER.C - added function LoadSymbTable(), loading symbol table defined in INI-File - added function GetMemCurAddr(), get address of cursor in memory window - changed function ViewCodeWnd(), function now returns the line number with the pc, adjusted address to Saturn address area, added label line if address is a known entry and added a check if the 5 nibble sequence on an address should be interpreted as PCO - changed function ViewCodeWnd() and InfoIntr(), adjusted to new prototype of function disassemble() - changed function UpdateCodeWnd(), if pc should shown at first line but the pc is the begin of a PCO, show PCO address as first line instead, added handling for label line - changed function OnKeyF5(), for label line support changed detection of PC line - changed function OnCodeGoAdr(), removed limitation to Saturn address area, limitation now done in function ViewCodeWnd() - added function OnKeyPlusMinus(), +/- key handler for memory window - changed function OnKeyCodeWnd(), added handling for label line and removed limitation going back before address 0 - changed function OnDrawCodeWnd(), added draw style for label line - changed function Debugger(), added initialization and uninitialization of symbol table and bold font, added +/- key handling for memory window, added "RPL Object Viewer" call and added Debugger Settings to the system menu - changed function OnFindOK(), in the case of a search match update also the RPL object viewer window - added functions for "RPL Object Viewer" dialog box - added functions for Debugger Settings handling - changed function EnterAddr(), added decoding a symbolic entry into an address - changed function InfoIntr(), added label line if instruction address is a known entry - changed function OnBrowseLoadMem() and OnBrowseSaveMem(), removed some NULL characters at end of file filter definition string DISASM.C - added variable disassembler_symb to enable symbolic address disassembly - changed function read_nibble(), made function public - changed function append_imm_nibble(), if the immediate data is 5 nibbles long and the decoded data is a known symbolic entry, show the symbolic name instead of the data - added new function append_numaddr(), numeric output of an address - changed function append_addr(), if the address is a known symbolic entry, show the symbolic name instead of the address - bugfix in function append_r_addr(), in some rare conditions the program counter value got larger than 0xFFFFF, if the calculated absolute address is a known symbolic entry show the symbolic name instead of the relative address, in the case of showing the relative address the corresponding absolute address is now printed by this function and not by the function append_pc_comment(), so there's no difference between VIEW_SHORT and VIEW_LONG any more - removed function append_pc_comment(), implementation is obsolete now because absolute address printing is now done in function append_r_addr() - changed function disasm_8() and disassemble(), changed function prototypes by removing the view argument DISPLAY.C - made global variable pbyLcd static - changed function UpdateContrast(), changed function prototype, the contrast value is now calculated inside the function directly from the IO chipset content - changed function CreateLcdBitmap(), adjusted to new prototype of function UpdateContrast() and removed obsolete use of the chipset contrast variable - changed function CreateMainBitmap(), replaced the _ASSERT with the VERIFY macro in some cases - changed function UpdateAnnunciators(), calculate the display contrast value now directly from the IO chipset content - changed function LcdProc(), added critical section for display update is in progress - bugfix in function StopDisplay(), function timeKillEvent() don't stop the display update immediately, so I have to wait until display update finished before I clear the display buffer DISRPL.C - new module for RPL object decoding DISRPL.H - header file for RPL object decoding part EMU42.C - added Critical Section initialization for LCD lock - changed function OnDropFiles() and OnObjectLoad(), adjusted function name GetUserCode() to GetUserCode42() - bugfix in function OnDropFiles() and OnObjectLoad(), readded delay after ON key state change, bug introduced in v1.04 - removed static functions OnStackCopy() and OnStackPaste(), implementation is now in module STACK.C - changed function OnViewCopy(), removed MONOCHROME implementation and assertion for nLcdZoom - changed function OnObjectLoad() and OnObjectSave(), adjusted to new prototype of function GetLoadObjectFilename() and GetSaveObjectFilename(), adjusted function name GetUserCode() to GetUserCode42() and OnSelectProgram() to OnSelectProgram42() - changed function OnObjectLoad(), changed load object warning message - changed function Disasm(), adjusted to new prototype of function disassemble() - changed function WinMain(), added non modal "RPL Object Viewer" dialog box in main message handler - bugfix in function WinMain(), getting the full path name of the current state file failed in the case of an empty name buffer EMU42.DSP - added symbfile.c and disrpl.c sources EMU42.H - added file filter definitions - removed extern declaration of pbyLcd - removed VIEW_SHORT and VIEW_LONG definition - changed function prototypes - extern declaration of global variables and functions EMU42.RC - added dialog IDD_DEBUG_SETTINGS and IDD_RPLVIEW - changed version and copyright ENGINE.C - adjusted to renamed IO.H definitions - changed function WorkerThread(), adjusted to new prototype of function UpdateContrast() and removed obsolete use of the chipset contrast variable FILES.C - changed function GetCutPathName(), removed warning when compiling for x64 architecture - bugfix in function RebuildRomCrc(), a ROM size smaller than 64KB caused a buffer overflow - changed function IsDataPacked(), made a DWORD pointer copy of the VOID pointer argument to avoid type casting, this generates the same code on MSVC6.0 but made it GCC compiler compatible - bugfix in function OpenDocument(), if document reload was refused the function returned no success -> this caused trouble in function OnFileMruOpen() removing the MRU entry of this document - bugfix in function RestoreBackup(), removed workaround for indirect contrast setting in InitKML(), in the case that the initializing of the backup KML failed, the original contrast setting was destroyed; as workaround added a call of function UpdateContrast() - changed function GetOpenFilename(), added file filter for all Emu42 specific filenames which is default, changed filter names, removed some NULL characters at end of file filter definition string and removed model specific file extension selection - changed function GetSaveAsFilename(), changed filter names, removed some NULL characters at end of file filter definition string and use small size characters for file extensions - changed function GetLoadObjectFilename() and GetSaveObjectFilename(), changed function prototype, added arguments for the file filter and the default extension - bugfix in function SaveObject(), stack level 1 worked only for the case that the calculator was on, if the calculator is off the relevant object is at stack level 2 - added function DecodeBmp(), contain the BMP image file decoder prior located in function LoadBitmapFile() and added check of bitmap file size - added functions ReadGifByte(), ReadGifWord() and DecodeGif() for decoding GIF image files - bugfix in function LoadBitmapFile(), check for a valid file handle was missing, moved BMP image file decoder to function DecodeBmp() and added GIF image file support IO.H - renamed definitions TIMER1_CTL to TIMERCTL_1 and TIMER2_CTL to TIMERCTL_2 - added Sacajawea chip specific definitions KEYBOARD.C - adjusted to renamed IO.H definitions KEYMACRO.C - changed function OnToolMacroNew() and OnToolMacroPlay(), removed some NULL characters at end of file filter definition string - changed function MacroProc(), removed warning when compiling for x64 architecture KML.C - changed szText variable qualifier from LPTSTR to LPCTSTR - changed function CreateKmlList(), adjusted to new prototype of function GetStringParam() - added function UpdateScriptList(), filling the KML script combo box with all found script titles and select the current used one - changed function ChooseKMLProc(), call function UpdateScriptList() to update the KML script combo box now - bugfix in function FatalError(), modifying the script buffer content isn't allowed - changed function InitLex(), IncludeLines() and IncludeBlocks(), adjusted to constant pointer of variable szText - changed function GetStringOf(), changed for better reading - changed function SkipWhite(), optimized and better readable implementation - bugfix in function ParseToken(), optimized string delimiter searching among other optimizations, removed increment of line counter on LF character to correct the line numbering on UNIX files with LF instead of CR LF at line end -> line counter increment is done in function SkipWhite() on decoding next keyword in function Lex() and modifying the script buffer content for debug output isn't allowed - changed function ParseLine(), replaced main loop "goto" construct - changed function GetStringParam(), changed return variable qualifier from LPTSTR to LPCTSTR LOWBAT.C - bugfix in function StartBatMeasure(), creating the battery watching thread wasn't Win9x compatible MOPS.C - adjusted to renamed IO.H definitions - changed function ChipResetMaster() and WriteIO() adjusted to new prototype of function UpdateContrast() and removed obsolete use of the chipset contrast variable - changed function WriteIO(), prepared implementation of the STL bit in the LEDOUT (0x30D) register OPCODES.C - adjusted to renamed IO.H definitions PCH.H - added INVALID_SET_FILE_POINTER definition RESOURCE.H - added definitions for Debugger Settings and RPL object viewer handling RPL.C - changed function RPL28_SkipOb(), RPL28_ObjectSize(), RPL42_SkipOb() and RPL42_ObjectSize(), adjusted to renamed definitions RPL.H - renamed definitions O_DOEREAL to O_DOEREL, D_DOEREAL to D_DOEREL and D_DOLNKARRY to D_DOHSTR - added some HP32SII RAM entries SETTINGS.C - changed function ReadSettings() and WriteSettings(), added item "Symbolic" in section [Disassembler] in the INI-File STACK.C - renamed function StackCopy() to OnStackCopy() and StackPaste() to OnStackPaste() - changed function OnStackCopy(), changed object detection and added HP32SII implementation - bugfix in function OnStackPaste(), readded delay after ON key state change, bug introduced in v1.04 SYMBFILE.C - new module for loading external symbols from a Saturn3 linker file TIMER.C - adjusted to renamed IO.H definitions TTYPES.H - removed contrast variable from CHIPSET_M structure USRPRG42.C - renamed function GetUserCode() to GetUserCode42() and OnSelectProgram() to OnSelectProgram42() - changed function PutUserCode() and SelectProgram42(), removed warning when compiling for x64 architecture - changed function SelectProgram42(), adjusted to new prototype of function GetSaveObjectFilename() 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 definition 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 definition 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 prototypes 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 module 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 implementation 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 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 - 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 dependent 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 module with memory addresses and RPL constants STACK.C - new module 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 specify 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 module 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