Remove EMULATOR_PREVIEW, normal host now includes a default userprog

To test a user program, simply replace userprog.bin with the program
you want to run and assemble the host.
This commit is contained in:
John Lorentzson 2025-07-30 16:52:52 +02:00
parent adb0e70f5e
commit f15ccf7799
5 changed files with 4 additions and 14 deletions

View file

@ -1,5 +1,4 @@
HOST_BINARY := host.prg
PREVIEW_BINARY := preview.prg
BUILD_DIR := ./build
SRC_DIR := ./src
@ -14,13 +13,8 @@ CL := cl65
CLFLAGS := -u __EXEHDR__ -t c64 -C c64-asm.cfg -l $(BUILD_DIR)/host.lst -Ln $(BUILD_DIR)/host.lbl
$(HOST_PRG): $(SRCS)
$(HOST_PRG): $(SRCS) userprog.bin
mkdir -p $(BUILD_DIR)
$(CL) -o $@ $(CLFLAGS) $(SRC_DIR)/$(TOPLEVEL)
$(PREVIEW_PRG): $(SRCS) userprog.bin
$(CL) -o $@ --asm-define EMULATOR_PREVIEW $(CLFLAGS) $(SRC_DIR)/$(TOPLEVEL)
all: $(HOST_PRG)
preview: $(PREVIEW_PRG)

View file

@ -1,7 +1,6 @@
;;; -*- Mode: asm; indent-tabs-mode: t; tab-width: 8 -*-
mainsetup:
.scope mainsetup
.ifdef EMULATOR_PREVIEW
USERPROG = $C000
.repeat 4, I
ldy #$00
@ -11,7 +10,6 @@ mainsetup:
dey
bne :-
.endrep
.endif
@waitstart: ;; Wait until joystick 2 has been pulled down to start the program
dec $d020

View file

@ -13,9 +13,7 @@
;.include "dubbel_buffer/raster_irqs.s"
.include "mainloop.s"
.ifndef EMULATOR_PREVIEW
.include "loader.s"
.endif
;.include "routines/arithmatic/mult_test.s"
;.include "routines/arithmatic/div_test.s"
@ -47,9 +45,7 @@ JMP exit
.include "lookup_tables.s"
.ifdef EMULATOR_PREVIEW
batch_userprog:
.incbin "../userprog.bin"
.endif
.include "END.s"

1
host/userprog.bin Normal file
View file

@ -0,0 +1 @@
`

View file

@ -90,7 +90,8 @@
(progn
(uiop:chdir (make-pathname :defaults script-path
:name nil :type nil))
(uiop:run-program "make -"
(uiop:run-program (format nil "make -f ~S"
(namestring *program-build-filepath*))
#+(or)
(namestring
(make-pathname :defaults script-path