diff --git a/.gitignore b/.gitignore index ad4d26c3f..9112484b8 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,6 @@ /testwrk/ /wrk/ /cc65.zip +/util/atari/*.exe +/util/gamate/*.exe + diff --git a/doc/intro.sgml b/doc/intro.sgml index 5d1889d76..4713de136 100644 --- a/doc/intro.sgml +++ b/doc/intro.sgml @@ -500,7 +500,7 @@ prompt. Before you can run the cartridge image produced by the linker, the binary has to be patched using the gamate-fixcart diff --git a/include/gamate.h b/include/gamate.h index 8b9790e39..bc6de3f98 100644 --- a/include/gamate.h +++ b/include/gamate.h @@ -145,6 +145,8 @@ /* constants for the conio implementation */ #define COLOR_BLACK 0x03 +#define COLOR_GRAY2 0x02 +#define COLOR_GRAY1 0x01 #define COLOR_WHITE 0x00 #define CH_HLINE 1 diff --git a/libsrc/gamate/cputc.s b/libsrc/gamate/cputc.s index 84742cb9d..d80e8b41a 100644 --- a/libsrc/gamate/cputc.s +++ b/libsrc/gamate/cputc.s @@ -89,28 +89,34 @@ putchar: adc #>(fontdata-$f8) sta ptr3+1 - lda CHARCOLOR - and #1 - beq @skip_plane1 - lda #LCD_XPOS_PLANE1 clc adc CURS_X sta LCD_X - ldy #$f8 + ldy #$F8 + + lda CHARCOLOR + lsr + bcc @delete1 + @copylp1: lda (ptr3),y eor RVS sta LCD_DATA iny bne @copylp1 + + beq @skip_delete1 -@skip_plane1: +@delete1: + lda #$00 +@del1: + sta LCD_DATA + iny + bne @del1 - lda CHARCOLOR - and #2 - beq @skip_plane2 +@skip_delete1: lda #LCD_XPOS_PLANE2 clc @@ -120,16 +126,30 @@ putchar: ldx CURS_Y lda _plotlo,x sta LCD_Y + + ldy #$F8 + + lda CHARCOLOR + and #2 + beq @delete2 - ldy #$f8 @copylp2: lda (ptr3),y eor RVS sta LCD_DATA iny bne @copylp2 + + beq @skip_delete2 + +@delete2: + lda #$00 +@del2: + sta LCD_DATA + iny + bne @del2 -@skip_plane2: +@skip_delete2: pla tax ldy CURS_X