First "working" try

This commit is contained in:
Pecusx
2023-05-08 21:45:08 +02:00
parent 11d9e99b5c
commit 1ce1e978bb
3 changed files with 37 additions and 30 deletions
+33 -26
View File
@@ -126,23 +126,22 @@ CheckX02
MakePlot
; let's calculate coordinates from xdraw and ydraw
;xbyte = xbyte/8
lda xdraw+1
lsr
lda xdraw
ror ;just one bit over 256. Max screenwidth = 512!!!
lsr
lsr
sta xbyte
and #%11111000
;sta xbyte
;---
ldx ydraw
ldy linetableL,x
clc
adc linetableL,x
sta xbyte
lda linetableH,x
adc xdraw+1
sta xbyte+1
lda xdraw
and #$7
tax
ldy #0
lda color
bne ClearPlot
@@ -166,24 +165,22 @@ ClearPlot
; let's calculate coordinates from xdraw and ydraw
;xbyte = xbyte/8
lda xdraw+1
lsr
lda xdraw
ror ;just one bit over 256. Max screenwidht = 512!!!
lsr
lsr
sta xbyte
and #%11111000
;sta xbyte
;---
ldx ydraw
ldy linetableL,x
clc
adc linetableL,x
sta xbyte
lda linetableH,x
adc xdraw+1
sta xbyte+1
lda xdraw
and #$7
tax
ldy #0
lda (xbyte),y
eor #$ff
and bittable,x
@@ -210,11 +207,20 @@ ClearPlot
mwa #linetableL temp2
mwa #linetableH modify
ldy #0
ldx #0
@ lda temp
sta (temp2),y
lda temp+1
sta (modify),y
adw temp #40
cpx #7
bne NotChar
ldx #0
adw temp #(320-7)
jmp next8lines
NotChar
inw temp
inx
next8lines
iny
cpy #screenheight+1
bne @-
@@ -222,13 +228,9 @@ ClearPlot
.endp
;--------------------------------------------------
.proc SetMainScreen
lda #0 ; Black background and border
lda #1 ; White background and border
sta $d020
sta $d021
; lda #$3b ; Bitmap mode on
; sta $d011
; lda #$18 ; Multicolor on
; sta $d016
lda $dd00 ; Set video bank to start at 0
and #252
@@ -243,12 +245,17 @@ ClearPlot
lda #$00
sta 53281
; clear color RAM
lda #0
tax
@ sta $d800,x
ldx #0
@ lda #1
sta $d800,x
sta $d900,x
sta $da00,x
sta $db00,x
lda #$21
sta $0400,x
sta $0500,x
sta $0600,x
sta $0700,x
inx
bne @-
+4 -4
View File
@@ -35,7 +35,7 @@
icl 'definitions.asm'
;---------------------------------------------------
FirstZpageVariable = $57
FirstZpageVariable = $30 ; $57
.zpvar DliColorBack .byte = FirstZpageVariable
.zpvar GradientNr .byte
.zpvar GradientColors .word
@@ -161,7 +161,7 @@ FirstZpageVariable = $57
;-----------------------------------------------
; Game loading address
ORG $4000
ORG $4100
icl 'variables.asm'
WeaponFont
@@ -184,7 +184,7 @@ FirstSTART
; SEI ; disable IRQ
LDA #$36
STA $0001 ; Turn Off BASIC ROM
/* LDA #<NMI ;
LDA #<NMI ;
STA $0318 ; change NMI vector
LDA #>NMI ; to our routine
STA $0319 ;
@@ -196,7 +196,7 @@ FirstSTART
STA $DD0D ; set Timer A as source for NMI
LDA #$01 ;
STA $DD0E ; start Timer A -> NMI
*/
; from here on NMI is disabled
BIN
View File
Binary file not shown.