diff --git a/EMU48.TXT b/EMU48.TXT deleted file mode 100644 index ea9ed1f..0000000 --- a/EMU48.TXT +++ /dev/null @@ -1,482 +0,0 @@ - - - - Emu48 - A freeware HP38/39/40/48/49 Emulator - for Windows 9x, ME, NT, 2000, XP, Vista and 7 - - - - ******************** - * OPERATING SYSTEM * - ******************** - -This version of Emu48 should work with all Intel x86 and x64 platforms. - - - **************** - * INSTALLATION * - **************** - -Emu48 is distributed in 1 archive: -- Emu48v15xSetup.zip All files and sources - -To install Emu48, just start the executable file inside the Emu48v15xSetup.zip -archive. The installer will guide you through the installation. When you first -run Emu48, it will detect the directory in which you installed it, and will -write its configuration to the registry HKCU\Software\Emu48. If you move the -Emu48 directory to another place you have to change the directory path inside -the "Choose Your KML Script" dialog. - -You can also update your current version with the Service Packs: -- E48BP5x.ZIP New EXE-File -- E48SP5x.ZIP Sources of the Service Pack - -Replace the original EXE file please. - - - ************************ - * YOU NEED A ROM IMAGE * - ************************ - -Emu48 needs an image of a calculator ROM to be able to run. Since fall 2000 the -emulator ROM's for the HP38, 39, 40, 48 and 49 are freely available on different -internet sites. Because there's no license for the distribution of the ROM -images, they aren't included in the Emu48 package. You can still use the classic -way extracting them from your own calculator. But in mostly all cases you have -to convert the ROM files into the Emu48 ROM format. - -- HP38: -To upload the ROM of your HP38G, you will need a special aplet called "ROM -UPLOAD", available at http://www.hpcalc.org/details.php?id=633. Once you've -uploaded the ROM, you have to convert it using the Convert utility. - -To do that, start a Command Prompt while running Windows, and type: - Convert ROM.38G - -Where is the path to your ROM image. This will create a file named -ROM.38G. This tool will also check its validity. - -- HP39/40: -To upload the ROM of your HP39G/HP40G, you will need a special aplet called "ROM -UPLOAD", available at http://hp.giesselink.com/emu48.htm. Once you've uploaded -the ROM, you have to convert it using the Rom2emu utility. - -To do that, start a Command Prompt while running Windows, and type: - Rom2emu ROM.39G - -There's also a HP39G/HP40G beta ROM for emulators inside an old Emu48 package -available at http://www.hpcalc.org/details.php?id=4272. - -- HP48: -If you have already used another HP48 emulator, you can convert the ROM using -the Convert utility. - -To do that, start a Command Prompt while running Windows, and type: - Convert ROM.48G -or Convert ROM.48S - -Where is the path to your old ROM image. This will create a file -named ROM.48G or ROM.48S, depending on the version you own. This tool should be -able to read any style of ROM image, and will also check its validity. Note that -if you run it with only one parameter, no file will be written, but it will -still check the validity of the ROM. - -If you have never used an HP48 emulator, and don't have a ROM dump, you can -either use Jean-Yves Avenard's ROMUPL.BIN or the ROMDump Wizard V1.x, which will -almost automatically get the ROM from your HP48. After the download you may have -to convert your dump with the CONVERT utility into the Emu48 format. - -You can find the latest version of the ROM dump programs on: -ROMUPL.BIN http://www.hpcalc.org/details.php?id=3686 -ROMDump Wizard http://hp.giesselink.com/emu48.htm - -- HP49G: -There's no ROM download program available so far. But you can create a ROM image -with the UPD49ROM tool available at http://hp.giesselink.com/emu48.htm and a ROM -update file for the HP49G calculator available at -http://www.hpcalc.org/hp49/pc/rom/. I suggested to use version 1.19-6 -(http://www.hpcalc.org/details.php?id=3240). - -To create a HP49G ROM image file, start a Command Prompt while running Windows, -and type: - UPD49ROM -f hp49119-6.flash ROM.49G - -This will create a HP49G ROM image file with an empty User Port 2. - - - **************** - * HOW TO START * - **************** - -When Emu48 is installed and you have put the ROM image(s), which must be in the -Emu48 ROM format, into the Emu48 directory, you can start Emu48. You'll see a -"Choose Your KML Script" box. - -KML Scripts in fact define the visual aspect of Emu48, the behavior of the -buttons, of the keyboard, ... It's a GREAT way to customize your copy of Emu48. - -Check that the path in the "Emu48 Directory" text area is correct. Modify it if -the directory in which you installed Emu48 is not the directory displayed. Click -the refresh button ("V") after modifying it to update the list box or use the -("...") button to start the directory browser. - -Choose a KML script in the list box for your calculator ROM you put into Emu48's -directory. - -Several HP48 scripts are included in the Emu48 archive: - * Emu48's Default Faceplate for HP48G/GX - * Emu48's Default Faceplate for HP48S/SX - These two are simple scripts, good for 800x600 display resolution. - * Casey's Gx with Toolbar and Touch Screen - * Casey's Sx with Toolbar and Touch Screen - These script uses many advanced features, and is a good demonstration of - the power of Emu48's scripting language KML. Try it, it is really great! - * Floating buttons - This one looks really great. - * Small but realistic HP48 Gx - This one has been designed for small resolutions such as 640x480. - Note: some things in this script have to be fixed. - -If you want other great scripts, visit Rechlin's great HP archive - http://www.hpcalc.org/ - -And if you are interested in writing new scripts, get the KML 2.0 documentation -from Christoph's page at http://hp.giesselink.com/emu48.htm - -Once you have selected a script, press OK to start the emulator. In most cases, -when Emu48 crash after pressing the OK button, you forgot to convert the ROM -image into the emulator format. While it's running, you can use the View/Change -KML Script... command to change the visual aspect of Emu48. - - - *************** - * KML SCRIPTS * - *************** - -Don't use TRUELCD.KMI for emulating display contrast in your scripts. It's not -fully correct. The hardware contrast values are in the area from 0 to 31. But -the ROMs bounds them to useful values. The HP48 S(X) ROM use only display -contrast values between 3 and 19 and the HP48 G(X) ROM values between 9 and 24. - -Maybe you have to adjust the "Rom" filename in the "Global" section. This mostly -happen with the HP49G ROM name. Some KML files use the name ROM.E49, that's the -name of the emulator ROM file published by HP. But Emu48 state files for the -HP49G have the same file extension, so the use of ROM.49G is preferred now. - - - **************** - * COMMAND LINE * - **************** - -The command line syntax is "Emu48 [E48file [Port2file]]". The first parameter -sets the filename for the emulation data, the second parameter the Port2 file. -You're not able to set a Port 2 file without setting the emulation data file. -The arguments are optional. - - - ******************* - * LOAD/SAVE FILES * - ******************* - -There are two ways to transfer files from or to the emulator. The one way is to -use the serial port to transfer the data directly from your HP to the emulator. -The second way is to load data, saved on your PC, into the stack of the -emulator. You can do this by using the Edit/Load Object... command or with the -file Drag and Drop feature. But there's one important restriction, the data must -a HP binary file (begin with HPHP48- or HPHP49-, this depends on your emulated -calculator)! If not, the data is load as string. The Edit/Save Object... command -will save the data in stack level 1 on the PC (always binary mode). Be sure, -when you use the second way for data transfer, that no program is running on the -emulator. The second way doesn't work on a HP38, because he has no stack. So you -can load aplets only from the serial port. - - - ***************** - * DRAG AND DROP * - ***************** - -Dropping HP objects over the emulator window will load program files (like the -command "Load object...") on the stack. Be sure that the emulator isn't busy -before doing this. - - - ******************* - * SHARED RAM CARD * - ******************* - -You can add a SHARED (explained below) RAM card of up to 4MB to a HP48. By -default, no such card will be created when you start Emu48. The MkShared.exe -utility will allow you to create it. - -To create a Port 2 RAM Card, call the program, select the RAM Card size, enter -the card file name and press the 'Create' button. That's it. Please remember, -this program replace the destination file without any request! - -If you use RAM cards greater than 128 KB in a HP48SX, you can only see the first -128 KB of the card. Please remember, the firmware of all HP48GX versions has a -bug when using a 4MB RAM card. You always get the message "Warning: Invalid Card -Data" at startup and Port 33 is unaccessible. This is not a bug of the emulator! - -When you have created this file, run Emu48, and call File/Settings. In the "Port -2" text area, type the name of the file you created (if you don't include a -path, it will be searched for in Emu48's directory) or press the "..." button -for the file browser. If this field is disabled you have chosen the Port 2 file -over the 2nd command line argument, so change the name there please. - -The "Port 2 is Writeable" check box represents the actual read/write state of -the Port 2 file. Changing the state will also change the state for the -calculator by modifying the Read-Only attribute of the file. - -You can also tick the check box "Port 2 Is Shared". When the box is cleared, -only the first instance of Emu48 will allow you to use the RAM card in Port 2. -When this box is checked, the first instance of Emu48 will give you both read -and write access to this RAM card. If you start Emu48 in another instance, the -RAM card in Port 2 will be write-protected. Thus you can transfer files very -easily between two calculators. This RAM card is used by both S/SX and G/GX -types. - -Please remember, all port configuration changes mostly behave like on the -original calculator. This means when you do this changes with the emulated -calculator on, it's the same like when you do this with a real calculator on. In -many times, this depends on the current state of the calculator, this will work -without any problems by doing an automatically calculator warmstart. But for the -most secure way, switch off the emulated calculator first, please! - - - *********************** - * FLASH ROM EMULATION * - *********************** - -The HP49G save the operation system in a reprogramable memory, a so called flash -memory. The flash memory is divided into two parts, into the Operating System -and into a User Data area. The User Data area is viewed as Port 2 in the HP49G. -Emu48 saves the Port 2 data in the ROM file (normally ROM.49G). As default -setting the ROM file is writeable in the first instance of Emu48. When you open -another instance of a HP49G emulation the Port 2 area is READ ONLY, that mean -all changes in Port 2 are lost when you exit this instance. If you don't want to -save data in Port 2 and want to protect the operating systems from overwriting, -you're able protect the ROM file. To do this, close all Emu48 instances and set -the variable 'Writeable' defined in the Emu48.ini file, section [ROM] to zero. - - - *********************** - * COPY / PASTE STRING * - *********************** - -With the menu items "Copy Stack" and "Paste Stack" in the "Edit" menu you're -able to copy real and complex numbers and string objects from the stack to the -PC clipboard and vice versa. - - - ********** - * BACKUP * - ********** - -Emu48 includes a backup feature (in the Edit menu). It save the complete state -of the calculator (excepting the ROM and Port 2 content) in the computer's -memory. You might want to use it before doing something risky, and if you don't -want to save to the disk. It provides some kind of Undo feature. It is also used -by Emu48 when you want to save or load a new document, to restore its old state -if you cancel the operation or of something goes wrong. - - - ************ - * KEYBOARD * - ************ - -To enter a character to the emulator use the PC keyboard (key translation -depends on the used KML script) or the mouse. If you press the left mouse -button, the emulator key is pressed as long as you press the mouse button or -leaving the area of the emulator button. Sometimes you need to press more then -one key (contrast setting, warmstart, ...). To do this, press the right mouse -button. All "locked" buttons are released after enter a key with the left mouse -button. - - - ********* - * CLOCK * - ********* - -The emulator time is synchronized with the PC time at startup of the emulator. -This may cause problems with other non original operating systems running on the -HP. On HP48 S(X) calculators the address area #00052-#00070, on all other -emulated calculators the address area #00058-#00076 in System RAM are rewritten -with the actual time information. - - - ******************************** - * Registry HKCU\Software\Emu48 * - ******************************** - -The section [Timers] in the Emu48.ini file isn't used any more. The variable -values are replaced by useful constants. You may delete this section if you -want. Starting an old version of Emu48 (V1.07 and earlier) will add this section -again. If you move the Emu48 directory to another place, you have to adjust the -variable 'Emu48Directory' in the [Files] section. - - - ************************ - * REAL SPEED EMULATION * - ************************ - -As you recognized the speed of the emulated HP is much faster than an original -one. The reason is, the assembler commands are emulated faster than the original -CPU can execute them. On one side this is a big advantage (faster execution of -programs) on the other side this cause many trouble. In Emu48 only the timers -work with the original speed. In result all commands like User-RPL WAIT wait -more or less the correct time. But many programs like shells or editors use an -own key handler to realize an autorepeat implementation. Normally these programs -use the execution time of each assembler command for waiting. On Emu48 this time -is much shorter, so the time between each key read is shorter as well and you -get a very fast key repetition. The editor ED from the JAZZ package hasn't this -problem, because the key input is synchronized with one of the timers. To solve -this problem Emu48 generally slow down emulation if a key is pressed. To solve -some other speed depending problems you are able to slow down the whole -emulation speed. There are two variables 'SXCycles=82' and 'GXCycles=123' -defined in the Emu48.ini file, section [Emulator] which control the "real" speed -and key repetition slow down for each calculator type. Each numeric value is -representing the allowed CPU cycles in a 16384Hz time frame. Because the used -cycle statements (from SASM.DOC) in Emu48 doesn't correspond to the real values -of the CPU, the saved values are estimated by comparing the execution time of a -program to the real calculator. Increasing the value fitting to your ROM will -make the "real speed" HP faster and vice versa. No warranty to the functionality -of Emu48 when you go below the default values. - - - ************************* - * SERIAL PORT EMULATION * - ************************* - -The serial ports are emulated as well now. You may choose the same serial port -for wire and IR. Remember that the IR port only work with 2400 Baud. If you want -to change the serial port settings, but they are disabled, close the serial port -with the command CLOSEIO or power cycle the HP first. - -Now it's possible to make transfers between the real calculator and Emu48. If -you have problems with the connection please try the following. There's a simple -way to check if your serial port is used by another program. First disable the -serial settings in both combo boxes and very important close the settings -dialog. Reopen the settings dialog and choose the COM port in the wire combo box -to the port the HP is connected with. When you open this combo box you only see -valid (unused) serial ports. Don't use the IR combo box, it only works with 2400 -Baud. The next important thing are the serial settings of the real calculator -and Emu48, they must be equal. If this doesn't work then mostly there's a -hardware or a resource problem of the serial port. Check this with connecting -the HP with a transfer program you like on the same serial port. - - - ******************************* - * INFRARED PRINTER SIMULATION * - ******************************* - -The emulator has the ability to print decoded data to a HP82240A/B printer -simulation. The data transfer to the printer simulator is done over UDP. You can -the define the IPv4 address and the port the printer simulator is listening. - - - **************** - * DISASSEMBLER * - **************** - -With the internal disassembler you're able to disassemble the Saturn chip -address area. With the default Map setting the disassembler always see the -mapped memory address. If for example you configured the RAM at #00000 you will -see the RAM and not the ROM at this address. With the other module settings you -specify a special module for disassembly. Each module use a linear address mode, -beginning at address #00000 and will not overlapped by other modules. So, for -example, you can access the second port of a HP48 RAM card greater than 128KB at -address #40000 (128 * 1024 * 2). The "Copy Data" button copies the selected -disassembler lines to the PC clipboard. - - - ************ - * DEBUGGER * - ************ - -Emu48 has an integrated Saturn assembler debugger inside. For further -information read the separated "Debugger.txt" documentation please. - - - ************** - * DDE SERVER * - ************** - -I implemented a DDE server in Emu48 to transmit data from and to the HP stack -with DDE. You have the same restrictions like with the commands "Load object..." -and "Save Object...", that a running program may corrupt memory. In difference -you can choose the stack level for the transfer in the DDE item field. Take care -to transmit data only after the acknowledge of the last DDE transaction. - -Technical data: - -Servername: Emu48 -Topicname: Stack -Item: 1 (stack level) -Clipboardformat: "CF_HPOBJ" (user defined) - -The DDE commands CONNECT, POKE and REQUEST are supported. - -The structure of the clipboard format "CF_HPOBJ": - -+--------+------------------------------------+ -| 4 Byte | HP object | -+--------+------------------------------------+ - \ \ - \ +--- normal HP object - +----------- length of object (LSB first) - - - ******************** - * TROUBLE SHOOTING * - ******************** - -Visit the Emu48 FAQ site at http://hp.giesselink.com/index.htm to get more -information please. - - - *********** - * SUPPORT * - *********** - -We cannot provide any individual support for Emu48. Information about Emu48 will -be on the Emu48 Homepage or on the Emu48 FAQ at - - http://hp.giesselink.com/index.htm - -It's also a good idea to look at the Usenet forum comp.sys.hp48. Emu48 topics -have discussed there in different threads for years now. - - - *************** - * LEGAL STUFF * - *************** - -Emu48 - An HP38/39/40/48/49 Emulator -Copyright (C) 2013 Sebastien Carlier & Christoph Gießelink - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA - - - *************** - * The Authors * - *************** - - Sebastien Carlier - Christoph Giesselink - -E-Mail: - c dot giesselink at gmx dot de - -Homepage: - http://hp.giesselink.com/ diff --git a/Emu48.exe b/Emu48.exe index ae817d3..5fcb7c5 100755 Binary files a/Emu48.exe and b/Emu48.exe differ diff --git a/Emu48.htm b/Emu48.htm new file mode 100644 index 0000000..29281b3 --- /dev/null +++ b/Emu48.htm @@ -0,0 +1,608 @@ + + + + +Emu48 Manual + + + + + + + +
+

Emu48 - A freeware HP38G/39G/40G/48SX/48GX/49G Emulator
+ for Windows 9x, ME, NT, 2000, XP, Vista, 7, 8 and 10

+
+ +
+

1. General

+

Emu48 is an emulator for the Hewlett Packard HP38G, HP39G, + HP40G, HP48SX, HP48GX and HP49G calculator hardware. These calculators + are based on the 1LT8 Clarke (HP48SX) and on the Yorke chip.

+

2. Acknowledgements

+

First of all a big thank to Sébastien Carlier for publishing + Emu48 v1.0 under the GPL. Without this decision newer versions of the + emulator wouldn't have been possible or ports to other similar + calculators wouldn't have been made. Also a big thank to Jean-Yves + Avenard for his technical assistance in the beginning. And finally I + want to thank all the unnamed authors for publishing material about + these calculators.

+

3. ROM Images

+

Emu48 needs an image of a calculator ROM to be able to run. ROM + images are valid in a packed (even address lower nibble, odd address + higher nibble) or unpacked (one nibble per byte with even address first) + form.

+

Since fall 2000 the emulator ROM's for the HP38, 39, 40, 48 and 49 + are freely available on different Internet sites. Because there's no + license for the distribution of the ROM images, they aren't included + in the Emu48 package. You can still use the classic way extracting + them from your own calculator. But in mostly all cases you have to + convert the ROM files into the Emu48 ROM format.

+
    +
  • HP38 +

    To upload the ROM of your HP38G, you will need a special aplet + called "ROM UPLOAD". + Once you've uploaded the ROM, you have to convert it using the + Convert utility.

    +

    To do that, start a Command Prompt while running Windows, and + type:

    +
    Convert <rom-file> ROM.38G
    +

    Where <rom-file> is the path to your ROM image. This will + create a file named ROM.38G. This tool will also check its validity. +

  • +
  • HP39/40 +

    To upload the ROM of your HP39G/HP40G, you will need a special aplet + called "ROM UPLOAD". + Once you've uploaded the ROM, you have to convert it using the Rom2emu utility. +

    +

    To do that, start a Command Prompt while running Windows, and + type:

    +
    Rom2emu <rom-file> ROM.39G
    +

    There's also a HP39G/HP40G beta ROM for emulators inside an old + Emu48 package. +

  • +
  • HP48 +

    If you have already used another HP48 emulator, you can convert + the ROM using the Convert utility. +

    +

    To do that, start a Command Prompt while running Windows, and + type:

    +
    Convert <rom-file> ROM.48G
    +

    or

    +
    Convert <rom-file> ROM.48S
    +

    Where <rom-file> is the path to your old ROM image. This + will create a file named ROM.48G or ROM.48S, depending on the version + you own. This tool should be able to read any style of ROM image, and + will also check its validity. Note that if you run it with only one + parameter, no file will be written, but it will still check the + validity of the ROM.

    +

    If you have never used an HP48 emulator, and don't have a ROM + dump, you can either use Jean-Yves Avenard's ROMUPL.BIN or the + ROMDump Wizard V1.x, which will almost automatically get the ROM from + your HP48. After the download you may have to convert your dump with + the CONVERT utility into the Emu48 format.

    +

    You can find the latest version of the ROM dump programs on:

    +
    + ROMUPL.BIN + http://www.hpcalc.org/details.php?id=3686
    + ROMDump Wizard + + http://hp.giesselink.com/emu48.htm +
  • +
  • HP49G +

    There's no ROM download program available so far. But you can + create a ROM image with the + UPD49ROM tool + and a + ROM update file for the HP49G calculator. I suggested to use + version 1.19-6 +

    +

    To create a HP49G ROM image file, start a Command Prompt while + running Windows, and type:

    +
    UPD49ROM -f hp49119-6.flash ROM.49G
    +

    This will create a HP49G ROM image file with an empty User + Port 2.

  • +
+

4. Installation

+

To install Emu48 you may use the installer package which contain, + among the binaries, some HP48 KML scripts or just unzip the emulator + and the required emulator skins from archives into an empty directory. + Finally you have to copy your ROM images into this directory and + adjust the ROM image name to the name used in the corresponding KML + script. When you first run Emu48, it will detect the directory in + which you installed it, and will write the configuration to the + registry at HKCU\Software\Emu48.

+

5. How to Start

+

When Emu48 is installed and you have put valid KML scripts and the + corresponding ROM image(s) into your Emu48 installation directory, you + can start Emu48. You'll see a "Choose Your KML Script" + box.

+

KML scripts in fact define the visual aspect of Emu48, the behavior of + the buttons, of the keyboard, ... It's a GREAT way to customize your copy + of Emu48.

+

Check that the path in the "Emu48 Directory" text area is + correct. Modify it if the directory in which you installed Emu48 is not + the directory displayed. Click the refresh button ("V") after + modifying it to update the list box or use the ("...") button to + start the directory browser.

+

Choose a KML script in the list box for your calculator ROM you put + into Emu48's directory.

+

Several HP48 scripts are included in the Emu48 archive:

+
    +
  • Emu48's Default Faceplate for HP48G/GX
  • +
  • Emu48's Default Faceplate for HP48S/SX +

    These two are simple scripts, good for 800x600 display + resolution.

  • +
  • Casey's Gx with Toolbar and Touch Screen
  • +
  • Casey's Sx with Toolbar and Touch Screen +

    These script uses many advanced features, and is a good + demonstration of the power of Emu48's scripting language KML. + Try it, it is really great!

  • +
  • Floating buttons +

    This one looks really great.

  • +
  • Small but realistic HP48 Gx +

    This one has been designed for small resolutions such as + 640x480. +

  • +
+

If you want other great scripts, visit Rechlin's great HP archive +

+

And if you are interested in writing new scripts, get the KML 2.0 + documentation from the + authors Emu48 page.

+

Once you have selected a script, press OK to start the emulator. In + most cases, when Emu48 crash after pressing the OK button, you are using + an invalid ROM image. While it's running, you can use the View/Change KML + Script... command to change the visual aspect of Emu48.

+

6. Command Line

+

The command line syntax is "Emu48 [E48file [Port2file]]". + The first parameter sets the filename for the emulation data + independent from the "LastDocument" setting, the second + parameter the Port2 file. You're not able to set a Port 2 file without + setting the emulation data file. The arguments are optional.

+

7. Virtual Keyboard

+

There are two ways to use the virtual keyboard on the emulated + calculator:

+
    +
  1. by Mouse
  2. +
  3. by PC keyboard
  4. +
+

+ The easiest way to use the emulated calculator is using the mouse. The KML + script define buttons with an area where mouse input is active. The mouse + cursor change from an arrow to a hand cursor in these areas. The state of + the virtual key follow the state of your left mouse button. When the mouse + cursor leaves the virtual key area the virtual button automatically + release. In some cases you need to press more than one key on the + emulator. For these cases press the virtual key with the right mouse + button. When you release the mouse button or leave the area of the virtual + key, the key is still hold. To release all hold virtual buttons, just use + the left mouse button again. A single release of a hold virtual key isn't + possible.

+

+ Another convenient way is using the PC keyboard. The KML script language + support a large variety of commands to implement this feature. So keyboard + usage depends on your used KML script and not on the emulator. Because of + this it's impossible to say what's happen when you press a key on the PC + keyboard. For further details read the KML 2.0 documentation mentioned + before please.

+

8. File Menu

+

8.1 New...

+

Creates a new emulation session. You're asked for a new KML script + where you can select the calculator type and skin to emulate.

+

8.2 Open...

+

Opens an existing emulation session. The emulation continues at the + same position where the loaded session was aborted. Loading emulation + sessions made with a different ROM revision may destroy the memory + content or may cause other unpredictable results.

+

8.3 Save

+

Saves the current running session with the actual name.

+

8.4 Save As...

+

Saves the current running session with a new name. You're also get in + this dialog when you Exit a new session without a state file name.

+

8.5 Close

+

Closes the current session without closing the emulator.

+

8.6 Settings

+

This calls the Settings dialog. This dialog has three tabs: + General, Memory and Peripheral.

+

8.6.1 Settings General

+

8.6.1.1 Section General

+
    +
  • Authentic Calculator Speed +

    When this option is checked, the emulation speed will be similar + to the real calculator depending on the RATE control register + content.

  • +
  • Enable Virtual LCD Delay +

    Try this option for a better 4 color gray scale display simulation + output.

  • +
  • Always On Top +

    When this option is checked, the emulator window will always be the + topmost one.

  • +
  • Activation Follows Mouse +

    This option enables a X-Mouse style windows activation. When the + mouse is moved over the emulator window, the emulator is getting the + focus and popping up into foreground.

  • +
  • Single Instance +

    When this option is checked, the program is only allowed to run in + a single instance. If another running instance is detected, the detected + instance is set into foreground as active window and get a request to + change his state file to the given one by the current instance. Finally + the current instance is terminated.

  • +
  • Automatically Save Files +

    When this option is checked, the current state file will automatically + saved when you change to another state file, but not when you close the + emulator program.

  • +
  • Automatically Save Files On Exit +

    When this option is checked, the current state file will be saved + automatically at the end when the emulator program is closed.

  • +
  • Show Load Object Warning +

    When this option is checked, you'll get a warning message box when you + try to load an object with the Load Object... menu command. If + this option is unchecked, the warning will be skipped.

  • +
  • Always Show KML Compilation Result +

    When this option is checked, you see the results of the KML + (Keyboard Macro Language) interpreter at every KML script load.

  • +
+

8.6.1.2 Section Style

+
    +
  • Show Title +

    When this option is checked, the window title bar is visible.

  • +
  • Show Menu +

    When this option is checked, the menu bar is enabled. If unchecked, + the menu is accessible as context menu in the client area outside the + calculator button definitions.

  • +
+

8.6.1.3 Section Disassembler

+

Choosing the assembler syntax:

+
    +
  • HP Mnemonics +

    This is the standard syntax used by HP.

  • +
  • Class Mnemonics +

    Class (Clarke assembler) was written by Lutz Vieweg in 1991, at a time + when HP had not published their own development tools. The syntax is very + similar to the AG and STAR mnemonics used at this time. Especially + published assembler programs written for the HP28S use the similar AG + syntax.

  • +
+

8.6.2 Settings Memory

+

8.6.2.1 Section Memory Cards

+
    +
  • Port 1 is Plugged +

    When this option is checked, a 128 KB RAM card is emulated in card + Port 1. The RAM card content is saved in the current emulator state + file.

  • +
  • Port 1 is Writeable +

    When this option is checked, the RAM card in card Port 1 is + writable else the card is Read-Only by simulating the card write + protect switch.

  • +
  • Port 2 is Shared +

    When this option is unchecked, only the first instance of Emu48 + will allow you to use the RAM card in Port 2. When this option is + checked, the first instance of Emu48 will give you both read and + write access to this RAM card. If you start Emu48 in another + instance, the RAM card in Port 2 will be write-protected. Thus you + can transfer files very easily between two calculators. This RAM card + is used by both S/SX and G/GX types.

  • +
  • Port 2 is Writeable +

    This option represents the actual read/write state of the Port 2 + file. Changing the option will also change the state for the + calculator by modifying the Read-Only attribute of the file.

  • +
  • Port 2 File +

    You can add a RAM card of up to 4MB to a HP48. By default, no such + card will be created when you start Emu48. The MkShared.exe utility + will allow you to create one. To create a Port 2 RAM Card, call the + program, select the RAM Card size, enter the card file name and press + the 'Create' button. That's it. Please remember, this program replace + the destination file without any request!

    +

    If you already have a Port 2 card file in unpacked format, you + have to copy the file into the emulator directory. If you choose a + different directory you have to use a full path file name.

    +

    If you use RAM cards greater than 128 KB in a HP48SX, you can only + see the first 128 KB of the card. Please remember, the firmware of + all HP48GX versions has a bug when using a 4 MB RAM card. You always + get the message "Warning: Invalid Card Data" at startup + and Port 33 is inaccessible. This is not a bug of the emulator!

    +

    When you have created or copied the file, enter the card file + name into the Port 2 File edit box.

    +

    Please remember, all port configuration changes mostly behave + like on the original calculator. This means when you do this changes + with the emulated calculator on, it's the same like when you do this + with a real calculator on. In many times, this depends on the current + state of the calculator, this will work without any problems by doing + an automatically calculator warmstart. But for the most secure way, + switch off the emulated calculator first, please!

  • +
+

8.6.3 Settings Peripheral

+

8.6.3.1 Section Sound

+

A new implementation of the sound engine made ROM patches for sound + output obsolete. The new sound engine emulates the behavior of the beeper + output ports and only work in connection with a sound card. Using the + internal PC speaker isn't possible any more. The old beeper method with a + ROM patch is still working but deprecated, it's strongly recommended to + remove all beep patches from your current KML scripts to enable the new + sound engine. The support of the old sound implementation by a ROM patch + maybe removed in later versions of the emulator and remaining beep + patches will corrupt the ROM with an illegal opcode then. +

+

+ For the sound generation the calculator must know his own CPU strobe + frequency. On the real calculator the speed depends on various settings + like component tolerances, actual temperature, humidity and other + variables. The resulting speed is measured by the calculator firmware + at a cold- or at a warmstart and stored in the =CSPEED variable. The + content of this calculator variable has direct influence on the + resulting frequency and duration. On the emulator the HP48SX CPU + strobe frequency is set by the registry key + HKCU\Software\Emu48\Emulator\SXCycles, for all other + calculators at HKCU\Software\Emu48\Emulator\GXCycles. + For some reasons the CPU cycles are only estimated and so the + strobe frequency value in the registry is not the exact CPU strobe + frequency of the calculator in Hz divided by 16384 like in the + other emulators. Because older versions of the emulator were not + able to measure the CPU strobe frequency properly or the strobe + frequency registry content has been changed since the last + measurement, the =CSPEED variable of this session file may contain + a wrong frequency value. You easily may discover this by measuring + the real duration of a 10s beep. Is the difference to 10s less + than 1s everything is ok, if not, you should perform a + warmstart of the calculator in this + session file. Alternatively you may execute a + Reset Calculator. This recalls the measuring + routine and save the result in the speed variable. Both restart + variants purge the stack content! +

+
    +
  • Volume +

    The output volume can be selected with the Volume slider relative to + the Master Volume control. +

  • +
  • Device +

    By default the sound device is set to "Standard Audio", but + you can also manually choose the output device. The device name is + somehow cut since Window Vista, but the method of reading the device + name is used for backwards compatibility to older versions of the + Operating System. When you change the Standard Audio device in the + Operating System settings dialog, the internal device numbering may + change, and so the manually selected audio device.

  • +
+

8.6.3.2 Section Infrared Printer

+

The emulator has the ability to print data to a HP82240A/B printer + simulation. The data transfer to the printer simulator is done over UDP. + In this section you can the define the IPv4 address and the port the + printer simulator is listening. A suitable HP82240B printer simulation can + be found here.

+

8.6.3.3 Section Serial Ports

+
    +
  • Wire +

    In the Wire combo box you can select the COM port device connected + to the wire port of the calculator.

  • +
  • Ir +

    In the Ir combo box you can select the COM port device connected + to the IR port of the calculator. Please remember that the IR port + only work with 2400 baud.

  • +
+

8.7 Exit

+

Quit emulation. The default actions at finishing are defined in the + Settings dialog. If the current session is + "Untitled" you are asked for a session file name using the + Save As... dialog. If you quit the emulator + without a given filename, you're asked for choosing a KML script at + next startup.

+

9. Edit Menu

+

9.1 Load Object...

+

This is only valid for the HP48SX, HP48GX and the HP49G emulation. + You can load HP48 and HP49G binary objects to stack level 1. Therefore + the object must begin with "HPHP48-x" for a HP48 or with + "HPHP49-x" for a HP49G binary object where x can be any + alphanumeric character. If the binary header isn't present, the object + is loaded as string. Dropping HP objects over the emulator window will + also load objects. Be sure that the emulator isn't busy before doing + this.

+

9.2 Save Object...

+

This is only valid for the HP48SX, HP48GX and the HP49G emulation. + Save the current object in stack level 1 as binary object to disk.

+

9.3 Copy Screen

+

Copy the screen content as bitmap to the clipboard.

+

9.4 Copy Stack

+

This is only valid for the HP48SX, HP48GX and the HP49G emulation.

+

Copy a "Real Number", "Complex Number" or + "String" object in stack level 1 to the clipboard. On all + other objects, the command will be ignored. This prevents sending + binary objects to the clipboard.

+

The decimal point (radix mark) of "Real Numbers" in the + clipboard is equal to the calculator setting. This point maybe + important when you try to paste the numbers into a program using the + locale settings of the host operating system.

+

9.5 Paste Stack

+

This is only valid for the HP48SX, HP48GX and the HP49G emulation.

+

Paste the text field content of the clipboard to stack level 1 of + the emulated calculator. If the clipboard content is representing a + real number, the number will be saved as "Real Number" + object. Is the content a complex number object, the number will be + saved as "Complex Number" object, in all other cases as + "String" object.

+

To import "Real or Complex Numbers" from the clipboard, + the decimal point (radix mark) of the clipboard and calculator + must be equal. A real or complex number is only detected in the + case of valid real number characters in the clipboard. Especially + heading and tailing white spaces aren't valid number characters + also.

+

Complex numbers must be in the form (a,b) when using the + point radix mark or in the form (a;b) when using the comma + radix mark. The Cartesian or algebraic form a+bi is not + supported.

+

9.6 Reset Calculator

+

This emulates the Reset pin of the internal CPU.

+

9.7 Backup

+

9.7.1 Backup Save

+

This saves the current emulator status into a backup slot. If the + backup slot already contain data, it will be overwritten.

+

9.7.2 Backup Restore

+

This restores a previous saved emulator status without request. If you + changed the calculator model meanwhile, the emulator will switch back to + the old model.

+

9.7.3 Backup Delete

+

This deletes the data in the backup slot.

+

10. View Menu

+

10.1 Change KML Script...

+

This allows you to change the skin of the current emulated calculator. + In opposite to the New... command you see only scripts emulating the same + calculator model.

+

11. Tools Menu

+

11.1 Disassembler...

+

This is a simple disassembler.

+

Enter the address to disassemble in hexadecimal into the "Address + (HEX)" field and press <Return>. With the "Next Address" + button the next opcode is disassembled. With the "Copy Data" button + you can copy all selected lines inside the list box to the clipboard.

+

11.2 Debugger...

+

The assembler code debugger of the emulator. For more details refer to the + extra documentation of the debugger please.

+

11.3 Macro

+

The keyboard macro recorder unit.

+

11.3.1 Macro Record...

+

Prompts a dialog to enter the macro file for the data to record. After + accepting the confirm message, every key event is recorded into the macro + file with it's time information.

+

11.3.2 Macro Play...

+

Prompts a dialog box to ask for the keyboard macro file to play. The + replay starts immediately after selecting the file.

+

11.3.3 Macro Stop

+

Stops recording or replaying a keyboard macro file.

+

11.3.4 Macro Settings...

+

Settings for the Macro Replay mode

+
    +
  • Real +

    Replay macro with the original recording speed.

  • +
  • Manual +

    Replay macro with the speed set by the speed slider.

  • +
+

12. Help Menu

+

12.1 Help Topics

+

Call this document.

+

12.2 About Emu48...

+

The version, copyright and license message...

+

13. DDE Server

+

Emu48 has an integrated DDE server to transmit data from and to the HP + stack. Because only the HP48 and HP49 have a stack, all DDE transfers + are ignored on the other calculators. You have the same restrictions like + with the commands "Load object..." and "Save + Object...", that a running program may corrupt memory. In difference + you can choose the stack level for the transfer in the DDE item field. + Take care to transmit data only after the acknowledge of the last DDE + transaction.

+

Technical data:

+ + + + + + + + + + + + + + + + + +
Servicename:Emu48
Topicname:Stack
Item:1 (stack level)
Clipboardformat:"CF_HPOBJ" (user defined)
+

The DDE commands CONNECT, POKE and REQUEST are supported.

+

The structure of the clipboard format "CF_HPOBJ":

+ + + + + +
4 Byte (length of object, LSB first)HP object (normal HP object)
+

14. License

+

Emu48 - A HP38G/39G/40G/48SX/48GX/49G Emulator
+ Copyright (C) 2017 Christoph Gießelink

+

This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version.

+

This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details.

+

You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+
+ + diff --git a/KML_20.DOC b/KML_20.DOC index 09732ec..7bdea49 100644 --- a/KML_20.DOC +++ b/KML_20.DOC @@ -1,6 +1,6 @@ {\rtf1\ansi\ansicpg1252\deff0\deflang1031\deflangfe1031{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\fmodern\fprq1\fcharset0 Courier New;}{\f2\froman\fprq2\fcharset161{\*\fname Times New Roman;}Times New Roman Greek;}{\f3\fswiss\fprq2\fcharset0 Arial;}{\f4\froman\fprq2\fcharset2 Symbol;}} {\colortbl ;\red0\green0\blue0;\red0\green0\blue255;} -{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\nowidctlpar\qc\lang1033\f0\fs56 EmuXY and KML 2.0\par +{\*\generator Msftedit 5.41.15.1515;}\viewkind4\uc1\pard\nowidctlpar\qc\lang1033\f0\fs56 EmuXY and KML 2.0\par \pard\nowidctlpar\fs24\par \b\fs28 Introduction\b0\par \fs24\par @@ -40,8 +40,10 @@ Basics\b0\par \tab Rom STRING\par \tab Patch STRING\par \tab Bitmap STRING\par +\tab\lang1031 Icon STRING\par \tab Color INTEGER INTEGER INTEGER INTEGER\par -\tab Print STRING\par +\tab Scale INTEGER INTEGER\par +\tab\lang1033 Print STRING\par \tab Debug INTEGER\par End\par \fs20\par @@ -56,9 +58,9 @@ End\par \f0\fs24\par \pard\nowidctlpar\qj Hardware is the emulated calculator hardware. This definition is optional on Emu48. The parameter is necessary to separate the KML scripts from each emulator. Valid entries are\par \pard\nowidctlpar Emu10:\par -\f1\fs16\tab Hardware \ldblquote Bert\rdblquote\par +\f1\fs16\tab\lang1031 Hardware \ldblquote Bert\rdblquote\par \f0\fs24 Emu28:\par -\f1\fs16\tab Hardware \ldblquote Centipede\rdblquote\par +\f1\fs16\tab\lang1033 Hardware \ldblquote Centipede\rdblquote\par \f0\fs24 Emu42:\par \f1\fs16\tab Hardware \ldblquote Lewis\rdblquote\par \f0\fs24 Emu48:\par @@ -88,7 +90,7 @@ Emu10:\par \ldblquote E\rdblquote = HP39G or HP40G\par \ldblquote G\rdblquote = HP48G, HP48G+ or HP48GX\par \ldblquote S\rdblquote = HP48S or HP48SX\par -\ldblquote X\rdblquote = HP49G\cf1\par +\lang1031\ldblquote X\rdblquote = HP49G\cf1\par \pard\nowidctlpar\qj Emu71:\par \pard\nowidctlpar\fi720\qj\cf0\lang1036\ldblquote T\rdblquote = HP71B\par \pard\nowidctlpar\qj Example:\par @@ -115,14 +117,22 @@ Bitmap is the bitmap file that will be the \ldblquote faceplate\rdblquote . All \pard\nowidctlpar Example:\par \f1\fs16\tab Bitmap \ldblquote mygx.bmp\rdblquote\par \pard\nowidctlpar\qj\f0\fs24\par +Icon is an optional icon file in the icon file format that will be showed instead the emulator icon at top left of the emulator title bar and at the dialog box.\par +\pard\nowidctlpar Example:\par +\f1\fs16\tab Icon \ldblquote mygx.ico\rdblquote\par +\pard\nowidctlpar\qj\f0\fs24\par Color is an optional setting to define the transparency color of the background bitmap. It takes effect only when both, title bar and menu bar are not shown. The first integer specifies the maximum tolerance between bitmap pixel and reference for color matching followed by three integers defining the RGB numbers (Red, Green and Blue) of the transparency reference color. Each RGB number range from 0 to 255. The difference between the actual pixel and the transparency color is calculated by the formula:\par -\f2 Difference = |\'c4R| + |\'c4G| + |\'c4B| where the \'c4 are the count differences between the color parts of the pixel and \f0 the transparency reference color. The given tolerance value must be greater or equal to the calculated difference to handle this background bitmap \ul position\ulnone as transparent. Because of setting the bitmap position to transparent it\rquote s quite important that the display area in the background bitmap is not set to transparent, else the complete display area will be transparent even if the colors of the display pixel don\rquote t match with the transparency reference color.\par +\f2 Difference = |\'c4R| + |\'c4G| + |\'c4B| where the \'c4 are the count differences between the color parts of the pixel and the transparency\f0 reference color. The given tolerance value must be greater or equal to the calculated difference to handle this background bitmap \ul position\ulnone as transparent. Because of setting the bitmap position to transparent it\rquote s quite important that the display area in the background bitmap is not set to transparent, else the complete display area will be transparent even if the colors of the display pixel don\rquote t match with the transparency reference color.\par \pard\nowidctlpar Example:\par \f1\fs16\tab Color 0 255 0 0\par \pard\nowidctlpar\qj\f0\fs24\par +Scale allows to resize the background bitmap with a factor. Background bitmap dependent positions like the button definitions, the display origin and the display Zoom factor are translated to the new size. Only for the case of an external annunciator bitmap definition, the source annunciator coordinates and size information aren\rquote t translated. The first argument is the \ldblquote multiplier\rdblquote , the second the \ldblquote dividend\rdblquote of the factor.\par +\pard\nowidctlpar Example:\par +\f1\fs16\tab Scale 2 3\par +\pard\nowidctlpar\qj\f0\fs24\par Print will display a string when the KML file is loaded. You can have as many of these as necessary. They are more effective if you put them before the other settings.\par \pard\nowidctlpar Example:\par -\f1\fs16\tab Print \ldblquote My homepage is at {\field{\*\fldinst{HYPERLINK "http://hp.giesselink.com/"}}{\fldrslt{\ul\cf2 http://hp.giesselink.com/}}}\f1\fs16\rdblquote\par +\f1\fs16\tab Print \ldblquote My homepage is at http://hp.giesselink.com/\rdblquote\par \pard\nowidctlpar\qj\f0\fs24\par Debug sets the emulator to return an information message box telling the scancode number of the keyboard key pressed when the scancode number isn\rquote t defined. Valid entries are 0 or 1. One is on and Zero is off.\par \pard\nowidctlpar Example:\par @@ -133,13 +143,13 @@ Debug sets the emulator to return an information message box telling the scancod \tab This section sets where the background bitmap will be placed and the size of the emulator window.\par \par \par -\f1\fs16 Background\par +\lang1031\f1\fs16 Background\par \tab Vga INTEGER\par \tab Topbar INTEGER\par \tab Menubar INTEGER\par \tab Offset INTEGER INTEGER\par \tab Size INTEGER INTEGER\par -End\par +\lang1033 End\par \f0\fs24\par \par \pard\nowidctlpar\qj Offset is how far the top left corner of the bitmap will be offset in the window. Most of the time you should set this to 0 0. The first integer is the amount of pixels to the right and the second is that amount of pixels down.\par @@ -172,31 +182,41 @@ End\par \tab Zoomxy INTEGER INTEGER\par \tab\lang1033 Vertical INTEGER\par \tab Offset INTEGER INTEGER\par +\tab Bitmap STRING\par \tab Color INTEGER INTEGER INTEGER INTEGER\par End\par \f0\fs24\par \par -\pard\nowidctlpar\qj Zoom is the size of the pixels in the LCD screen. This command is only valid for Emu28, Emu42 (Lewis) Emu48 and Emu71 and will be ignored on Emu10 and Emu42 (Sacajawea). Valid entries are 1, 2, 3 or 4. Zoom factor two is usually used by the dot matrix LCD types emulated by Emu28, Emu42 (Lewis), Emu48 and Emu71.\par +\pard\nowidctlpar\qj Zoom is the size of the pixels in the LCD screen. This command is only valid for Emu28, Emu42 (Lewis), Emu48 and Emu71 and will be ignored on Emu10 and Emu42 (Sacajawea). Zoom factor two is usually used by the dot matrix LCD types emulated by Emu28, Emu42 (Lewis), Emu48 and Emu71.\par \pard\nowidctlpar Example:\par \f1\fs16\tab Zoom 2\par \f0\fs24\par -Zoomxy is a variant of the Zoom command only valid for Emu42 (Lewis). On Emu42 (Lewis) the High-End-Pioneer calculator series has originally a non quadratic rectangle as display pixel. The height of the pixel is normally bound to the zoom factor. But in some circumstances it\rquote s useful to adjust the height of the pixel separately from the width. The first integer is the width and the second integer is the height of the dot matrix pixel. The width integer is still limited to 1, 2, 3 or 4, but the height integer can be any positive integer number.\par +Zoomxy is a variant of the Zoom command only valid for Emu42 (Lewis) and Emu48. On Emu42 (Lewis) the High-End-Pioneer calculator series has originally a non quadratic rectangle as display pixel. The height of the pixel is normally bound to the zoom factor. But in some circumstances it\rquote s useful to adjust the height of the pixel separately from the width. The first integer is the width and the second integer is the height of the dot matrix pixel.\par Example:\par \f1\fs16\tab Zoomxy 2 3\par +\pard\nowidctlpar\qj\f0\fs24\par +Vertical is a special command only for the Pocket PC versions of Emu42 and Emu48 to rotate the display drawing by 90\'b0 anti-clockwise.\par +\pard\nowidctlpar Example:\par +\f1\fs16\tab Vertical 1\par \f0\fs24\par \pard\nowidctlpar\qj Offset sets the position of the LCD screen. The first integer is the amount of pixels right and the second is the amount of pixels down.\par \pard\nowidctlpar Example:\par \f1\fs16\tab Offset 20 20\par \f0\fs24\par -\pard\nowidctlpar\qj Color sets the color of the LCD display for different contrast settings. The first Integer is the contrast setting value. The number of setting values depends on the hardware type.\par +\pard\nowidctlpar\qj Bitmap \super (*1) \nosupersub is an optional command for including an external annunciator bitmap instead of using the annunciators in the background bitmap.\par +\pard\nowidctlpar Example:\par +\f1\fs16\tab Bitmap \ldblquote mylcd.bmp\rdblquote\par +\pard\nowidctlpar\qj\f0\fs24\par +Color sets the color of the LCD display for different contrast settings. The first Integer is the contrast setting value. The number of setting values depends on the hardware type.\par \par Emu10:\par \pard\nowidctlpar\fi720\qj 0-7 = 0 is lightest, 7 is darkest\par -\pard\nowidctlpar\qj Emu42 (Sacajawea), Emu71:\par +\pard\nowidctlpar\qj\par +Emu42 (Sacajawea), Emu71:\par \pard\nowidctlpar\fi720\qj 0-15 = foreground colors (Pixel on), 0 is lightest, 15 is darkest\par 16-31 = background colors (Pixel off), 16 corresponds to 0, 17 to 1, \'85\par -\pard\nowidctlpar\qj Emu28, Emu42 (Lewis):\par -\pard\nowidctlpar\fi720\qj 0-31 = foreground colors (Pixel on), 0 is lightest, 15 is darkest\par +\pard\nowidctlpar\qj\lang1031 Emu28, Emu42 (Lewis):\par +\pard\nowidctlpar\fi720\qj\lang1033 0-31 = foreground colors (Pixel on), 0 is lightest, 15 is darkest\par 32-63 = background colors (Pixel off), 32 corresponds to 0, 33 to 1, \'85\par \pard\nowidctlpar\qj Emu48:\par \pard\nowidctlpar\fi720\qj 0-31 = foreground colors (Pixel on), 0 is lightest, 15 is darkest\par @@ -256,8 +276,8 @@ Max\tab : max. adjustable contrast value by keyboard\par \pard\nowidctlpar\b0\par \lang1031\f1\fs16 Digit\par \tab Offset INTEGER INTEGER\par -\tab Size INTEGER INTEGER\par -\tab\lang1033 Distance INTEGER\par +\tab\lang1033 Size INTEGER INTEGER\par +\tab Distance INTEGER\par \tab Bitmap STRING\par End\par \f0\fs24\par @@ -298,10 +318,11 @@ Example:\par \pard\nowidctlpar\qj\tab Annunciators are the 23 (Emu10), 60 (Emu42 (Sacajawea)), six (Emu48), seven (Emu28, Emu42 (Lewis)) and 32 (Emu71) status icons on the screen. You must specify one of these blocks for each annunciator.\par \pard\nowidctlpar\par \par -\f1\fs16 Annunciator INTEGER\par +\lang1031\f1\fs16 Annunciator INTEGER\par \tab Size INTEGER INTEGER\par \tab Offset INTEGER INTEGER\par -\tab Down INTEGER INTEGER\par +\tab\lang1033 Down INTEGER INTEGER\par +\tab Opaque INTEGER\par End\par \f0\fs24\par \par @@ -321,15 +342,18 @@ Example:\par \pard\nowidctlpar Example:\par \f1\fs16\tab Down 16 485\par \f0\fs24\par -\b\fs28\page Button\par -\b0\fs24\par +\pard\nowidctlpar\qj Opaque, available on Emu28, Emu42 (Lewis) and Emu71, controls the visual style of an annunciator. The annunciator symbol is normally drawn with the actual pixel color on a transparent background. This default behavior was chosen to draw the annunciators inside a display area with realistic background colors. The other way is using an opaque annunciator with the advantage of using a full colored annunciator without transparency.\par +\pard\nowidctlpar Example:\par +\f1\fs16\tab Opaque 1\par +\pard\nowidctlpar\qj\b\f0\fs28\page Button\par +\pard\nowidctlpar\b0\fs24\par \tab Button sets the position of the button and what the button does.\par \par -\f1\fs16 Button INTEGER\par +\lang1031\f1\fs16 Button INTEGER\par \tab Type INTEGER\par \tab Size INTEGER INTEGER\par \tab Offset INTEGER INTEGER\par -\tab Down INTEGER INTEGER\par +\tab\lang1033 Down INTEGER INTEGER\par \tab OutIn INTEGER INTEGER\par \tab Virtual\par \tab NoHold\par @@ -456,24 +480,24 @@ Example:\par \clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx978\cellx1986\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf2\b\fs24 v\cell\cell 4\cell 5\cell 6\cell *\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx978\cellx1986\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf1\b0\fs20 5 4\cell\cell 3 4\cell 2 4\cell 1 4\cell 0 4\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx978\cellx1986\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf2\b\fs24 SHIFT\cell\cell 1\cell 2\cell 3\cell -\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 -\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx978\cellx1986\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf1\b0\fs20 5 2\cell\cell 3 2\cell 2 2\cell 1 2\cell 0 2\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 +\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx978\cellx1986\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf1\lang1036\b0\fs20 5 2\cell\cell 3 2\cell 2 2\cell 1 2\cell 0 2\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx978\cellx1986\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf2\b\fs24 C\cell\cell 0\cell .\cell =\cell +\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx978\clbrdrb\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf1\b0\fs20 0 32768\cell\cell 3 1\cell 2 1\cell 1 1\cell 0 1\cell\row\pard\nowidctlpar\cf0\f0\fs24\par \pard\nowidctlpar\qj\b\fs28\page OutIn Codes HP19BII\par \pard\nowidctlpar\par \trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 -\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx978\cellx1986\cellx2994\cellx4002\cellx5010\cellx6018\pard\intbl\nowidctlpar\cf2\f3\fs24 Key\cell\b0\cell\cell\cell\cell\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 +\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx978\cellx1986\cellx2994\cellx4002\cellx5010\cellx6018\pard\intbl\nowidctlpar\cf2\lang1033\f3\fs24 Key\cell\b0\cell\cell\cell\cell\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx978\cellx1986\cellx2994\cellx4002\cellx5010\cellx6018\pard\intbl\nowidctlpar\cf1\b\fs20 OutIn\cell\b0\cell\cell\cell\cell\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \cellx978\cellx1986\cellx2994\cellx4002\cellx5010\cellx6018\pard\intbl\nowidctlpar\b\fs16\cell\b0\cell\cell\cell\cell\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 -\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx978\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf2\b\fs24 A\cell B\cell C\cell D\cell E\cell F\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 +\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx978\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf2\b\fs24 A\cell\lang1040 B\cell C\cell D\cell E\cell\lang1033 F\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx978\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf1\b0\fs20 6 256\cell 6 2048\cell 6 64\cell 6 32\cell 6 1\cell 6 1024\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 -\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx978\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf2\b\fs24 G\cell\lang1040 H\cell I\cell J\cell K\cell L\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 +\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx978\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf2\b\fs24 G\cell H\cell\lang1040 I\cell J\cell K\cell\lang1031 L\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx978\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf1\b0\fs20 5 256\cell 5 2048\cell 5 64\cell 5 32\cell 5 1\cell 5 1024\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 -\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx978\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf2\b\fs24 M\cell N\cell O\cell\lang1036 P\cell Q\cell R\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 +\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx978\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf2\b\fs24 M\cell N\cell\lang1040 O\cell P\cell Q\cell\lang1033 R\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx978\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf1\b0\fs20 4 256\cell 4 2048\cell 4 64\cell 4 32\cell 4 1\cell 4 1024\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 -\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx978\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf2\b\fs24 S\cell T\cell U\cell V\cell W\cell X\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 -\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx978\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf1\b0\fs20 3 256\cell 3 2048\cell 3 64\cell 4 32\cell 4 1\cell 4 1024\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 -\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx978\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf2\b\fs24 Y\cell\lang1040 Z\cell ?\cell $\cell #\cell :\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 +\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx978\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf2\b\fs24 S\cell T\cell\lang1031 U\cell V\cell W\cell\lang1036 X\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 +\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx978\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf1\b0\fs20 3 256\cell 3 2048\cell 3 64\cell 3 32\cell 3 1\cell 3 1024\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 +\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx978\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf2\b\fs24 Y\cell Z\cell\lang1040 ?\cell $\cell #\cell :\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx978\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf1\b0\fs20 2 256\cell 2 2048\cell 2 64\cell 2 32\cell 2 1\cell 2 1024\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf2\b\fs24 SPACE\cell INS\cell DEL\cell\lang1033 <-\cell ->\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \clbrdrl\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf1\b0\fs20 1 2048\cell 1 64\cell 1 32\cell 1 1\cell 1 1024\cell\row\pard\nowidctlpar\cf0\f0\fs24\par @@ -492,7 +516,7 @@ Example:\par \clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx978\cellx1986\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf2\b\fs24 v\cell\cell 4\cell 5\cell 6\cell *\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx978\cellx1986\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf1\b0\fs20 3 2\cell\cell 3 128\cell 3 512\cell 3 4\cell 3 8\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx978\cellx1986\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf2\b\fs24 %\cell\cell 1\cell 2\cell 3\cell -\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 -\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx978\cellx1986\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf1\b0\fs20 5 2\cell\cell 3 2\cell 2 2\cell 1 2\cell 0 2\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 +\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx978\cellx1986\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf1\b0\fs20 2 2\cell\cell 2 128\cell 2 512\cell 2 4\cell 2 8\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf2\b\fs24 ON\cell O\cell .\cell =\cell +\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \clbrdrl\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf1\b0\fs20 0 32768\cell 1 128\cell 1 512\cell 1 4\cell 1 8\cell\row\pard\nowidctlpar\cf0\f0\fs24\par \pard\nowidctlpar\qj\b\fs28\page OutIn Codes HP20S / HP21S\par @@ -584,7 +608,7 @@ Example:\par \clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx978\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf2\b\fs24 M\cell N\cell O\cell\lang1036 P\cell Q\cell R\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx978\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf1\b0\fs20 4 256\cell 4 2048\cell 4 64\cell 4 32\cell 4 1\cell 4 1024\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx978\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf2\b\fs24 S\cell T\cell U\cell V\cell W\cell X\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 -\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx978\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf1\b0\fs20 3 256\cell 3 2048\cell 3 64\cell 4 32\cell 4 1\cell 4 1024\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 +\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx978\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf1\b0\fs20 3 256\cell 3 2048\cell 3 64\cell 3 32\cell 3 1\cell 3 1024\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx978\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf2\b\fs24 Y\cell\lang1033 Z\cell #\cell\{\cell [\cell (\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx978\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf1\b0\fs20 2 256\cell 2 2048\cell 2 64\cell 2 32\cell 2 1\cell 2 1024\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf2\b\fs24 SPACE\cell <<\cell =\cell LC\cell ALPHA\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 @@ -598,7 +622,7 @@ Example:\par \clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx978\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf2\b\fs24 SHIFT\cell <^v>\cell TRIG\cell SOLV\cell USER\cell NEXT\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx978\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf1\lang1031\b0\fs20 6 2\cell 6 128\cell 6 512\cell 6 4\cell 6 8\cell 6 16\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf2\b\fs24 ENTER\cell CHS\cell EEX\cell\lang1040 DROP\cell <-\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 -\clbrdrl\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf1\b0\fs20 6 128\cell 5 512\cell 5 4\cell 5 8\cell 5 16\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 +\clbrdrl\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx1986\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf1\b0\fs20 5 128\cell 5 512\cell 5 4\cell 5 8\cell 5 16\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx978\cellx1986\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf2\b\fs24 '\cell\cell 7\cell 8\cell 9\cell /\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx978\cellx1986\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrr\brdrw30\brdrs\clbrdrb\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf1\b0\fs20 4 2\cell\cell 4 128\cell 4 512\cell 4 4\cell 4 8\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 \clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx978\cellx1986\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx2994\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx4002\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx5010\clbrdrl\brdrw30\brdrs\clbrdrt\brdrw30\brdrs\clbrdrr\brdrw30\brdrs \cellx6018\pard\intbl\nowidctlpar\cf2\b\fs24 STO\cell\cell\lang1036 4\cell 5\cell 6\cell *\cell\row\trowd\trgaph30\trleft-30\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3 @@ -793,16 +817,16 @@ or\par \tab\tab \par \tab End\par Or\par -\tab IfMem INTEGER INTEGER INTEGER\par -\tab\tab \par +\tab\lang1031 IfMem INTEGER INTEGER INTEGER\par +\tab\tab\lang1033 \par \tab Else\par \tab\tab \par \tab End\par or\par -\tab SetFlag INTEGER\par +\tab\lang1031 SetFlag INTEGER\par or\par \tab ResetFlag INTEGER\par -or\par +\lang1033 or\par \tab NotFlag INTEGER\par or\par \tab IfFlag INTEGER\par @@ -904,7 +928,7 @@ Example:\par \b0\fs24\par \pard\nowidctlpar\qj This document was originally written by Casey Patterson for the Keyboard Macro Language made by S\'e9bastien Carlier and is now maintained by Christoph Gie\'dfelink.\par \pard\nowidctlpar\par -I\rquote m sorry, the authors can\rquote t give any individual support, try the forum at {\field{\*\fldinst{HYPERLINK "http://www.hpmuseum.org/"}}{\fldrslt{\ul\cf2 http://www.hpmuseum.org/}}}\f0\fs24 please.\par +I\rquote m sorry, the authors can\rquote t give any individual support, try the forum at http://www.hpmuseum.org/ please.\par \par \par The latest updates are available at:\par @@ -913,9 +937,10 @@ The latest updates are available at:\par \pard\nowidctlpar\fi720\b0 c.giesselink@gmx.de\par \pard\nowidctlpar\par \pard\nowidctlpar\fi720 Christoph Giesselink Main Page\par -\pard\fi720{\field{\*\fldinst{HYPERLINK "http://hp.giesselink.com/"}}{\fldrslt{\ul\cf2 http://hp.giesselink.com/}}}\f0\fs24\par +http://hp.giesselink.com/\par \pard\nowidctlpar\par \par -Release 18: May 18th, 2015\par +Release 19: August 15th, 2017\par +\par } \ No newline at end of file diff --git a/PROBLEMS.TXT b/PROBLEMS.TXT index edfff3e..727e589 100644 --- a/PROBLEMS.TXT +++ b/PROBLEMS.TXT @@ -1,4 +1,4 @@ -Known bugs and restrictions of Emu48 V1.58 +Known bugs and restrictions of Emu48 V1.59 ------------------------------------------ - the following I/O bits aren't emulated (incomplete) @@ -47,4 +47,4 @@ Known bugs and restrictions of Emu48 V1.58 - quitting the emulator while programming the flash isn't allowed, because the content of flash state machine isn't saved so far -08/16/16 (c) by Christoph Gießelink, c dot giesselink at gmx dot de +08/15/17 (c) by Christoph Gießelink, c dot giesselink at gmx dot de diff --git a/Sources/Emu48/CHANGES.TXT b/Sources/Emu48/CHANGES.TXT index 0b0948e..ad5c41a 100644 --- a/Sources/Emu48/CHANGES.TXT +++ b/Sources/Emu48/CHANGES.TXT @@ -1,3 +1,78 @@ +Service Pack 59 for Emu48 Version 1.0 + +DISPLAY.C +- splitted nGdiZoom in nGdiXZoom and nGdiYZoom to get the ability + for different zoom factors in x and y direction +- added function CreateAnnunBitmap() and DestroyAnnunBitmap(), + handle a separate annunciator bitmap +- changed function UpdateMainDisplay(), UpdateMenuDisplay(), + WriteToMainDisplay() and WriteToMenuDisplay(), modified to the + separated nGdiXZoom and nGdiYZoom zoom factors +- bugfix in function ResizeWindow(), added Critical Section for GDI + access + +EMU48.C +- changed function OnPaint(), modified to the separated nGdiXZoom + and nGdiYZoom zoom factors +- added function OnTopics() to call help file +- changed function MainWndProc(), added ID_HELP_TOPICS message + handler + +EMU48.H +- changed window style for disabled title bar, added system menu + with minimize in task bar +- extern declaration of global variables and functions + +EMU48.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 +- added Menuitem Help "Help Topics" in main menu +- 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 "Zoomxy", "Scale" and "Icon" to pLexToken[] table +- changed function InitGlobal(), added implementation of keyword + "Scale" and "Icon" +- changed function InitLcd(), adjusted keyword "Zoom" to the + separated nGdiXZoom and nGdiYZoom zoom factors, added + implementation of keyword "Zoomxy" and "Bitmap" +- changed function KillKML(), added LoadIconDefault() to disable + custom icons, added DestroyAnnunBitmap() and preset of some global + variables +- changed function DrawAnnunciator(), added alternative annunciator + bitmap +- 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_ZOOMXY, TOK_SCALE and TOK_ICON definition + +MOPS.C +- changed function Npeek() and Nread(), removed conditional jump for + speed optimization + +RESOURCE.H +- added ID_HELP_TOPICS definition + + Service Pack 58 for Emu48 Version 1.0 DDESERV.C diff --git a/Sources/Emu48/DISPLAY.C b/Sources/Emu48/DISPLAY.C index 764d8f0..a90ef1d 100644 --- a/Sources/Emu48/DISPLAY.C +++ b/Sources/Emu48/DISPLAY.C @@ -49,9 +49,11 @@ UINT nBackgroundH = 0; UINT nLcdX = 0; UINT nLcdY = 0; UINT nLcdZoom = 1; // memory DC zoom -UINT nGdiZoom = 1; // GDI zoom +UINT nGdiXZoom = 1; // GDI x zoom +UINT nGdiYZoom = 1; // GDI y zoom HDC hLcdDC = NULL; HDC hMainDC = NULL; +HDC hAnnunDC = NULL; // annunciator DC BYTE (*GetLineCounter)(VOID) = NULL; VOID (*StartDisplay)(BYTE byInitial) = NULL; @@ -68,6 +70,7 @@ static LPBYTE pbyLcd; static HBITMAP hLcdBitmap; static HBITMAP hMainBitmap; +static HBITMAP hAnnunBitmap; static DWORD Pattern[16]; static BYTE Buf[36]; @@ -265,6 +268,40 @@ VOID DestroyMainBitmap(VOID) return; } +// +// load annunciator bitmap +// +BOOL CreateAnnunBitmap(LPCTSTR szFilename) +{ + _ASSERT(hWindowDC != NULL); + VERIFY(hAnnunDC = CreateCompatibleDC(hWindowDC)); + if (hAnnunDC == NULL) return FALSE; // quit if failed + hAnnunBitmap = LoadBitmapFile(szFilename); + if (hAnnunBitmap == NULL) + { + DeleteDC(hAnnunDC); + hAnnunDC = NULL; + return FALSE; + } + hAnnunBitmap = (HBITMAP) SelectObject(hAnnunDC,hAnnunBitmap); + return TRUE; +} + +// +// destroy annunciator bitmap +// +VOID DestroyAnnunBitmap(VOID) +{ + if (hAnnunDC != NULL) + { + VERIFY(DeleteObject(SelectObject(hAnnunDC,hAnnunBitmap))); + DeleteDC(hAnnunDC); + hAnnunDC = NULL; + hAnnunBitmap = NULL; + } + return; +} + //**************** //* //* LCD functions @@ -402,7 +439,7 @@ VOID UpdateMainDisplay(VOID) } EnterCriticalSection(&csGDILock); // solving NT GDI problems { - StretchBlt(hWindowDC, nLcdX, nLcdY, 131*nLcdZoom*nGdiZoom, nLines*nLcdZoom*nGdiZoom, + StretchBlt(hWindowDC, nLcdX, nLcdY, 131*nLcdZoom*nGdiXZoom, nLines*nLcdZoom*nGdiYZoom, hLcdDC, Chipset.boffset*nLcdZoom, 0, 131*nLcdZoom, nLines*nLcdZoom,SRCCOPY); GdiFlush(); } @@ -508,8 +545,8 @@ VOID UpdateMenuDisplay(VOID) } EnterCriticalSection(&csGDILock); // solving NT GDI problems { - StretchBlt(hWindowDC, nLcdX, nLcdY+nLines*nLcdZoom*nGdiZoom, - 131*nLcdZoom*nGdiZoom, (64-nLines)*nLcdZoom*nGdiZoom, + StretchBlt(hWindowDC, nLcdX, nLcdY+nLines*nLcdZoom*nGdiYZoom, + 131*nLcdZoom*nGdiXZoom, (64-nLines)*nLcdZoom*nGdiYZoom, hLcdDC, 0, nLines*nLcdZoom, 131*nLcdZoom, (64-nLines)*nLcdZoom, SRCCOPY); GdiFlush(); } @@ -640,8 +677,8 @@ VOID WriteToMainDisplay(LPBYTE a, DWORD d, UINT s) EnterCriticalSection(&csGDILock); { - StretchBlt(hWindowDC, nLcdX+x0*nGdiZoom, nLcdY+y0*nGdiZoom, - x*nGdiZoom, (y-y0)*nGdiZoom, + StretchBlt(hWindowDC, nLcdX+x0*nGdiXZoom, nLcdY+y0*nGdiYZoom, + x*nGdiXZoom, (y-y0)*nGdiYZoom, hLcdDC, x0+Chipset.boffset*nLcdZoom, y0, x, y-y0, SRCCOPY); GdiFlush(); } @@ -804,8 +841,8 @@ VOID WriteToMenuDisplay(LPBYTE a, DWORD d, UINT s) EnterCriticalSection(&csGDILock); // solving NT GDI problems { - StretchBlt(hWindowDC, nLcdX+x0*nGdiZoom, nLcdY+y0*nGdiZoom, - (x-x0)*nGdiZoom, (y-y0+nLcdZoom)*nGdiZoom, + StretchBlt(hWindowDC, nLcdX+x0*nGdiXZoom, nLcdY+y0*nGdiYZoom, + (x-x0)*nGdiXZoom, (y-y0+nLcdZoom)*nGdiYZoom, hLcdDC, x0, y0, x-x0, y-y0+nLcdZoom, SRCCOPY); GdiFlush(); } @@ -862,8 +899,13 @@ VOID ResizeWindow(VOID) SWP_NOMOVE | SWP_NOZORDER); } - _ASSERT(hWindowDC); // move destination window - SetWindowOrgEx(hWindowDC, nBackgroundX, nBackgroundY, NULL); + EnterCriticalSection(&csGDILock); // solving NT GDI problems + { + _ASSERT(hWindowDC); // move origin of destination window + VERIFY(SetWindowOrgEx(hWindowDC, nBackgroundX, nBackgroundY, NULL)); + GdiFlush(); + } + LeaveCriticalSection(&csGDILock); InvalidateRect(hWnd,NULL,TRUE); } return; diff --git a/Sources/Emu48/EMU48.C b/Sources/Emu48/EMU48.C index 0fe546f..cb43967 100644 --- a/Sources/Emu48/EMU48.C +++ b/Sources/Emu48/EMU48.C @@ -13,7 +13,7 @@ #include "kml.h" #include "debugger.h" -#define VERSION "1.58" +#define VERSION "1.59" #ifdef _DEBUG LPCTSTR szNoTitle = _T("Emu48 ")_T(VERSION)_T(" Debug"); @@ -886,12 +886,12 @@ static LRESULT OnPaint(HWND hWindow) // redraw main display area StretchBlt(hPaintDC, nLcdX, nLcdY, - 131*nLcdZoom*nGdiZoom, nLines*nLcdZoom*nGdiZoom, + 131*nLcdZoom*nGdiXZoom, nLines*nLcdZoom*nGdiYZoom, hLcdDC, Chipset.boffset*nLcdZoom, 0, 131*nLcdZoom, nLines*nLcdZoom, SRCCOPY); // redraw menu display area - StretchBlt(hPaintDC, nLcdX, nLcdY+nLines*nLcdZoom*nGdiZoom, - 131*nLcdZoom*nGdiZoom, (64-nLines)*nLcdZoom*nGdiZoom, + StretchBlt(hPaintDC, nLcdX, nLcdY+nLines*nLcdZoom*nGdiYZoom, + 131*nLcdZoom*nGdiXZoom, (64-nLines)*nLcdZoom*nGdiYZoom, hLcdDC, 0, nLines*nLcdZoom, 131*nLcdZoom, (64-nLines)*nLcdZoom, SRCCOPY); GdiFlush(); @@ -1710,6 +1710,12 @@ static LRESULT OnToolDisasm(VOID) // disasm dialogbox call return 0; } +static LRESULT OnTopics(VOID) +{ + ShellExecute(hWnd,_T("open"),_T("Emu48.htm"),NULL,szEmuDirectory,SW_SHOWNORMAL); + return 0; +} + static LRESULT OnAbout(VOID) { if (DialogBox(hApp, MAKEINTRESOURCE(IDD_ABOUT), hWnd, (DLGPROC)About) == -1) @@ -1947,6 +1953,7 @@ LRESULT CALLBACK MainWndProc(HWND hWindow, UINT uMsg, WPARAM wParam, LPARAM lPar case ID_TOOL_MACRO_PLAY: return OnToolMacroPlay(); case ID_TOOL_MACRO_STOP: return OnToolMacroStop(); case ID_TOOL_MACRO_SETTINGS: return OnToolMacroSettings(); + case ID_HELP_TOPICS: return OnTopics(); case ID_ABOUT: return OnAbout(); } // check if command ID belongs to MRU file area diff --git a/Sources/Emu48/EMU48.H b/Sources/Emu48/EMU48.H index 4a270a7..a9336b5 100644 --- a/Sources/Emu48/EMU48.H +++ b/Sources/Emu48/EMU48.H @@ -60,7 +60,7 @@ // window styles #define STYLE_TITLE (WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_OVERLAPPED) -#define STYLE_NOTITLE (WS_POPUP|WS_CLIPSIBLINGS) +#define STYLE_NOTITLE (WS_POPUP|WS_SYSMENU|WS_MINIMIZEBOX|WS_CLIPSIBLINGS) // WM_COPYDATA identifier #define CDID_FILENAME 1 // send file name @@ -152,34 +152,38 @@ extern VOID WriteSettingsInt(LPCTSTR lpszSection, LPCTSTR lpszEntry, INT nValue) extern VOID DelSettingsKey(LPCTSTR lpszSection, LPCTSTR lpszEntry); // Display.c -extern BOOL bGrayscale; -extern UINT nBackgroundX; -extern UINT nBackgroundY; -extern UINT nBackgroundW; -extern UINT nBackgroundH; -extern UINT nLcdX; -extern UINT nLcdY; -extern UINT nLcdZoom; -extern UINT nGdiZoom; -extern HDC hLcdDC; -extern HDC hMainDC; -extern BYTE (*GetLineCounter)(VOID); -extern VOID (*StartDisplay)(BYTE byInitial); -extern VOID (*StopDisplay)(VOID); -extern VOID UpdateContrast(BYTE byContrast); -extern VOID SetLcdColor(UINT nId, UINT nRed, UINT nGreen, UINT nBlue); -extern VOID SetLcdMode(BOOL bMode); -extern VOID CreateLcdBitmap(VOID); -extern VOID DestroyLcdBitmap(VOID); -extern BOOL CreateMainBitmap(LPCTSTR szFilename); -extern VOID DestroyMainBitmap(VOID); -extern VOID UpdateDisplayPointers(VOID); -extern VOID UpdateMainDisplay(VOID); -extern VOID UpdateMenuDisplay(VOID); -extern VOID WriteToMainDisplay(LPBYTE a, DWORD d, UINT s); -extern VOID WriteToMenuDisplay(LPBYTE a, DWORD d, UINT s); -extern VOID UpdateAnnunciators(VOID); -extern VOID ResizeWindow(VOID); +extern BOOL bGrayscale; +extern UINT nBackgroundX; +extern UINT nBackgroundY; +extern UINT nBackgroundW; +extern UINT nBackgroundH; +extern UINT nLcdX; +extern UINT nLcdY; +extern UINT nLcdZoom; +extern UINT nGdiXZoom; +extern UINT nGdiYZoom; +extern HDC hLcdDC; +extern HDC hMainDC; +extern HDC hAnnunDC; +extern BYTE (*GetLineCounter)(VOID); +extern VOID (*StartDisplay)(BYTE byInitial); +extern VOID (*StopDisplay)(VOID); +extern VOID UpdateContrast(BYTE byContrast); +extern VOID SetLcdColor(UINT nId, UINT nRed, UINT nGreen, UINT nBlue); +extern VOID SetLcdMode(BOOL bMode); +extern VOID CreateLcdBitmap(VOID); +extern VOID DestroyLcdBitmap(VOID); +extern BOOL CreateMainBitmap(LPCTSTR szFilename); +extern VOID DestroyMainBitmap(VOID); +extern BOOL CreateAnnunBitmap(LPCTSTR szFilename); +extern VOID DestroyAnnunBitmap(VOID); +extern VOID UpdateDisplayPointers(VOID); +extern VOID UpdateMainDisplay(VOID); +extern VOID UpdateMenuDisplay(VOID); +extern VOID WriteToMainDisplay(LPBYTE a, DWORD d, UINT s); +extern VOID WriteToMenuDisplay(LPBYTE a, DWORD d, UINT s); +extern VOID UpdateAnnunciators(VOID); +extern VOID ResizeWindow(VOID); // Engine.c extern BOOL bInterrupt; @@ -279,6 +283,8 @@ extern BOOL GetSaveObjectFilename(LPCTSTR lpstrFilter,LPCTSTR lpstrDefExt); extern WORD WriteStack(UINT nStkLevel,LPBYTE lpBuf,DWORD dwSize); extern BOOL LoadObject(LPCTSTR szFilename); extern BOOL SaveObject(LPCTSTR szFilename); +extern BOOL LoadIconFromFile(LPCTSTR szFilename); +extern VOID LoadIconDefault(VOID); extern HBITMAP LoadBitmapFile(LPCTSTR szFilename); extern HRGN CreateRgnFromBitmap(HBITMAP hBmp,COLORREF color,DWORD dwTol); diff --git a/Sources/Emu48/EMU48.RC b/Sources/Emu48/EMU48.RC index 54eaf48..6fd24b0 100644 --- a/Sources/Emu48/EMU48.RC +++ b/Sources/Emu48/EMU48.RC @@ -114,7 +114,7 @@ BEGIN IDD_CHOOSEKML, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 188 + RIGHTMARGIN, 208 TOPMARGIN, 7 BOTTOMMARGIN, 59 END @@ -295,7 +295,7 @@ FONT 8, "MS Sans Serif" BEGIN ICON IDI_EMU48,IDC_STATIC,7,6,20,20,SS_REALSIZEIMAGE LTEXT "",IDC_VERSION,29,6,151,8,NOT WS_GROUP - LTEXT "Copyright © 2016 Christoph Gießelink && Sébastien Carlier", + LTEXT "Copyright © 2017 Christoph Gießelink && Sébastien Carlier", IDC_STATIC,29,18,181,8 DEFPUSHBUTTON "OK",IDOK,215,12,39,14 EDITTEXT IDC_LICENSE,7,33,247,112,ES_MULTILINE | ES_AUTOHSCROLL | @@ -383,18 +383,18 @@ BEGIN GROUPBOX "Serial Ports",IDC_STATIC,161,64,83,50 END -IDD_CHOOSEKML DIALOG DISCARDABLE 0, 0, 195, 66 +IDD_CHOOSEKML DIALOG DISCARDABLE 0, 0, 215, 66 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Choose Your KML Script" FONT 8, "MS Sans Serif" BEGIN - DEFPUSHBUTTON "OK",IDOK,138,7,50,14 - PUSHBUTTON "Cancel",IDCANCEL,138,27,50,14 - COMBOBOX IDC_KMLSCRIPT,7,47,181,120,CBS_DROPDOWNLIST | + DEFPUSHBUTTON "OK",IDOK,158,7,50,14 + PUSHBUTTON "Cancel",IDCANCEL,158,27,50,14 + COMBOBOX IDC_KMLSCRIPT,7,47,201,120,CBS_DROPDOWNLIST | CBS_OEMCONVERT | CBS_SORT | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_EMUDIR,7,17,106,14,ES_AUTOHSCROLL - PUSHBUTTON "...",IDC_EMUDIRSEL,113,17,10,14 - PUSHBUTTON "V",IDC_UPDATE,123,17,10,14 + EDITTEXT IDC_EMUDIR,7,17,126,14,ES_AUTOHSCROLL + PUSHBUTTON "...",IDC_EMUDIRSEL,133,17,10,14 + PUSHBUTTON "V",IDC_UPDATE,143,17,10,14 LTEXT "Emu48 Directory :",IDC_STATIC,7,7,115,8 LTEXT "Current KML Script :",IDC_STATIC,7,37,115,8 END @@ -410,9 +410,9 @@ BEGIN IDC_ALWAYSDISPLOG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, 7,146,139,14 GROUPBOX "",IDC_STATIC,7,7,287,36 - CTEXT "Title of the Script",IDC_TITLE,71,14,158,8 - CTEXT "by",IDC_STATIC,71,22,158,8 - CTEXT "The Author",IDC_AUTHOR,71,30,158,8,NOT WS_GROUP + CTEXT "Title of the Script",IDC_TITLE,7,14,287,8 + CTEXT "by",IDC_STATIC,7,22,287,8 + CTEXT "The Author",IDC_AUTHOR,7,30,287,8,NOT WS_GROUP EDITTEXT IDC_KMLLOG,7,48,287,92,ES_MULTILINE | ES_AUTOHSCROLL | ES_OEMCONVERT | ES_READONLY | WS_VSCROLL | NOT WS_TABSTOP @@ -691,8 +691,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,5,8,0 - PRODUCTVERSION 1,5,8,0 + FILEVERSION 1,5,9,0 + PRODUCTVERSION 1,5,9,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -709,12 +709,12 @@ BEGIN BEGIN VALUE "CompanyName", "Christoph Gießelink & Sebastien Carlier\0" VALUE "FileDescription", "HP38/39/40/48/49 Emulator\0" - VALUE "FileVersion", "1, 5, 8, 0\0" + VALUE "FileVersion", "1, 5, 9, 0\0" VALUE "InternalName", "Emu48\0" - VALUE "LegalCopyright", "Copyright © 2016\0" + VALUE "LegalCopyright", "Copyright © 2017\0" VALUE "OriginalFilename", "Emu48.exe\0" VALUE "ProductName", "Emu48\0" - VALUE "ProductVersion", "1, 5, 8, 0\0" + VALUE "ProductVersion", "1, 5, 9, 0\0" END END BLOCK "VarFileInfo" @@ -796,6 +796,8 @@ BEGIN END POPUP "&Help" BEGIN + MENUITEM "&Help Topics", ID_HELP_TOPICS + MENUITEM SEPARATOR MENUITEM "&About Emu48...", ID_ABOUT END END @@ -861,6 +863,8 @@ BEGIN END POPUP "&Help" BEGIN + MENUITEM "&Help Topics", ID_HELP_TOPICS + MENUITEM SEPARATOR MENUITEM "&About Emu48...", ID_ABOUT END END diff --git a/Sources/Emu48/FILES.C b/Sources/Emu48/FILES.C index d80709c..abc2ed5 100644 --- a/Sources/Emu48/FILES.C +++ b/Sources/Emu48/FILES.C @@ -874,7 +874,6 @@ restore: } if (pbyRom) { - SetWindowLocation(hWnd,Chipset.nPosX,Chipset.nPosY); Map(0x00,0xFF); } return FALSE; @@ -1440,7 +1439,7 @@ BOOL GetSaveObjectFilename(LPCTSTR lpstrFilter,LPCTSTR lpstrDefExt) InitializeOFN(&ofn); ofn.lpstrFilter = lpstrFilter; - ofn.lpstrDefExt = lpstrDefExt; + ofn.lpstrDefExt = NULL; ofn.nFilterIndex = 1; ofn.lpstrFile = szBuffer; ofn.lpstrFile[0] = 0; @@ -1449,6 +1448,19 @@ BOOL GetSaveObjectFilename(LPCTSTR lpstrFilter,LPCTSTR lpstrDefExt) if (GetSaveFileName(&ofn) == FALSE) return FALSE; _ASSERT(ARRAYSIZEOF(szBufferFilename) == ofn.nMaxFile); lstrcpy(szBufferFilename, ofn.lpstrFile); + if (ofn.nFileExtension == 0) // given filename has no extension + { + // actual name length + UINT nLength = lstrlen(szBufferFilename); + + // destination buffer has room for the default extension + if (nLength + 1 + lstrlen(lpstrDefExt) < ARRAYSIZEOF(szBufferFilename)) + { + // add default extension + szBufferFilename[nLength++] = _T('.'); + lstrcpy(&szBufferFilename[nLength], lpstrDefExt); + } + } return TRUE; } @@ -1586,6 +1598,39 @@ BOOL SaveObject(LPCTSTR szFilename) // separated stack reading part +//################ +//# +//# Load Icon +//# +//################ + +BOOL LoadIconFromFile(LPCTSTR szFilename) +{ + HANDLE hIcon; + + SetCurrentDirectory(szEmuDirectory); + // not necessary to destroy because icon is shared + hIcon = LoadImage(NULL, szFilename, IMAGE_ICON, 0, 0, LR_DEFAULTSIZE|LR_LOADFROMFILE|LR_SHARED); + SetCurrentDirectory(szCurrentDirectory); + + if (hIcon) + { + SendMessage(hWnd, WM_SETICON, ICON_SMALL, (LPARAM) hIcon); + SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM) hIcon); + } + return hIcon != NULL; +} + +VOID LoadIconDefault(VOID) +{ + // use window class icon + SendMessage(hWnd, WM_SETICON, ICON_SMALL, (LPARAM) NULL); + SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM) NULL); + return; +} + + + //################ //# //# Load Bitmap diff --git a/Sources/Emu48/KML.C b/Sources/Emu48/KML.C index e05d10a..bebd4cf 100644 --- a/Sources/Emu48/KML.C +++ b/Sources/Emu48/KML.C @@ -81,6 +81,7 @@ static CONST KmlToken pLexToken[] = {TOK_AUTHOR, 000002, 6,_T("Author")}, {TOK_BITMAP, 000002, 6,_T("Bitmap")}, {TOK_OFFSET, 000011, 6,_T("Offset")}, + {TOK_ZOOMXY, 000011, 6,_T("Zoomxy")}, {TOK_BUTTON, 000001, 6,_T("Button")}, {TOK_IFFLAG, 000001, 6,_T("IfFlag")}, {TOK_ONDOWN, 000000, 6,_T("OnDown")}, @@ -97,12 +98,14 @@ static CONST KmlToken pLexToken[] = {TOK_CLASS, 000001, 5,_T("Class")}, {TOK_PRESS, 000001, 5,_T("Press")}, {TOK_IFMEM, 000111, 5,_T("IfMem")}, + {TOK_SCALE, 000011, 5,_T("Scale")}, {TOK_TYPE, 000001, 4,_T("Type")}, {TOK_SIZE, 000011, 4,_T("Size")}, {TOK_ZOOM, 000001, 4,_T("Zoom")}, {TOK_DOWN, 000011, 4,_T("Down")}, {TOK_ELSE, 000000, 4,_T("Else")}, {TOK_ONUP, 000000, 4,_T("OnUp")}, + {TOK_ICON, 000002, 4,_T("Icon")}, {TOK_MAP, 000011, 3,_T("Map")}, {TOK_ROM, 000002, 3,_T("Rom")}, {TOK_VGA, 000001, 3,_T("Vga")}, // for PPC compatibility reasons @@ -137,6 +140,9 @@ static UINT uButtonClicked = 0; static BOOL bKeyPressed = FALSE; // no key pressed static UINT uLastKeyPressed = 0; // var for last pressed key +static INT nScaleMul = 0; // no scaling +static INT nScaleDiv = 0; + //################ //# //# Compilation Result @@ -1242,6 +1248,14 @@ static VOID InitGlobal(KmlBlock* pBlock) nCurrentClass = (UINT) pLine->nParam[0]; PrintfToLog(_T("Calculator Class : %u"), nCurrentClass); break; + case TOK_ICON: + if (!LoadIconFromFile((LPTSTR) pLine->nParam[0])) + { + PrintfToLog(_T("Cannot load Icon %s."), (LPTSTR)pLine->nParam[0]); + break; + } + PrintfToLog(_T("Icon %s loaded."), (LPTSTR)pLine->nParam[0]); + break; case TOK_DEBUG: bDebug = (BOOL) pLine->nParam[0]&1; PrintfToLog(_T("Debug %s"), bDebug?_T("On"):_T("Off")); @@ -1290,6 +1304,10 @@ static VOID InitGlobal(KmlBlock* pBlock) dwTColorTol = (DWORD) pLine->nParam[0]; dwTColor = RGB((BYTE) pLine->nParam[1],(BYTE) pLine->nParam[2],(BYTE) pLine->nParam[3]); break; + case TOK_SCALE: + nScaleMul = (INT) pLine->nParam[0]; + nScaleDiv = (INT) pLine->nParam[1]; + break; default: PrintfToLog(_T("Command %s Ignored in Block %s"), GetStringOf(pLine->eCommand), GetStringOf(pBlock->eType)); } @@ -1335,20 +1353,45 @@ static KmlLine* InitLcd(KmlBlock* pBlock) nLcdY = (UINT) pLine->nParam[1]; break; case TOK_ZOOM: - if ((nGdiZoom = (UINT) pLine->nParam[0]) == 0) - { - nGdiZoom = 1; // default zoom - } + if ((nGdiXZoom = (UINT) pLine->nParam[0]) == 0) + nGdiXZoom = 1; // default zoom // search for memory DC zoom (1-4) - for (nLcdZoom = 4; (nGdiZoom % nLcdZoom) != 0; --nLcdZoom) { }; - _ASSERT(nLcdZoom > 0); // because (nGdiZoom % 1) == 0 - nGdiZoom /= nLcdZoom; // remainder is GDI zoom + for (nLcdZoom = 4; (nGdiXZoom % nLcdZoom) != 0; --nLcdZoom) { }; + _ASSERT(nLcdZoom > 0); // because (nGdiXZoom % 1) == 0 + nGdiXZoom /= nLcdZoom; // remainder is GDI zoom + nGdiYZoom = nGdiXZoom; + break; + case TOK_ZOOMXY: + if ((nGdiXZoom = (UINT) pLine->nParam[0]) == 0) + nGdiXZoom = 1; // default zoom + if ((nGdiYZoom = (UINT) pLine->nParam[1]) == 0) + nGdiYZoom = 1; // default zoom + + // search for memory DC zoom (1-4) + for (nLcdZoom = 4; ((nGdiXZoom % nLcdZoom) | (nGdiYZoom % nLcdZoom)) != 0 ; --nLcdZoom) { }; + _ASSERT(nLcdZoom > 0); // because (nGdiYZoom % 1) == 0 && (nGdiYZoom % 1) == 0 + nGdiXZoom /= nLcdZoom; // remainder is GDI zoom + nGdiYZoom /= nLcdZoom; break; case TOK_COLOR: SetLcdColor((UINT) pLine->nParam[0],(UINT) pLine->nParam[1], (UINT) pLine->nParam[2],(UINT) pLine->nParam[3]); break; + case TOK_BITMAP: + if (hAnnunDC != NULL) + { + PrintfToLog(_T("Bitmap %s ignored."), (LPCTSTR)pLine->nParam[0]); + AddToLog(_T("Please put only one Bitmap command in the Lcd block.")); + break; + } + if (!CreateAnnunBitmap((LPCTSTR)pLine->nParam[0])) + { + PrintfToLog(_T("Cannot load Annunciator Bitmap %s."), (LPCTSTR)pLine->nParam[0]); + break; + } + PrintfToLog(_T("Annunciator Bitmap %s loaded."), (LPCTSTR)pLine->nParam[0]); + break; case TOK_END: return pLine; default: @@ -1638,6 +1681,7 @@ VOID KillKML(VOID) } UnmapRom(); DestroyLcdBitmap(); + DestroyAnnunBitmap(); DestroyMainBitmap(); if (hPalette) { @@ -1659,6 +1703,7 @@ VOID KillKML(VOID) } hRgn = NULL; } + LoadIconDefault(); bClicking = FALSE; uButtonClicked = 0; FreeBlocks(pKml); @@ -1680,9 +1725,12 @@ VOID KillKML(VOID) nBackgroundW = 256; nBackgroundH = 0; nLcdZoom = 1; - nGdiZoom = 1; + nGdiXZoom = 1; + nGdiYZoom = 1; dwTColor = (DWORD) -1; dwTColorTol = 0; + nScaleMul = 0; + nScaleDiv = 0; cCurrentRomType = 0; nCurrentClass = 0; ResizeWindow(); @@ -2076,17 +2124,22 @@ VOID RefreshButtons(RECT *rc) VOID DrawAnnunciator(UINT nId, BOOL bOn) { + HDC hDC; UINT nSx,nSy; --nId; // zero based ID if (nId >= ARRAYSIZEOF(pAnnunciator)) return; if (bOn) { + hDC = hAnnunDC != NULL ? hAnnunDC : hMainDC; + nSx = pAnnunciator[nId].nDx; // position of annunciator nSy = pAnnunciator[nId].nDy; } else { + hDC = hMainDC; + nSx = pAnnunciator[nId].nOx; // position of background nSy = pAnnunciator[nId].nOy; } @@ -2095,7 +2148,7 @@ VOID DrawAnnunciator(UINT nId, BOOL bOn) BitBlt(hWindowDC, pAnnunciator[nId].nOx, pAnnunciator[nId].nOy, pAnnunciator[nId].nCx, pAnnunciator[nId].nCy, - hMainDC, + hDC, nSx, nSy, SRCCOPY); GdiFlush(); @@ -2291,6 +2344,105 @@ VOID PlayKey(UINT nOut, UINT nIn, BOOL bPressed) //# //################ +static VOID ResizeMainBitmap(INT nMul, INT nDiv) +{ + if (nMul * nDiv > 0) // resize main picture + { + BITMAP Bitmap; + int nMode; + INT nWidth,nHeight; + UINT i; + + // update graphic + nBackgroundX = MulDiv(nBackgroundX,nMul,nDiv); + nBackgroundY = MulDiv(nBackgroundY,nMul,nDiv); + nBackgroundW = MulDiv(nBackgroundW,nMul,nDiv); + nBackgroundH = MulDiv(nBackgroundH,nMul,nDiv); + nLcdX = MulDiv(nLcdX,nMul,nDiv); + nLcdY = MulDiv(nLcdY,nMul,nDiv); + nGdiXZoom = MulDiv(nGdiXZoom * nLcdZoom,nMul,nDiv); + nGdiYZoom = MulDiv(nGdiYZoom * nLcdZoom,nMul,nDiv); + + // search for memory DC zoom (1-4) + for (nLcdZoom = 4; ((nGdiXZoom % nLcdZoom) | (nGdiYZoom % nLcdZoom)) != 0 ; --nLcdZoom) { }; + _ASSERT(nLcdZoom > 0); // because (nGdiYZoom % 1) == 0 && (nGdiYZoom % 1) == 0 + nGdiXZoom /= nLcdZoom; // remainder is GDI zoom + nGdiYZoom /= nLcdZoom; + + // update script coordinates (buttons) + for (i = 0; i < nButtons; ++i) + { + pButton[i].nOx = (UINT) (pButton[i].nOx * nMul / nDiv); + pButton[i].nOy = (UINT) (pButton[i].nOy * nMul / nDiv); + pButton[i].nDx = (UINT) (pButton[i].nDx * nMul / nDiv); + pButton[i].nDy = (UINT) (pButton[i].nDy * nMul / nDiv); + pButton[i].nCx = (UINT) (pButton[i].nCx * nMul / nDiv); + pButton[i].nCy = (UINT) (pButton[i].nCy * nMul / nDiv); + } + + // update script coordinates (annunciators) + for (i = 0; i < ARRAYSIZEOF(pAnnunciator); ++i) + { + // translate offset + pAnnunciator[i].nOx = (UINT) (pAnnunciator[i].nOx * nMul / nDiv); + pAnnunciator[i].nOy = (UINT) (pAnnunciator[i].nOy * nMul / nDiv); + + if (hAnnunDC == NULL) // no external annunciator bitmap + { + // translate down (with rounding) + pAnnunciator[i].nDx = (UINT) MulDiv(pAnnunciator[i].nDx,nMul,nDiv); + pAnnunciator[i].nDy = (UINT) MulDiv(pAnnunciator[i].nDy,nMul,nDiv); + // translate size (with rounding) + pAnnunciator[i].nCx = (UINT) MulDiv(pAnnunciator[i].nCx,nMul,nDiv); + pAnnunciator[i].nCy = (UINT) MulDiv(pAnnunciator[i].nCy,nMul,nDiv); + } + } + + EnterCriticalSection(&csGDILock); // solving NT GDI problems + { + // get bitmap size + GetObject(GetCurrentObject(hMainDC,OBJ_BITMAP),sizeof(Bitmap),&Bitmap); + + // resulting bitmap size + nWidth = MulDiv(Bitmap.bmWidth,nMul,nDiv); + nHeight = MulDiv(Bitmap.bmHeight,nMul,nDiv); + + VERIFY(nMode = SetStretchBltMode(hMainDC,HALFTONE)); + + if (nMul <= nDiv) // shrinking bitmap + { + VERIFY(StretchBlt( + hMainDC,0,0,nWidth,nHeight, + hMainDC,0,0,Bitmap.bmWidth,Bitmap.bmHeight, + SRCCOPY)); + } + else // expanding bitmap + { + // bitmap with new size + HDC hMemDC = CreateCompatibleDC(hMainDC); + HBITMAP hMainBitMap = CreateCompatibleBitmap(hMainDC,nWidth,nHeight); + HBITMAP hMemBitMap = (HBITMAP) SelectObject(hMemDC,SelectObject(hMainDC,hMainBitMap)); + + VERIFY(StretchBlt( + hMainDC,0,0,nWidth,nHeight, + hMemDC,0,0,Bitmap.bmWidth,Bitmap.bmHeight, + SRCCOPY)); + + // delete original bitmap + VERIFY(DeleteObject(SelectObject(hMemDC,hMemBitMap))); + DeleteDC(hMemDC); + } + + VERIFY(SetStretchBltMode(hMainDC,nMode)); + + GdiFlush(); + } + LeaveCriticalSection(&csGDILock); + ResizeWindow(); + } + return; +} + static KmlBlock* LoadKMLGlobal(LPCTSTR szFilename) { HANDLE hFile; @@ -2429,6 +2581,7 @@ BOOL InitKML(LPCTSTR szFilename, BOOL bNoLog) goto quit; } + ResizeMainBitmap(nScaleMul,nScaleDiv); // resize main picture CreateLcdBitmap(); PrintfToLog(_T("%i Buttons Defined"), nButtons); diff --git a/Sources/Emu48/KML.H b/Sources/Emu48/KML.H index f2d0346..ced8be5 100644 --- a/Sources/Emu48/KML.H +++ b/Sources/Emu48/KML.H @@ -32,36 +32,39 @@ typedef enum eTokenId TOK_GLOBAL, //16 TOK_AUTHOR, //17 TOK_BITMAP, //18 - TOK_OFFSET, //19 - TOK_BUTTON, //20 - TOK_IFFLAG, //21 - TOK_ONDOWN, //22 - TOK_NOHOLD, //23 - TOK_LOCALE, //24 - TOK_TOPBAR, //25 - TOK_MENUBAR, //26 - TOK_TITLE, //27 - TOK_OUTIN, //28 - TOK_PATCH, //29 - TOK_PRINT, //30 - TOK_DEBUG, //31 - TOK_COLOR, //32 - TOK_MODEL, //33 - TOK_CLASS, //34 - TOK_PRESS, //35 - TOK_IFMEM, //36 - TOK_TYPE, //37 - TOK_SIZE, //38 - TOK_DOWN, //39 - TOK_ZOOM, //40 - TOK_ELSE, //41 - TOK_ONUP, //42 - TOK_EOL, //43 - TOK_MAP, //44 - TOK_ROM, //45 - TOK_VGA, //46 - TOK_LCD, //47 - TOK_END //48 + TOK_ZOOMXY, //19 + TOK_OFFSET, //20 + TOK_BUTTON, //21 + TOK_IFFLAG, //22 + TOK_ONDOWN, //23 + TOK_NOHOLD, //24 + TOK_LOCALE, //25 + TOK_TOPBAR, //26 + TOK_MENUBAR, //27 + TOK_TITLE, //28 + TOK_OUTIN, //29 + TOK_PATCH, //30 + TOK_PRINT, //31 + TOK_DEBUG, //32 + TOK_COLOR, //33 + TOK_MODEL, //34 + TOK_CLASS, //35 + TOK_PRESS, //36 + TOK_IFMEM, //37 + TOK_SCALE, //38 + TOK_TYPE, //39 + TOK_SIZE, //40 + TOK_DOWN, //41 + TOK_ZOOM, //42 + TOK_ELSE, //43 + TOK_ONUP, //44 + TOK_ICON, //45 + TOK_EOL, //46 + TOK_MAP, //47 + TOK_ROM, //48 + TOK_VGA, //49 + TOK_LCD, //50 + TOK_END //51 } TokenId; #define TYPE_NONE 00 diff --git a/Sources/Emu48/MOPS.C b/Sources/Emu48/MOPS.C index 7c3dabe..cd1dbca 100644 --- a/Sources/Emu48/MOPS.C +++ b/Sources/Emu48/MOPS.C @@ -753,8 +753,9 @@ VOID Npeek(BYTE *a, DWORD d, UINT s) } } } - if (s-=c) {a+=c; d=(d+c)&0xFFFFF;} - } while (s); + a+=c; + d=(d+c)&0xFFFFF; + } while (s-=c); return; } @@ -843,8 +844,9 @@ VOID Nread(BYTE *a, DWORD d, UINT s) for (u=0; u