Jump to content
  • 0
SerErris

BASIC Screen reset after Graphics Mode

Question

Hi,

I have created a screen setup which uses Layer0 320x240 8bpp bitmap mode. The screen is so big, that it overwrites the screenareas of ScreenRam (characters) and the CharRom. I also change the Palette.

After running the program I like to return to the READY. prompt with a working screen.

However I am not able to reset it. 

I can run CINT ($FF81) and that recreates the CHARROM. However it does not copy back the Palette or sets the color scheme (color 1,0). 

Quote

10300 :REM RESET SCREEN
10310 SYS $FF81
10320 COLOR 1,0
10340 RETURN

So this works partially, but it does not reset the color pallet.

I also tried to set the VERA Reset bit.. but that crashes the emulator completely. The screen goes all blue and nothing ever returns. (I am using a -echo setting currently). You never get any ready prompt or an listing or anything at all back.

I also tried to run the vera restore first, and then the sys call to CINT - but does not work at all... looks like the sys call is never getting executed.

Any idea? I do not want to load the pallette on my own. Should the CINT not actually do a VERA Reset first and then sets all the registers as required and copy the CHARROM?

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0
Posted (edited)

You could try to also call ioinit and/of restor.  And perhaps ramtas But I think that one will wipe all memory.  
$ff84. $ff8a. $ff87

oh the order should be ioinit then restor then cint. 

Edited by desertfish

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)

So if I to restore ... the cint will never get called, cause my memory is gone (afaik). 

I just think the pallette stuff should be part of CINT. But it currently not. Not sure if that is considered a bug. Also the Pallette is created by the VERA chip. 

IOINIT does not restore the palette.

Edited by SerErris

Share this post


Link to post
Share on other sites
  • 0

restor  ($ff8a)  should not wipe the memory. It "restores default I/O vectors".    it was ramtas ($ff87) that wipes, I think.

Share this post


Link to post
Share on other sites
  • 0

Iovectors will not wipe the palette as this is VERA internal. On reset VERA resets the pallet, and that would be okay. I could the. Run the CINT to load the Chatroom again but I cannot get it to work.

Share this post


Link to post
Share on other sites
  • 0
10 SCREEN $80
20 POKE $9F25, $80
30 SYS $FF81

It works for me.

Edited by Greg King
  • Like 1

Share this post


Link to post
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.

Guest
Answer this question...

×   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.


×
×
  • Create New...

Important Information

Please review our Terms of Use