Quote:Original post by HemoGloben
Quote:Original post by benryves
EDIT: to the above poster, please put CAPTION around them pictures [smile] (I'm lazy, OK?)
*snip*
A few more Z80 projects.
What did you code that with? I tried to use the BASIC in the calc, and it runs waaayyyy too slow. Did you just optimize out the ass? Or did you code in assembler?
Any tips for programming on the Ti-83 Plus's?
ZiLOG Z80 ASM all the way!
#include "../ti83plus.inc"#include "../ion.inc"#define bcall(label) RST 28h \ .dw label#define DitherBuffer SavesScreen .org $9D93 .db $BB,$6D ret jr nc,StartDescription:.db "Fire Effect",0Start: di ;Clear Dither buffer: xor a ld hl,DitherBuffer ld bc,24*16 bcall(_memset) ;DITHER = 24x16FireLoop:; (1) Shift all the bytes in the buffer up one. ld hl,DitherBuffer+24 ld de,DitherBuffer ld bc,15*24 ldir; (2) Add a line of fire at the bottom edge of the screen. call GetPoints ld a,1 call SetMemory call GetPoints ld a,2 call SetMemory call GetPoints ld a,3 call SetMemory ; (3) Soften previous lines. ld ix,DitherBuffer ld d,15NextSoftenLine: ld c,22SoftenAlongLine: ld a,(ix+0) add a,a add a,a ld b,a ld a,(ix+2) add a,a add a,a add a,b ld b,a ld a,(ix+25) add a,a add a,a add a,b ld b,0 cp 15 jr c,Make_0 cp 23 jr c,Make_1 cp 32 jr c,Make_2Make_3: inc bMake_2: inc bMake_1: inc bMake_0: ld a,b ld (ix+1),a inc ix dec c ld a,c or a jr nz,SoftenAlongLine inc ix inc ix dec d ld a,d or a jr nz,NextSoftenLine ; (4) Copy to screen, pool keypresses &c. call RenderDither call ionFastCopy ld a,KeyRow_5 out (1),a in a,(1) cp dKClear ret z jr FireLoopRenderDither: ;Renders the dither to the plotsscreen. bcall(_grbufclr) ld hl,0 ld (X_Pos),hl ld ix,DitherBuffer ld (Pointer),ixNextByte: ld ix,(Pointer) ld a,(ix+0) inc ix ld (Pointer),ix add a,a add a,a ld l,a ld h,0 ld de,Dithers add hl,de push hl pop ix ld a,(Y_Pos) ld l,a ld a,(X_Pos) ld b,4 call ionputSprite ld a,(X_Pos) add a,4 cp 96 jr nz,SaveA ld a,(Y_Pos) add a,4 cp 64 ret z ld (Y_Pos),a xor aSaveA: ld (X_Pos),a jr NextBytex_Pos: .db 0Y_Pos: .db 0Pointer: .dw 0GetPoints: ld b,12 call ionRandom inc a ld e,a ld b,10 call ionRandom add a,2 ld c,a retSetMemory: ld hl,DitherBuffer+(24*15) ld d,0 add hl,de ld b,0 bcall(_memset) ret Dithers: .db %11110000 .db %11110000 .db %11110000 .db %11110000 .db %10100000 .db %11110000 .db %10100000 .db %11110000 .db %01010000 .db %00000000 .db %01010000 .db %00000000 .db %00000000 .db %00000000 .db %00000000 .db %00000000#include "keyval.inc".endEND
Probably could be shrunk a bit... But you get the idea. FT2, the space shooter, is about 8000 lines of code in all [wow]
Erm, for suggestions I'd suggest you check out
ticalc.org for docs and the
MaxCoderz forums for friendly help and advice.
Oh, and I should post a pic, shouldn't I?
All from a scene demo I did (full animated screenshot is
hyar)