SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

xz80

An X11-based ZX Spectrum emulator

By Ian Collier <imc@prg.ox.ac.uk>

Version 0.1

Installing

A Makefile is provided. Edit the Makefile and tweak any of the configuration options. Descriptions of what they do is included in the Makefile. Then build the emulator with "make". An executable called "xz80" will be created. This may now be tested.

If necessary, copy the executable and the man file "xz80.1" into appropriate directories. Copy the Spectrum ROM file into an xz80 library directory. The man file may be read using "nroff -man xz80.1 | more" or with the "man" command.

If you have problems compiling z80.c due to lack of available memory, you may be able to pick up the object code for this file from xz80's home WWW page (address below). Currently only SGI (IRIX 5.2), Sun4 (SunOS 4.1.1) and HP_UX (not certain on the version) object files exist.

Problems have been reported with xz80 on Solaris. It seems to be OK when gcc rather than cc is used. If gcc complains about the lack of a getwd function, then define the preprocessor symbol __hpux (I think I have fixed this though). Until such time as I have access to a Solaris system, anyone with good debugging instincts is welcome to try to get xz80 to work with cc on Solaris. The function findfile() in util.c seems to be at fault.

xz80 will work with most monochrome displays. In the smallest-sized display, contrasting colours are displayed with the darker colour in black and the lighter colour in white. Halftoning is used if the scaling factor is greater than 1.

xz80 has been tested on SunOS 4.1.1, HPUX 9.01, IRIX 5.2, AIX 3.2.5 and Linux 1.2.11. If and when you succeed or don't succeed in getting it work on other platforms, please let me know. There are several areas in which xz80 could break if ported to another system. Please report all faults as accurately as possible and I will try and fix it.

A Linux console option for xz80 has been added, thanks to Russell Marks. There is a LINUXDEF symbol in the Makefile which will enable this. Unfortunately the kempston joystick emulation does not work with this option because I don't know how to translate key names to keys.

xz80 probably requires the following to be true:

unsigned char contains exactly 8 bits unsigned short contains exactly 16 bits int contains (at least) 31 bits unsigned long contains (at least) 32 bits

xz80 does not require an ANSI compiler, but if your compiler does not understand the word "signed" then you must insert -Dsigned='' into the compile flags, and things of type "char" must be signed by default. Some compilers have a flag which forces characters to be signed by default.

xz80 works best when the MIT-SHM extension is present.

ROM Files

The file "spectrum.rom" is the original Spectrum ROM, permission to distribute which has been granted by Amstrad for use with Spectrum emulators. The file "imc.rom" is an alternative, details of which are contained in the text file imcrom.txt.

Extensions to xz80

If you require an extension to xz80, please ask. I will probably give more priority to those extensions which have been requested most. :-)

If you own code which emulates extra pieces of hardware, or you would like to offer such code, please do so. I may be approaching certain people who wrote for xzx to ask for code, but please offer anyway. Please note that any such code, though copyrighted to you, may be modified and will be released under the GNU General Public License.

Licence

Attention is drawn to the following notice which is written at the top of each source file:

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., 675 Mass Ave, Cambridge, MA 02139, USA.

The GNU General Public License is written in the file called COPYING in the original distribution of this package.

Credits

This program was inspired by, and written to fix (some of) the deficiencies of, the xzx emulator by Des Herriott <dnh@mfltd.co.uk>. Several of the X routines of xz80 follow closely those of xzx. Without xzx, this emulator would probably not have been written.

Thanks to Arnt Gulbrandsen <agulbra@nvg.unit.no> for supplying and maintaining the Spectrum FTP site!

An SGS manufacturer's data sheet on the Z80 CPU was used during the writing of the emulator, and "The Complete Spectrum ROM Disassembly" by Dr Ian Logan & Dr Frank O'Hara, published by Melbourne House Publishers, was used during its testing. The Sinclair ZX Printer manual was used during the writing of the ZX printer emulation.

Ian Collier <ian.collier@comlab.oxford.ac.uk> The Queen's College
High Street
Oxford OX1 4AW
England.

Home WWW Page

http://www.comlab.ox.ac.uk/oucl/users/ian.collier/Spectrum/index.html


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.