Emu28 v1.19

DEBUGGER.C
- added backup breakpoint list
- 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

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

EMU28.C
- changed function OnFileMruOpen(), on success move selected entry
  to top of MRU table

EMU28.DSP
- changed to REGISTRY (HKCU/Software/Emu28) saving

EMU28.H
- added MMU bit definitions PAGE_BITS, ADDR_BITS and ADDR_SIZE
- changed variable prototypes of RMap[] and WMap[]
- extern declaration of global variable and function

EMU28.RC
- changed version

FILES.C
- 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

KML.C
- added keyword "IfMem" to pLexToken[] 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 InitButton(), source code improvement checking
  the size of button array
- changed function RunLine(), added implementation of "IfMem"
  command

KML.H
- added TOK_IFMEM definition

MOPS.C
- bugfix in MAPMASK() and MAPSIZE() definition, used wrong define
  for page calculation
- bugfix in function ModuleId(), used define had nothing to do with
  with module size calculation
- changed prototype of variable RMap[] and WMap[], used better name
  inside size definition
- bugfix in function MapNCE(), MapEXT(), MapROM(), Config(),
  Uncnfg() and MapData(), used wrong define for page calculation
- bugfix in function Npeek(), Nread() and Nwrite(), used wrong
  define for display/timer/control address calculation and used
  wrong define for memory page calculation

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

OPS.H
- removed PAGE_SIZE and ADDR_SIZE definition
- bugfix in function FASTPTR(), used wrong define for page
  calculation

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
- added function DoComplex() to handle a complex number object
- changed function OnStackCopy(), added complex number support
- changed function OnStackPaste(), added flag to disable automatic
  clipboard object detection and added complex number support


Emu28 v1.18

DDESERV.C
- bugfix in function DdeCallback(), readded delay at XTYP_POKE after
  ON key state change switching calculator on, bug introduced in
  v1.07 and added stack level adjust at XTYP_REQUEST for the case
  that the calculator is off and made ON key hold time variable

DEBUGGER.C
- changed function SetMappingMenu(), added control of memory menu
  items ID_DEBUG_MEM_LOAD and ID_DEBUG_MEM_SAVE
- changed function Debugger(), added calls of Load/Save Memory Data
  and "RPL Object Viewer" handling functions
- 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 Load/Save Memory Data handling

DISPLAY.C
- made global variable pbyLcd static
- changed function UpdateMainDisplay(), 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 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

EMU28.C
- added Critical Section initialization for LCD lock
- changed function On Paint(), exchanged BitBlt() with StretchBlt()
  in display redraw part because of a serious bug in the WineHQ
  BitBlt() implementation
- bugfix in function OnDropFiles() and OnObjectLoad(), readded
  delay after ON key state change switching calculator on, bug
  introduced in v1.07 and made ON key hold time variable
- changed function OnObjectLoad(), changed load object warning
  message
- 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

EMU28.DSP
- added disrpl.c source

EMU28.H
- removed extern declaration of pbyLcd
- extern declaration of global variables

EMU28.RC
- changed IDD_SETTINGS, replaced "Ok" with "OK" and removed
  accelerator keys from "OK" and "Cancel"
- added dialogs IDD_DEBUG_MEMSAVE, IDD_DEBUG_MEMLOAD and IDD_RPLVIEW
- added "Load Memory Data...", "Save Memory Data..." and
  "Rpl Object Viewer..." menu entries in debugger "Memory" context
  menu
- changed version and copyright

FILES.C
- 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
- changed function GetOpenFilename(), added file filter for all
  Emu28 specific filenames which is default, changed filter names
  and removed model specific file extension selection
- changed function GetSaveAsFilename(), changed filter names and use
  small size characters for file extensions
- 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

KEYBOARD.C
- changed function KeyboardEvent(), made key switch time variable

KML.C
- 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
- changed function InitGlobal(), changed some punctuation and
  capital letters
- bugfix in function ReloadButtons(), global variable bKeyPressed
  wasn't updated

RESOURCE.H
- added definitions for Load/Save Memory Data and RPL object viewer
  handling

SETTINGS.C
- changed function ReadSettings() and WriteSettings(), added items
  "WakeupDelay" and "KeyMinDelay" in section [Emulator] in the
  INI-File

STACK.C
- bugfix in function OnStackPaste(), added delay after ON key state
  change switching calculator on and made ON key hold time variable


Emu28 v1.17

DDESERV.C
- bugfix in function DdeCallback(), readded delay after ON key state
  change, bug introduced in v1.07

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 and added Debugger Settings to the
  system menu
- 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

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

EMU28.C
- bugfix in function Interfiles() and OnObjectLoad(), readded delay
  after ON key state change, bug introduced in v1.07
- changed function OnObjectLoad() and OnObjectSave(), adjusted to
  new prototype of function GetLoadObjectFilename() and
  GetSaveObjectFilename()
- changed function Disasm(), adjusted to new prototype of function
  disassemble()

EMU28.DSP
- added symbfile.c sources

EMU28.H
- added file filter definition
- removed VIEW_SHORT and VIEW_LONG definition
- changed function prototypes
- extern declaration of global variable and functions

EMU28.RC
- added dialog IDD_DEBUG_SETTINGS
- changed version

FILES.C
- changed function GetCutPathName(), removed warning when compiling
  for x64 architecture
- 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
- changed function GetOpenFilename() and GetSaveAsFilename(),
  removed some NULL characters at end of file filter definition
  string
- changed function GetLoadObjectFilename() and
  GetSaveObjectFilename(), changed function prototype, added
  arguments for the file filter and the default extension

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()
- 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

PCH.H
- added INVALID_SET_FILE_POINTER definition

RESOURCE.H
- added definitions for Debugger Settings handling

RPL.C
- renamed definition DOEREAL to DOEREL and adjusted usage in
  function RPL_SkipOb() and RPL_ObjectSize()

STACK.C
- bugfix in function OnStackPaste(), added delay after ON key state
  change

SETTINGS.C
- changed function ReadSettings() and WriteSettings(), added item
  "Symbolic" in section [Disassembler] in the INI-File

SYMBFILE.C
- new module for loading external symbols from a Saturn3 linker file


Emu28 v1.16

DEBUGGER.C
- changed function OnLButtonUp(), NewValue(), EnterAddr() and
  EnterBreakpoint(), replaced WM_GETTEXT message call with function
  GetWindowText()

DISASM.C
- bugfix in function disassemble(), the NOP5 opcode returned wrong
  address for next instruction (GOTO opcode skipping one nibble)

EMU28.C
- bugfix in function SaveChanges(), function GetSaveAsFilename()
  returns a boolean and not a button id and removed call of last
  document saving
- changed function On Paint(), removed mixture of BitBlt() calls with
  argument hPaintDC and hWindowDC inside critical section
- bugfix in function OnFileSaveAs(), function GetSaveAsFilename()
  returns a boolean and not a button id and removed call of last
  document saving
- changed function OnFileClose(), removed call of DisableDebugger()
  because it's now done in function ResetDocument()
- changed function OnTopics(), minor optimization by replacing
  ShellExecuteEx() with ShellExecute()
- changed function WinMain(), added last document saving at end of
  program

EMU28.H
- extern declaration of global variable

EMU28.RC
- changed version and copyright

FILES.C
- changed function ResetDocument(), added call of DisableDebugger()
- changed function GetLoadObjectFilename() and
  GetSaveObjectFilename(), changed default file filter from *.* to
  *.HP

MOPS.C
- changed function GetLPD(), added possibility to disable low
  battery detection

SETTINGS.C
- changed function ReadSettings() and WriteSettings(), added item
  "Disable" in section [LowBat] in the INI-File


Emu28 v1.15

DDESERV.C
- changed function DdeCallback(), changed to new BINARYHEADER28C
  definition

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

EMU28.C
- 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
- changed function OnFileSaveAs(), minor optimizations and added
  MruAdd() call
- changed function OnObjectSave(), minor optimization
- changed function MainWndProc(), added MRU message handler
- changed function WinMain(), added StartupBackup handling and added
  MRU initialization, startup file adding and cleanup

EMU28.DSP
- added mru.c sources

EMU28.H
- renamed define BINARYHEADER28 into BINARYHEADER28C and the
  definition to "HPHP28-C" to separate it from Emu42
- extern declaration of global variable and functions
- changed function prototypes

EMU28.RC
- cosmetic changes in dialog IDD_CHOOSEKML to improve WinXP style
- added Menuitem Files "Recent Files..."
- changed version

FILES.C
- changed function GetCutPathName(), better support for UNC names
- changed function SaveBackup(), added assertion for checking
  emulator engine state
- changed function WriteStack(), now checking the complete binary
  header "HPHP28-C" to distinguish them from Emu42 object files,
  adjusted to new prototype of function RPL28_ObjectSize() and added
  new error state for bad objects
- changed function LoadObject(), added error message for bad objects
- changed function SaveObject(), changed to new BINARYHEADER28C
  definition

MRU.C
- new module for MRU routines

OPCODES.C
- bugfix in function o158x(), o159x(), o15Cx(), o15Dx(), o15Ax(),
  o15Bx(), o15Ex() and o15Fx(), used wrong cpu cycles
- 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

RPL.C
- bugfix in RPL_ObjectSize(), changed function prototype for adding
  buffer size parameter preventing reading outside buffer area when
  decoding bad objects

SETTINGS.C
- added function DelReg() for deleting a registry item
- changed function ReadSettings() and WriteSettings(), added item
  "StartupBackup" in section [Files]
- 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


Emu28 v1.14

DDESERV.C
- bugfix in function DdeCallback(), decoding of the item name wasn't
  UNICODE compatible

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

DISPLAY.C
- changed function ResizeWindow(), added "Always on top" feature

EMU28.C
- moved CF_HPOBJ definition to EMU28.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

EMU28.H
- added CF_HPOBJ definition from EMU28.C
- removed declaration of bClassicCursor
- extern declaration of global variables and functions

EMU28.RC
- added item "Always On Top" and "Activation Follows Mouse" in
  settings dialog
- 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()

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
  for using arrow cursor over button
- changed function InitKML(), added full check for unpacked ROM
  image and build checksum of patched ROM

MOPS.C
- bugfix in function WriteIO(), display sync error flag reset in the
  DSPCTL (0x303) register hasn't worked on CPU reset condition

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

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

TIMER.C
- changed function CalcT2(), in the case of a pending timer2
  interrupt return always the timer2 value 0xFFFFFFFF


Emu28 v1.13

DDESERV.C
- removed warnings when compiling under VS2005
- changed function DdeCallback(), case XTYP_POKE and XTYP_REQUEST
  now decode the item name for the stack level

DEBUGGER.C
- removed warnings when compiling under VS2005

EMU28.C
- removed warnings when compiling under VS2005

EMU28.H
- changed function prototypes

EMU28.RC
- changed version
- replaced CREATEPROCESS_MANIFEST_RESOURCE_ID definition in manifest
  declaration by 1

EXTERNAL.C
- changed function BeepWave(), removed VS2005 warning
- changed function BeepWin9x(), disabled implementation for x64
  architecture

FILES.C
- changed function PatchRom(), removed VS2005 warning
- changed function WriteStack(), added stack level argument
- changed function LoadObject(), adjusted call of WriteStack() to
  new function prototype

IO.H
- renamed LBICTL to LPD

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
- changed function DisplayChooseKml(), changed return type of dialog
  box
- changed function ParseLine(), change typecast of szLexString from
  DWORD to DWORD_PTR

KML.H
- changed variable type of nParam[] element of KmlLine structure
  because element is also used as pointer

MOPS.C
- renamed LBICTL to LPD
- changed function Npeek() and Nread(), adjusted to new prototypes
  of ReadIO() and ReadSlaveIO()
- new function GetLPD() for reading the LPD state
- changed prototypes of function ReadIO() and ReadSlaveIO(), added
  update argument
- bugfix in function ReadIO(), WriteIO(), ReadSlaveIO() and
  WriteSlaveIO(), added implementation of the LPD (0x300) register
- changed function WriteIO(), added IAM bit implementation in the
  DSPTEST (0x302) register for timer emulation
- bugfix in function WriteSlaveIO(), a DON bit change in the DSPCTL
  (0x303) register hadn't affect on the annunciators

PCH.H
- added _CRT_SECURE_NO_DEPRECATE definition
- added DWORD_PTR type definition

RESOURCE.H
- removed CREATEPROCESS_MANIFEST_RESOURCE_ID and RT_MANIFEST
  definition

RPL.C
- added definition of EDITLINE
- 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

STACK.C
- adjusted calls of RPL_Push() to new function prototype
- 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 StartTimers(), timers are stopped if the IAM
  bit in the DSPTEST (0x302) register of the master chip with the
  quarz crystal isn't set
- bugfix in function StopTimers(), on stopping master timer slave
  timers wasn't stopped automatically


Emu28 v1.12

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.10)

EMU28.C
- 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

EMU28.H
- extern declaration of global functions

EMU28.RC
- changed version

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

KML.C
- 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
- bugfix in function Lex(), EOF without LF at end of non empty line
  wasn't detected as EOL


Emu28 v1.11

DISPLAY.C
- changed function UpdateContrast(), added background color to
  display bitmap
- changed function WritePixelQuad(), draw only one pixel instead of
  four pixels now; added 3rd background color
- bugfix in function UpdateMainDisplay(), added emulation of display
  row bitmap (0x1E0-0x2DF)
- bugfix in function UpdateAnnunciators(), adjusted contrast table
  entry to lesser contrast

EMU28.H
- added definition with valid calculator models
- added macro with model validation code

EMU28.RC
- changed version

FETCH.C
- changed function EvalOpcode(), included assertion for detecting
  access to packed memory data

FILES.C
- bugfix in function OpenDocument(), after reading CPU state, ext.
  RAM pointer must immediately be deleted because on error condition
  function ResetDocument() tries to free this memory; added check
  for valid calculator model

KML.C
- bugfix in function InitButton(), nested scancode block commands
  hadn't handled correctly
- changed function InitKML(), changed checking for valid Model
  argument and changed the corresponding error message


Emu28 v1.10

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
- changed function WritePixelQuad(), added Zoom factor 3 handling
- changed function StopDisplay(), removed display clear

EMU28.C
- 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)

EMU28.H
- expanded MMUMAP enumeration
- extern declaration of global variable

EMU28.RC
- changed IDD_KMLLOG, replaced "Always" text with "Show Script
  compilation result next time"
- added "Follow" menu entries in debugger "Memory" context menu
- changed version

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
- changed function ResetDocument(), NewDocument(), OpenDocument(),
  SaveDocument(), SaveBackup(), RestoreBackup() and ResetBackup(),
  added external RAM handling
- bugfix in function RestoreBackup(), window title wasn't updated
- bugfix in function CreateBIPalette(), for 16 and 32 bitcount
  bitmaps no logical palette was created
- bugfix in function LoadBitmapFile(), function blocked loading
  bitmap when ROM file was missing

KML.C
- changed table szLexDelim[], removed first element
- added new table eIsGlobalBlock[] with valid block tokens
- added new function IsGlobalBlock(), checking if token inside
  eIsGlobalBlock[] table
- changed function Lex(), added assertion for mode checking
- changed function ParseLines(), added syntax checking for command
  tokens and removed "Open block." message
- changed function ParseBlocks(), added syntax checking for block
  tokens
- changed function InitLcd(), TOK_ZOOM argument wasn't checked, on
  illegal zoom values use 1 as default now
- bugfix in function LoadKMLGlobal(), keyword "Global" had only been
  detected as first command in KML script

KML.H
- adjusted definitions of LEX_BLOCK, LEX_COMMAND and LEX_PARAM to
  modified table szLexDelim[]

MOPS.C
- added new function ModuleId() for calculating the RAM Id from the
  module size
- bugfix in function MapNCE(), size calculation for mirroring was
  wrong
- added new function MapEXT() for mapping external RAM
- changed function MapROM(), added calls of MapEXT()
- changed function Config(), Uncnfg(), Reset(), C_Eq_Id() and
  MapData(), added external RAM handling
- bugfix in function Uncnfg(), changed unconfig order between master
  and slave controller, master is unconfigurated first
- bugfix in function MapData(), priority order was wrong, adjusted
  to the one used in function Map()

RESOURCE.H
- added several definitions

RPL.C
- added new function RPL_GarbageCol() for doing a garbage collection
- changed function RPL_CreateTemp(), added garbage collection on low
  memory condition

SETTINGS.C
- changed function ReadSettings() and WriteSettings(), added item
  "SaveDefaultConfirm" in section [Files] in the INI-File

TYPES.H
- added new variables for external RAM handling


Emu28 v1.09

DISPLAY.C
- changed function UpdateMainDisplay(), removed DEBUG_DISPLAY
  implementation
- bugfix in function UpdateContrast(), used background Color 0 in
  calculator off state even if Color 32 was defined, added critical
  section for DIB section update because of asynchronous display
  update now and added update of annunciators
- bugfix in function CreateLcdBitmap(), DIB section shouldn't
  created from the memory DC
- deleted function WriteToMainDisplay(), not necessary for the new
  display implementation any more
- added functions LcdProc(), StartDisplay() and StopDisplay() for
  new the implementation of the display engine

EMU28.C
- changed function SettingsProc(), added sound handling
- moved function OnStackCopy() and OnStackPaste() to STACK.C
- changed function WinMain(), added accelerator key access for menus

EMU28.DSP
- added stack.c sources

EMU28.H
- removed definitions of DISP_ANNUN and DISP_MAIN
- removed reference of variable disp
- removed function prototype of WriteToMainDisplay()
- extern declaration of global functions

EMU28.RC
- added "Sound" group in Settings dialog
- changed menu text "Copy String" to "Copy Stack" and menu text
  "Paste String" to "Paste Stack"
- added accelerator resource
- changed version and copyright

ENGINE.C
- bugfix in function WorkerThread(), when changing into SM_RUN state
  display contrast must also be restored
- changed function WorkerThread(), when changing into SM_RUN state
  display engine must be started and when leaving SM_RUN state
  display engine must be stopped now

FILES.C
- added function RomType() returning the current ROM version

IO.H
- added MROW_BEGIN and MROW_END definitions

KML.C
- 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

MOPS.C
- changed MMU page size bits from code constants to a definition
- deleted function UpdateDisplay(), not necessary for the new
  display implementation any more
- changed function Nwrite(), removed calling of functions
  UpdateDisplay() and UpdateAnnunciators()
- changed function WriteIO(), control of the DSPCTL (0x303) register
  calls now the functions StartDisplay() and StopDisplay() to
  start/stop the display engine and removed DISP_MAIN references
- changed function WriteIO(), replaced DISP_ANNUN references by an
  annunciator implementation in function WriteSlaveIO()
- changed function WriteSlaveIO(), added annunciator implementation

OPS.H
- added MMU page and address size definitions

RPL.C
- added function RPL_GetSystemFlag() returning the state of the
  given flag

RESOURCE.H
- added several definitions

STACK.C
- new module with the message handler functions OnStackCopy() and
  OnStackPaste() prior located in EMU28.C
- changed function OnStackCopy() and OnStackPaste(), they can now
  also copy real numbers from and to the clipboard

TIMER.C
- changed function CheckT(), minor optimization in checking if INT
  or WAKE bit is set


Emu28 v1.08

DISPLAY.C
- bugfix in function CreateMainBitmap(), in error case hMainDC
  variable wasn't cleared

EMU28.H
- extern declaration of global variables

EMU28.RC
- changed menu text order from "Copy Stack/Copy Screen/Paste Stack"
  to "Copy Screen/Copy Stack/Paste Stack"
- changed version

EXTERNAL.C
- added function BeepWave(), beeper function using sound card
- added function BeepWin9x(), PC speaker function for working on
  Win9x
- changed function External(), removed range checking of duration;
  call function BeepWin9x() on Win9x instead of Beep() or in the
  case of wave sound the function BeepWave()

FILES.C
- changed function PatchRom(), changed ASCII string handling from
  BYTE to CHAR data type

KML.C
- changed function AddToLog(), changed argument qualifier and minor
  code optimization
- bugfix in function InitKML(), changed log message for no "Model"
  definition found and a missing "Bitmap" definition wasn't detected

OPS.H
- changed function Nsrb(), speed optimization

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


Emu28 v1.07

DDESERV.C
- changed function DdeCallback(), removed delays after ON key state
  change

DEBUGGER.C
- bugfix in function Debugger(), used function to set icon which
  hasn't worked properly under WinXP

EMU28.C
- changed function OnStackPaste(), minor code optimization
- changed function Interfiles(), OnStackPaste() and OnObjectLoad(),
  removed delays after ON key state change
- changed function declaration of function OnTopics()
- bugfix in function WinMain(), szCurrentKml wasn't initialized

EMU28.RC
- changed version

FILES.C
- changed function WriteStack(), minor optimization when saving as
  string
- 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
- bugfix in function OpenDocument(), reload KML button state from
  last document close
- changed function LoadObject(), file access is now shared
- changed function DibNumColors() and CreateBIPalette(), changed
  argument qualifier

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 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
- added function ReloadButtons(), update internal button state from
  chip keyboard matrix content

KML.H
- added ReloadButtons() function prototype

OPS.H
- bugfix in function Nsub() and Nrsub(), in some situations wrong
  results in dec mode with illegal decimal number entry as 2nd
  operator

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


Emu28 v1.06

CHECKBOX.BMP
- fixed one pixel with wrong color

EMU28.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
- changed function OnLButtonDown(), OnLButtonUp(), OnMouseMove(),
  OnKeyDown() and OnKeyUp(), disable function handling when in macro
  play mode
- changed function MainWndProc(), added some macro handler functions

EMU28.DSP
- added keymacro.c sources

EMU28.H
- extern declaration of global variables and functions

EMU28.RC
- changed "Always" checkbox in "KML Script Compilation Result"
  dialog from a pushlike to normal one for better readability under
  Windows XP style
- added "Macro Settings" dialog
- added Menuitem Tools "Macro..."
- 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
- 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 timer
  failed if first writing address was before the timer address area

PCH.H
- added VERIFY macro

RESOURCE.H
- added several definitions

SETTINGS.C
- changed function ReadSettings() and WriteSettings(), added section
  [Macro] in INI-File


Emu28 v1.05

EMU28.C
- added function OnTopics() to call help file
- changed function MainWndProc(), added ID_HELP_TOPICS to command
  message handler

EMU28.RC
- changed version and copyright
- added Menuitem Help "Help Topics" in main menu

FILES.C
- added functions UpChk(), Checksum(), CorrectChecksum() and
  RebuildRomChecksum() for recalculation of ROM checksums
- changed function PatchRom(), added recalculation of ROM checksums
  at end of ROM patching

OPS.H
- changed function Nadd(), optimized "illegal number in dec mode"
  detection
- changed function Ninc(), Ndec(), Nsub() and Nrsub(), removed
  register wrap handling
- changed function Nneg(), optimized non zero value handling
- bugfix in function Nsrc(), the Sticky Bit (SB) wasn't handled in
  all rSRC opcodes

RESOURCE.H
- added definition


Emu28 v1.04

CURSOR.C
- new module to create a hand cursor

DDESERV.C
- replaced all LocalAlloc() with HeapAlloc() memory requests

DEBUGGER.C
- replaced all LocalAlloc() with HeapAlloc() memory requests

DISASM.C
- changed several variable qualifiers from TCHAR * to LPCTSTR and
  replaced rest of TCHAR * by LPTSTR
- changed variable qualifier of hp_reg_1_af and hp_reg_2_af
- changed function append_tab(), speed optimization
- changed function append_field(), removed use of temporary variable

DISPLAY.C
- replaced variable use of hOldLcdBitmap with hLcdBitmap
- replaced variable use of hOldMainBitmap with hMainBitmap

EMU28.DSP
- added cursor.c sources

EMU28.C
- changed variable qualifier of szLicence
- added global variables
- replaced all LocalAlloc() with HeapAlloc() memory requests
- bugfix in function CopyItemsToClipboard(), don't worked in UNICODE
  mode because character translation was missing
- changed function OnCreate() and OnDestroy(), added load and
  destroy of two new cursor resources
- changed function WinMain(), removed class cursor from main window

EMU28.H
- extern declaration of global variables and functions
- moved T2CYCLES definition from OPCODES.H
- changed function DuplicateString(), replaced LocalAlloc() with
  HeapAlloc() memory request

EMU28.RC
- changed version and copyright
- changed resource language description to English

FILES.C
- replaced all LocalAlloc() with HeapAlloc() memory requests

KML.C
- replaced all LocalAlloc() with HeapAlloc() memory requests
- bugfix in function PrintfToLog(), temporary buffer was half of
  size in UNICODE mode
- bugfix in function BrowseFolder(), the shell's allocator release
  was missing in one case
- changed function ChooseKMLProc(), optimized IDC_EMUDIRSEL command
  case
- bugfix in function ParseString(), strings greater 127 characters
  caused a buffer overflow in UNICODE mode
- bugfix in function KillKML(), set variables bDebug, nKMLFlags and
  nLcdZoom to there startup values
- changed function MouseMovesTo(), added code part to select cursor

OPCODES.C
- bugfix in function o3X() and o8082X(), used wrong cpu cycles

OPCODES.H
- moved T2CYCLES definition to EMU28.H

PCH.H
- added IDC_HAND definition for non Win2k OS project

RPL.C
- replaced all LocalAlloc() with HeapAlloc() memory requests

SETTINGS.C
- changed function ReadSettings() and WriteSettings(), added item
  "ClassicCursor" in section [KML] in the INI-File

TIMER.C
- bugfix in function CalcT(), estimated timer ticks were sometimes
  to large because there was a misbehavior between real time clock
  and counted CPU cycles when in free running mode
- changed function RescheduleT(), optimized initialization of
  synchronization variables used in CalcT()
- changed function ReadT(), minor optimization calculating the timer
  value


Emu28 v1.03

DEBUGGER.C
- bugfix in function NewValue(), EnterAddr(), EnterBreakpoint(),
  EditBreakpoint() and InfoIntr(), uncompleted wParam argument
  decoding in WM_COMMAND case
- replaced function OnToggleCheck() with ToggleBreakpointItem(), a
  more general function to toggle a breakpoint check box
- changed function EditBreakpoint(), adjusted LBN_DBLCLK case to use
  the new ToggleBreakpointItem() function and modified behavior of
  VK_SPACE to toogle all selected items

EMU28.C
- added Critical Section initialization for CPU slow down
- changed function SetWindowTitle(), changed argument qualifier
- bugfix in function SettingsProc(), Disasm() and About(),
  uncompleted wParam argument decoding in WM_COMMAND case
- bugfix in function MainWndProc(), wrong wParam argument decoding
  in WM_SYSCOMMAND case
- bugfix in function WinMain(), fixed possible buffer overflows in
  state file loading message

EMU28.H
- extern declaration of global function

EMU28.RC
- changed version
- changed IDC_DEBUG_MEM from static to listbox control, looks better
  in connection with WinXP style

ENGINE.C
- bugfix in function AdjustSpeed(), AdjKeySpeed() and SetSpeed(),
  reference setting wasn't synchronized

FILES.C
- changed buffer size information of files and path's from 260 to
  MAX_PATH definition
- removed global variable hRomFile, using local now
- removed variable "hRomMap", remainder of older implementation
- changed function MapRom(), minor optimization in ROM image loading
- bugfix in function GetOpenFilename(), GetSaveAsFilename(),
  GetLoadObjectFilename() and GetSaveObjectFilename(), adjusted
  size of temporary buffer to size of destination buffer and fixed
  memory allocation bug in UNICODE mode
- changed function LoadBitmapFile(), it's better to validate the
  pbyRom instead of the hRomFile variable to check if the ROM is
  loaded to avoid possible side effects (ROM loaded by resource) and
  removed uncalled code part

KML.C
- bugfix in function KMLLogProc(), uncompleted wParam argument
  decoding in WM_COMMAND case and update of the bAlwaysDisplayLog
  variable only in the IDOK and IDCANCEL case
- bugfix in function ChooseKMLProc(), uncompleted wParam argument
  decoding in WM_COMMAND case and added UNREFERENCED_PARAMETER
  statement
- bugfix in function ParseLines() and ParseBlocks(), fixed problem
  of uninitialized variable which may occur on parsing corrupt KML
  files


Emu28 v1.02

DEBUGGER.C
- added function UpdateDbgCycleCounter() to handle a 64 bit CPU
  cycles counter in debug mode
- added implementation of "Profiler" dialog box

DEBUGGER.H
- extern declaration of global function

EMU28.C
- changed function WinMain(), added non modal "Profiler" dialog box
  in main message handler

EMU28.H
- extern declaration of global variable
- changed prototype of function AdjKeySpeed()

EMU28.RC
- changed version and copyright
- bugfixes in dialogs, some WS_EX_ styles (especially window
  borders) don't worked on some operating systems
- added Menuitem Info "Profiler..." in debugger menu
- added "Profiler" dialog

ENGINE.C
- bugfix in function Debugger(), fixed problem at quitting debugger
  when last executed opcode was SHUTDN
- changed function Debugger(), added call for 64 bit cpu cycle
  counter adjust
- changed function AdjKeySpeed(), changed back to v1.00 version,
  slow down on every key pressed

KEYBOARD.C
- changed function KeyboardEvent(), changed call of AdjKeySpeed()

KML.C
- changed function DrawAnnunciator(), changed making of gray scale
  mask

RESOURCE.H
- added definitions

TIMER.C
- bugfix in accurate timer handling, variable wasn't initialized so
  it might haven't worked


Emu28 v1.01

DEBUGGER.C
- bugfix in function Debugger(), removed illegal call of
  DestroyMenu() in WM_DESTROY message handler

DISPLAY.C
- changed function UpdateAnnunciators(), added gray scale emulation
  of annunciators

EMU28.C
- changed function OnCreate(), don't enable DragAcceptFiles() here
- changed function Interfiles(), checking calculator model to
  disable stack writing isn't necessary any more

EMU28.H
- changed prototype of function AdjKeySpeed()

EMU28.RC
- changed version and copyright

ENGINE.C
- changed function AdjKeySpeed(), a detected pressed key is now a
  boolean argument from caller; this allows to detect a pressed, but
  not by KBD_OR selected key -> no CPU slow down in this case

FILES.C
- removed unused variables
- changed functions CrcRom(), MapRom() and UnmapRom(), can handle
  packed ROM files now

KEYBOARD.C
- bugfix in function KeyboardEvent(), CPU slow down by calling the
  function AdjKeySpeed() on key pressed must be activated here

KML.C
- changed function DrawAnnunciator(), added gray scale emulation of
  annunciators
- changed function InitKML(), enable object "Drag and Drop"
  calculator model dependent here now

KML.H
- changed prototype of function DrawAnnunciator()

MOPS.C
- bugfix in function MapData(), wrong implementation of ROM area
  detection
- changed function WriteIO(), added annunciators update in CONTRAST
  register (0x301, 0x302) emulation

OPCODES.C
- changed function o802() and o803(), removed AdjKeySpeed() call


(c) by Christoph Gieelink, c dot giesselink at gmx dot de
