Re: A82: AHHHHHHHHHHHHHH!
[Prev][Next][Index][Thread]
Re: A82: AHHHHHHHHHHHHHH!
At 12:32 AM 9/26/97 -0400, you wrote:
>Still cant get it to work!!!
>Well i have change to what you guys said but doesnt work only shows a blck
>screen and then i got to take out the bads.
>So if someone could re-write or change it i would be very happy, and also add
>a code that when you press clear it exits back to ASH thats it.
>
>#include "ti82.h"
>#include "oldcall.h"
>#include "graph.h"
>
>.org START_ADDR
>.db "Sprite",0
>
>Loop:
> ld hl, Sprite
> ld b,10
> ld c,10
>
> call PutSprite
> ROM_CALL(DISP_GRAPH
>
> jr Loop
Infinite loop here. You will have to reset the calc after running this
program.
>
>PutSprite:
>
>
>
> push bc
> push de
> ld a,63
> sub c
> ld c,a
> push hl
> push hl
> ROM_CALL(FIND_PIXEL)
Change this to call FIND_PIXEL (forgot this until I saw ADAMMAN's reply).
> ld de,$88B8 ;CHANGED FROM $FC00 is that right?
> add hl,de
> ex de,hl
> pop hl
> ld b,(hl)
> inc hl
> ld c,(hl)
> inc hl
> push hl
> pop ix
> ex de,hl
>PS_NewRow:
> push bc
> ld d,(ix)
> inc ix
> push af
> push hl
>PS_NewCol:
> rl d
> ld e,a
> jr nc,PS_NoPixel
> or (hl)
> ld (hl),a
> jr PS_NextPixel
>PS_NoPixel:
> cpl
> and (hl)
> ld (hl),a
>PS_NextPixel:
> ld a,e
> rrca
> jr nc,PS_SameByte
> inc hl
>PS_SameByte:
> djnz PS_NewCol
> pop hl
> pop af
> ld de,12
> add hl,de
> pop bc
> dec c
> jr nz,PS_NewRow
> pop hl
> pop de
> pop bc
> jr Loop
>
>Sprite:
>.db 6,6
>.db %110011
>.db %100001
>.db %000000
>.db %000000
>.db %100001
>.db %110011
Change Sprite to the following:
Sprite:
.db 6,6
.db %11001100
.db %10000100
.db %00000000
.db %00000000
.db %10000100
.db %11001100
Without those additional bits (they're not really added), your sprite will
appear to be shifted to the right and the far right pixels would appear to
be removed. This is because the compiler would put two bits (both zeroes)
at the beginning of each byte.
>#include "graph.inc"
>
>.end
Hope I could be of help...again :)
Thomas J. Hruska -- thruska@tir.com
Shining Light Productions -- "Meeting the needs of fellow programmers"
http://www.geocities.com/SiliconValley/Heights/8504
http://shinelight.home.ml.org
References: