In a program I'm making [name must not be mentioned], I need to be able to draw lines fast. I could make my own routine to do this, but this program is for Mirage so I figure I will just use either the Mirage line routine or the Ion line routine. After searching for a while through routines called fastlinex, fastlinew etc, I came across what appears to me to be the correct one for my purposes: fastline. The only problem is that am having trouble determining what the inputs are. I have searched high and low for a program that uses fastline, and I did finally find one, but it must use some inputs that I don't understand how to use becuase simply putting X1,Y1 in hl and X2,Y2 in de produced nothing when I tried. Here's the code for the program that I found:
Code:
It appears that a and b have some sort of input as well in the routine, but I don't understand exactly what it wants. All I want is a solid line from a given (x,y) to a second (x,y). I searched through both the mirage documentation (which is very very scarce) and the ion documentation (all that I could find of it), but I found nothing.
Does anyone know the inputs for a fastline routine in either Mirage or Ion? Kerm, I know you must; you did after all, re-write the ion libs.
Code:
.nolist
#include "ti83plus.inc"
#include "mirage.inc"
.list
.org $9d93 ;Origin
.db $BB,$6D ;Compiled AsmPrgm token
ret ;Header Byte 1 -- So TIOS wont run
.db 1 ;Header Byte 2 -- Identifies as MirageOS prog
button: ;Button - should be a 15x15 graphic
.db %00000000,%00000000
.db %00000001,%00000000
.db %00000001,%00000000
.db %01010000,%10000000
.db %01001000,%10000000
.db %01000100,%01000000
.db %01000010,%01000000
.db %01000001,%00000000
.db %00100000,%10000000
.db %00100000,%01000000
.db %00100000,%00100000
.db %00100000,%00010000
.db %00101111,%10000000
.db %00000000,%00000000
.db %00000000,%00000000
.db %00000000,%00000000
.db %00000000,%00000000
progstart:
ld b,95
call irandom ;X1
ld h,a
ld b,63
call irandom ;Y1
ld l,a
ld b,95
call irandom ;X2
ld d,a
ld b,63
call irandom ;Y2
ld e,a
ld b,255
call irandom ;Pattern if 3 chosen below
ld (mlinebitmap),a
ld a,(userpattern)
ld b,0
cp 0
jr z,dozero
cp 1
jr z,doone
cp 2
jr z,dotwo
cp 3
jr z,dothree
ld b,4
call irandom ;Pattern
merge:
call fastline
call ifastcopy
ld b,100
lbl:
ei
halt
bcall(_getCSC)
cp $F
ld c,0
jr z,scnclr
cp $38
ret z
cp $21
jr z,userzero
cp $22
jr z,userone
cp $1A
jr z,usertwo
cp $12
jr z,userthree
cp $23
jr z,userfour
djnz lbl
jr progstart
scnclr:
bcall(_GrBufClr)
jr progstart
userfour:
inc c
userthree:
inc c
usertwo:
inc c
userone:
inc c
userzero:
ld a,c
ld (userpattern),a
jr progstart
dothree:
inc b
dotwo:
inc b
doone:
inc b
dozero:
ld a,b
jr merge
userpattern:
.db $04
.end
It appears that a and b have some sort of input as well in the routine, but I don't understand exactly what it wants. All I want is a solid line from a given (x,y) to a second (x,y). I searched through both the mirage documentation (which is very very scarce) and the ion documentation (all that I could find of it), but I found nothing.
Does anyone know the inputs for a fastline routine in either Mirage or Ion? Kerm, I know you must; you did after all, re-write the ion libs.