-CSRCS = devtty.c devices.c main.c bank128.c divide.c divmmc.c devinput.c
+CSRCS = devtty.c devices.c main.c bank128.c devinput.c
CDSRCS = discard.c
DSRCS = ../dev/devide.c ../dev/devsd.c ../dev/blkdev.c
DDSRCS = ../dev/devide_discard.c ../dev/devsd_discard.c ../dev/mbr.c
+DZSRCS = ../dev/zx/divide.c ../dev/zx/divmmc.c
+DDZSRCS =
ASRCS = crt0.s zx128.s zxvideo.s
ASRCS += tricks.s commonmem.s loader-divide.s
AOBJS = $(ASRCS:.s=.rel)
DOBJS = $(patsubst ../dev/%.c,%.rel, $(DSRCS))
DDOBJS = $(patsubst ../dev/%.c,%.rel, $(DDSRCS))
-OBJS = $(COBJS) $(CDOBJS) $(AOBJS) $(DOBJS) $(DDOBJS)
+DZOBJS = $(patsubst ../dev/zx/%.c,%.rel, $(DZSRCS))
+DDZOBJS = $(patsubst ../dev/zx/%.c,%.rel, $(DDZSRCS))
+OBJS = $(COBJS) $(CDOBJS) $(AOBJS) $(DOBJS) $(DDOBJS) $(DZOBJS) $(DDZOBJS)
CROSS_CCOPTS += -I../dev/
$(DDOBJS): %.rel: ../dev/%.c
$(CROSS_CC) $(CROSS_CCOPTS) $(CROSS_CC_SEGDISC) -c $<
+$(DZOBJS): %.rel: ../dev/zx/%.c
+ $(CROSS_CC) $(CROSS_CCOPTS) $(CROSS_CC_SEG3) -c $<
+
+$(DDZOBJS): %.rel: ../dev/zx/%.c
+ $(CROSS_CC) $(CROSS_CCOPTS) $(CROSS_CC_SEGDISC) -c $<
+
$(AOBJS): %.rel: %.s
$(CROSS_AS) $(ASOPTS) $<
Right now we ldir in one case (could be faster abusing stack), and
the exchange case could be made much much faster using registers
and stack tricks not bounce buffers
+- Enable interrupts during swap
- Look at what is needed for other suitable interfaces. DIVMMC would
in particular be good to support but that means another harder
bootloader hack