From eadd7c7adef9a31ae18021f95ecfea7a25542dc0 Mon Sep 17 00:00:00 2001 From: uz Date: Mon, 7 Jan 2013 19:30:55 +0000 Subject: [PATCH] Patch by Greg King: The Oric Atmos graphics driver tries to be both a black-and-white driver and a color-palette driver, at the same time. That cannot work on the Oric's architecture. This patch makes it be only a black-and-white driver. git-svn-id: svn://svn.cc65.org/cc65/trunk@5955 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/atmos/atmos-240-200-2.s | 46 ++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/libsrc/atmos/atmos-240-200-2.s b/libsrc/atmos/atmos-240-200-2.s index 80d9ec784..9027b3340 100644 --- a/libsrc/atmos/atmos-240-200-2.s +++ b/libsrc/atmos/atmos-240-200-2.s @@ -1,7 +1,8 @@ ; -; Graphics driver for the 240x200x2 mode on the Atmos +; Graphics driver for the 240x200x2 monochrome mode on the Atmos ; ; Stefan Haubenthal +; 2012-08-11, Greg King ; .include "zeropage.inc" @@ -12,6 +13,9 @@ .macpack generic +XSIZE = 6 ; System font width +YSIZE = 8 ; System font height + ; ------------------------------------------------------------------------ ; Header. Includes jump table and constants. @@ -26,8 +30,8 @@ .word 200 ; Y resolution .byte 2 ; Number of drawing colors .byte 1 ; Number of screens available -xsize: .byte 6 ; System font X size - .byte 8 ; System font Y size + .byte XSIZE ; System font X size + .byte YSIZE ; System font Y size .word $011C ; Aspect ratio (based on 4/3 display) .byte 0 ; TGI driver flags @@ -65,7 +69,6 @@ X1 = ptr1 Y1 = ptr2 X2 = ptr3 Y2 = ptr4 -RADIUS = tmp1 ; Absolute variables used in the code @@ -90,7 +93,7 @@ INK = $F210 .rodata -DEFPALETTE: .byte $00, $07 +DEFPALETTE: .byte 0, 1 .code @@ -218,15 +221,7 @@ SETCOLOR: ; SETPALETTE: - ldy #0 - lda (ptr1),y - sta PARAM1 - jsr PAPER - ldy #1 - lda (ptr1),y - sta PARAM1 - jsr INK - lda #TGI_ERR_OK + lda #TGI_ERR_INV_FUNC ; This resolution has no palette sta ERROR rts @@ -263,15 +258,16 @@ GETDEFPALETTE: ; SETPIXEL: + lda Y1 + sta PARAM2 lda MODE mymode: sta PARAM3 lda X1 sta PARAM1 - lda Y1 - sta PARAM2 lda #0 sta PARAM1+1 sta PARAM2+1 + sta PARAM3+1 jmp CURSET ; ------------------------------------------------------------------------ @@ -316,6 +312,8 @@ LINE: sta PARAM2+1 lda MODE sta PARAM3 + ldx #>0 + stx PARAM3+1 jmp DRAW ; ------------------------------------------------------------------------ @@ -368,13 +366,11 @@ TEXTSTYLE: ; OUTTEXT: - lda X1 - sta PARAM1 lda Y1 + sub #(YSIZE - 1) sta PARAM2 - lda #3 - sta PARAM3 - jsr CURSET + lda #3 ; (Move graphics cursor; don't draw) + jsr mymode ldy #0 @next: lda (ptr3),y @@ -382,15 +378,21 @@ OUTTEXT: sta PARAM1 lda #0 sta PARAM2 + sta PARAM1+1 + sta PARAM2+1 + sta PARAM3+1 lda MODE sta PARAM3 tya pha jsr CHAR - lda xsize + lda #XSIZE sta PARAM1 lda #0 sta PARAM2 + sta PARAM1+1 + sta PARAM2+1 + sta PARAM3+1 lda #3 sta PARAM3 jsr CURMOV -- 2.39.5