This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's z80 & ez80 Assembly subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Z80 & 68k Assembly => z80 & ez80 Assembly
Author Message
CoBB


Active Member


Joined: 30 Jun 2003
Posts: 720

Posted: 10 Jul 2003 05:26:01 am    Post subject:

There's just a little bit missing: you don't modify the memory. After xor (hl) you need to put ld (hl),a.
Back to top
JacobdeHaan


Member


Joined: 10 Jul 2003
Posts: 165

Posted: 10 Jul 2003 05:43:39 am    Post subject:

YEAH!!!! Razz Very Happy

You were right, i put that in, so now the code looks like this

Code:
.nolist
#define   end   .end
#define   END   .end
#define   equ   .equ
#define   EQU   .equ
#include   "include/ti83plus.inc"
.list
.org userMem-2;Define where to start in memory
.db $BB,$6D;AsmPrgm instruction

   bcall(_clrLCDfull)
   ld a,2
   ld l,2
   ld ix,mouse1
   ld e,l
   ld h,0
   ld d,h
   add hl,de
   add hl,de
   add hl,hl
   add hl,hl
   ld e,a
   add hl,de
   ld de,plotsscreen
   add hl,de
   ld b,8
put8by8loop:
   ld a,(ix)
   xor (hl)
   ld (hl),a
   inc ix
   ld de,12
   add hl,de
   djnz put8by8loop
   bcall(_grbufcpy)
   bcall(_getKey)
   ret;Exit program

mouse1:
   .db %10000000
   .db %11100000
   .db %11111000
   .db %11111100
   .db %11111110
   .db %00010000
   .db %00011000
   .db %00001000
.end
.end

And it worked great.
Back to top
Job the GameQuitter


Member


Joined: 04 Jun 2003
Posts: 102

Posted: 10 Jul 2003 01:10:30 pm    Post subject:

I said it befor, and I'll say it again:

change

Code:
put8by8loop:
ld a,(ix)
xor (hl)
ld (hl),a
inc ix
ld de,12
add hl,de
djnz put8by8loop
to
Code:
ld de,12
put8by8loop:
ld a,(ix)
xor (hl)
ld (hl),a
inc ix
add hl,de
djnz put8by8loop
...because you're loading 12 into DE 7 unnecessary times after the first one. This eats up 70 clockcycles. I know it's not much considering an 83+ will compute about 6000 cycles a second, but it's still redundant effort.
Back to top
Justin W.
Shattered Silence


Advanced Member


Joined: 24 May 2003
Posts: 429

Posted: 10 Jul 2003 08:47:59 pm    Post subject:

Hey Thanks CoBB. I typed the source from my head and missed that one line. Also I was tired when I wrote it up so I wasn't thinking about that extra clock cycle usage on the ld de,12 . I've been gone for the last two days so I didn't get a chance to fix it.
Back to top
JacobdeHaan


Member


Joined: 10 Jul 2003
Posts: 165

Posted: 10 Jul 2003 11:40:49 pm    Post subject:

Job the GameQuitter wrote:
I said it befor, and I'll say it again:

Sorry 'bout that, forgot that bit. I changed it though, and thanks.
Back to top
omni


Member


Joined: 14 Jun 2003
Posts: 115

Posted: 16 Jul 2003 11:11:04 am    Post subject:

is it possible to make a sprite move by itself? Like when you run the program, you see a short animation appear and then the program ends, the sprite would move on a designated path.
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 16 Jul 2003 12:33:16 pm    Post subject:

if u program it that way...
Back to top
omni


Member


Joined: 14 Jun 2003
Posts: 115

Posted: 16 Jul 2003 12:35:43 pm    Post subject:

how would I? Sad
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 16 Jul 2003 01:00:11 pm    Post subject:

just have a var that u increment until it equals a certain point on the screen, then inc the other num until the next point... and so forth!
Back to top
omni


Member


Joined: 14 Jun 2003
Posts: 115

Posted: 17 Jul 2003 07:24:57 am    Post subject:

what would I have to change in the code if I were to change my sprite from 8*8 to 15bits by 15 bits?
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 17 Jul 2003 11:41:42 am    Post subject:

does ur sprite data look like this :
Code:
label:
.db 8,8
.db (sprite data here)
? if so, then just change the length and width...
Back to top
omni


Member


Joined: 14 Jun 2003
Posts: 115

Posted: 17 Jul 2003 11:48:24 am    Post subject:

Is this correct?


ld hl,Sprite
ld de,OP1
ld bc,17
ldir
ld hl,OP1
ld de,$1133
SET plotLoc,(IY+PlotFlags)
bcall(_DisplayImage)
ret

Sprite:
.db 16,16
.db %0000000000000000
(16rows of 16bits total)


Last edited by Guest on 17 Jul 2003 12:11:34 pm; edited 1 time in total
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 17 Jul 2003 12:14:13 pm    Post subject:

yes, just be sure to change one line :
Code:
    ld bc,17
to
Code:
    ld bc, (however many BYTEs u have of data [including 2 size bytes])
... help?
Back to top
omni


Member


Joined: 14 Jun 2003
Posts: 115

Posted: 17 Jul 2003 12:19:38 pm    Post subject:

whats a size byte?

EDIT
Is it the :
.db 16,16
?
And how would I display the sprite on the graph screen?


Last edited by Guest on 17 Jul 2003 12:32:30 pm; edited 1 time in total
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 17 Jul 2003 01:52:14 pm    Post subject:

yes the size bytes are the 2 that signify the size Smile
Back to top
omni


Member


Joined: 14 Jun 2003
Posts: 115

Posted: 17 Jul 2003 02:28:55 pm    Post subject:

how would I display a sprite on the graph buffer, because the routine displays the sprite on the hoemscreen not the graph and I want it on the graphscreen.
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 18 Jul 2003 08:48:34 am    Post subject:

look at the sysflags.htm(l) file that came with 83pa28d or just click on System Flags in toc.htm(l)... look at that list, and see if u can find one that will work ur purpose!
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page Previous  1, 2
» View previous topic :: View next topic  
Page 2 of 2 » All times are UTC - 5 Hours

 

Advertisement