CEF32
CEF32 For Emulator Developers Last Modification: 7-February-2008
IntroductionCEF32 is an implementation of the Computer Emulation Framework (CEF) V2.2 for Microsoft Windows 95 and later. It is distributed with several default components. This will allow developers to rapidly develop emulators for various CPUs, since CEF32 and the default components provide most of the non-CPU framework required for an emulator. This document describes the default components provided with CEF32 and also defines how the CEF32 application adds features beyond the CEF specification. CEF32 provides the TUI_Interface, TMaster_Clock, and TMaster_Assembler objects. It also serves as a reference implementation of the specification.CEF32 differences from the specificationCEF32 provides all of the features of the CEF specification, except as described in this section. Additional capabilities are also described here. The memory display is limited to 2^63 addresses instead of 2^64. The Master assembler Add_Reference and Add_Reference_Ex methods only support bit ranges that reside entirely within a single byte. Bases from 37 through 49, inclusive, are supported in addition to the CEF standard 2 through 36. CEF32 supports additional features in expressions. The following additional operators are available:
Operator |
Description |
! |
Factorial (do a factorial of the previous value) |
% |
Percentage (divide the previous value by 100) |
MOD |
Division remainder only |
MIN |
Return left side value if greater than the right side value, otherwise, return the right side value |
MAX |
Return left side value if less than the right side value, otherwise, return the right side value |
SHR |
Shift value right (value interpreted as a signed 2s complement integer) |
SHL |
Shift value left (value interpreted as a signed 2s complement integer) |
AND |
Bitwise and (value interpreted as a signed 2s complement integer) |
OR |
Bitwise or (value interpreted as a signed 2s complement integer) |
XOR |
Bitwise exclusive-or (value interpreted as a signed 2s complement integer) |
NOT |
Bitwise inversion (1's-complement of value interpreted as an integer) |
& |
Bitwise and (synonym of AND) |
| |
Bitwise or (synonym of OR) |
~ |
Bitwise complement (synonym of NOT) |
<< |
Shift value left (Synonym of SHL). |
>> |
Shift value right (Synonym of SHR). |
PI is a predefined constant equal to 3.14159265... Functions have the form: FUNCTION(expression) where expression is the value to perform the function on. Available trigonometric functions are:
Function |
Description |
TAN |
Tangent |
SIN |
Sine |
COS |
Cosine |
SEC |
Secant |
COT |
Cotangent |
CSC |
Cosecant |
ARC and Hyperbolic functions are available by prefixing the trigonometric function name with "ARC", "HYP", or "HYPARC" (eg ARCTAN and HYPARCSEC). Other functions available:
Function |
Description |
RAD |
Degree to radian conversion |
DEG |
Radian to degree conversion |
ABS |
Absolute value |
EXP |
Constant E raised to the specified power |
INT |
Integer |
LOG |
Natural logarithm |
LOG10 |
Common logarithm |
SQR |
Square root |
SGN |
Sign (returns -1 if negative, 1 if positive, or 0 if 0). |
FIB |
Fibonacci sequence |
Command-line OptionsCEF32 can be started with a command line that automatically loads an emulator (.cef) file. Passing the emulator file, preceeded by a commercial at-sign (@), causes CEF32 to load that file. The file extension is not required if it is ".cef". Example: CEF32 @Altair CEF_Util.dll This DLL implements the CEF Utilites Specification. It is used by several of the included components. Supplied Standard Components The following components are provided with CEF32 for the benefit of emulator developers. Use of these components is not required, but can save development time.
Alphabetical list of Components:Altair 8800System hardware environment for the MITS Altair 8800 and IMSAI 8080 micro-computers.
Apple II KeyboardKeyboard that uses an Apple II keyboard layout.
ASR33 KeyboardKeyboard that uses an ASR-33 teletype keyboard layout.
CEF ClockThis is the default master clock component for CEF32.
CEF Generic 4M memory4 Mb of infinitely fast static RAM.
CEF Generic 64K memory16-bit-address (64Kb) static RAM.
CEF Generic Front PanelA generic "front panel", with LEDs for address and data.
CEF Generic memory64-bit-address RAM.
CEF Generic Serial CableA generic serial cable component. It maintains the states and signals.
CEF ScreenMemory-mapped screen.
CEF Z80Micro-processor emulator that can operate in 8080, 8085, or Z80 modes.
Cosmac ElfSystem hardware emulator for the Cosmac Elf microcomputer.
DEC DL11A DEC KL11/DL11 serial interface board.
DEC DL11WDEC DL11-W line clock
DEC EAEEmulates a DEC KE11-A Extended Arithmetic Element (EAE)
Fairchild 3850/3853Micro-processor emulator for the Fairchild 3850 CPU with the 3853 SMI.
IMM860Emulates an Intel Imm8-60 serial I/O board.
Intel 8008Emulates an Intel 8008 8-bit microprocessor.
Intellec8Intellec8 8-bit microcomputer front-panel.
LA120 KeyboardKeyboard that uses a DEC LA120 (DECWriter III) keyboard layout.
LK201 KeyboardKeyboard that uses a DEC LK201 keyboard layout.
MITS 88-SIOAn S-100 bus MIT 88-SIO board. It consists of two physical ports, the first is the I/O status, and the second is the I/O latch.
NullThis is a null component, which performs no functions.
PC 108-key KeyboardA 108-key keyboard in standard PC layout.
PDP-11CPU emulator that can operate as a PDP-11/05, PDP-11/10, PDP-11/15, PDP-11/20, or PDP-11/34.
RCA CDP1802Emulates the RCA CDP1802/1806 microprocessors.
SOL-20System hardware environment for the Processor Technology SOL-20 personal computer.
SOL-20 KeyboardThis is a keyboard that uses a PT SOL-20 keyboard layout.
TRS80 Model I KeyboardKeyboard that uses a TRS-80 Model I keyboard layout.
UNIBUSA UNIBUS front-panel and configuration support for peripherals.
VDM1 ScreenVideo and screen.
VT05Simple video terminal, emulating a "glass teletype", the DEC VT05, and the DEC VT50.
VT05 KeyboardKeyboard that uses a DEC VT05 keyboard layout.
VT100 KeyboardKeyboard that uses a DEC VT100 keyboard layout.
VT52DEC VT52 terminal with emulation options for VT50, VT05, and glass teletype.
VT52 KeyboardKeyboard that uses a DEC VT52 keyboard layout.
Emulators The following emulator files provide complete machine emulation for various systems: Altair.cef A MITS Altair 8800/IMSAI 8080 emulator with front panel, 64K of RAM, 1 88-SIO S-100 serial port (expandable to 127 serial ports), and 8080 CPU. Contains a port manager for easily adding/removing serial ports and connetting them to cable components.
Cosmac_elf.cef A Cosmac Elf emulator, as described in the August 1976 issue of Popular Electronics.
Intellec8.cef This component emulates an Intel Intellec8 microcomputer with an 8008 CPU, 16 Kb of RAM, and an Imm8-60 serial interface connected to a VT05.
PDP11.cef A DEC PDP-11/34 emulator, comprised of a PDP-11/34 CPU, 124 Kb RAM, 1 DL11-W serial interface, and a VT05 system console.
Sample emulators The following files are provided with CEF32 as examples. F8.cef A sample emulator file that configures a Fairchild 3851/3853 CPU and 64 Kb of RAM.
SOL20.cef A sample emulator file for the Processor Technology SOL-20 computer. It references a non-existent ROM file, but appears to work if you provide a valid ROM image.
TRS80.cef A sample emulator file. It references non-existent files, but serves as an example of an emulator file.
Fonts The following font files are provided with CEF32. 6574.c 5x7 alphanumeric font.
6575.c 5x7 alphanumeric font.
vt52.c Font for DEC VT52 terminal.
vt52g.c Font for DEC VT52 terminal in graphics mode.
Emulator Script Files CEF32 can load CEF emulator definition files which automatically marshal the appropriate components to emulate a specific machine. These files have a default extension of .cef. See the included sample *.cef files for examples of the format of these files. In addition to the commands described in the CEF specification, several others are added. The following list is a comprehensive and complete list. The valid commands are:
Command |
Description |
ASCII |
Show text in memory display as ASCII. |
BYTE |
Show default data size to 1 byte. |
CAPTION x |
Set CEF caption to x. |
CONNECT x y |
Connect component named x to component named y. Component y is connected to the output of x. Both components must be loaded. If the names contain spaces, they should be enclosed in quotes. |
DISCONNECT x y |
Disconnect component named x from component named y. If the names contain spaces, they should be enclosed in quotes. |
DOUBLE |
Convert default data size to double long integer (8 bytes). |
EBCDIC |
Show text in memory display as EBCDIC. |
HIDE |
Hide the CEF application. |
HIGH x |
Set highest valid memory address to x. |
IMMEDIATE x |
Execute command x in immediate mode. If x contains spaces, it must be enclosed in quotes. |
LOAD x {y}
|
Load component from DLL named x. Optionally a command line can be passed to the component as y. If the command line contains spaces, it must be enclosed in quotes. "/NAME=z" may be appended to the end of the line, where z is the name by which this component will be referenced. |
LONG |
Set default data size for long integer (4 bytes). |
LOW x |
Set lowest valid memory address to x. |
RADIX |
Sets default base for numbers (2 through 49). |
RUN |
Starts execution of the (default) CPU. |
SIGNED |
Sets the default display of numbers to be signed. |
UNLOAD_ALL |
Removes all loaded components. |
UNLOAD x |
Removes component named x. If x contains spaces, it must be enclosed in quotes. |
UNSIGNED |
Sets the default display of numbers to be unsigned. |
WORD |
Sets default data size to word (2 bytes). |