README
This commit is contained in:
88
README
Normal file
88
README
Normal file
@@ -0,0 +1,88 @@
|
||||
______ ______ ______
|
||||
/\___ \ /\ __ \ /\ \
|
||||
\/__/ /__\ \ __ \\ \ \ \
|
||||
/\_____\\ \_____\\ \_____\
|
||||
Zilog \/_____/ \/_____/ \/_____/ CPU Emulator v0.1
|
||||
Copyright (C) 1999-2018 Manuel Sainz de Baranda y Goñi <manuel@zxe.io>
|
||||
|
||||
This is a very accurate Z80 emulator that I wrote many years ago. It is fast and
|
||||
small, easy to understand and the code is profusely commented.
|
||||
|
||||
|
||||
Building
|
||||
========
|
||||
|
||||
You must first install Z <http://zeta.st>, a header-only library that provides
|
||||
types and macros. This is the only dependency, the emulator does not use the
|
||||
standard C library or its headers, nor does it need to be dynamically linked
|
||||
against any library. Then add Z80.h and Z80.c to your project and configure
|
||||
your build system so that the compiler predefines the CPU_Z80_STATIC and
|
||||
CPU_Z80_USE_LOCAL_HEADER macros when compiling your sources.
|
||||
|
||||
If you preffer to compile the emulator as a library, you can use premake4:
|
||||
|
||||
$ cd building
|
||||
$ premake4 gmake # generate Makefile
|
||||
$ make help # list available targets
|
||||
$ make [config=<configuration>] <target> # build the emulator
|
||||
|
||||
There is also an Xcode project in "development/Xcode" with several targets:
|
||||
|
||||
dynamic
|
||||
Shared library.
|
||||
|
||||
dynamic-module
|
||||
Shared library with a generic module ABI to be used in modular multi-machine
|
||||
emulators.
|
||||
|
||||
static
|
||||
Static library.
|
||||
|
||||
static-module
|
||||
Static library with a generic CPU emulator ABI to be used in monolithic
|
||||
multi-machine emulators.
|
||||
|
||||
|
||||
Code configuration
|
||||
==================
|
||||
|
||||
There are some predefined macros that control the compilation:
|
||||
|
||||
CPU_Z80_DEPENDENCIES_H
|
||||
If defined, Z80.h will #include only this header as dependency. If you don't
|
||||
want to use Z, you can provide your own header with the types and macros
|
||||
used by the emulator.
|
||||
|
||||
CPU_Z80_BUILD_ABI
|
||||
Builds the generic CPU emulator ABI.
|
||||
|
||||
CPU_Z80_BUILD_MODULE_ABI
|
||||
Builds the generic module ABI. This macro also enables CPU_Z80_BUILD_ABI, so
|
||||
the generic CPU emulator ABI will be built too. This option is intended to
|
||||
be used when building a true module loadable at runtime with dlopen(),
|
||||
LoadLibrary() or similar. The ABI module can be accessed via the weak symbol
|
||||
__module_abi__.
|
||||
|
||||
CPU_Z80_HIDE_ABI
|
||||
Makes the generic CPU emulator ABI private.
|
||||
|
||||
CPU_Z80_HIDE_API
|
||||
Makes the public functions private.
|
||||
|
||||
CPU_Z80_STATIC
|
||||
You need to define this to compile or use the emulator as a static library
|
||||
or if you have added Z80.h and Z80.c to your project.
|
||||
|
||||
CPU_Z80_USE_ABI
|
||||
Tells Z80.h to declare the prototype of the CPU emulator ABI.
|
||||
|
||||
CPU_Z80_USE_LOCAL_HEADER
|
||||
Use this if you have imported Z80.h and Z80.c to your project. Z80.c will
|
||||
#include "Z80.h" instead of <emulation/CPU/Z80.h>.
|
||||
|
||||
|
||||
Use in Non-Free / Proprietary Software
|
||||
======================================
|
||||
|
||||
This library is released under the terms of the GNU General Public License v3,
|
||||
but I can license it for non-free projects if you contact me.
|
||||
Reference in New Issue
Block a user