Emu42 Changelog

What's new in Emu42 1.30

Aug 23, 2023
  • 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 typede '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

New in Emu42 1.29 (Oct 25, 2022)

  • MU42.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 <ON><C> 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

New in Emu42 1.28 (May 18, 2022)

  • 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

New in Emu42 1.27 (Oct 12, 2021)

  • 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.

New in Emu42 1.26 (Sep 23, 2021)

  • 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 HP32 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

New in Emu42 1.25 (Aug 26, 2020)

  • 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

New in Emu42 1.18 (Apr 23, 2014)

  • 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

New in Emu42 1.17 (May 16, 2013)

  • 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

New in Emu42 1.16 (Jan 23, 2013)

  • 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 e