0 Members and 1 Guest are viewing this topic.
#include "ti83plus.inc"#define progStart $9D95.org progStart-2.db $BB,$6DMainLoop: .db 3Eh ;start of ld a,*smc_index: .db 0 inc a and 1Fh ld (smc_index),a ld hl,LUT add a,l jr nc,$+3 inc h ld l,a ld c,(hl) .db 16h ;ld d,*smc_yskew: .db 40 call C_div_D ld a,c; ld a,(hl); rlca \ rlca \ rlca \ and 7 ld (smc_ycomponent),a ld a,(smc_index) add a,a .db $C6smc_var1: .db 0 and 31 ld hl,LUT add a,l jr nc,$+3 inc h ld l,a ld c,(hl) .db 16h ;ld d,*smc_xskew: .db 32 call C_div_D ld a,c; ld a,(hl); rlca \ rlca \ rlca \ and 7 ld (smc_xcomponent),a ld ix,933Fh ld hl,0while_y_lt_32: ld a,l .db $C6smc_ycomponent: .db 0 and 31 ld de,LUT add a,e jr nc,$+3 inc d ld e,a ld a,(de) ld (smc_m),awhile_x_lt_48: ld a,h .db $C6 ;add a,*smc_xcomponent: .db 0 and 31 ld de,LUT add a,e jr nc,$+3 inc d ld e,a ld a,(de) .db $C6smc_m: .db 0 ld b,0 jr nc,$+3 inc b ld c,a push bc ld de,(smc_ycomponent) ld a,(smc_xcomponent) add a,e add a,h add a,l ld c,a ld a,(smc_index) add a,c and 31 ld de,LUT add a,e jr nc,$+3 inc d ld e,a ld a,(de) pop bc add a,c jr nc,$+3 inc b rr b \ rra rr b \ rra ld b,a ;color ld a,h \ and 3 jr nz,$+10 inc ix ld (ix),a ld (ix+12),a rl (ix) \ rl (ix) rl (ix+12) \ rl (ix+12) ld a,b cp 144 \ jr nc,$+5 inc (ix) cp 96 \ jr nc,$+8 inc (ix+12) inc (ix+12) cp 48 \ jr nc,$+11 inc (ix+12) inc (ix) inc (ix) inc h ld a,h cp 48 jr nz,while_x_lt_48 ld h,0 ld de,12 add ix,de inc l ld a,l cp 32 jp nz,while_y_lt_32 bcall(486Ah) bcall(4744h) cp 15 ret z ld hl,(smc_xskew) ld de,(smc_yskew) ld bc,(smc_var1) cp 3 jr nz,$+3 inc l cp 2 jr nz,$+3 dec l cp 1 jr nz,$+3 inc e cp 4 jr nz,$+3 dec e cp 10 jr nz,$+3 inc c cp 11 jr nz,$+3 dec c ld a,c and 31 ld (smc_var1),a ld a,e cp 64 jr nc,$+5 ld (smc_yskew),a ld a,l cp 64 jr nc,$+5 ld (smc_xskew),a jp MainLoopLUT:.db 255,254,246,234,219,199,177,153,128,103,79,57,37,22,10,2,0,2,10,22,37,57,79,103,128,153,177,199,219,234,246,254C_Div_D:;Inputs:; C is the numerator; D is the denominator;Outputs:; A is the remainder; B is 0; C is the result of C/D; D,E,H,L are not changed; xor a sla c rla sla c rla cp d jr c,$+4 inc c sub d sla c rla cp d jr c,$+4 inc c sub d sla c rla cp d jr c,$+4 inc c sub d sla c rla cp d jr c,$+4 inc c sub d sla c rla cp d jr c,$+4 inc c sub d sla c rla cp d jr c,$+4 inc c sub d sla c rla cp d ret c inc c sub d ret
lol, it is far faster than the axe version, nice job
By the way, I wonder how cool would a racing or tunnel game be if the track was made of an animated plasma effect? Basically, the white would be black and the gray white, and you would have to stay inside the white area.
Looks very nice.By the way, I wonder how cool would a racing or tunnel game be if the track was made of an animated plasma effect? Basically, the white would be black and the gray white, and you would have to stay inside the white area.