Page 1 of 1

Fun with PSG Register + Screen 128 mode

Posted: Tue Sep 15, 2020 3:35 am
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



 


Fun with PSG Register + Screen 128 mode

Posted: Tue Sep 15, 2020 2:19 pm
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


Fun with PSG Register + Screen 128 mode

Posted: Tue Sep 15, 2020 10:05 pm
by John Chow Seymour

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


Fun with PSG Register + Screen 128 mode

Posted: Tue Sep 15, 2020 11:23 pm
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.


Fun with PSG Register + Screen 128 mode

Posted: Wed Sep 16, 2020 12:24 am
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.


Fun with PSG Register + Screen 128 mode

Posted: Wed Sep 16, 2020 7:56 pm
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