diff --git a/host/Makefile b/host/Makefile index 0cef5ab..dba6e9c 100644 --- a/host/Makefile +++ b/host/Makefile @@ -1,14 +1,23 @@ HOST_BINARY := host.prg BUILD_DIR := ./build + +BUILD_TYPE ?= release SRC_DIR := ./src + HOST_PRG := $(BUILD_DIR)/$(HOST_BINARY) PREVIEW_PRG := $(BUILD_DIR)/$(PREVIEW_BINARY) SRCS := $(shell find $(SRC_DIR) -name '*.s' -or -name '*.inc') TOPLEVEL := source.s +ifeq ($(BUILD_TYPE), test) + TOPLEVEL := test.s +endif + + + CL := cl65 CLFLAGS := -u __EXEHDR__ -t c64 -C c64-asm.cfg -l $(BUILD_DIR)/host.lst -Ln $(BUILD_DIR)/host.lbl diff --git a/host/run.sh b/host/run.sh index bbd27a5..378ea18 100755 --- a/host/run.sh +++ b/host/run.sh @@ -1,4 +1,4 @@ # !/bin/bash killall x64sc -make; \ +make BUILD_TYPE=test; \ nohup flatpak run net.sf.VICE -windowypos 0 -windowxpos 960 -windowwidth 945 -windowheight 720 -moncommands build/host.lbl build/host.prg /dev/null & diff --git a/host/src/source.s b/host/src/source.s index 72f87e6..50d7fec 100644 --- a/host/src/source.s +++ b/host/src/source.s @@ -1,51 +1,39 @@ ;;; -*- Mode: asm; indent-tabs-mode: t; tab-width: 8 -*- + +;; Source file for the project. Will compile inte a program that run programs +;; injected through the game-port. .debuginfo + ; Generate debug info -.org $080D +.org $080D ; Make listing file have the right offset. ;;Macros .include "macros/16aritmatic.s" ;;inc files .include "routines/memory/mem.inc" ;;Code to run .include "STARTUP.s" +;; WIP, do not work. ;.include "dubbel_buffer/raster_irqs.s" .include "mainloop.s" .include "loader.s" -;; Note that arithmatic tests may use upp all the memory and the compiler dont complain! -;.include "routines/arithmatic/mult_test.s" -;.include "routines/arithmatic/div_test.s" -;.include "routines/arithmatic/div_test_zero.s" - -;.include "routines/circle/circle_test.s" -;.include "routines/circle/circle_test_size.s" -;.include "routines/circle/circle_test_position.s" -;.include "routines/line/line_test.s" -;.include "routines/line/line_test_extensive.s" -;.include "routines/text/char_draw_test.s" -;.include "routines/pixel/pixel_test.s" -;.include "routines/memory/memcpy_test.s" -;.include "routines/memory/memset_test.s" - -;.include "routines/triangle/triangle_test.s" -exit: -JMP exit .include "public.inc" .include "routines/line/line.s" .include "routines/circle/circle.s" -.include "routines/triangle/triangle.s" .include "routines/pixel/pixel_draw.s" .include "routines/pixel/pixel_calc.s" .include "routines/pixel/misc_pixel.s" .include "routines/text/char_draw.s" .include "routines/memory/memset.s" .include "routines/memory/clear_screen.s" -.include "routines/memory/memcpy.s" .include "routines/arithmatic/mult.s" .include "routines/arithmatic/div.s" - .include "lookup_tables.s" +;; WIP, will not work +;.include "routines/triangle/triangle.s" +;; Works but disabled because no use yet. +;.include "routines/memory/memcpy.s" + batch_userprog: .incbin "../userprog.bin" diff --git a/host/src/test.s b/host/src/test.s new file mode 100644 index 0000000..54fd2cb --- /dev/null +++ b/host/src/test.s @@ -0,0 +1,51 @@ +;;; -*- Mode: asm; indent-tabs-mode: t; tab-width: 8 -*- +.debuginfo + ; Generate debug info +.org $080D +;;Macros +.include "macros/16aritmatic.s" +;;inc files +.include "routines/memory/mem.inc" +;;Code to run +.include "STARTUP.s" +;; WIP, do not use. +;.include "dubbel_buffer/raster_irqs.s" + +mainsetup: +;; Note that arithmetic tests may use upp all the memory and the compiler don't complain! +;.include "routines/arithmatic/mult_test.s" +;.include "routines/arithmatic/div_test.s" +.include "routines/arithmatic/div_test_zero.s" + +;.include "routines/circle/circle_test.s" +;.include "routines/circle/circle_test_size.s" +;.include "routines/circle/circle_test_position.s" +;.include "routines/line/line_test.s" +;.include "routines/line/line_test_extensive.s" +;.include "routines/text/char_draw_test.s" +;.include "routines/pixel/pixel_test.s" +;.include "routines/memory/memcpy_test.s" +;.include "routines/memory/memset_test.s" + +;.include "routines/triangle/triangle_test.s" +exit: +JMP exit +.include "public.inc" +;.include "routines/line/line.s" +;.include "routines/circle/circle.s" +;.include "routines/triangle/triangle.s" +.include "routines/pixel/pixel_draw.s" +;.include "routines/pixel/pixel_calc.s" +;.include "routines/pixel/misc_pixel.s" +;.include "routines/text/char_draw.s" +.include "routines/memory/memset.s" +.include "routines/memory/clear_screen.s" +;.include "routines/memory/memcpy.s" +;.include "routines/arithmatic/mult.s" +.include "routines/arithmatic/div.s" + +.include "lookup_tables.s" + +batch_userprog: +.incbin "../userprog.bin" + +.include "END.s"