From 09d7701c15e284f26a8e5bbdda3737b487f6b00f Mon Sep 17 00:00:00 2001 From: hugova Date: Fri, 2 May 2025 22:35:12 +0200 Subject: [PATCH] add test program for char_draw --- wip-hugo/routines/text/char.inc | 11 +++++++++++ wip-hugo/routines/text/char_draw.s | 14 +++----------- wip-hugo/routines/text/char_draw_test.s | 11 +++++++++++ 3 files changed, 25 insertions(+), 11 deletions(-) create mode 100644 wip-hugo/routines/text/char.inc create mode 100644 wip-hugo/routines/text/char_draw_test.s diff --git a/wip-hugo/routines/text/char.inc b/wip-hugo/routines/text/char.inc new file mode 100644 index 0000000..bf346d5 --- /dev/null +++ b/wip-hugo/routines/text/char.inc @@ -0,0 +1,11 @@ + Character_generator_ROM = $D000 + Y_pos_offset = $F9 ; 16-bit value (uses F8), reuses from Y_pos + X_pos_offset = $FA ; 16-bit value (uses F7) + X_pos = $FA + Y_pos = $F9 + charset = $FB + code = $FE + petski_position = $FE ; 16-bit value (uses FF),reuses code:s memory + screen_position = $FC ; 16-bit value (uses FD) + ;; copy + VIC_bank = $4000 diff --git a/wip-hugo/routines/text/char_draw.s b/wip-hugo/routines/text/char_draw.s index 9b8ebf4..3f959a0 100644 --- a/wip-hugo/routines/text/char_draw.s +++ b/wip-hugo/routines/text/char_draw.s @@ -1,19 +1,11 @@ ;;; -*- Mode: asm; indent-tabs-mode: t; tab-width: 8 -*- -;; petski: https://www.c64-wiki.com/wiki/File:ASCII-Codes.gif +;; petscii: https://www.c64-wiki.com/wiki/File:ASCII-Codes.gif ;;https://www.c64-wiki.com/wiki/Character_set -;; Takes in a PETSKI-code in CODE +;; Takes in a PETSCII-code in CODE ;; And prints it ON X_pos, Y_pos ;; Note that this is the real positions divided by 8 .proc char_draw; user-procedure :clobbers (A Y) :clobbers-arguments (0 3) - Character_generator_ROM = $D000 - Y_pos_offset = $F9 ; 16-bit value (uses F8), reuses from Y_pos - X_pos_offset = $FA ; 16-bit value (uses F7) - X_pos = $FA - Y_pos = $F9 - charset = $FB - code = $FE - petski_position = $FE ; 16-bit value (uses FF),reuses code:s memory - screen_position = $FC ; 16-bit value (uses FD) + .include "char.inc" ;#### TEMP INIT DATA #### LDA #$10 diff --git a/wip-hugo/routines/text/char_draw_test.s b/wip-hugo/routines/text/char_draw_test.s new file mode 100644 index 0000000..16a874c --- /dev/null +++ b/wip-hugo/routines/text/char_draw_test.s @@ -0,0 +1,11 @@ +.scope char_draw_test + .include "char.inc" + LDA #$10 + STA code + LDA #$10 + LDA #04 + STA X_pos + LDA #02 + STA Y_pos + JSR char_drawj +.endscope