From 42cab8c25a46e225f5dcdedf1f9c2d66f6ef3a89 Mon Sep 17 00:00:00 2001 From: redcode Date: Fri, 2 Nov 2018 08:26:57 +0100 Subject: [PATCH] README --- README | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 README diff --git a/README b/README new file mode 100644 index 0000000..4d5e80c --- /dev/null +++ b/README @@ -0,0 +1,88 @@ + ______ ______ ______ + /\___ \ /\ __ \ /\ \ + \/__/ /__\ \ __ \\ \ \ \ + /\_____\\ \_____\\ \_____\ +Zilog \/_____/ \/_____/ \/_____/ CPU Emulator v0.1 +Copyright (C) 1999-2018 Manuel Sainz de Baranda y Goñi + +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 , 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=] # 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 . + + +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.