dev229 - VERA: emulated noise freq was double that of real hardware (#2488)

* VERA: emulated noise freq was double that of real hardware

* fulfill req changes: version/engine version, revert SDL submodule
This commit is contained in:
mooinglemur 2025-04-26 08:38:20 -10:00 committed by GitHub
parent 35fe3679f2
commit b1814a8337
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 16 additions and 6 deletions

View file

@ -81,7 +81,7 @@ render(struct VERA_PSG* psg, int16_t *left, int16_t *right)
if ((psg->chipType >= 1) && (!ch->left && !ch->right)) {
new_phase = 0;
}
if ((ch->phase & 0x10000) != (new_phase & 0x10000)) {
if ((psg->chipType < 3) ? (ch->phase & 0x10000) != (new_phase & 0x10000) : (ch->phase & 0x10000) && !(new_phase & 0x10000)) {
ch->noiseval = (psg->chipType < 1) ? psg->noiseOut : (psg->noiseState >> 1) & 0x3f;
}
ch->phase = new_phase;

View file

@ -543,7 +543,7 @@ void DivPlatformVERA::poke(std::vector<DivRegWrite>& wlist) {
}
void DivPlatformVERA::setFlags(const DivConfig& flags) {
psg->chipType=flags.getInt("chipType",2);
psg->chipType=flags.getInt("chipType",3);
chipClock=25000000;
CHECK_CUSTOM_CLOCK;
rate=chipClock/512;