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
omni


Member


Joined: 14 Jun 2003
Posts: 115

Posted: 29 Oct 2003 08:12:17 pm    Post subject:

Could someone explain how to do smooth scrolling?
Back to top
John Barrus


Member


Joined: 25 May 2003
Posts: 131

Posted: 30 Oct 2003 03:33:34 pm    Post subject:

Basically:

to move the screen up one row:
ld bc,768
ld hl,gbuf+12
ld de, gbuf
ldir

to move screen down one row:
ld bc,768
ld hl,gbuf+756
ld de,gbuf+768
lddr

Now you populate to empty lines (how ever you want)
To move left and right, it's a bit more complicated. You have to use the srl, rr, etc. opcodes. I suggest looking in the source for mario to find how to do it.
Back to top
MaxVT103


Member


Joined: 24 Aug 2003
Posts: 109

Posted: 30 Oct 2003 05:21:09 pm    Post subject:

I agree with john on the scrolling. If you want to get even better scrolling, create a custom buffer or re-alocate saferam areas for the buffer and you can write above and below the screen without errors and it scrolls so nicely.

Donald
Back to top
John Barrus


Member


Joined: 25 May 2003
Posts: 131

Posted: 31 Oct 2003 05:24:39 pm    Post subject:

I guess you could do that, but I think it's more convenient to just write a routine to scroll and repopulate on the fly using the tilemap data, instead of loading it all into a second buffer and then into the graphscreen.
Back to top
omni


Member


Joined: 14 Jun 2003
Posts: 115

Posted: 31 Oct 2003 05:43:35 pm    Post subject:

May you elaborate on that John?
Back to top
John Barrus


Member


Joined: 25 May 2003
Posts: 131

Posted: 31 Oct 2003 06:41:14 pm    Post subject:

Well, do you know how to make tilemaps?
Basically, I would write a routine to read from the tilemap data in your source, and then load it into the graph buffer.
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