A85: Re: newbster. :-P VERIFY this, advanced programmers...


[Prev][Next][Index][Thread]

A85: Re: newbster. :-P VERIFY this, advanced programmers...




Hmm... well, at the risk of being flamed (just kidding ;P) for being only an
intermediate programmer I THINK I may know your problem--s--.

First of all...

ld b,32
 ld c,32
ld hl,&A_shape
This is fine... I think. I'm still programming in ZShell, but that looks cool
from what little I know of usgard.

But whoa...
 ld a,4
 out (5),a
THIS should be done only ONCE and at the VERY beginning (or initialization) of
your program... continuing:

This is fine... (from what I know...)
 #fncall PSPR_NR
But...

DITCH this... I have never reset that value for any reason... from what I know
it should stay as "4" through the whole program... guys, am I missing out on
something?
 ld a,0
 out (5),a

Sprite data always (in my programs) goes at the End of a program... AFTER your
routines and before .end . . . never in the middle. Now that I think of it, I
don't think putting it in your code messes anything up, but it makes for an
extremely jumbled program...
A_shape:
 .db 8,8
 .db %00000000
 .db %11111110
 .db %10000010
 .db %10000010
 .db %10000010
 .db %10000010
 .db %10000010
 .db %11111110
There's my reasons for your fixed code that's coming right up...

Modified code(from what I know):
InitProgram:  ;wherever the beginning of your program is, only once. period.
LD A, 4
OUT (5), A

DisplayA_shape:
 ld b,32
 ld c,32
 ld hl,&A_shape
 ;someone elaborate on whether he has to LD DE, (PROGRAM_ADDR)
 ;ADD HL, DE
 #fncall PSPR_NR

Sprite data at the end of your executable code is desirable...
A_shape:
 .db 8,8
 .db %00000000
 .db %11111110
 .db %10000010
 .db %10000010
 .db %10000010
 .db %10000010
 .db %10000010
 .db %11111110

I really hope that helped.. maybe it did, maybe not. :D

-Josh Morris
 DorkReMi@aol.com


Follow-Ups: