summaryrefslogtreecommitdiff
path: root/misc/sims
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-12-31 14:26:49 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-12-31 14:26:49 +0000
commita3124243d36a5729304fd2822efca8c96a6f5c6f (patch)
tree92783bb0eb955c8e9543b064f9c1e1cc5e410571 /misc/sims
parent26e09cad1a1979b0eeb8bb38160f85b1675f916d (diff)
downloadnuttx-a3124243d36a5729304fd2822efca8c96a6f5c6f.tar.gz
nuttx-a3124243d36a5729304fd2822efca8c96a6f5c6f.tar.bz2
nuttx-a3124243d36a5729304fd2822efca8c96a6f5c6f.zip
Add z80sim info
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@471 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'misc/sims')
-rw-r--r--misc/sims/README.txt35
-rw-r--r--misc/sims/z80sim/README.txt24
-rw-r--r--misc/sims/z80sim/src/Makefile27
-rw-r--r--misc/sims/z80sim/src/Z80-081707.zipbin29532 -> 0 bytes
-rw-r--r--misc/sims/z80sim/src/main.c7
5 files changed, 82 insertions, 11 deletions
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
--- a/misc/sims/z80sim/src/Z80-081707.zip
+++ /dev/null
Binary files 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