Fun with PSG Register + Screen 128 mode

Chat about anything CX16 related that doesn't fit elsewhere
Post Reply
Ender
Posts: 220
Joined: Sat May 09, 2020 9:32 pm

Fun with PSG Register + Screen 128 mode

Post by Ender »


So one thing I noticed a while ago is that in screen 128 mode, the layer 0 data actually overwrites the PSG registers. This means theoretically you could create sounds by drawing in screen 128 mode.

Sure enough, if you do a certain pset, you can turn up the volume of the PSG:


Quote




PSET 258,199,$FF



You'll notice that makes a pinkish pixel towards the bottom right, and also makes a buzzing sound. You can also change the other registers, to make whatever sound you want, like a simple square wave.


Quote




10 SCREEN 128



20 PSET 256,199,$FF



30 PSET 257,199,$01



40 PSET 258,199,$F8



50 PSET 259,199,$3F



 

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

Fun with PSG Register + Screen 128 mode

Post by Ender »


A fun experiment you can do is download pigdevil2010's conversion of Famicommodore for the X16, and then go to SCREEN 128 before running it with SYS $1000.  You can see the pixels changing on the bottom right.

https://drive.google.com/file/d/1H7Wp9FrNjfMwUkp2Nx1wFE9mZPICn5Q2/view

John Chow Seymour
Posts: 143
Joined: Sun Jul 05, 2020 3:27 pm

Fun with PSG Register + Screen 128 mode

Post by John Chow Seymour »


I don't quite understand.  Is this intentional?  If not, is it an issue with the emulator?

SlithyMatt
Posts: 913
Joined: Tue Apr 28, 2020 2:45 am

Fun with PSG Register + Screen 128 mode

Post by SlithyMatt »



1 hour ago, John Chow Seymour said:




I don't quite understand.  Is this intentional?  If not, is it an issue with the emulator?



It's bad/lazy VERA configuration. You can remap VRAM to prevent this.

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

Fun with PSG Register + Screen 128 mode

Post by Ender »



2 hours ago, John Chow Seymour said:




I don't quite understand.  Is this intentional?  If not, is it an issue with the emulator?



I think the screen 128 mode was first written before the VERA was set up the way it is now with the PSG registers, and it simply hasn't been changed to adjust for it.  Although I'm not really sure how you could easily fix it besides just making it one scanline less, so it's 320x199.  The only other thing I can think of would be to move the character data for layer 1 so that you could start the layer 0 data lower in memory.

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

Fun with PSG Register + Screen 128 mode

Post by SerErris »


Actually it is both... I have described it in another thread here. 

 

the screenram layout should change .... move the charrom to the End $1F000 and move layer 0 to $04000 ...  I I’ll suggest it as a Pullrequest for the kernel

Post Reply