Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/.dir-locals.el
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
((fundamental-mode . ((indent-tabs-mode . nil))))
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on:
pull_request:

jobs:
build:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
platform:
- adam
- apple2
- atari
- c64
- coco
# - msdos # MSDOS doesn't seem to build yet

container:
image: fozztexx/defoogi:1.4.1

steps:
- uses: actions/checkout@v4

- name: Build
run: make -f Makefile.${{ matrix.platform }} r2r

- name: Upload artifact for ${{ matrix.platform }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform }}
path: r2r/${{ matrix.platform }}/**
26 changes: 18 additions & 8 deletions Makefile.adam
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ TARGET_EXEC ?= autorun.ddp

BUILD_DIR ?= ./build
SRC_DIRS ?= ./src
R2R_DIR ?= ./r2r/adam
R2R_BIN := $(R2R_DIR)/$(TARGET_EXEC)

ADDL_DIR1 := ../eoslib/src
ADDL_DIR2 := ../smartkeyslib/src

ADDL_LIB1 := ../eoslib/eos.lib
ADDL_LIB2 := ../smartkeyslib/smartkeys.lib
ADDL_LIB1 := eos.lib
ADDL_LIB2 := smartkeys.lib

CC=zcc
AS=zcc
Expand All @@ -17,15 +19,22 @@ OBJS := $(SRCS:%=$(BUILD_DIR)/%.o)
DEPS := $(OBJS:.o=.d)

CFLAGS=+coleco -subtype=adam -DBUILD_ADAM -I$(ADDL_DIR1) -I$(ADDL_DIR2)
LDFLAGS=+coleco -subtype=adam -create-app -o$(TARGET_EXEC) -lndos -l$(ADDL_LIB1) -l$(ADDL_LIB2)
LDFLAGS=+coleco -subtype=adam -create-app -lndos -l$(ADDL_LIB1) -l$(ADDL_LIB2)
ASFLAGS=+coleco -subtype=adam

INC_DIRS := $(shell find $(SRC_DIRS) -type d)
INC_FLAGS := $(addprefix -I,$(INC_DIRS))

$(BUILD_DIR)/$(TARGET_EXEC): $(OBJS)
$(CC) $(LDFLAGS) $(OBJS)
cp autorun.ddp ../fujinet-firmware/data/webui/device_specific/BUILD_ADAM/
$(R2R_BIN): $(OBJS) | $(R2R_DIR)
$(CC) -o$@ $(LDFLAGS) $(OBJS)

.PHONY: dist autorun clean r2r

dist: $(R2R_BIN)
cp $< ../fujinet-platformio/data/webui/device_specific/BUILD_ADAM/

# Create the "Ready 2 Run" executable/disk
r2r: $(R2R_BIN)

# c source
$(BUILD_DIR)/%.c.o: %.c
Expand All @@ -37,10 +46,11 @@ $(BUILD_DIR)/%.asm.o: %.asm
$(MKDIR_P) $(dir $@)
$(AS) $(ASFLAGS) -c $< -o $@

.PHONY: clean
$(R2R_DIR):
$(MKDIR_P) $@

clean:
$(RM) -r autorun* $(BUILD_DIR)
$(RM) -r autorun* $(BUILD_DIR) $(R2R_DIR)

-include $(DEPS)

Expand Down
28 changes: 19 additions & 9 deletions Makefile.apple2
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ FUJINET_LIB_VERSION_DIR = $(FUJINET_LIB)/$(FUJINET_LIB_VERSION)-$(TARGETS)
# Name of the final, single-file executable.
# Default: name of the current dir with target name appended
PROGRAM := config
R2R_DIR := r2r/$(TARGETS)
DISK := $(R2R_DIR)/autorun.po

# Path(s) to additional libraries required for linking the program
# Use only if you don't want to place copies of the libraries in SRCDIR
Expand Down Expand Up @@ -256,7 +258,7 @@ ASFLAGS += --asm-include-dir src/$(TARGETLIST)/asminc --asm-include-dir $(FUJINE
CFLAGS += --include-dir $(FUJINET_LIB_VERSION_DIR) -DUSING_FUJINET_LIB

.SUFFIXES:
.PHONY: all test clean get_fujinet_lib zap love
.PHONY: all test clean get_fujinet_lib zap love dist r2r

all: get_fujinet_lib $(PROGRAM)

Expand Down Expand Up @@ -316,6 +318,9 @@ get_fujinet_lib:
$(TARGETOBJDIR):
$(call MKDIR,$@)

$(R2R_DIR):
$(call MKDIR,$@)

vpath %.c $(SRCDIR)/$(TARGETLIST) $(SRCDIR)

$(TARGETOBJDIR)/%.o: %.c | $(TARGETOBJDIR)
Expand Down Expand Up @@ -344,24 +349,29 @@ test: $(PROGRAM)
$(EMUCMD) $<
$(POSTEMUCMD)

dist: $(PROGRAM)
cp dist.apple2/bootable.po dist.apple2/dist.po
./dist.apple2/add-file.sh dist.apple2/dist.po config config.system
$(DISK): $(PROGRAM) | $(R2R_DIR)
cp dist.apple2/bootable.po $@
./dist.apple2/add-file.sh $@ config config.system

dist: $(DISK)
@( \
echo "Attempting to copy autorun.po to firmware folder outside of project" ; \
echo "Attempting to copy $(DISK) to firmware folder outside of project" ; \
if [ -d ../fujinet-firmware/ ] ; then \
echo "Copying into ../fujinet-firmware" ; \
cp dist.apple2/dist.po ../fujinet-firmware/data/webui/device_specific/BUILD_APPLE/autorun.po ; \
cp dist.apple2/dist.po ../fujinet-firmware/data/webui/device_specific/BUILD_APPLE/$(DISK) ; \
elif [ -d ../fujinet-platformio/ ] ; then \
echo "Copying into ../fujinet-platformio (NOTE: please consider renaming to updated fujinet-firmware name)" ; \
cp dist.apple2/dist.po ../fujinet-platformio/data/webui/device_specific/BUILD_APPLE/autorun.po ; \
cp dist.apple2/dist.po ../fujinet-platformio/data/webui/device_specific/BUILD_APPLE/$(DISK) ; \
else \
echo "ERROR: Could not find fujinet firmware folder to copy autorun.po to." ; \
echo "ERROR: Could not find fujinet firmware folder to copy $(DISK) to." ; \
echo "Tried ../fujinet-firmware, and ../fujinet-platformio" ; \
exit 1 ; \
fi ; \
)

# Create the "Ready 2 Run" executable/disk
r2r: get_fujinet_lib $(DISK)

gendebug: $(PROGRAM)
@echo "Generating debug.scr script for AppleWin"
@echo 'echo "Loading symbols"' > debug.scr
Expand All @@ -375,7 +385,7 @@ clean:
$(call RMFILES,$(REMOVES))
$(call RMFILES,$(PROGRAM))
$(call RMFILES,*.map)
rm -rf dist/
rm -rf dist/ $(R2R_DIR)

else # $(words $(TARGETLIST)),1

Expand Down
24 changes: 17 additions & 7 deletions Makefile.atari
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ FUJINET_LIB_VERSION_DIR = $(FUJINET_LIB)/$(FUJINET_LIB_VERSION)-$(TARGETS)
# Name of the final, single-file executable.
# Default: name of the current dir with target name appended
PROGRAM := config
R2R_DIR := r2r/$(TARGETS)
R2R_BIN := $(R2R_DIR)/autorun.atr

# Path(s) to additional libraries required for linking the program
# Use only if you don't want to place copies of the libraries in SRCDIR
Expand Down Expand Up @@ -284,7 +286,7 @@ ASFLAGS += --asm-include-dir src/$(TARGETLIST)/asminc --asm-include-dir $(FUJINE
CFLAGS += --include-dir $(FUJINET_LIB_VERSION_DIR) -DUSING_FUJINET_LIB

.SUFFIXES:
.PHONY: all test clean get_fujinet_lib zap
.PHONY: all test clean get_fujinet_lib zap r2r

all: get_fujinet_lib $(PROGRAM)

Expand Down Expand Up @@ -344,6 +346,9 @@ get_fujinet_lib:
$(TARGETOBJDIR):
$(call MKDIR,$@)

$(R2R_DIR):
$(call MKDIR,$@)

vpath %.c $(SRCDIR)/$(TARGETLIST) $(SRCDIR)

$(TARGETOBJDIR)/%.o: %.c | $(TARGETOBJDIR)
Expand All @@ -357,33 +362,38 @@ $(TARGETOBJDIR)/%.o: %.s | $(TARGETOBJDIR)
$(PROGRAM): $(CONFIG) $(OBJECTS) $(LIBS)
$(CC) -t $(CC65TARGET) $(LDFLAGS) -o $@ $(patsubst %.cfg,-C %.cfg,$^)

# Create the "Ready 2 Run" executable/disk
r2r: get_fujinet_lib $(R2R_BIN)

test: $(PROGRAM)
$(PREEMUCMD)
$(EMUCMD) $<
$(POSTEMUCMD)

test-atr: $(PROGRAM) dist
$(PREEMUCMD) \
$(EMUCMD) //disk autorun.atr \
$(EMUCMD) //disk $(R2R_BIN) \
$(POSTEMUCMD)

dist: $(PROGRAM)
$(R2R_BIN): $(PROGRAM) | $(R2R_DIR)
mkdir -p dist
cp ../fujinet-tools/atari/dist/*.COM dist/ || true
cp ../fujinet-tools/atari/dist/*.com dist/ || true
cp $(PROGRAM) dist/
dir2atr -m -S -B picoboot.bin autorun.atr dist/
dir2atr -m -S -B picoboot.bin $@ dist/

dist: $(R2R_BIN)

dist-z: $(PROGRAM)
@if [ -d "../fujinet-config-loader" ] ; then \
echo "Found fujinet-config-loader, creating compressed autorun.atr"; \
echo "Found fujinet-config-loader, creating compressed $(R2R_BIN)"; \
$(MAKE) -C ../fujinet-config-loader clean dist > /dev/null 2>&1 ; \
if [ $$? -ne 0 ] ; then \
echo "ERROR running compressor"; \
exit 1; \
fi; \
cp ../fujinet-config-loader/autorun-zx0.atr ./autorun.atr; \
echo "Compressed file saved as autorun.atr"; \
cp ../fujinet-config-loader/autorun-zx0.atr ./$(R2R_BIN); \
echo "Compressed file saved as $(R2R_BIN)"; \
else \
echo "ERROR: Could not find fujinet-config-loader in sibling directory to current."; \
exit 1; \
Expand Down
12 changes: 10 additions & 2 deletions Makefile.c64
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ FUJINET_LIB_VERSION_DIR = $(FUJINET_LIB)/$(FUJINET_LIB_VERSION)-$(TARGETS)
# Name of the final, single-file executable.
# Default: name of the current dir with target name appended
PROGRAM := config
R2R_DIR := r2r/$(TARGETS)
R2R_BIN := $(R2R_DIR)/$(PROGRAM).prg

# Path(s) to additional libraries required for linking the program
# Use only if you don't want to place copies of the libraries in SRCDIR
Expand Down Expand Up @@ -260,7 +262,7 @@ ASFLAGS += --asm-include-dir src/$(TARGETLIST)/asminc --asm-include-dir $(FUJINE
CFLAGS += --include-dir $(FUJINET_LIB_VERSION_DIR) -DUSING_FUJINET_LIB

.SUFFIXES:
.PHONY: all test clean get_fujinet_lib zap
.PHONY: all test clean get_fujinet_lib zap r2r

all: get_fujinet_lib $(PROGRAM)

Expand Down Expand Up @@ -320,6 +322,9 @@ get_fujinet_lib:
$(TARGETOBJDIR):
$(call MKDIR,$@)

$(R2R_DIR):
$(call MKDIR,$@)

vpath %.c $(SRCDIR)/$(TARGETLIST) $(SRCDIR)

$(TARGETOBJDIR)/%.o: %.c | $(TARGETOBJDIR)
Expand All @@ -330,9 +335,12 @@ vpath %.s $(SRCDIR)/$(TARGETLIST) $(SRCDIR)
$(TARGETOBJDIR)/%.o: %.s | $(TARGETOBJDIR)
$(CC) -t $(CC65TARGET) -c --create-dep $(@:.o=.d) $(ASFLAGS) -o $@ $<

$(PROGRAM): $(CONFIG) $(OBJECTS) $(LIBS)
$(R2R_BIN): $(CONFIG) $(OBJECTS) $(LIBS) | $(R2R_DIR)
$(CC) -t $(CC65TARGET) $(LDFLAGS) -o $@ $(patsubst %.cfg,-C %.cfg,$^)

# Create the "Ready 2 Run" executable/disk
r2r: get_fujinet_lib $(R2R_BIN)

test: $(PROGRAM)
$(PREEMUCMD)
$(EMUCMD) $<
Expand Down
37 changes: 26 additions & 11 deletions Makefile.coco
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,32 @@ AS=lwasm
CP=cp
ECHO=echo
FIRMWARE_DIR="../fujinet-firmware"

config.bin: check_wifi.o connect_wifi.o destination_host_slot.o hosts_and_devices.o main.o perform_copy.o select_file.o select_slot.o set_wifi.o show_info.o bar.o die.o input.o io.o mount_and_boot.o screen.o strrchr.o pause.o
$(CC) -o config.bin check_wifi.o connect_wifi.o destination_host_slot.o hosts_and_devices.o main.o perform_copy.o select_file.o select_slot.o set_wifi.o show_info.o bar.o die.o input.o io.o mount_and_boot.o screen.o strrchr.o pause.o
$(RM) autorun.dsk
decb dskini autorun.dsk
decb copy -t -0 dist.coco/autoexec.bas autorun.dsk,AUTOEXEC.BAS
writecocofile autorun.dsk config.bin
$(CP) autorun.dsk $(FIRMWARE_DIR)/data/webui/device_specific/BUILD_COCO/
# $(CP) autorun.dsk ~/tnfs/
TARGET_EXEC=config.bin
DISK=autorun.dsk
R2R_DIR=r2r/coco
R2R_BIN=$(R2R_DIR)/$(DISK)

$(TARGET_EXEC): check_wifi.o connect_wifi.o destination_host_slot.o hosts_and_devices.o main.o perform_copy.o select_file.o select_slot.o set_wifi.o show_info.o bar.o die.o input.o io.o mount_and_boot.o screen.o strrchr.o pause.o
$(CC) -o $@ check_wifi.o connect_wifi.o destination_host_slot.o hosts_and_devices.o main.o perform_copy.o select_file.o select_slot.o set_wifi.o show_info.o bar.o die.o input.o io.o mount_and_boot.o screen.o strrchr.o pause.o

$(R2R_BIN): $(TARGET_EXEC) | $(R2R_DIR)
$(RM) $@
decb dskini $@
decb copy -t -0 dist.coco/autoexec.bas $@,AUTOEXEC.BAS
writecocofile $@ $<

dist: $(R2R_BIN)
$(CP) $< $(FIRMWARE_DIR)/data/webui/device_specific/BUILD_COCO/
$(ECHO) Now, Do a Upload Filesystem task.

.PHONY: r2r

# Create the "Ready 2 Run" executable/disk
r2r: $(R2R_BIN)

$(R2R_DIR):
mkdir -p $@

pause.o: src/coco/pause.c
$(CC) -c src/coco/pause.c

Expand Down Expand Up @@ -73,5 +88,5 @@ screen.o: src/coco/screen.c
clean:
$(RM) *.o
$(RM) coco/*.o
$(RM) config.bin
$(RM) autorun.dsk
$(RM) $(TARGET_EXEC)
$(RM) $(DISK)
11 changes: 10 additions & 1 deletion Makefile.msdos
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
TARGET = config.com
R2R_DIR = r2r/msdos
R2R_BIN = $(R2R_DIR)/$(TARGET)

CC = wcc
CFLAGS = -q -0 -bt=dos -ms -osh $(CPPFLAGS) -i=src -i=src/msdos

Expand All @@ -10,9 +13,15 @@ SOURCE = src/check_wifi.c src/connect_wifi.c src/destination_host_slot.c src/hos

all: $(TARGET)

$(TARGET): $(OBJS)
# Create the "Ready 2 Run" executable/disk
r2r: $(R2R_BIN)

$(R2R_BIN): $(OBJS) | $(R2R_DIR)
$(LD) $(LDFLAGS) NAME $@

$(R2R_DIR):
mkdir -p $@

src/check_wifi.obj: src/check_wifi.c
$(CC) $(CFLAGS) src/check_wifi.c

Expand Down