From a3124243d36a5729304fd2822efca8c96a6f5c6f Mon Sep 17 00:00:00 2001 From: patacongo Date: Mon, 31 Dec 2007 14:26:49 +0000 Subject: Add z80sim info git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@471 42af7a65-404d-4744-a932-0658087f49c3 --- misc/sims/README.txt | 35 +++++++++++++++++++++++++++++++++++ misc/sims/z80sim/README.txt | 24 ++++++++++++++++++++++++ misc/sims/z80sim/src/Makefile | 27 +++++++++++++++++---------- misc/sims/z80sim/src/Z80-081707.zip | Bin 29532 -> 0 bytes misc/sims/z80sim/src/main.c | 7 ++++++- 5 files changed, 82 insertions(+), 11 deletions(-) create mode 100644 misc/sims/README.txt create mode 100644 misc/sims/z80sim/README.txt delete mode 100644 misc/sims/z80sim/src/Z80-081707.zip (limited to 'misc/sims') diff --git a/misc/sims/README.txt b/misc/sims/README.txt new file mode 100644 index 000000000..a7a902e59 --- /dev/null +++ b/misc/sims/README.txt @@ -0,0 +1,35 @@ +README.txt +^^^^^^^^^^ + +This directory contains instruction set simulators that were +used to verify NuttX and which are not readily available elsewhere. + +These tools were cobbled together using bits and pieces of software +from all over the internet. Licensing is unknown and you are +certainly at risk if you distribute these in a commercial product. +My recommendation: For your personal use only. + +z80sim +^^^^^^ + + This is an emulator for the Z80 instruction set. It is based + on the instruction set emulator by Marat Fayzullin but has + been extended to load Intel hex format files as produced by + the SDCC toolchain. + + Sources and licensing + ^^^^^^^^^^^^^^^^^^^^^ + + Marat Fayzullin's Z80 instruction set simulator is available + here: http://fms.komkon.org/EMUL8/ . Licensing information + is available at that site as well. I am not permitted to + distribute that package on the internet, but the Makefile + will automatically download the package. + + Most of the Intel hex logic was copied from some + http://www.pjrc.com/tech/8051/pm2_docs/intel-hex.html . + Licensing requires only that I include the authors name + (Paul Stoffregen) and contact information (paul@ece.orst.edu) + in the source code. + + diff --git a/misc/sims/z80sim/README.txt b/misc/sims/z80sim/README.txt new file mode 100644 index 000000000..2c813510d --- /dev/null +++ b/misc/sims/z80sim/README.txt @@ -0,0 +1,24 @@ +z80sim +^^^^^^ + + This is an emulator for the Z80 instruction set. It is based + on the instruction set emulator by Marat Fayzullin but has + been extended to load Intel hex format files as produced by + the SDCC toolchain. + + Sources and licensing + ^^^^^^^^^^^^^^^^^^^^^ + + Marat Fayzullin's Z80 instruction set simulator is available + here: http://fms.komkon.org/EMUL8/ . Licensing information + is available at that site as well. I am not permitted to + distribute that package on the internet, but the Makefile + will automatically download the package. + + Most of the Intel hex logic was copied from some + http://www.pjrc.com/tech/8051/pm2_docs/intel-hex.html . + Licensing requires only that I include the authors name + (Paul Stoffregen) and contact information (paul@ece.orst.edu) + in the source code. + + diff --git a/misc/sims/z80sim/src/Makefile b/misc/sims/z80sim/src/Makefile index c673f5803..0b68816c7 100644 --- a/misc/sims/z80sim/src/Makefile +++ b/misc/sims/z80sim/src/Makefile @@ -1,15 +1,20 @@ -CC = gcc -CFLAGS = -g -Wall -IZ80 -DLSB_FIRST=1 -DDEBUG=1 -DJUMPZ80 +Z80SITE = http://fms.komkon.org/EMUL8 +Z80SOURCE = Z80-081707.zip +Z80UNZIP = /usr/bin/unzip +Z80WGET = /usr/bin/wget -LD = gcc -LDFLAGS = +CC = gcc +CFLAGS = -g -Wall -IZ80 -DLSB_FIRST=1 -DDEBUG=1 -DJUMPZ80 -SRCS = main.c Debug.c Z80.c -OBJS = $(SRCS:.c=.o) +LD = gcc +LDFLAGS = -BIN = z80sim +SRCS = main.c Debug.c Z80.c +OBJS = $(SRCS:.c=.o) -VPATH = Z80 +BIN = z80sim + +VPATH = Z80 all: $(BIN) default: $(BIN) @@ -17,9 +22,11 @@ default: $(BIN) $(OBJS): %.o: %.c $(CC) -c $(CFLAGS) $< -o $@ +Z80-081707.zip: + $(Z80WGET) $(Z80SITE)/$(Z80SOURCE) Z80: Z80-081707.zip - unzip Z80-081707.zip + $(Z80UNZIP) Z80-081707.zip z80sim: Z80 $(OBJS) $(LD) $(LDFLAGS) $(OBJS) -o $@ @@ -28,5 +35,5 @@ clean: @rm -f $(BIN) *.o *.rel *.asm *.lst *.sym *.adb *~ distclean: clean - rm -rf Z80 + rm -rf Z80 Z80-081707.zip diff --git a/misc/sims/z80sim/src/Z80-081707.zip b/misc/sims/z80sim/src/Z80-081707.zip deleted file mode 100644 index 9a2339481..000000000 Binary files a/misc/sims/z80sim/src/Z80-081707.zip and /dev/null differ diff --git a/misc/sims/z80sim/src/main.c b/misc/sims/z80sim/src/main.c index 0f42f230c..648fcd568 100644 --- a/misc/sims/z80sim/src/main.c +++ b/misc/sims/z80sim/src/main.c @@ -105,7 +105,12 @@ void JumpZ80(word PC) } #endif -/* Intel hex code based largely on code taken from the PJRC website */ +/* Intel hex code based largely on code taken from the PJRC website. + * Licensing requires the following: + * + * Author: Paul Stoffregen + * Contact: paul@ece.orst.edu + */ /* Name: parse_hex * Description: Parse one line from an Intel hex file -- cgit v1.2.3