mirror of
https://codeberg.org/hkzlab/TK2048.git
synced 2025-12-25 22:42:16 +11:00
commitce479dacb9Author: hkz <tabaglio@posteo.net> Date: Fri Oct 17 09:31:15 2025 +0200 Update README and CHANGELOG commit6840e57190Author: hkz <tabaglio@posteo.net> Date: Wed Oct 15 13:25:23 2025 +0200 Rework graphics commit0f0fe3ecb7Author: hkz <tabaglio@posteo.net> Date: Wed Oct 15 13:10:55 2025 +0200 Rework graphics commitf258d81f73Author: hkz <tabaglio@posteo.net> Date: Wed Oct 15 12:54:29 2025 +0200 Rework colors commit631097903bAuthor: hkz <tabaglio@posteo.net> Date: Wed Oct 15 09:24:59 2025 +0200 Centralize versioning commit3219687fd7Author: hkz <tabaglio@posteo.net> Date: Wed Oct 15 07:38:55 2025 +0200 move some definitions outside of utility.h commit07d054ea51Author: hkz <tabaglio@posteo.net> Date: Tue Oct 14 14:03:24 2025 +0200 Tweak some initialization code commitd920f68139Author: hkz <tabaglio@posteo.net> Date: Tue Oct 14 11:04:53 2025 +0200 Reworked wait time before making a move in demo mode commita3425993b1Author: hkz <tabaglio@posteo.net> Date: Tue Oct 14 08:57:48 2025 +0200 Tweak strings to indicate DEMO mode commit46f3662322Author: hkz <tabaglio@posteo.net> Date: Tue Oct 14 08:39:41 2025 +0200 Rewritten the irq handler commit2999c7c218Author: hkz <tabaglio@posteo.net> Date: Mon Oct 13 21:10:54 2025 +0200 fix saving commite7a5006a4aAuthor: hkz <tabaglio@posteo.net> Date: Mon Oct 13 21:00:29 2025 +0200 nitial working version for the VDP commit735513e5c8Author: hkz <tabaglio@posteo.net> Date: Mon Oct 13 19:36:20 2025 +0200 Fix game mode commit76fed16432Author: hkz <tabaglio@posteo.net> Date: Mon Oct 13 18:59:02 2025 +0200 Re-enable partial drawing commitf5cfc0f5daAuthor: hkz <tabaglio@posteo.net> Date: Mon Oct 13 18:46:08 2025 +0200 Use signed arithmetics for game logic commit5348adcd72Author: hkz <tabaglio@posteo.net> Date: Mon Oct 13 17:53:49 2025 +0200 Enable tiles redrawing commit31018463adAuthor: hkz <tabaglio@posteo.net> Date: Mon Oct 13 17:48:52 2025 +0200 Fix joystick code commit7c4385972dAuthor: hkz <tabaglio@posteo.net> Date: Mon Oct 13 17:24:13 2025 +0200 Begin fixing game code commit78604e6f7dAuthor: hkz <tabaglio@posteo.net> Date: Mon Oct 13 16:24:29 2025 +0200 Begin writing code to update the tiles commit26e94d2957Author: hkz <tabaglio@posteo.net> Date: Mon Oct 13 11:43:41 2025 +0200 Begin wiring in the VDP code in the game module commit28a1fbfc18Author: hkz <tabaglio@posteo.net> Date: Mon Oct 13 10:09:43 2025 +0200 Implement (untested) code to draw joystick commitd3d2207b4fAuthor: hkz <tabaglio@posteo.net> Date: Mon Oct 13 08:44:00 2025 +0200 Add dummy demo and game modules for VDP commit5deb0d802fAuthor: hkz <tabaglio@posteo.net> Date: Sun Oct 12 21:27:15 2025 +0200 Update the charset commitd2cd7356ecAuthor: hkz <tabaglio@posteo.net> Date: Sun Oct 12 21:19:43 2025 +0200 Tweak nametable for the dialog commitdd0e5ce53dAuthor: hkz <tabaglio@posteo.net> Date: Sun Oct 12 21:12:24 2025 +0200 Integrate the new dialog module for the VDP commitb4469d514cAuthor: hkz <tabaglio@posteo.net> Date: Sun Oct 12 15:25:31 2025 +0200 Add dummy module for VDP dialog commitd1dcdd1381Author: hkz <tabaglio@posteo.net> Date: Sun Oct 12 12:15:23 2025 +0200 Add initializer module for VDP commitfd84d3abbbAuthor: hkz <tabaglio@posteo.net> Date: Tue Oct 7 20:15:46 2025 +0200 Begin defining binaries commitbd650081fcAuthor: hkz <tabaglio@posteo.net> Date: Tue Oct 7 15:02:56 2025 +0200 Add resources for two screens of the VDP version commit58f7436c45Author: hkz <tabaglio@posteo.net> Date: Tue Oct 7 12:52:38 2025 +0200 Add a module list with defines commit969fe9deabAuthor: hkz <tabaglio@posteo.net> Date: Tue Oct 7 12:35:40 2025 +0200 Additional renaming commit83552c2ad8Author: hkz <tabaglio@posteo.net> Date: Tue Oct 7 12:14:27 2025 +0200 Rename other graphic files, remove unused imports commitdbc1bebf9fAuthor: hkz <tabaglio@posteo.net> Date: Tue Oct 7 11:59:16 2025 +0200 Begin renaming graphic files to mention they're for HGR
146 lines
No EOL
6.6 KiB
Makefile
146 lines
No EOL
6.6 KiB
Makefile
VPATH = src
|
|
|
|
# Apple Commander tool JAR
|
|
ACMD=/d/Users/hkzla/software/applecommander/AppleCommander-ac-1.11.0.jar
|
|
JAVA=/c/Program\ Files/Microsoft/jdk-21.0.8.9-hotspot/bin/java.exe
|
|
|
|
# Program output
|
|
SW_NAME=tk2048
|
|
|
|
MASTER_PRG=master
|
|
INTRO_PRG=intro
|
|
DLOG_PRG=dlog
|
|
GAME_PRG=game
|
|
DEMO_PRG=demo
|
|
VDPIN_PRG=vdpin
|
|
VDDLG_PRG=vddlg
|
|
VDGAM_PRG=vdgam
|
|
VDDEM_PRG=vddem
|
|
|
|
# Libraries
|
|
LIBS=clib-6502.a
|
|
|
|
MASTER_ASM_SRCS = tk2k_startup_master.s disk2.s master_func.s
|
|
MASTER_C_SRCS = master_main.c dos_floppy.c utility.c
|
|
|
|
INTRO_ASM_SRCS = tk2k_startup_module.s preserve_zero_pages.s vdp.s vdp_utils.s
|
|
INTRO_C_SRCS = intro_main.c utility.c input.c
|
|
|
|
DLOG_ASM_SRCS = tk2k_startup_module.s preserve_zero_pages.s sound.s
|
|
DLOG_C_SRCS = dlog_main.c input.c utility.c game_hgr_graphics.c hgr_line_data.c
|
|
|
|
GAME_ASM_SRCS = tk2k_startup_module.s preserve_zero_pages.s input_asm.s sound.s
|
|
GAME_C_SRCS = game_main.c input.c utility.c game_hgr_graphics.c hgr_line_data.c game_logic.c arrows_pic.c tiles.c hgr_graph_misc_data.c
|
|
|
|
DEMO_ASM_SRCS = tk2k_startup_module.s preserve_zero_pages.s input_asm.s sound.s
|
|
DEMO_C_SRCS = demo_main.c input.c utility.c game_hgr_graphics_demo.c hgr_line_data.c game_logic.c arrows_pic.c tiles.c hgr_graph_misc_data.c
|
|
|
|
VDPIN_ASM_SRCS = tk2k_startup_module.s preserve_zero_pages.s vdp.s vdp_utils.s vdp_init.s
|
|
VDPIN_C_SRCS = vdpin_main.c utility.c
|
|
|
|
VDDLG_ASM_SRCS = tk2k_startup_module.s preserve_zero_pages.s sound.s vdp.s vdp_utils.s game_vdp_graphics.s
|
|
VDDLG_C_SRCS = vddlg_main.c input.c utility.c
|
|
|
|
VDGAM_ASM_SRCS = tk2k_startup_module.s preserve_zero_pages.s input_asm.s sound.s vdp.s vdp_utils.s game_vdp_graphics.s
|
|
VDGAM_C_SRCS = vdgam_main.c input.c utility.c game_logic.c
|
|
|
|
VDDEM_ASM_SRCS = tk2k_startup_module.s preserve_zero_pages.s input_asm.s sound.s vdp.s vdp_utils.s game_vdp_graphics.s
|
|
VDDEM_C_SRCS = vddem_main.c input.c utility.c game_logic.c
|
|
|
|
# Object files
|
|
MASTER_OBJS = $(MASTER_ASM_SRCS:%.s=%.o) $(MASTER_C_SRCS:%.c=%.o)
|
|
INTRO_OBJS = $(INTRO_ASM_SRCS:%.s=%.o) $(INTRO_C_SRCS:%.c=%.o)
|
|
DLOG_OBJS = $(DLOG_ASM_SRCS:%.s=%.o) $(DLOG_C_SRCS:%.c=%.o)
|
|
GAME_OBJS = $(GAME_ASM_SRCS:%.s=%.o) $(GAME_C_SRCS:%.c=%.o)
|
|
DEMO_OBJS = $(DEMO_ASM_SRCS:%.s=%.o) $(DEMO_C_SRCS:%.c=%.o)
|
|
VDPIN_OBJS = $(VDPIN_ASM_SRCS:%.s=%.o) $(VDPIN_C_SRCS:%.c=%.o)
|
|
VDDLG_OBJS = $(VDDLG_ASM_SRCS:%.s=%.o) $(VDDLG_C_SRCS:%.c=%.o)
|
|
VDGAM_OBJS = $(VDGAM_ASM_SRCS:%.s=%.o) $(VDGAM_C_SRCS:%.c=%.o)
|
|
VDDEM_OBJS = $(VDDEM_ASM_SRCS:%.s=%.o) $(VDDEM_C_SRCS:%.c=%.o)
|
|
|
|
all: $(SW_NAME).woz
|
|
|
|
%.o: %.s
|
|
as6502 --core=6502 --list-file=$(@:%.o=obj/%.lst) -o obj/$@ $<
|
|
|
|
%.o: %.c
|
|
cc6502 --core=6502 -O2 --list-file=$(@:%.o=obj/%.lst) --char-is-unsigned --pedantic-errors -o obj/$@ $<
|
|
|
|
$(MASTER_PRG).hex: $(MASTER_OBJS)
|
|
(cd obj ; ln6502 -g ../linker-files/master.scm $^ -o ../out/$@ $(LIBS) -l --cross-reference --cstartup=tk2k --no-automatic-placement-rules --output-format intel-hex --rom-code)
|
|
|
|
$(INTRO_PRG).hex: $(INTRO_OBJS)
|
|
(cd obj ; ln6502 -g ../linker-files/module.scm $^ -o ../out/$@ $(LIBS) -l --cross-reference --cstartup=tk2k --no-automatic-placement-rules --output-format intel-hex --rom-code)
|
|
|
|
$(DLOG_PRG).hex: $(DLOG_OBJS)
|
|
(cd obj ; ln6502 -g ../linker-files/module.scm $^ -o ../out/$@ $(LIBS) -l --cross-reference --cstartup=tk2k --no-automatic-placement-rules --output-format intel-hex --rom-code)
|
|
|
|
$(GAME_PRG).hex: $(GAME_OBJS)
|
|
(cd obj ; ln6502 -g ../linker-files/module.scm $^ -o ../out/$@ $(LIBS) -l --cross-reference --cstartup=tk2k --no-automatic-placement-rules --output-format intel-hex --rom-code)
|
|
|
|
$(DEMO_PRG).hex: $(DEMO_OBJS)
|
|
(cd obj ; ln6502 -g ../linker-files/module.scm $^ -o ../out/$@ $(LIBS) -l --cross-reference --cstartup=tk2k --no-automatic-placement-rules --output-format intel-hex --rom-code)
|
|
|
|
$(VDPIN_PRG).hex: $(VDPIN_OBJS)
|
|
(cd obj ; ln6502 -g ../linker-files/vdpin_module.scm $^ -o ../out/$@ $(LIBS) -l --cross-reference --cstartup=tk2k --no-automatic-placement-rules --output-format intel-hex --rom-code)
|
|
|
|
$(VDDLG_PRG).hex: $(VDDLG_OBJS)
|
|
(cd obj ; ln6502 -g ../linker-files/module.scm $^ -o ../out/$@ $(LIBS) -l --cross-reference --cstartup=tk2k --no-automatic-placement-rules --output-format intel-hex --rom-code)
|
|
|
|
$(VDGAM_PRG).hex: $(VDGAM_OBJS)
|
|
(cd obj ; ln6502 -g ../linker-files/module.scm $^ -o ../out/$@ $(LIBS) -l --cross-reference --cstartup=tk2k --no-automatic-placement-rules --output-format intel-hex --rom-code)
|
|
|
|
$(VDDEM_PRG).hex: $(VDDEM_OBJS)
|
|
(cd obj ; ln6502 -g ../linker-files/module.scm $^ -o ../out/$@ $(LIBS) -l --cross-reference --cstartup=tk2k --no-automatic-placement-rules --output-format intel-hex --rom-code)
|
|
|
|
$(MASTER_PRG).bin: $(MASTER_PRG).hex
|
|
(cd out ; objcopy -I ihex -O binary $(MASTER_PRG).hex $(MASTER_PRG).bin)
|
|
|
|
$(INTRO_PRG).bin: $(INTRO_PRG).hex
|
|
(cd out ; objcopy -I ihex -O binary $(INTRO_PRG).hex $(INTRO_PRG).bin)
|
|
|
|
$(DLOG_PRG).bin: $(DLOG_PRG).hex
|
|
(cd out ; objcopy -I ihex -O binary $(DLOG_PRG).hex $(DLOG_PRG).bin)
|
|
|
|
$(GAME_PRG).bin: $(GAME_PRG).hex
|
|
(cd out ; objcopy -I ihex -O binary $(GAME_PRG).hex $(GAME_PRG).bin)
|
|
|
|
$(DEMO_PRG).bin: $(DEMO_PRG).hex
|
|
(cd out ; objcopy -I ihex -O binary $(DEMO_PRG).hex $(DEMO_PRG).bin)
|
|
|
|
$(VDPIN_PRG).bin: $(VDPIN_PRG).hex
|
|
(cd out ; objcopy -I ihex -O binary $(VDPIN_PRG).hex $(VDPIN_PRG).bin)
|
|
|
|
$(VDDLG_PRG).bin: $(VDDLG_PRG).hex
|
|
(cd out ; objcopy -I ihex -O binary $(VDDLG_PRG).hex $(VDDLG_PRG).bin)
|
|
|
|
$(VDGAM_PRG).bin: $(VDGAM_PRG).hex
|
|
(cd out ; objcopy -I ihex -O binary $(VDGAM_PRG).hex $(VDGAM_PRG).bin)
|
|
|
|
$(VDDEM_PRG).bin: $(VDDEM_PRG).hex
|
|
(cd out ; objcopy -I ihex -O binary $(VDDEM_PRG).hex $(VDDEM_PRG).bin)
|
|
|
|
$(SW_NAME).dsk: $(MASTER_PRG).bin $(INTRO_PRG).bin $(DLOG_PRG).bin $(GAME_PRG).bin $(DEMO_PRG).bin $(VDPIN_PRG).bin $(VDDLG_PRG).bin $(VDGAM_PRG).bin $(VDDEM_PRG).bin
|
|
(cd out ; cp ../dsk/TK2048_AUTO_BRUN.dsk ./$(SW_NAME).dsk; \
|
|
cat $(MASTER_PRG).bin | $(JAVA) -jar $(ACMD) -p $(SW_NAME).dsk HELLO B 0x800; \
|
|
cat $(INTRO_PRG).bin | $(JAVA) -jar $(ACMD) -p $(SW_NAME).dsk INTRO b; \
|
|
cat $(DLOG_PRG).bin | $(JAVA) -jar $(ACMD) -p $(SW_NAME).dsk DLOG b; \
|
|
cat $(GAME_PRG).bin | $(JAVA) -jar $(ACMD) -p $(SW_NAME).dsk GAME b; \
|
|
cat $(DEMO_PRG).bin | $(JAVA) -jar $(ACMD) -p $(SW_NAME).dsk DEMO b; \
|
|
cat $(VDPIN_PRG).bin | $(JAVA) -jar $(ACMD) -p $(SW_NAME).dsk VDPIN b; \
|
|
cat $(VDDLG_PRG).bin | $(JAVA) -jar $(ACMD) -p $(SW_NAME).dsk VDDLG b; \
|
|
cat $(VDGAM_PRG).bin | $(JAVA) -jar $(ACMD) -p $(SW_NAME).dsk VDGAM b; \
|
|
cat $(VDDEM_PRG).bin | $(JAVA) -jar $(ACMD) -p $(SW_NAME).dsk VDDEM b; \
|
|
cat ../data/LOADS.bin | $(JAVA) -jar $(ACMD) -p $(SW_NAME).dsk LOADS b; \
|
|
cat ../data/STATE.bin | $(JAVA) -jar $(ACMD) -p $(SW_NAME).dsk STATE b;)
|
|
|
|
$(SW_NAME).woz: $(SW_NAME).dsk
|
|
(cd out ; dsk2woz ./$(SW_NAME).dsk ./$(SW_NAME).woz)
|
|
|
|
clean:
|
|
-rm obj/*.o
|
|
-rm obj/*.lst
|
|
-rm out/*.hex
|
|
-rm out/*.bin
|
|
-rm out/*.dsk
|
|
-rm out/*.woz
|