Chapter 4. MC14500 Simulator

The MC14500 simulator uses web technology and javascript to be platform independent and be usable also in the future. A drawback of this implementation is that the javascript simulator can not access the users file-system or hardware.

The simulator runs on browsers with good svg support. The simulator uses the hardware architecture as shown in the following svg figure.

Figure 4.1. MC14500 Simulator

MC14500 Simulator


Pressing the "Step" button means falling clock edge and therefore the MC14500 loads the instruction and input data.

Releasing the "Step" button means rising clock edge and therefore MC14500 writes data. The program counter increases. After the program memory access time, the next instruction and IO-address appears at the MC14500 and the Outputs, Inputs or RAM.

The simulator consists of 3 files:

  1. index.html is the web page to be opened in a browser. It then loads two javascript files. It contains the svg graphic as shown above that is modified using the javascript files.

  2. mc14500.js is the simulator that runs the program and alters the svg graphics in the index.html page.

  3. program.js holds the program to be run.

The simulator can be stored on web server as it is under https://www.linurs.org/mc14500sim/index.html but it can also run from a local directory.

To run an other program, simply use the mc14500gui.py to create html. Then open the created html file in a web browser. There will be a link as https://www.linurs.org/mc14500sim/index.html?rom=60A0B011328821425880117281C0&program=xnor&ilsb=False&iowidth=4&pcwidth=8&endian=little that points to the default web server including the program to be used.

Alternatively produce a <name>.js file. Then rename it to program.js or better create a link ln -s <name>.js program.js program.js

Important

The simulator supports ilsb True or False but has a fixed iowidth=4, pcwidth=8 and endian=little.


Linurs startpage