mirror of
https://codeberg.org/hkzlab/TK2048.git
synced 2025-12-25 13:42:16 +11:00
Centralize versioning
This commit is contained in:
parent
3219687fd7
commit
631097903b
5 changed files with 28 additions and 20 deletions
2
Makefile
2
Makefile
|
|
@ -24,7 +24,7 @@ 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
|
||||
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
|
||||
|
|
|
|||
|
|
@ -1,14 +1,19 @@
|
|||
#ifndef _GAME_DATA_HEADER_
|
||||
#define _GAME_DATA_HEADER_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define GAME_MODE_NORMAL 0
|
||||
#define GAME_MODE_LOAD 1
|
||||
|
||||
|
||||
typedef struct {
|
||||
uint8_t mode;
|
||||
} game_data;
|
||||
|
||||
#endif /* _GAME_DATA_HEADER_ */
|
||||
#ifndef _GAME_DATA_HEADER_
|
||||
#define _GAME_DATA_HEADER_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define GAME_VER_CH0 '3'
|
||||
#define GAME_VER_CH1 '.'
|
||||
#define GAME_VER_CH2 '0'
|
||||
|
||||
|
||||
#define GAME_MODE_NORMAL 0
|
||||
#define GAME_MODE_LOAD 1
|
||||
|
||||
|
||||
typedef struct {
|
||||
uint8_t mode;
|
||||
} game_data;
|
||||
|
||||
#endif /* _GAME_DATA_HEADER_ */
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
#include "game_data.h"
|
||||
#include "utility.h"
|
||||
#include "mem_map.h"
|
||||
#include "mem_registers.h"
|
||||
|
|
@ -78,7 +79,7 @@ static const uint8_t box_content_start[BOX_CONTENT_SIZE] = {
|
|||
0, 0, 0, 0, 0, 0, 0,203, 77, 0, 0, 77, 0, 0, 77,192, 77, 0, 77, 77,211, 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 77, 77,211, 0, 0, 77, 0, 0, 77, 0, 77, 0, 77,198, 84, 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 20, 11, 50, 48, 52, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 50, 46, 49, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 20, 11, 50, 48, 52, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, GAME_VER_CH0, GAME_VER_CH1, GAME_VER_CH2, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
|
@ -106,7 +107,7 @@ static const uint8_t instruction_box[INSTR_BOX_SIZE] = {
|
|||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
18, 5, 1, 3, 8, 0, 0, 50, 48, 52, 56, 33,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
79, 0, 50, 48, 50, 53, 0, 50, 46, 49, 0, 79
|
||||
7, 15, 15, 4, 0, 12, 21, 3, 11, 33, 33, 33
|
||||
};
|
||||
|
||||
static const uint8_t demo_box[INSTR_BOX_SIZE] = {
|
||||
|
|
@ -117,7 +118,7 @@ static const uint8_t demo_box[INSTR_BOX_SIZE] = {
|
|||
4, 5, 0, 0, 4, 5, 13, 15, 0, 0, 13, 15,
|
||||
15, 4, 5, 0, 0, 4, 5, 13, 15, 0, 0, 13,
|
||||
13, 15, 4, 5, 0, 0, 4, 5, 13, 15, 0, 0,
|
||||
79, 0, 50, 48, 50, 53, 0, 50, 46, 49, 0, 79
|
||||
0, 13, 15, 4, 5, 0, 0, 4, 5, 13, 15, 0
|
||||
};
|
||||
|
||||
#ifdef _DEMO_MODE_
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include "monitor_subroutines.h"
|
||||
#include "utility.h"
|
||||
#include "input.h"
|
||||
#include "mem_map.h"
|
||||
#include "shared_page.h"
|
||||
|
||||
|
|
@ -29,7 +30,7 @@ void main(void) {
|
|||
memset((void*)(shared_page->module_data), 0, MODULE_DATA_SIZE);
|
||||
|
||||
// Detect expansion hardware, and choose what to load according to that
|
||||
vdp_detected = vdp_detect();
|
||||
vdp_detected = vdp_detect() && !read_any_key();
|
||||
|
||||
// Delay a bit
|
||||
while(wait_count--) WAIT(0xFF);
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
static state_page_data* state_page = (state_page_data*)STATE_PAGE;
|
||||
static shared_page_data *shared_page = (shared_page_data*)SHARED_PAGE;
|
||||
static uint8_t score_buf[7] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
static char game_ver[5] = {'V', GAME_VER_CH0, GAME_VER_CH1, GAME_VER_CH2, '\0'};
|
||||
|
||||
#define WAIT_COUNTER_END 0xFFFF
|
||||
|
||||
|
|
@ -44,7 +45,7 @@ void main(void) {
|
|||
vdp_print_string(1, 13, 12, (char*)score_buf);
|
||||
vdp_print_string(1, 5, 15, "Press any key to START");
|
||||
vdp_print_string(1, 1, 23, "hkz@social.chinwag.org");
|
||||
vdp_print_string(1, 28, 23, "2025");
|
||||
vdp_print_string(1, 28, 23, game_ver);
|
||||
|
||||
switch(dld->mode) {
|
||||
case DLOG_MODE_WIN:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue