mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-02-15 12:31:53 +00:00
peasant: remove some more calls to the ROM
we might want to run with language card at some point
This commit is contained in:
parent
e2208da387
commit
32d20ead2f
@ -30,7 +30,7 @@ draw_box:
|
||||
; draw lines
|
||||
|
||||
ldx #2 ; color is purple
|
||||
lda COLORTBL,X
|
||||
lda colortbl,X
|
||||
sta HGR_COLOR
|
||||
|
||||
; draw outer rectangle, x+6, y+5 x-6, y-5
|
||||
|
@ -28,39 +28,39 @@ PTRIG = $C070
|
||||
|
||||
; APPLESOFT BASIC ROUTINES
|
||||
|
||||
NORMAL = $F273
|
||||
;NORMAL = $F273
|
||||
HGR2 = $F3D8
|
||||
HGR = $F3E2
|
||||
BKGND0 = $F3F4 ; clear current page to A
|
||||
;HGR = $F3E2
|
||||
;BKGND0 = $F3F4 ; clear current page to A
|
||||
HPOSN = $F411 ; (Y,X),(A) (values stores in HGRX,XH,Y)
|
||||
HPLOT0 = $F457 ; plot at (Y,X), (A)
|
||||
COLOR_SHIFT = $F47E
|
||||
HLINRL = $F530 ; (X,A),(Y)
|
||||
;COLOR_SHIFT = $F47E
|
||||
;HLINRL = $F530 ; (X,A),(Y)
|
||||
HGLIN = $F53A ; line to (X,A),(Y)
|
||||
COLORTBL = $F6F6
|
||||
;COLORTBL = $F6F6
|
||||
|
||||
|
||||
; MONITOR ROUTINES
|
||||
|
||||
HLINE = $F819 ; HLINE Y,$2C at A
|
||||
VLINE = $F828 ; VLINE A,$2D at Y
|
||||
CLRSCR = $F832 ; Clear low-res screen
|
||||
CLRTOP = $F836 ; clear only top of low-res screen
|
||||
SETCOL = $F864 ; COLOR=A
|
||||
ROM_TEXT2COPY = $F962 ; iigs
|
||||
TEXT = $FB36
|
||||
TABV = $FB5B ; VTAB to A
|
||||
ROM_MACHINEID = $FBB3 ; iigs
|
||||
BELL = $FBDD ; ring the bell
|
||||
BASCALC = $FBC1 ;
|
||||
VTAB = $FC22 ; VTAB to CV
|
||||
HOME = $FC58 ; Clear the text screen
|
||||
;HLINE = $F819 ; HLINE Y,$2C at A
|
||||
;VLINE = $F828 ; VLINE A,$2D at Y
|
||||
;CLRSCR = $F832 ; Clear low-res screen
|
||||
;CLRTOP = $F836 ; clear only top of low-res screen
|
||||
;SETCOL = $F864 ; COLOR=A
|
||||
;ROM_TEXT2COPY = $F962 ; iigs
|
||||
TEXT = $FB36 ; qboot
|
||||
;TABV = $FB5B ; VTAB to A
|
||||
;ROM_MACHINEID = $FBB3 ; iigs
|
||||
;BELL = $FBDD ; ring the bell
|
||||
;BASCALC = $FBC1 ;
|
||||
;VTAB = $FC22 ; VTAB to CV
|
||||
HOME = $FC58 ; Clear the text screen ; qboot
|
||||
WAIT = $FCA8 ; delay 1/2(26+27A+5A^2) us
|
||||
CROUT1 = $FD8B
|
||||
SETINV = $FE80 ; INVERSE
|
||||
SETNORM = $FE84 ; NORMAL
|
||||
COUT = $FDED ; output A to screen
|
||||
COUT1 = $FDF0 ; output A to screen
|
||||
;CROUT1 = $FD8B
|
||||
;SETINV = $FE80 ; INVERSE
|
||||
;SETNORM = $FE84 ; NORMAL
|
||||
COUT = $FDED ; output A to screen ; qboot
|
||||
COUT1 = $FDF0 ; output A to screen ; qload
|
||||
|
||||
|
||||
|
||||
|
@ -26,9 +26,6 @@ vgi_simple_rectangle:
|
||||
|
||||
simple_rectangle_loop:
|
||||
|
||||
; FIXME: if not black/white probably need to run
|
||||
; color swap based on what column we are in
|
||||
|
||||
lda VGI_RCOLOR
|
||||
|
||||
and #$f
|
||||
@ -38,19 +35,13 @@ simple_rectangle_loop:
|
||||
|
||||
sta HGR_COLOR
|
||||
|
||||
done_colors:
|
||||
|
||||
; get ROW into (GBASL)
|
||||
|
||||
; urgh we depend on HGR_BITS being properly set
|
||||
; fast_hposn shifts color for us too
|
||||
|
||||
jsr fast_hposn
|
||||
|
||||
; Y is already the RX1/7
|
||||
|
||||
; adjust color if in striped mode
|
||||
|
||||
not_striped:
|
||||
|
||||
; copy the XRUN
|
||||
|
||||
@ -190,3 +181,35 @@ colortbl:
|
||||
; black2, orange, blue, white2
|
||||
.byte $00,$2A,$55,$7F,$80,$aa,$D5,$FF
|
||||
|
||||
|
||||
|
||||
;========================
|
||||
; fast hposn
|
||||
;========================
|
||||
; like HPOSN but faster (uses lookup tables)
|
||||
; need to set up lookup tables before using
|
||||
fast_hposn:
|
||||
|
||||
lda VGI_RY1
|
||||
tax
|
||||
lda hposn_low,X
|
||||
sta GBASL
|
||||
lda hposn_high,X
|
||||
sta GBASH
|
||||
|
||||
lda VGI_RX1
|
||||
tax
|
||||
ldy div7_table,X
|
||||
|
||||
tya
|
||||
lsr
|
||||
|
||||
lda HGR_COLOR ; if on odd byte rotate bits
|
||||
sta HGR_BITS
|
||||
bcc done_hposn
|
||||
|
||||
jsr colorshift
|
||||
|
||||
done_hposn:
|
||||
rts
|
||||
|
||||
|
@ -75,34 +75,3 @@ right_masks:
|
||||
.byte $81,$83,$87, $8F,$9F,$BF,$FF
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
fast_hposn:
|
||||
|
||||
|
||||
lda VGI_RY1
|
||||
tax
|
||||
lda hposn_low,X
|
||||
sta GBASL
|
||||
lda hposn_high,X
|
||||
sta GBASH
|
||||
|
||||
lda VGI_RX1
|
||||
tax
|
||||
ldy div7_table,X
|
||||
|
||||
tya
|
||||
lsr
|
||||
|
||||
lda HGR_COLOR ; if on odd byte rotate bits
|
||||
sta HGR_BITS
|
||||
bcc done_hposn
|
||||
|
||||
jsr COLOR_SHIFT
|
||||
|
||||
done_hposn:
|
||||
rts
|
||||
|
||||
|
@ -39,9 +39,6 @@ draw_inv_box:
|
||||
lda #135
|
||||
sta BOX_Y2
|
||||
|
||||
|
||||
|
||||
|
||||
jsr draw_box
|
||||
|
||||
;===================
|
||||
|
Loading…
x
Reference in New Issue
Block a user