Jump to content
IGNORED

Page flipping...


Recommended Posts

I am having trouble getting a stable switch of a new dlist and screen memory area. I am setting up the dlist and screen ram, and then writing the new dlist address into 560 and then the new screen address into 88. If I set the two immediately one after the other, I usually get a garbled screen and a crash. If I have a pause between them, such as waiting on a keypress, then it always works. This makes me wonder if something happens during the fast assignment ( like a vblank or something ) and one gets partially activated or the shadows are getting out of sync or something like that.

 

Anyway, I wanted to know what the usual way of doing this is, particularly if there are some other steps I'm missing besides just assigning 560 & 88. The dlist itself is just a copy of the standard gr. 0, with the LMS pointing to the same screen memory area as is getting written into 88.

 

set up screen memory

set up dlist to point to screen memory

write screen addr into 88

write dlist addr into 560

Link to comment
Share on other sites

Why are you changing SAVMSC (88 and 89) ?

 

You only need to worry about that if you're using the OS to put characters/graphics onscreen.

 

In such cases, you shouldn't do it in the VBlank - if the main program's doing screen I/O and the address suddenly gets changed then you'll get corruption.

 

Also, if you've got graphics + a Text Window, some of the Page Zero graphics variables, including SAVMSC get swapped over with ones in higher up OS RAM on occasions where the text window are accessed.

 

If you "half bake" the Display List pointer, worst thing that happens is you might get a short burst of unwanted garbage.

Link to comment
Share on other sites

Ok, I think this is happening because I am immediately starting a screen write...if it starts to happen before the vblank loads shadow, then the shadows will get updated to new values in the middle of the screen write code, which is a bad thing. So inserting a wait for vblank is probably called for right after setting the new values, such that teh screen write operation does not commence until after the next vblank.

Edited by danwinslow
Link to comment
Share on other sites

It shouldn't matter. There's not "shadows of shadows" except for the text window like I mentioned.

 

But, there is stuff like the cursor... maybe try turning it off because the S: and E: does save/restore type stuff on the cursor and changing screen memory's location might upset it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...