+Support for the Amstrad NC series of Z80 portable computers.
+
+Use:
+
+ TARGET=amstradnc/nc100 for the NC100
+
+
Memory map. All off PCMCIA root, 16K arbitrary banks
No CP/M emulation (due to NMI)
dd if=myfs of=mycard.img bs=16384 seek=20 conv=notrunc
-To boot from NC100emu use nc100emu.s. Compile it with sdas80 and use the
-resulting nc100.cim as the bootscript for the emulator.
+To boot from NC100emu use nc100emu.s. Compile it with the makefile and use the
+resulting nc100.cim as the boot image for the emulator.
TODO
.globl outstring
.globl outstringhex
- .include "kernel.def"
- .include "../kernel.def"
+ .include "platform/kernel.def"
+ .include "../../kernel.def" ; Kernel
.include "nc100.def"
; -----------------------------------------------------------------------------
--- /dev/null
+
+CSRCS = ../devlpr.c ../devtty.c ../devrd.c ../devaudio.c ../devgfx.c
+CSRCS += ../devices.c ../main.c
+
+ASRCS = ../nc100.s ../crt0.s
+ASRCS += ../tricks.s ../commonmem.s
+
+COBJS = $(CSRCS:.c=.rel)
+AOBJS = $(ASRCS:.s=.rel)
+OBJS = $(COBJS) $(AOBJS)
+
+JUNK = $(CSRCS:.c=.lst) $(CSRCS:.c=.asm) $(CSRCS:.c=.sym) $(ASRCS:.s=.lst) $(ASRCS:.s=.sym) $(CSRCS:.c=.rst) $(ASRCS:.s=.rst)
+
+all: $(OBJS)
+
+$(COBJS): %.rel: %.c
+ $(CROSS_CC) $(CROSS_CCOPTS) -o $(dir $@) -c $<
+
+$(AOBJS): %.rel: %.s
+ $(CROSS_AS) $(ASOPTS) $<
+
+clean:
+ rm -f $(OBJS) $(JUNK) core *~
+
+bootblock.img: ../bootblock.s
+ sdasz80 -fflopzws bootblock.rel ../bootblock.s
+ sdldz80 -nwmx -b BOOTBLOCK=0 -i bootblock.ihx bootblock.rel
+ srec_cat -disable-sequence-warning \
+ bootblock.ihx -intel \
+ -output bootblock.img -binary
+
+image: bootblock.img
+ dd if=bootblock.img of=../../fuzix.bin bs=1 conv=notrunc
+
+nc100emu.bin: nc100emu.s
+ sdasz80 -fflopzws nc100emu.rel $<
+ sdldz80 -nwmx -b _CODE=0x100 -i nc100emu.ihx nc100emu.rel
+ srec_cat -disable-sequence-warning \
+ nc100emu.ihx -intel -offset -0x100 \
+ -output nc100emu.bin -binary
-b _COMMONMEM=0xF000
-b _DISCARD=0xE000
-l z80
-platform-nc100/crt0.rel
-platform-nc100/commonmem.rel
-platform-nc100/nc100.rel
+platform-amstradnc/crt0.rel
+platform-amstradnc/commonmem.rel
+platform-amstradnc/nc100.rel
start.rel
version.rel
lowlevel-z80.rel
-platform-nc100/tricks.rel
-platform-nc100/main.rel
+platform-amstradnc/tricks.rel
+platform-amstradnc/main.rel
timer.rel
kdata.rel
-platform-nc100/devrd.rel
-platform-nc100/devices.rel
+platform-amstradnc/devrd.rel
+platform-amstradnc/devices.rel
devio.rel
filesys.rel
process.rel
audio.rel
usermem.rel
usermem_std-z80.rel
-platform-nc100/devlpr.rel
-platform-nc100/devtty.rel
-platform-nc100/devaudio.rel
-platform-nc100/devgfx.rel
+platform-amstradnc/devlpr.rel
+platform-amstradnc/devtty.rel
+platform-amstradnc/devaudio.rel
+platform-amstradnc/devgfx.rel
font4x6.rel
-e
;
.area ASEG(ABS)
- .org 0x0
+ .org 0x100
;
; Switch to the PCMCIA card as if run by FN-x
;
- .ds #0x100
start: di
ld a, #0x43 ; screen RAM
out (0x13),a
--- /dev/null
+CROSS_CCOPTS += -I$(ROOT_DIR)/platform-amstradnc
+ASOPTS += -I$(ROOT_DIR)
+
; imported debug symbols
.globl outstring, outde, outhl, outbc, outnewline, outchar, outcharhex
- .include "kernel.def"
- .include "../kernel.def"
+ .include "platform/kernel.def"
+ .include "../../kernel.def" ; Kernel
.area _COMMONMEM
+++ /dev/null
-
-CSRCS = devlpr.c devtty.c devrd.c devaudio.c devgfx.c
-CSRCS += devices.c main.c
-
-ASRCS = nc100.s crt0.s
-ASRCS += tricks.s commonmem.s
-
-COBJS = $(CSRCS:.c=.rel)
-AOBJS = $(ASRCS:.s=.rel)
-OBJS = $(COBJS) $(AOBJS)
-
-JUNK = $(CSRCS:.c=.lst) $(CSRCS:.c=.asm) $(CSRCS:.c=.sym) $(ASRCS:.s=.lst) $(ASRCS:.s=.sym) $(CSRCS:.c=.rst) $(ASRCS:.s=.rst)
-
-all: $(OBJS)
-
-$(COBJS): %.rel: %.c
- $(CROSS_CC) $(CROSS_CCOPTS) -c $<
-
-$(AOBJS): %.rel: %.s
- $(CROSS_AS) $(ASOPTS) $<
-
-clean:
- rm -f $(OBJS) $(JUNK) core *~
-
-bootblock.img: bootblock.s
- sdasz80 -fflopzws bootblock.rel bootblock.s
- sdldz80 -nwmx -b BOOTBLOCK=0 -i bootblock.ihx bootblock.rel
- srec_cat -disable-sequence-warning \
- bootblock.ihx -intel \
- -output bootblock.img -binary
-
-image:
- dd if=bootblock.img of=../fuzix.bin bs=1 conv=notrunc