From f15ccf7799fa9b1aa718c91908be232516142709 Mon Sep 17 00:00:00 2001 From: John Lorentzson Date: Wed, 30 Jul 2025 16:52:52 +0200 Subject: [PATCH] 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. --- host/Makefile | 8 +------- host/src/mainloop.s | 2 -- host/src/source.s | 4 ---- host/userprog.bin | 1 + user-side-compiler/populate-asm-functions.lisp | 3 ++- 5 files changed, 4 insertions(+), 14 deletions(-) create mode 100644 host/userprog.bin diff --git a/host/Makefile b/host/Makefile index d36b5ec..0cef5ab 100644 --- a/host/Makefile +++ b/host/Makefile @@ -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) diff --git a/host/src/mainloop.s b/host/src/mainloop.s index 6ffbda1..a7ad4d6 100644 --- a/host/src/mainloop.s +++ b/host/src/mainloop.s @@ -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 diff --git a/host/src/source.s b/host/src/source.s index 4768068..99731f7 100644 --- a/host/src/source.s +++ b/host/src/source.s @@ -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" diff --git a/host/userprog.bin b/host/userprog.bin new file mode 100644 index 0000000..64845fb --- /dev/null +++ b/host/userprog.bin @@ -0,0 +1 @@ +` \ No newline at end of file diff --git a/user-side-compiler/populate-asm-functions.lisp b/user-side-compiler/populate-asm-functions.lisp index bade850..51ff7c5 100644 --- a/user-side-compiler/populate-asm-functions.lisp +++ b/user-side-compiler/populate-asm-functions.lisp @@ -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