Add custom bootblock for lide-update

Fix weird issues when booting on OS 3.2
This commit is contained in:
Matt Harlum 2024-05-07 11:23:56 +00:00 committed by Matt Harlum
parent 15d49d3f61
commit fc7e6594ec
4 changed files with 62 additions and 2 deletions

View File

@ -74,12 +74,15 @@ lidetool/lidetool:
rename/renamelide:
make -C rename
disk: $(ROM) lideflash/lideflash rename/renamelide lidetool/lidetool
lideflash/bootblock/obj/bootblock.o:
make -C lideflash/bootblock
disk: $(ROM) lideflash/lideflash rename/renamelide lidetool/lidetool lideflash/bootblock/obj/bootblock.o
@mkdir -p $(BUILDDIR)
cp $(ROM) build
echo -n 'lideflash -I $(ROM)\n' > $(BUILDDIR)/startup-sequence
xdftool $(BUILDDIR)/$(DISK) format lide-update + \
boot install boot1x + \
boot write lideflash/bootblock/obj/bootblock.o + \
write $(ROM) + \
write lidetool/lidetool lidetool + \
write lideflash/lideflash lideflash + \
@ -112,3 +115,4 @@ clean:
make -C rename clean
-rm -rf *.rom
-rm -rf $(BUILDDIR)
make -C lideflash/bootblock clean

1
lideflash/bootblock/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
obj/*

View File

@ -0,0 +1,18 @@
INCLUDE=/opt/amiga/m68k-amigaos/ndk-include
AS=vasmm68k_mot
ASFLAGS=-Fbin -m68000 -I$(INCLUDE) -quiet -align
OBJDIR=obj
.PHONY: all clean
SRCS = bootblock.S
OBJS = $(SRCS:%.S=$(OBJDIR)/%.o)
all: ${OBJDIR}/bootblock.o
clean:
-rm -rf $(OBJDIR)
$(OBJDIR)/%.o: %.S
@mkdir -p $(OBJDIR)
$(AS) $(ASFLAGS) -o $@ $<

View File

@ -0,0 +1,37 @@
include lvo/exec_lib.i
include libraries/expansionbase.i
include exec/resident.i
; Custom bootblock code
;
; OS 3.2 has a couple of bugs when booting a 1.3 style boot-block (i.e without EBB_SILENTSTART set)
; echo stalls until the enter key is pressed, and gibberish spews out in the CLI after our startup-sequence completes
; This has been reported by other users here: https://eab.abime.net/showthread.php?t=115917
;
; lideflash needs to run on kick 1.3 and also 3.2
; To support both, set EBB_SILENTSTART if kick supports it
start: lea (exp_name,pc),a1
moveq.l #37,d0
jsr _LVOOpenLibrary(a6)
tst.l d0
beq boot ; Kick 1.3, no silentstart
movea.l d0,a1
bset.b #EBB_SILENTSTART,(eb_Flags,A1) ; Set SILENTSTART to stop OS 3.2 from wigging out
jsr _LVOCloseLibrary(a6)
boot: lea (dos_name,pc),a1
moveq.l #0,d0
jsr _LVOFindResident(A6)
tst.l d0
beq error
move.l d0,a0
move.l RT_INIT(A0),A0
moveq.l #0,d0
rts
error: moveq.l #-1,d0
rts
exp_name:
DC.B "expansion.library",0
dos_name:
DC.B "dos.library",0