Ah, but i did get the routine i wanted sorted out:
![Image](http://img329.imageshack.us/img329/6671/textroutineao4.gif)
or:
Code: Select all
Group1 .equ $FE
Group2 .equ $FD
dEnter .equ 254
Main:
ld hl,$450E
tifont:
push hl
in a,($06)
push af
ld a,$27
out ($06),a
ld bc,7
ld de,copysprite
ldir
pop af
out ($06),a
ld l,0
ld a,0
ld b,7
ld ix,copysprite
call ionputsprite ;display it!
call ionfastcopy
bcall(_cleargbuf)
pop hl
keyLoop:
ld a,0ffh
out (1),a
ld a,Group2
out (1),a
in a,(1)
cp dEnter
ret z
ld a,Group1
out (1),a
in a,(1)
cp $FF
jr z,keyLoop
ld de,8
rra
rra
jr c,$+4
sbc hl,de ;left was pressed
rra
jr c,$+3
add hl,de ;right was pressed
jr nz,tifont
ret
copysprite:
.db 0,0,0,0,0,0,0
![Image](http://img112.imageshack.us/img112/3603/heymaxcoderzct3.gif)
Code: Select all
Group1 .equ $FE
Group2 .equ $FD
dEnter .equ 254
Main:
bcall(_cleargbuf)
ld de,0105h
ld (bigPenRow),de
ld hl,textLabel
call drawFont
bcall(_getkey)
ret
drawFont:
push hl
ld de,$4506
in a,($06)
push af
ld a,$27
out ($06),a
ld a,(hl)
ld l,a
ld h,0
add hl,hl
add hl,hl
add hl,hl ;x8
add hl,de
ld bc,7
ld de,copysprite
ldir
pop af
out ($06),a
bigPenRow = $ + 1
ld hl,0101h
call drawsprite
inc l
call drawsprite
inc h
call drawsprite
dec l
call drawsprite
dec h
call drawsprite
ld a,h
ld b,7
ld ix,copysprite
call ionputsprite ;display it!
call ionfastcopy
ld de,$0600
ld hl,(bigPenRow)
add hl,de
ld (bigPenRow),hl
pop hl
inc hl
ld a,(hl)
or a ;null terminated
ret z
jp drawFont
drawsprite:
ld a,h
ld b,7
ld ix,copysprite
call ionORSprite ;display it!
ld hl,(bigPenRow)
ret
copysprite:
.db 0,0,0,0,0,0,0,
textLabel:
.db "Hey Maxcoderz!",0
;-----> Draw a sprite
; b=size of sprite
; l=yc
; a=xc
; ix holds pointer
ionORSprite:
push ix
ld e,l
ld h,$00
ld d,h
add hl,de
add hl,de
add hl,hl
add hl,hl
ld e,a
and $07
ld c,a
srl e
srl e
srl e
add hl,de
ld de,gbuf
add hl,de
putSpriteLoop1:
sl1: ld d,(ix)
ld e,$00
ld a,c
or a
jr z,putSpriteSkip1
putSpriteLoop2:
srl d
rr e
dec a
jr nz,putSpriteLoop2
putSpriteSkip1:
ld a,(hl)
or d
ld (hl),a
inc hl
ld a,(hl)
or e
ld (hl),a
ld de,$0B
add hl,de
inc ix
djnz putSpriteLoop1
pop ix
ret
Note2: please don't try these out on your actual calculators (if you do bother to try them out at all!) as i really don't know what i am doing with the ports and on PindurTI i experienced some funky things. I think i fixed them but i've really got no idea! So please, unless you know what you are doing, well.. just be careful!
By ORing each sprite 5 times (once centered, once shifted one pixel left, once shifted one pixel right, etc) then XORing the sprite in the center, there's that cool outline effect
![Smile :)](./images/smilies/grayscale_smile.gif)
EDIT: The Internet i was using crapped out before i could post this, after reading through the replies in the other topic that cleared up quite a few things
![Smile :)](./images/smilies/grayscale_smile.gif)