Regen 0.93 Beta 4
Moderator: AamirM
Regen 0.93 Beta 4
Hi,
I've uploaded a new beta 4 of Regen which contains somewhat major sound emulation updates. I've added an option to boost PSG volume to whatever the user like since I remeber something else, someone else says something else and recordings sound something else. As such, I've been unable to find a way that fits for everyone.
Apart from that, hopefully all the reported sound problems might have been fixed in this release. So don't forget to test them out.
SSG-EG part of my YM2612 core has undergone a major overhaul. So it should be pretty much very close to the real thing now. If you want to check out yourself, here is a recording from the real thing and here is the test ROM to run in Regen and compare results. All credits for these both go out to Nemesis.
And I almost forgot, you can download the beta from here.
And my thanks goes out to a Russian guy for reporting many sound problems but wants to remain anonymous.
Please continue your discussions about the latest Regen beta in this topic.
stay safe,
AamirM
I've uploaded a new beta 4 of Regen which contains somewhat major sound emulation updates. I've added an option to boost PSG volume to whatever the user like since I remeber something else, someone else says something else and recordings sound something else. As such, I've been unable to find a way that fits for everyone.
Apart from that, hopefully all the reported sound problems might have been fixed in this release. So don't forget to test them out.
SSG-EG part of my YM2612 core has undergone a major overhaul. So it should be pretty much very close to the real thing now. If you want to check out yourself, here is a recording from the real thing and here is the test ROM to run in Regen and compare results. All credits for these both go out to Nemesis.
And I almost forgot, you can download the beta from here.
And my thanks goes out to a Russian guy for reporting many sound problems but wants to remain anonymous.
Please continue your discussions about the latest Regen beta in this topic.
stay safe,
AamirM
Ecco - the Tide of Time
the "splash" sound when you dive back into the water after jumping out is weird, listen to Gens for something more correct, Kega handles this like Regen by the way so it should be checked on real hw but definitely not sound like a "splash"
there is some note in Gens code about how to fix it, it's related to attenuation level on Key ON
indeed, in my implementation, forcing attenuation level to MAX (1023) on Key ON fixed it, however, I'm not sure if this is correct behavior because it will break the "Flamethrower" sound effect in Alien 3
the "splash" sound when you dive back into the water after jumping out is weird, listen to Gens for something more correct, Kega handles this like Regen by the way so it should be checked on real hw but definitely not sound like a "splash"
there is some note in Gens code about how to fix it, it's related to attenuation level on Key ON
indeed, in my implementation, forcing attenuation level to MAX (1023) on Key ON fixed it, however, I'm not sure if this is correct behavior because it will break the "Flamethrower" sound effect in Alien 3
I dunno, I think Regen has it right and Gens has it wrong, and this game is one of my favorites, so it know it pretty well. I think it definitely needs to be tested on the hardware. In fact, I might make a recording this afternoon, since the splash sound in Ecco II seems to be one of those infamous bugs everything gets wrong to start with.
I've found a pretty major bug while messing around today though. There seems to be a big problem with savestates. It seems the VRAM isn't being loaded back when a savestate is loaded. Try pretty much any game and take a savestate in a menu or something, then try and load it from a different area like in level and you'll see it.
I've found a pretty major bug while messing around today though. There seems to be a big problem with savestates. It seems the VRAM isn't being loaded back when a savestate is loaded. Try pretty much any game and take a savestate in a menu or something, then try and load it from a different area like in level and you'll see it.
some other bugs I found recently:
Pacman 2: the new adventures
The game hangs if you don't hit START to jump to title screen after the sega logo (where the opening song should be played as well as the little intro sequence)
Note that the opening song is not played in Kega either (but the game does no hang), this is probably related to the same sound bug later in the game (music stops if you go into PAUSE menu)
Beavis & Butthead
The Chainsaw SFX is wrong in sound test. It appears to use SSG-EG with setting of 0x08 on operators 2,3,4 of channel #1 (with some operator using AR different from 1F). Kega seems to handle it right btw.
Pacman 2: the new adventures
The game hangs if you don't hit START to jump to title screen after the sega logo (where the opening song should be played as well as the little intro sequence)
Note that the opening song is not played in Kega either (but the game does no hang), this is probably related to the same sound bug later in the game (music stops if you go into PAUSE menu)
Beavis & Butthead
The Chainsaw SFX is wrong in sound test. It appears to use SSG-EG with setting of 0x08 on operators 2,3,4 of channel #1 (with some operator using AR different from 1F). Kega seems to handle it right btw.
-
- Very interested
- Posts: 273
- Joined: Fri Feb 29, 2008 8:12 pm
- Location: United States
How does this SFX sounds in your emulator , Nemesis?
Because my implementation (and certainly Aamir's one) follows your indications and reproduce your Test ROM correctly but failed on this one specifically.
As Steve Snake seems to have appeared back again here, maybe did he remember how he fixed/tested this one ?
Because my implementation (and certainly Aamir's one) follows your indications and reproduce your Test ROM correctly but failed on this one specifically.
As Steve Snake seems to have appeared back again here, maybe did he remember how he fixed/tested this one ?
I'm in the middle of some pretty major changes, so I can't actually compile a build which works right now, but as soon as I've got everything back together (maybe a couple of days) I'll give it a try. The SSG-EG test rom I posted only tested SSG-EG with an attack rate set to 0x1F however. The attack phase in SSG-EG could be totally messed up, and the test rom I posted would still work fine. I might compile an alternate version which includes an attack phase, since we now know of an in-game case which relies on it.
Hi,
Maybe its fixed in my latest build since I made some changes to SSG-EG but I haven't checked because I've been very busy (will check out today). But yeah, I think attack rates of 0x8-0x9 or less might not be handled correctly. IIRC, Nemesis did explain what happens with an attack rate less than 0x1F but I didn't really looked at it (no game used that).
stay safe,
AamirM
Maybe its fixed in my latest build since I made some changes to SSG-EG but I haven't checked because I've been very busy (will check out today). But yeah, I think attack rates of 0x8-0x9 or less might not be handled correctly. IIRC, Nemesis did explain what happens with an attack rate less than 0x1F but I didn't really looked at it (no game used that).
stay safe,
AamirM
Alrighty, I've just got everything back together, and I've got the same problem with this chainsaw sound effect in my emulator.
The problem is related to the point at which SSG-EG mode triggers a "loop". I said that SSG-EG loops when attenuation hits max. The YM2608 documentation tells us that when all 4 bits of the sustain level are set, the sustain level is set to 93db (0x370). One of these two statements is incorrect.
OP3 of the chainsaw sound sets the sustain level to max, with a sustain rate of 0, so the level never changes during the sustain phase. If SSG-EG really looped when attenuation hit max, and the sustain level was really 0x370 when set to max, the envelope for OP3 should never loop under SSG-EG, but it does. Either SSG-EG actually loops when it hits the max sustain level (0x370) or some earlier point, or the sustain level is actually 96db (0x3FF) when all bits are set.
Kega Fusion seems to loop SSG-EG when the output reaches 0x370. This fixes the chainsaw sound, but is actually the cause of clear errors in the SSG-EG output from Kega with the inverted held note patterns 0xB and 0xD. I'll do some tests, and try to get a definitive answer as to how to solve this problem.
The problem is related to the point at which SSG-EG mode triggers a "loop". I said that SSG-EG loops when attenuation hits max. The YM2608 documentation tells us that when all 4 bits of the sustain level are set, the sustain level is set to 93db (0x370). One of these two statements is incorrect.
OP3 of the chainsaw sound sets the sustain level to max, with a sustain rate of 0, so the level never changes during the sustain phase. If SSG-EG really looped when attenuation hit max, and the sustain level was really 0x370 when set to max, the envelope for OP3 should never loop under SSG-EG, but it does. Either SSG-EG actually loops when it hits the max sustain level (0x370) or some earlier point, or the sustain level is actually 96db (0x3FF) when all bits are set.
Kega Fusion seems to loop SSG-EG when the output reaches 0x370. This fixes the chainsaw sound, but is actually the cause of clear errors in the SSG-EG output from Kega with the inverted held note patterns 0xB and 0xD. I'll do some tests, and try to get a definitive answer as to how to solve this problem.
Indeed, adding Alone Coder's fixes from TFM Maker in MAME implementation (see below) fixed this sound
ona side note, he is doing this on KEY ON, I wonder if it's right also:
if ( SLOT->volume >= 512 /* áûëî MAX_ATT_INDEX */ ) //Alone Coder
{
SLOT->volume = MAX_ATT_INDEX;
if (SLOT->ssg&0x01) /* bit 0 = hold */
{
if (SLOT->ssgn&1) /* have we swapped once ??? */
{
/* yes, so do nothing, just hold current level */
}
else
swap_flag = (SLOT->ssg&0x02) | 1 ; /* bit 1 = alternate */
}
else
{
/* same as KEY-ON operation */
/* restart of the Phase Generator should be here,
only if AR is not maximum ??? ALWAYS! */
SLOT->phase = 0; //Alone Coder
/* phase -> Attack */
SLOT->volume = 511; //Alone Coder
SLOT->state = EG_ATT;
swap_flag = (SLOT->ssg&0x02); /* bit 1 = alternate */
}
not sure if it's right though but he claimed to have made test on real YM2203, let's wait for your own test on this/* negate output (changes come from alternate bit, init comes from attack bit) */
if ((SLOT->ssg&0x08) && (SLOT->ssgn&2) && (SLOT->state > EG_REL))
out ^= 511;
ona side note, he is doing this on KEY ON, I wonder if it's right also:
if ( SLOT->volume >= MAX_ATT_INDEX )SLOT->volume = 511; /* Alone Coder */
Hi,
I tried that with the latest build today but its not fixed in there. Will try Eke's suggested fix soon too. Maybe it works only if attack rate is not maximum(?). Does Nemesis test ROM sounds correct with that? I think envelopes will loop a little fast with those changes so Nemesis test ROM may not sound right.
EDIT:
Okay, I tried Eke's suggested fix and it fixes the problem and Nemesis' test ROM sound fine to me too.
stay safe,
AamirM
I tried that with the latest build today but its not fixed in there. Will try Eke's suggested fix soon too. Maybe it works only if attack rate is not maximum(?). Does Nemesis test ROM sounds correct with that? I think envelopes will loop a little fast with those changes so Nemesis test ROM may not sound right.
Yeah, looked at it today and I found not one but two pretty nasty bugs. VRAM was being loaded correctly but the VDP registers weren't being loaded correctly. I wrote "vdp.registers = data[0xFA + i]" when in fact I should have written "vdp_set_register(i, data[0xFA + i])" . Secondly the FM state was not being restored correctly either . Its embarassing I know. Now the states load correctly. Thanks for pointing these bugs out.Nemesis wrote:I've found a pretty major bug while messing around today though. There seems to be a big problem with savestates. It seems the VRAM isn't being loaded back when a savestate is loaded. Try pretty much any game and take a savestate in a menu or something, then try and load it from a different area like in level and you'll see it.
EDIT:
Okay, I tried Eke's suggested fix and it fixes the problem and Nemesis' test ROM sound fine to me too.
stay safe,
AamirM
-
- Very interested
- Posts: 746
- Joined: Sat Dec 15, 2007 7:49 am
- Location: Kazakhstan, Pavlodar
the "Zap" sound effect also use SSG-EG on one of the operator, you might want to check it backAamirM wrote:
Okay, I tried Eke's suggested fix and it fixes the problem and Nemesis' test ROM sound fine to me too.
stay safe,
AamirM
this one uses really extreme timings :
YM CH1 SLOT3, TL=0x0
YM CH1 SLOT3, AR=0x1f, KSR=0x2
YM CH1 SLOT3, DR=0x1f, AM=0
YM CH1 SLOT3, SR=0xf
YM CH1 SLOT3, SL=0x0, RR=0xf
YM CH1 SLOT3, SSG=0x8
I wonder how this is supposed to sound ? Is it supposed to repeatetely restart a very fast Substain again and again (again, the frequency is modified several time to distort the sound)?
Generally speaking, it would be interesting to know how the Enveloppe Generator behaves in some extreme case or when events (key ON/OFF) occurs at uncommmon moment (key OFF/ON during attack, key ON with attenuation level being still very low,...)
Also I wonder if the TL level could have some effect when looking for transition between decay & substain ?
Sorry to be a little off-topic again, thi swould be betterin the YM2612 thread maybe