Basic cant switch from graphics mode to text mode?2

Chat about anything CX16 related that doesn't fit elsewhere
Post Reply
kruemmelbande
Posts: 1
Joined: Fri Aug 28, 2020 1:40 pm

Basic cant switch from graphics mode to text mode?2

Post by kruemmelbande »


I tried to switch to text mode after getting into graphics mode, but it looks like the background doesent reset propperly, so its all glitched out.

Ender
Posts: 220
Joined: Sat May 09, 2020 9:32 pm

Basic cant switch from graphics mode to text mode?2

Post by Ender »


You can fix it by turning off layer 0 with:


Quote




POKE $9f29, $21



Or you can just fill the screen with a background color that isn't 0, such as:


Quote




COLOR 1,6:CLS



 

SerErris
Posts: 172
Joined: Sat Aug 08, 2020 9:18 am

Basic cant switch from graphics mode to text mode?2

Post by SerErris »


@Greg King answered that in this thread: 


 

Where I had pretty much the same issue: Here is the answer. My issue was even a little bit bigger (reset the palette and stuff), but if you just want to get back to a blank text mode screen that is what works.

10 SCREEN $80
20 POKE $9F25, $80
30 SYS $FF81

Ender
Posts: 220
Joined: Sat May 09, 2020 9:32 pm

Basic cant switch from graphics mode to text mode?2

Post by Ender »



24 minutes ago, SerErris said:




@Greg King answered that in this thread: 




 



Where I had pretty much the same issue: Here is the answer. My issue was even a little bit bigger (reset the palette and stuff), but if you just want to get back to a blank text mode screen that is what works.




10 SCREEN $80
20 POKE $9F25, $80
30 SYS $FF81



Yup, calling the reset kernal routing is another way.  Would line 20 actually be needed in that case?

SerErris
Posts: 172
Joined: Sat Aug 08, 2020 9:18 am

Basic cant switch from graphics mode to text mode?2

Post by SerErris »


Line 20 is the VERA reset. In my case that was the only way to reset the Palette and all pointers to where they belong (I moved the tilebase etc.). 

You can try without the VERA reset. Maybe it is enought in your case. 

The above resets the screen to the original setup after startup.

Post Reply