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:
parent
adb0e70f5e
commit
f15ccf7799
5 changed files with 4 additions and 14 deletions
|
@ -1,5 +1,4 @@
|
||||||
HOST_BINARY := host.prg
|
HOST_BINARY := host.prg
|
||||||
PREVIEW_BINARY := preview.prg
|
|
||||||
|
|
||||||
BUILD_DIR := ./build
|
BUILD_DIR := ./build
|
||||||
SRC_DIR := ./src
|
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
|
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)
|
mkdir -p $(BUILD_DIR)
|
||||||
$(CL) -o $@ $(CLFLAGS) $(SRC_DIR)/$(TOPLEVEL)
|
$(CL) -o $@ $(CLFLAGS) $(SRC_DIR)/$(TOPLEVEL)
|
||||||
|
|
||||||
$(PREVIEW_PRG): $(SRCS) userprog.bin
|
|
||||||
$(CL) -o $@ --asm-define EMULATOR_PREVIEW $(CLFLAGS) $(SRC_DIR)/$(TOPLEVEL)
|
|
||||||
|
|
||||||
all: $(HOST_PRG)
|
all: $(HOST_PRG)
|
||||||
|
|
||||||
preview: $(PREVIEW_PRG)
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
;;; -*- Mode: asm; indent-tabs-mode: t; tab-width: 8 -*-
|
;;; -*- Mode: asm; indent-tabs-mode: t; tab-width: 8 -*-
|
||||||
mainsetup:
|
mainsetup:
|
||||||
.scope mainsetup
|
.scope mainsetup
|
||||||
.ifdef EMULATOR_PREVIEW
|
|
||||||
USERPROG = $C000
|
USERPROG = $C000
|
||||||
.repeat 4, I
|
.repeat 4, I
|
||||||
ldy #$00
|
ldy #$00
|
||||||
|
@ -11,7 +10,6 @@ mainsetup:
|
||||||
dey
|
dey
|
||||||
bne :-
|
bne :-
|
||||||
.endrep
|
.endrep
|
||||||
.endif
|
|
||||||
|
|
||||||
@waitstart: ;; Wait until joystick 2 has been pulled down to start the program
|
@waitstart: ;; Wait until joystick 2 has been pulled down to start the program
|
||||||
dec $d020
|
dec $d020
|
||||||
|
|
|
@ -13,9 +13,7 @@
|
||||||
;.include "dubbel_buffer/raster_irqs.s"
|
;.include "dubbel_buffer/raster_irqs.s"
|
||||||
|
|
||||||
.include "mainloop.s"
|
.include "mainloop.s"
|
||||||
.ifndef EMULATOR_PREVIEW
|
|
||||||
.include "loader.s"
|
.include "loader.s"
|
||||||
.endif
|
|
||||||
|
|
||||||
;.include "routines/arithmatic/mult_test.s"
|
;.include "routines/arithmatic/mult_test.s"
|
||||||
;.include "routines/arithmatic/div_test.s"
|
;.include "routines/arithmatic/div_test.s"
|
||||||
|
@ -47,9 +45,7 @@ JMP exit
|
||||||
|
|
||||||
.include "lookup_tables.s"
|
.include "lookup_tables.s"
|
||||||
|
|
||||||
.ifdef EMULATOR_PREVIEW
|
|
||||||
batch_userprog:
|
batch_userprog:
|
||||||
.incbin "../userprog.bin"
|
.incbin "../userprog.bin"
|
||||||
.endif
|
|
||||||
|
|
||||||
.include "END.s"
|
.include "END.s"
|
||||||
|
|
1
host/userprog.bin
Normal file
1
host/userprog.bin
Normal file
|
@ -0,0 +1 @@
|
||||||
|
`
|
|
@ -90,7 +90,8 @@
|
||||||
(progn
|
(progn
|
||||||
(uiop:chdir (make-pathname :defaults script-path
|
(uiop:chdir (make-pathname :defaults script-path
|
||||||
:name nil :type nil))
|
:name nil :type nil))
|
||||||
(uiop:run-program "make -"
|
(uiop:run-program (format nil "make -f ~S"
|
||||||
|
(namestring *program-build-filepath*))
|
||||||
#+(or)
|
#+(or)
|
||||||
(namestring
|
(namestring
|
||||||
(make-pathname :defaults script-path
|
(make-pathname :defaults script-path
|
||||||
|
|
Loading…
Add table
Reference in a new issue