J80 Documentation 1.00

J80 is one Z80 Emulator written in JAVA with included a standard BIOS for complete Microcomputer with working CP/M 2.2, CP/M 3.0 and one simple ZX Spectrum 48/128K emulator. The spectrum 128K version emulation is not complete but working. The best gol of this emulator is that the 'hardware' is build on the fly reading the configuration form one file in this way is very simple add new peripheral or features.  J80 is "hardware compatible" with YAZE another Z80 emulator written in C. For any bug or suggestion email me at  mario@viara.cn

Major Changes

Date
Revision
Description
10 July 2004
1.0
Added support for Zenith Z19 terminal.
1 Jan 2004
0.0
First public release.

 Installation

The standard distribution form is one packaged named J80-XXX.tar.gz where XXX is the version number (Es. J80-0.0-alpha.tar.gz) extract the packaged in one new directory using tar  or tar and gzip set the appropriate PATH and CLASSPATH for your virtual machine. Add the directory XXX/bin to your PATH and the file XXX./j80.jar to your CLASSPATH

Directory structure of installed J80


Path
Description
XXX
Contains rom images, configuration and jar archive.
XXX/biin
Contains JNI dll and batch file
XXX/images
Contains standard CP/M disk images
XXX/doc
Contain the documentation
XXX/*.conf
J80 configuration files
XXX/z80
Various Z80 snapshot for spectrum emulator.

Win32 example

This example assume J80 installed in C:\j80-0.0 and Java 2 installed in c:\jdk1.22

SET PATH=%PATH%;c:\jdk1.22\bin;C:\j80-0.0\bin

SET CLASSPATH=%CLASSPATH%;c:\j80-0.0\j80.jar

Running J80

After the installation you can start J80 with the default configuration just typing : java J80.j80 if the Java environment is correctly configured the emulator start and load CP/M 3.0 with 4 disk image.

A:  Is mapped to the operating system utilities
B:  Is mapped to the famous CP/M games LADDER
C:  Is mapped to the Word star 3.0


J80 configuration

J80 is configured via one text configuration file named j80.conf (also it is possible specify a different configuration file on the command line) the configuration have this format. par=string[,op1,op2...,opn] Any line beginning with # is a remark.

Where par is the parameter name,string is the parameter value and the op1,op2…opn are optional parameters separated by comma.

Configuration parameter

Parameter
Description

mhz=frequency

Specify the frequency in Mhz of the emulated J80.

crt=class

Specify the class used for the physical CRT emulation J80 have the following standard CRT implementation :

j80.vdu.GraphicsCRT            Swing implementation     

j80.vdu.ttyCRT                     Console implementation (require one JNI dll this version only support WIN32 of WINNT/WIN2000)

peripheral=class,[method,value]

The specified class , implementing the class j80.Peripheral ,is loaded from the emulator and initialized the only required class is the j80.MMU , the memory manager. The option method,value if present are method of the class with integer or string argument

diskimage=unit,filename,sector

Define one FD/HD unit (the peripheral j80.FDC must be loaded) Unit is the unit 0 to 15, filename is the image filename and sector is the number of 128 byte sector for track.

diskdir=unit,directory

Define one FD/HD unit from one existing directory the disk is mounted RW but any modification made from CP/M wull be lost when the emulator terminate. Unit is the unit 0 to 15, directory is the directory that will be mounted on the first access.

load=filename,offset


The binary file filename will be loaded at the offset specified of the emulator, the peripheral j80.MMU must be loaded. Normally this is the last parameters and load the Eprom loader for the operating system.

snapshot=filename


Load a snapshot in to the Z80 memory, one snapshot peripheral is required. Es. j80.spectrum.S


J80 have the following standard peripheral

Class

Description

J80.CharDevice

Define one new character devices like one printer. The standard BIOS expect LPT: on port 3 and AUX: on port 4.

J80.vdu.SampleVDU

DUMP terminal implementation require the parameter crt=class present before.

J80.vdu.Hazeltine1500

Complete terminal emulation of Hazeltine1500.

J80.vdu.Z19

Zenith Z19 terminal emulator (only native mode)

J80.FDC

Standard HD/FDC controller.

j80.mmu.PlainMMU

Standard 64K memory manager unit implementation.

J80.mmu.BankMMU

Banked  1024KB Memory required for CPM3 and ZPM3

J80.Spectrum48K

Complete ZX spectrum 48K peripheral. also is required  load=rom/spectrum.rom,0

J80.Spectrum128K 

Complete ZX  spectrum 128K peripheral also is required : load=rom/128a.rom,0 and  load/128b.rom,0

 




J80 Microcomputer emulator

 

The J80 in the default configuration emulate one complete Z80 microcomputer compatible with the BIOS of the YAZE emulator (see http://www.mathematik.uni-ulm.de/users/ag/yaze-ag/)

 

BIOS Configuration

Default configuration of the BIOS.

 

Hard Disk

Unit

Type

Size

Remark

0

IBM3270

253 KB

Default boot disk

1

IBM3270

253 KB

 

2

Hard disk

4 MB

Image disk or directory

3

Hard disk

4 MB

Image disk or directory

 

 

Z80 input output port map

Port

Dir

Class

Description

0

R

j80.vdu..SampleVDU

Read the console status
00 – No keyboard char available
FF – Keyboard char available

1

R

J80.vdu.SampleVDU

Read next keyboard char

1

W

J80.vdu.SampleVDU

Write one character to the console

3

W

J80.CharDevice

Write one character to the printer (LST: device)

4

W

J80.CharDevice

Write one character to the auxiliary device (AUX:)

10

W

j80.FDU

Select drive 0 – 15

11

W

j80.FDU

Track low byte

12

W

j80.FDU

Track hi byte

13

W

j80.FDU

Sector 1-255

14

W

j80.FDU

FDC Command (0 READ , 1 WRITE)

15

R

j80.FDU

The first read after one write on port 14 return the status of the command (0 SUCCESS, 1 ERROR) any other ready return 0 if the disk is ready.

16

W

j80.FDU

Dma low byte

17

W

j80.FDU

Dma hi byte

20

W

j80.mmu.BankMMU

Page low byte

21

W

j80.mmu.BankMMU

Page hi byte

22

W

j80.mmu.BankMMU

Page frame

255

W

j80.vdu.SampleVDU

Terminate the emulator

 

 

 

 

 

 

 

 

 

J80 ZX Spectrum emulator

Start the ZX Spectrum

 

To start the Spectrum emulator is necessary start-up j80 using spectrum.conf configuration file.  java J80.j80 spectrum.conf the emulator can emulate Spectrum 48K or 128K for more details see the configuration file. This version the sound emulation is not correct and use the deprecated class sun.audio.*

 

Default configuration

 

The j80 package contains this configuration (.conf files) :

File name

Description

J80.conf

Default configuration

Cpm2.conf

Selectable from j80.conf to start CP/M 2.2

Cpm2.conf

Selectable from j80.conf to start CP/M 3.0

Zpm3.conf

Selectable from j80.conf to start ZPM 3.0

Spectrum.conf

Spectrum 48 K configuration.

 

The CP/M Disk utility

The j80.CpmUtil implements a sample program for transfer file from and to the host file system and CP/M disk image. The tools is like a ftp client program and permit to get/put/delete file and format new CP/M disk. The documentation at moment is not completed please try online help, the program don’t make any check on input use it carefully