From 44b31b79504171f6d8ac9b16a0ab9dd7fe38b588 Mon Sep 17 00:00:00 2001 From: Brett Gordon Date: Thu, 8 Oct 2015 14:35:55 -0400 Subject: [PATCH] coco3: add video init function. --- Kernel/platform-coco3/coco3.s | 7 ++----- Kernel/platform-coco3/video.c | 8 ++++++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Kernel/platform-coco3/coco3.s b/Kernel/platform-coco3/coco3.s index 2de9d35f..826559be 100644 --- a/Kernel/platform-coco3/coco3.s +++ b/Kernel/platform-coco3/coco3.s @@ -33,6 +33,7 @@ .globl unix_syscall_entry .globl nmi_handler .globl null_handler + .globl video_init include "kernel.def" include "../kernel09.def" @@ -161,11 +162,7 @@ b@ sta ,x+ sta $ffb0 stb $ffb8 ;; clear video memory - ldx #$ac00 - lda #$20 -a@ sta ,x+ - cmpx #$bbd0 - bne a@ + jsr _video_init ;; Our vectors are in high memory unlike Z80 but we still ;; need vectors ldu #0xfeee ; vector area diff --git a/Kernel/platform-coco3/video.c b/Kernel/platform-coco3/video.c index 631da1cf..a05ffb38 100644 --- a/Kernel/platform-coco3/video.c +++ b/Kernel/platform-coco3/video.c @@ -97,3 +97,11 @@ unsigned char vt_map(unsigned char c) return 0x5E; /* up arrow */ return c; } + + +void video_init( ) +{ + map_for_video(); + memset( (char *)0x2000, ' ', 0x4000 ); + map_for_kernel(); +} -- 2.34.1