I was looking through the emulators code to see how the PSG works.
Even with my pretty terrible C knowledge, I understand most of it. Apart from the section below. I think I understand the syntax (xor the volume with $20, if the 6th bit ($20) is set, or the volume with $C0), I dont get why it's doing it. It kinda feels like it's meant to cap the value at 63, but it doesn't do that and there are surly better ways to achieve it anyway. So I was wondering if anyone else knew?
Question
Yazwho
I was looking through the emulators code to see how the PSG works.
Even with my pretty terrible C knowledge, I understand most of it. Apart from the section below. I think I understand the syntax (xor the volume with $20, if the 6th bit ($20) is set, or the volume with $C0), I dont get why it's doing it. It kinda feels like it's meant to cap the value at 63, but it doesn't do that and there are surly better ways to achieve it anyway. So I was wondering if anyone else knew?
https://github.com/commanderx16/x16-emulator/blob/master/src/vera_psg.c
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.