Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animate screen transition like Golvelious does. #12

Open
plattysoft opened this issue Jan 23, 2024 · 2 comments
Open

Animate screen transition like Golvelious does. #12

plattysoft opened this issue Jan 23, 2024 · 2 comments

Comments

@plattysoft
Copy link
Owner

SCREEN SCROLL custom instruction shows promise, but we need to load the new data in the screen somehow (reading from resource address does not work)
We could copy the current and the next room to RAM and that way we could copy from RAM to VRAM.
Not sure how to find out unused RAM from basic, or maybe create an array and just use it using POKE?

@plattysoft
Copy link
Owner Author

Screencast.from.01-23-2024.09.21.01.PM.webm

This code does it, screen scroll uses the joystick direction, then we add the new line.

FOR I=0 TO 20
  SCREEN SCROLL 1
  CMD RAMTOVRAM AR+&H20*I, &H1800, &H20
NEXT I

We should delete the last row first to not scroll into the item area, or do some other trick (it will break on side scroll as well)
We might need to write it by hand

@plattysoft
Copy link
Owner Author

This other option is massively slower

12310 FOR I=0 TO 20
12320  FOR J=19 TO 0 STEP -1
12330   FOR K=0 TO 3
12340    T=VPEEK(&H1800+J*32+K):VPOKE &H1800+(J+1)*32+K, T
12350    CMD RAMTOVRAM AR+&H20*I, &H1800, &H20
12360   NEXT K
12370  NEXT J
12380 NEXT I

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

1 participant