mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-07-06 07:28:58 +00:00
hgr: sier_hgr fix branch-always and add some more comments
also accidentally fixes colors
This commit is contained in:
parent
6c3ed631fb
commit
b4b5bedbf9
@ -52,7 +52,6 @@ SAVED = $FF
|
|||||||
FULLGR = $C052
|
FULLGR = $C052
|
||||||
PAGE1 = $C054
|
PAGE1 = $C054
|
||||||
PAGE2 = $C055
|
PAGE2 = $C055
|
||||||
LORES = $C056 ; Enable LORES graphics
|
|
||||||
|
|
||||||
; ROM routines
|
; ROM routines
|
||||||
HGR = $F3E2
|
HGR = $F3E2
|
||||||
@ -90,10 +89,9 @@ sier_outer:
|
|||||||
ldx #0 ; get X 0 for later
|
ldx #0 ; get X 0 for later
|
||||||
stx YY ; YY starts at 0
|
stx YY ; YY starts at 0
|
||||||
|
|
||||||
; create XX_T lookup table
|
; create XX_T and YY_T lookup tables
|
||||||
; note, same as YY_T lookup table?
|
|
||||||
|
|
||||||
stx XX_TL ; start at 0
|
stx XX_TL ; always start at 0
|
||||||
stx XX_TH
|
stx XX_TH
|
||||||
|
|
||||||
; calc XX*T
|
; calc XX*T
|
||||||
@ -101,14 +99,15 @@ sier_outer:
|
|||||||
xt_table_loop:
|
xt_table_loop:
|
||||||
clc ; 2
|
clc ; 2
|
||||||
lda XX_TL ; 3
|
lda XX_TL ; 3
|
||||||
tl_smc:
|
|
||||||
adc T_L ; 2
|
adc T_L ; 2
|
||||||
sta XX_TL ; 3
|
sta XX_TL ; 3
|
||||||
|
|
||||||
lda XX_TH ; 3
|
lda XX_TH ; 3
|
||||||
th_smc:
|
|
||||||
adc T_H ; 3
|
adc T_H ; 3
|
||||||
sta XX_TH ; 3
|
sta XX_TH ; 3
|
||||||
|
|
||||||
sta YT_LOOKUP_TABLE,X ; 5
|
sta YT_LOOKUP_TABLE,X ; 5
|
||||||
|
|
||||||
eor #$ff ; negate, as we subtract ; 2
|
eor #$ff ; negate, as we subtract ; 2
|
||||||
sta XT_LOOKUP_TABLE,X ; 5
|
sta XT_LOOKUP_TABLE,X ; 5
|
||||||
inx ; 2
|
inx ; 2
|
||||||
@ -128,8 +127,9 @@ no_carry:
|
|||||||
; speed up the zoom as it goes
|
; speed up the zoom as it goes
|
||||||
inc speed_smc+1
|
inc speed_smc+1
|
||||||
|
|
||||||
|
; set initial position on screen at line 32
|
||||||
|
|
||||||
lda #$1 ; center
|
lda #$0 ;
|
||||||
sta GBASL
|
sta GBASL
|
||||||
|
|
||||||
lda #$42 ; start on page2 line 32 ($4200)
|
lda #$42 ; start on page2 line 32 ($4200)
|
||||||
@ -147,7 +147,8 @@ sier_yloop:
|
|||||||
adc #$1
|
adc #$1
|
||||||
sta gb_smc+1
|
sta gb_smc+1
|
||||||
|
|
||||||
|
; YY*T only needs to be updated once per line
|
||||||
|
; so do it here and then self-modify into place
|
||||||
|
|
||||||
ldx YY ; 3
|
ldx YY ; 3
|
||||||
stx add_yy_smc+1 ; 4
|
stx add_yy_smc+1 ; 4
|
||||||
@ -159,7 +160,7 @@ sier_yloop:
|
|||||||
ldx #0 ; XX
|
ldx #0 ; XX
|
||||||
|
|
||||||
seven_loop:
|
seven_loop:
|
||||||
ldy #7
|
ldy #7 ; apple ii 7 pixels per byte
|
||||||
|
|
||||||
sier_xloop:
|
sier_xloop:
|
||||||
|
|
||||||
@ -167,7 +168,7 @@ sier_xloop:
|
|||||||
|
|
||||||
|
|
||||||
; SAVED = XX+(Y*T)
|
; SAVED = XX+(Y*T)
|
||||||
clc ; needed for colors ; 2
|
clc ; needed for proper colors ; 2
|
||||||
txa ; XX ; 2
|
txa ; XX ; 2
|
||||||
yy_th_smc:
|
yy_th_smc:
|
||||||
adc #$dd ; 2
|
adc #$dd ; 2
|
||||||
@ -209,7 +210,7 @@ black:
|
|||||||
ror ; 2
|
ror ; 2
|
||||||
|
|
||||||
gb_smc:
|
gb_smc:
|
||||||
sta $4000 ; 4
|
sta $4000 ; write to hi-res display ; 4
|
||||||
inc gb_smc+1 ; increase GBASL ; 6
|
inc gb_smc+1 ; increase GBASL ; 6
|
||||||
|
|
||||||
cpx #248 ; 2
|
cpx #248 ; 2
|
||||||
@ -218,14 +219,16 @@ gb_smc:
|
|||||||
|
|
||||||
;=================
|
;=================
|
||||||
; total roughly ???
|
; total roughly ???
|
||||||
; 49152 per inside *80 = 3,145,728
|
; full screen each inner cycle is done 256*192 = 49152
|
||||||
; apple II cyles/frame = 17,030
|
; apple II cyles/frame = 17,030
|
||||||
; 1FPS = 1,021,800
|
; 1FPS = 1,021,800
|
||||||
|
|
||||||
|
|
||||||
;==================================
|
;==================================
|
||||||
|
|
||||||
jsr MOVE_DOWN ; X/Y left alone
|
jsr MOVE_DOWN ; ROM routine to skip the next line
|
||||||
|
; as this is non-trivial on Apple II
|
||||||
|
; X/Y left alone
|
||||||
; returns with GBASH in A
|
; returns with GBASH in A
|
||||||
|
|
||||||
inc YY ; repeat until YY=128
|
inc YY ; repeat until YY=128
|
||||||
@ -234,10 +237,5 @@ gb_smc:
|
|||||||
;flip_pages:
|
;flip_pages:
|
||||||
; TODO if frame rate ever gets fast enough
|
; TODO if frame rate ever gets fast enough
|
||||||
|
|
||||||
jmp sier_outer ; branch always
|
bmi sier_outer ; branch always
|
||||||
|
|
||||||
|
|
||||||
; $386, want to be at $3F5
|
|
||||||
; load at $36F???
|
|
||||||
|
|
||||||
; jmp sier
|
|
||||||
|
Loading…
Reference in New Issue
Block a user