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
9 changes: 7 additions & 2 deletions Makefile.coco
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ 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)
cfgload.bin:
$(AS) -o $@ src/coco/cfgload.asm

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

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

Expand Down Expand Up @@ -88,5 +92,6 @@ screen.o: src/coco/screen.c
clean:
$(RM) *.o
$(RM) coco/*.o
$(RM) cfgload.bin
$(RM) $(TARGET_EXEC)
$(RM) $(DISK)
25 changes: 15 additions & 10 deletions dist.coco/autoexec.bas
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
10 REM FUJINET CONFIG AUTOEXEC
20 CLS 6
22 REM POKE &H95AC,57:POKE &HFF22,PEEK(&HFF22) OR &H10
23 REM POKE &H167,&H39
40 PRINT @ 256, " LOADING FUJINET CONFIG... ";
50 PRINTCHR$(219);
60 FOR X=0 TO 30
70 PRINT CHR$(211);
80 NEXT X
90 LOADM"CONFIG":EXEC
100 REM FUJINET CONFIG AUTOEXEC
110 C = PEEK(&HFFF8):D = PEEK(&HFFF9)
120 REM IF WE ARE COCO3, CHECK SCREEN WIDTH
130 IF C=&HFE AND D=&HF7 THEN W = PEEK(&H00E7) ELSE W = 0
140 CLS 6
150 REM 1 OR 2 MEANS 40 OR 80 COLUMN MODE
160 IF W = 1 OR W = 2 THEN GOTO 230
170 PRINT @ 256, " LOADING FUJINET CONFIG... ";
180 PRINTCHR$(219);
190 FOR X=0 TO 30
200 PRINT CHR$(211);
210 NEXT X
220 GOTO 240
230 PRINT "Loading FujiNet Config..."
240 LOADM"CFGLOAD":EXEC
33 changes: 33 additions & 0 deletions src/coco/cfgload.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
****************************************************
* CONFIG LOADER
* BASED ON CODE FROM BY SIMON JONASSEN (AKA INVISIBLE MAN)
*
* PREREQUISITES:
*
* DECB FAT ETC INTACT AT $600 > $DFF
* CB/ECB/DECB NOT SWITCHED OUT
* DP=0
****************************************************
org $7c00
lhook equ $cfc5
fname equ $094c (8.3 notation) PADDED without "." ($20 pad)
ftype equ $0957 $0200 for .bin file
execsd equ $009D

start
ldx #myfile
ldu #fname
dofname ldd ,x++
std ,u++
cmpx #endmy
blo dofname
ldd #$200
std ftype ;bin file type right after name
jsr lhook
ldx execsd
jmp ,x
rts

myfile fcc 'CONFIG BIN'
endmy equ *
end start