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