1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-08 15:29:37 +00:00

Invert vertical dimension on the screen

This commit is contained in:
Dave Plummer 2023-10-10 10:48:21 -07:00
parent f1ee45c0f3
commit 1c838e5db7
5 changed files with 16 additions and 19 deletions

Binary file not shown.

View File

@ -227,8 +227,8 @@ int main (void)
// DrawScreenMoire(0,30, 319, 199);
// Print the numbers from 0-9999, forcing the screen to scroll
for (i = 25; i < 95; i+=5)
DrawCircleC(SCREEN_WIDTH/2, SCREEN_HEIGHT/2, i, 1);
for (i = 5; i < 80; i+=5)
DrawCircleC(SCREEN_WIDTH/2, SCREEN_HEIGHT/2 + 20, i, 1);
printf("Done, exiting...\r\n");
return 0;

View File

@ -804,12 +804,12 @@ Current file: kimGFX.s
000511r 1 A2 rr ldx #>(S0006)
000513r 1 20 rr rr jsr _DrawTextAt
000516r 1 A2 00 ldx #$00
000518r 1 A9 19 lda #$19
000518r 1 A9 05 lda #$05
00051Ar 1 A0 00 ldy #$00
00051Cr 1 20 rr rr jsr staxysp
00051Fr 1 A0 01 L0002: ldy #$01
000521r 1 20 rr rr jsr ldaxysp
000524r 1 C9 5F cmp #$5F
000524r 1 C9 50 cmp #$50
000526r 1 8A txa
000527r 1 E9 00 sbc #$00
000529r 1 50 02 bvc L0006
@ -825,7 +825,7 @@ Current file: kimGFX.s
00053Dr 1 A9 A0 lda #$A0
00053Fr 1 20 rr rr jsr pushax
000542r 1 A2 00 ldx #$00
000544r 1 A9 64 lda #$64
000544r 1 A9 78 lda #$78
000546r 1 20 rr rr jsr pushax
000549r 1 A0 05 ldy #$05
00054Br 1 20 rr rr jsr ldaxysp

View File

@ -98,32 +98,29 @@ _GetPixelAddress:
ror adp1
lsr adp1+1
ror adp1
lda #199 ; transfer (199-_y1cord) to adp2
sec ; and temporary storage
sbc _y1cord
lda _y1cord
sta adp2
sta temp
lda #0
sbc _y1cord+1
lda _y1cord+1
sta adp2+1
sta temp+1
asl adp2 ; compute 40*(199-_y1cord)
rol adp2+1 ; 2*(199-_y1cord)
asl adp2 ; compute 40*(_y1cord)
rol adp2+1 ; 2*(_y1cord)
asl adp2
rol adp2+1 ; 4*(199-_y1cord)
lda adp2 ; add in temporary save of (199-_y1cord)
clc ; to make 5*(199-_y1cord)
rol adp2+1 ; 4*(_y1cord)
lda adp2 ; add in temporary save of (_y1cord)
clc ; to make 5*(_y1cord)
adc temp
sta adp2
lda adp2+1
adc temp+1
sta adp2+1 ; 5*(199-_y1cord)
asl adp2 ; 10*(199-_y1cord)
sta adp2+1 ; 5*(_y1cord)
asl adp2 ; 10*(_y1cord)
rol adp2+1
asl adp2 ; 20#(199-_y1cord)
asl adp2 ; 20#(_y1cord)
rol adp2+1
asl adp2 ; 40*(199-_y1cord)
asl adp2 ; 40*(_y1cord)
rol adp2+1
lda adp2 ; add in int(_x1cord/8) computed earlier
clc

Binary file not shown.