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
Tyler


Advanced Member


Joined: 29 May 2003
Posts: 352

Posted: 06 Dec 2003 09:28:43 pm    Post subject:

Finally a major project to work on. This shell will be slighty different from others, and has a windows feel, without all the annoying errors. I've worked on alot of the graphics tonight and it's looking quite well

- Currently
8 Way Scrolling Mouse W/ Variable Speed
Battery Level Checker / Reporter (2 Levels)
Nice Looking Windows Graphics Feel
Direct Input Keying Library
Sprites Routine
(Darth, I finally made my own Wink )

I'll get a picture up soon, although I can't support direct linking...
Clickity to see screenshot!


Last edited by Guest on 06 Dec 2003 09:37:11 pm; edited 1 time in total
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 06 Dec 2003 09:44:30 pm    Post subject:

does the direct key routine support all keys?
can i get a copy of your sprite routine ( i want to see the differences)


Last edited by Guest on 06 Dec 2003 09:45:33 pm; edited 1 time in total
Back to top
Tyler


Advanced Member


Joined: 29 May 2003
Posts: 352

Posted: 06 Dec 2003 10:01:25 pm    Post subject:

Alright, but I looked at Shawn McLaughin's source and tried to make it even faster than it is, but in the end I think I only made it slower, I'll paste it in a second
Back to top
Tyler


Advanced Member


Joined: 29 May 2003
Posts: 352

Posted: 06 Dec 2003 10:26:10 pm    Post subject:

Most of the code is still Shawn's I have major updating to do!
But here's what I've edited so far


Code:
;-=-=-=-=-=-
;DESCRIPTION
;-=-=-=-=-=-
;XORS A SPRITE TO THE GRAPHSCREEN
;WITH ADDITIONAL/OPTIONAL CLIPPING
;
;ORIGINAL BY SHAWN MCLAUGHLIN
;UPDATED BY TYLER
;
;VERSION INCLUDES
;-PUSH ALL
;-POP ALL
;
;-DNJZ CALLING TO SAVE SPACE
;ALTHOUGH THIS IS PROBABLY SLOWER
;
;-=-=-=-
;Inputs
;-=-=-=-
;A  = Y Coordinate
;E  = X Coordinate
;B  = Height Of Sprite
;IX = Pointer To Sprite
;
;-=-=-=-=-
;DESTORYS
;-=-=-=-=-
;ALL
;
;-=-=-=-
;NOTES
;-=-=-=-
;CALL CLIPSPRITE_XOR - Clipping Enabled
;CALL PUTSPRITE_XOR - Clipping Disabled
;CALL PUSHALL - Pushes All Registers On The Stack
;CALL POPALL - Pops All Registers On The Stack
;
;
#define   X_PIXEL_SHIFT   SRL C
#defcont     \ RRA

PUSHALL:

 PUSH AF
 PUSH BC
 PUSH DE
 PUSH HL
 RET

POPALL:
 
 POP AF
 POP BC
 POP DE
 POP HL
 RET

CLIPSPRITE_XOR:

 LD D,A
 LD A,E

 ADD A,64
 JR C,X_CLIPTOP

 CP 128   
 RET NC

 SUB E
 SUB E

 CP B
 JR NC,X_NOVERTCLIP
 JR X_NOVERTCLIP-1


X_CLIPTOP:

 DEC A
 ADD A,B
 RET M
 LD B,0
 LD C,A
 DEC C
 ADD IX,BC
 LD E,B
 LD B,A

X_NOVERTCLIP:

 LD A,$77;(LD (HL),A)
 LD (X_PATCHLEFT),A
 LD (X_PATCHRIGHT),A

 LD A,D
 OR A
 JP M,X_CLIPLEFT

 CP 89
 JR C,PUTSPRITE_XOR
 CP 96
 RET NC

 LD HL,X_PATCHRIGHT
 JR X_PATCH

X_CLIPLEFT:
 CP -7
 RET C
 LD HL,X_PATCHLEFT

X_PATCH
 LD (HL),0

PUTSPRITE_XOR:
 SLA E
 SLA E
 LD L,E
 LD H,$00
 LD D,H
 ADD HL,HL
 ADD HL,DE
 LD E,A
 PUSH B
 LD B,3

PUTSPRITELOOP:

 SRA E
 DJNZ PUTSPRITELOOP

 POP B
 INC E
 ADD HL,DE
 LD DE,PLOTSSCREEN
 ADD HL,DE
 LD DE,13
 ADD $07
 SUB 7
 NEG
 LD C,A
 ADD A,A
 ADD A,C
 LD (X_SHIFTING+1),A

X_SHIFTBLIT:
 
 LD C,(IX)
 XOR A

X_SHIFTING:
 JR $+69
 PUSH B
 LD B,6

X_SHIFTINGLOOP:

 X_PIXEL_SHIFT;SRL C / RRA
 DJNZ X_SHIFTINGLOOP

;A=RIGHT
;C=LEFT

 POP B
 OR (HL)

X_PATCHRIGHT:

 LD (HL),A
 DEC HL
 LD A,C
 OR (HL)

X_PATCHLEFT:
 
 LD (HL),A
 ADD HL,DE
 INC IX
 DJNZ X_SHIFTBLIT
 RET

.END


Ask me before using this code, we all know you didn't write it Smile


Last edited by Guest on 19 Jun 2006 10:36:34 pm; edited 1 time in total
Back to top
sic


Advanced Newbie


Joined: 28 Jul 2003
Posts: 62

Posted: 07 Dec 2003 11:14:00 am    Post subject:

Umm.. since when are "push b" and "pop b" opcodes?
Back to top
Tyler


Advanced Member


Joined: 29 May 2003
Posts: 352

Posted: 07 Dec 2003 01:58:33 pm    Post subject:

Whoops
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 08 Dec 2003 08:41:17 am    Post subject:

why dont u guys just use IonPutSprite? it is on ticalc.org, and it does that same thing, in MUCH less code! then you could use IonFastCopy too, and have a real fast program! Very Happy
Back to top
sgm


Calc Guru


Joined: 04 Sep 2003
Posts: 1265

Posted: 08 Dec 2003 12:50:03 pm    Post subject:

sic wrote:
Umm.. since when are "push b" and "pop b" opcodes?

When you're programming an 8080. Cross-compatible too, so you never know. Smile
Back to top
sgm


Calc Guru


Joined: 04 Sep 2003
Posts: 1265

Posted: 08 Dec 2003 12:51:16 pm    Post subject:

And stop misspelling my name, and don't use that source, it's broken. I have the masked sdr fixed though.
Back to top
Tyler


Advanced Member


Joined: 29 May 2003
Posts: 352

Posted: 08 Dec 2003 06:05:27 pm    Post subject:

Hehe, Really? A broken program that works
And yes, I really do have an 8080 Intel Wink

Adam, you can just use those files,
Sweet, I might need to modify IonFastCopy though for silver editions because I want this shell to take advantage of its speed
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 08 Dec 2003 06:51:55 pm    Post subject:

1st thing, my name is NOT adam Razz adm. is a military term (de ja vu [ie: ive made this post before Wink])

and, that is sweet that you will make it use the SE's speed to an advantage Very Happy
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
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement