Merge branch 'cc65:master' into atari7800conio

This commit is contained in:
Karri Kaksonen
2022-04-04 15:32:40 +03:00
committed by GitHub
4 changed files with 37 additions and 12 deletions

3
.gitignore vendored
View File

@@ -7,3 +7,6 @@
/testwrk/ /testwrk/
/wrk/ /wrk/
/cc65.zip /cc65.zip
/util/atari/*.exe
/util/gamate/*.exe

View File

@@ -500,7 +500,7 @@ prompt.
Before you can run the cartridge image produced by the linker, the binary has to Before you can run the cartridge image produced by the linker, the binary has to
be patched using the <bf/gamate-fixcart/ tool that is included in the cc65 be patched using the <bf/gamate-fixcart/ tool that is included in the cc65
package in the util/gamata directory. package in the util/gamate/ directory.
<tscreen><verb> <tscreen><verb>
gamate-fixcart <image.bin> gamate-fixcart <image.bin>

View File

@@ -145,6 +145,8 @@
/* constants for the conio implementation */ /* constants for the conio implementation */
#define COLOR_BLACK 0x03 #define COLOR_BLACK 0x03
#define COLOR_GRAY2 0x02
#define COLOR_GRAY1 0x01
#define COLOR_WHITE 0x00 #define COLOR_WHITE 0x00
#define CH_HLINE 1 #define CH_HLINE 1

View File

@@ -89,28 +89,34 @@ putchar:
adc #>(fontdata-$f8) adc #>(fontdata-$f8)
sta ptr3+1 sta ptr3+1
lda CHARCOLOR
and #1
beq @skip_plane1
lda #LCD_XPOS_PLANE1 lda #LCD_XPOS_PLANE1
clc clc
adc CURS_X adc CURS_X
sta LCD_X sta LCD_X
ldy #$f8 ldy #$F8
lda CHARCOLOR
lsr
bcc @delete1
@copylp1: @copylp1:
lda (ptr3),y lda (ptr3),y
eor RVS eor RVS
sta LCD_DATA sta LCD_DATA
iny iny
bne @copylp1 bne @copylp1
beq @skip_delete1
@skip_plane1: @delete1:
lda #$00
@del1:
sta LCD_DATA
iny
bne @del1
lda CHARCOLOR @skip_delete1:
and #2
beq @skip_plane2
lda #LCD_XPOS_PLANE2 lda #LCD_XPOS_PLANE2
clc clc
@@ -120,16 +126,30 @@ putchar:
ldx CURS_Y ldx CURS_Y
lda _plotlo,x lda _plotlo,x
sta LCD_Y sta LCD_Y
ldy #$F8
lda CHARCOLOR
and #2
beq @delete2
ldy #$f8
@copylp2: @copylp2:
lda (ptr3),y lda (ptr3),y
eor RVS eor RVS
sta LCD_DATA sta LCD_DATA
iny iny
bne @copylp2 bne @copylp2
beq @skip_delete2
@delete2:
lda #$00
@del2:
sta LCD_DATA
iny
bne @del2
@skip_plane2: @skip_delete2:
pla pla
tax tax
ldy CURS_X ldy CURS_X