Z80 Emulator/Test Pod
The emulator is a separate hardware addition which plugs into the front of the tester. By using this, full control of the PCB under test can be achieved including software development. Currently the Z80 microprocessor is supported and the emulator contains a fully functional Z80A on board.
The emulator is plugged into the PCB's Z80 socket by use of a 40 pin header or adapter PCB. It is powered from the 5V available on the PCB under test.
The emulator also has built in 32K of static RAM with battery back up. This RAM is selectable in blocks from 2K (2048 bytes) to the full 32K and when a block is selected, the memory is shadowed over a similar sized block of ROM space on the PCB. Whatever block size is selected, the RAM will always start at address 0000h. This is vital for Z80 operation. The RAM can be disabled if required.
Current block sizes selectable are 2K, 4K, 8K, 16K and 32K.
The Emulator can allow the original PCB to run its on board code in normal real time or the code can be run in a slow motion mode which is approx 10%. There is also a facility to freeze the code by clicking a button and also a method of stopping the code so the AR81 can interrogate the PCB as normal. There is also a RESET function which will allow the PCB to be placed in a reset state whenever required.
When the Emulator is enabled, the PCB under test will function exactly as if the processor has not been removed.
You must be Running Tester Version 1.80 or Higher and A.O.S 2.34 (Mark 1) or 1.03 (Mark 2.0/2.1)
Extra Jumpers on POD
3 Provided Extra Jumpers are required to Operate the Z80 Emulator
- Pin B2 goes to Pin 17
- Pin B15 goes to Pin 16
- Pin B16 goes to Pin 25
As shown in Picture bellow
RAM Select DIP Switch
The DIP Swicth settings for the RAM chip are as follows
- U = Enabled (UP)
- D = Disabled (DOWN)
- E = Either (depends on Function Required)
- BLANK = Doesn't Matter
Please Note: SW6 Write protect only stops the RAM being written to, it can still be Read from when its active (SW5 ON). SW5 RAM Enable will only activate the other DIPS when ON, In the OFF Position the other DIPS will have no active function.
Using the Emulator
There a two ways to use the emulator and both ways will allow different functions to be performed. Both methods are described below.
Emulator Operation – Command Line.
When the emulator is first powered up, it will be placed in a disabled state which means that the Z80 will be active but held in a non-active mode. The PCB under test will hence not run and no bus activity will be present.
When this is the case, the LED on the emulator board will be on, indicating that the PCB under test can be controlled by the usual tester functions such as RAMTEST etc.
To enable the emulator, simply type RUN into the Main Test Window on the tester. This command will place the emulator into the RUN mode. The LED will go out and the PCB under test will start running. Sometimes the reset will not always start the PCB correctly so by typing RESET into the Main Test Window, a forced reset can be done which will start the PCB running. Note both these commands can be upper or lower case.
When the emulator is placed in a RUN mode, no control of the PCB by the tester is possible and the tester can only operate Read Only operations such as reading data etc. Some buttons and features are disabled and an error will be given if an attempt to run them is done. This is normal.
To slow the PCB operation down, type SLOW into the Main Test Window. This will slow the PCB down to approx 10% of its normal speed.
If the PCB has to be stopped, PAUSE can be entered. This will place the emulator into a Wait State and keep it active but the PCB will freeze in operation. The LED on the emulator will be off to indicate that no control by the tester is possible.
If STOP is entered, the emulator will be disabled and the PCB will stop at whatever point it was in the code. The LED will come on and full tester control will resume.
Emulator Operation – Full Emulator Mode.
Operating the emulator in the Full Emulator Mode allows all the above features plus more.
To enter the Full Emulator Mode, type EMULATOR into the Main Test Window. Again upper and lower case can be used.
Once the command is entered, the emulator will initialise whereby it calculates a ROM space and sets up various files. After a few seconds, it will be ready and the buttons on the Main Test Screen will change to ones for the emulator.
If the PCB under test does not have any power or a clock signal, then the emulator will not start. An error will be given to indicate this.
The buttons at the bottom of the screen will allow the basic operation as in the earlier emulator mode described. Simply click the button required and the emulator will be controlled.
At the top of the screen, the buttons allow more advanced features. These are described below.
Resd ADDR & Read DATA
These buttons will simply return the address and the data that the emulator is set to. Note the address the emulator is set to is dependant on the Z80 and the code. The tester or user cannot alter this when the emulator LED is on. The Z80 will always start operation at 0000h after a reset cycle.
The Reset button will send reset cycle to the Z80 whenever it is clicked. Each time this happens, the Z80 and emulator will start operation at address 0000h.
The CODE button will open a separate window to display program code. This can be turned on and off by clicking the button. When selected, the button will be highlighted.
Note the code window cannot be changed when the emulator is enabled, ie when the LED is on.
To change the code window, first STOP the emulator by clicking STOP button.
To load the code window, the Disassembler must be used. Type in the address of the first line of code into the ADDR box and the press WRITE ADDR. After this, set the path and filename if required or simply enter DIS and the number of bytes. The resultant code will be loaded into the normal Main Test Window but also it will be listed in the CODE window. Each time DIS is used, the CODE window will be cleared and reloaded.
If RESET is pressed after loading the CODE window, the first line will be highlighted in BLUE indicating the code is ready and not been processed.
The STEP +1 button will allow the PCB program or loaded code to step one instruction at a time. The emulator must be placed in a WAIT mode first and the reset performed. If reset is not performed, the code will step from where it left off.
Each time the step is run, the highlighted line in the CODE window will be shown in GREEN indicating it is getting processed. Once complete, the line will turn YELLOW.
All code run will be displayed in the Main Test Window of the tester as well plus the current Address will be updated in the ADDR box.
The STEP BYTES button will allow the code to be stepped multiple times without clicking the button. Enter the amount of instructions to execute in the BYTES box.
When the emulator is running the steps, the tester cannot be operated until the final instruction is completed.
BRK Point Set
This button allows an address to be set within the code that will stop the STEP BYTES or STEP +1 routines when it is reached. The CODE window, if selected, will show the address in RED when it is reached and a tone will be generated to indicate this.
To enter a Break Point, type the address into the ADDR box and simply click BRK POINT SET button. This can be done when the emulator is in the WAIT MODE or disabled by clicking STOP. When a break point is set, the BRK POINT SET button will be highlighted.
BRK Point Clr
By clicking this button, the Break point ad