DAC output problem [solved]

For anything related to sound (YM2612, PSG, Z80, PCM...)

Moderator: BigEvilCorporation

Eke
Very interested
Posts: 884
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke » Thu Apr 07, 2011 6:50 pm

Well, it's accurate in a sense it emulates some stuff that other emulators generally don't: undocumented VDP register bits (like Mode 4, HVC latch, 3-bit palette, etc), lock-out when accessing illegal areas,, TMSS register lock-out, address error exception,...

However it won't give you any indication (unless you recompile it with log messages like I do for debugging emulation issues), so I am not sure how useful this could be. At least, your other drivers sound flawlessly and at the right volume.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Thu Apr 07, 2011 7:19 pm

Eke wrote:Well, it's accurate in a sense it emulates some stuff that other emulators generally don't: undocumented VDP register bits (like Mode 4, HVC latch, 3-bit palette, etc), lock-out when accessing illegal areas,, TMSS register lock-out, address error exception,...

However it won't give you any indication (unless you recompile it with log messages like I do for debugging emulation issues), so I am not sure how useful this could be. At least, your other drivers sound flawlessly and at the right volume.
Anyway, even if it does not include debug features, it's always faster to test rom on the emulator than on real hardware which imply to copy rom to my sd card, put it in everdrive, flash the internal eprom (which take sometime when you have a big rom like my sound test one) etc ;)
At least now, i'll include your emulator in the "test tools" as it provides more accurate emulation than others on some points :)

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Thu Apr 07, 2011 8:54 pm

Thanks a tons Eke, i finally fixed my driver, it was in fact due to the problem you were pointing :)
I'll post soon a new SGDK version :)

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Thu Apr 07, 2011 11:18 pm

Well, I was HALF right - the problem was the pan not being set correctly, I was just wrong on why it wasn't set. :lol:

Seems nearly every z80 pcm driver out has this issue - it's a surprise the problem hasn't been seen more often.

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Fri Apr 08, 2011 6:32 am

So the problem was just pan set incorrectly or some other magic happening ? Unless you have mono sound setup I don't think its too hard to miss one speaker being silent...?
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Fri Apr 08, 2011 7:06 am

TmEE co.(TM) wrote:So the problem was just pan set incorrectly or some other magic happening ? Unless you have mono sound setup I don't think its too hard to miss one speaker being silent...?
You can set the pan to left, right, both (center), or neither (off). There is apparently a "quirk" in the YM2612 that makes the two address ports the same, so the pan value was not being sent to the pan register, leaving it as off.

Eke
Very interested
Posts: 884
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke » Fri Apr 08, 2011 8:28 am

Glad you fixed it, it sounds awesome by the way.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Fri Apr 08, 2011 9:42 am

Eke wrote:Glad you fixed it, it sounds awesome by the way.
Thanks ;)
It's the simplest driver but it gave me more troubles than others ;)
The ADPCM 2 channels was difficult to fit in, there is no much available cycles at end compared the simple PCM driver.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Fri Apr 08, 2011 9:44 am

Chilly Willy wrote:Well, I was HALF right - the problem was the pan not being set correctly, I was just wrong on why it wasn't set. :lol:

Seems nearly every z80 pcm driver out has this issue - it's a surprise the problem hasn't been seen more often.
True, it was indeed a panning problem but not the one we expected.
I still do not understand why the sound was barely audible...

Eke
Very interested
Posts: 884
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke » Fri Apr 08, 2011 10:13 am

Stef wrote: I still do not understand why the sound was barely audible...
You mean as it should have been completely muted but was still a little bit audible on real hardware ?

In that case, this could mean the panning feature of the output DAC is not working exactly as we think. I don't know how this stuff generally works but maybe it's masking only some bits of the channel output, which still produce sound under some specific conditions.

Tomy
Interested
Posts: 11
Joined: Sun Nov 26, 2006 12:23 pm

Post by Tomy » Fri Apr 08, 2011 4:10 pm

Hi Stef,

Why your sound sample missing all music *.h ?
Then how to compile ? Thanks.

Eke
Very interested
Posts: 884
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke » Sat Apr 09, 2011 11:31 am

Stef wrote:
Eke wrote:Well, it's accurate in a sense it emulates some stuff that other emulators generally don't: undocumented VDP register bits (like Mode 4, HVC latch, 3-bit palette, etc), lock-out when accessing illegal areas,, TMSS register lock-out, address error exception,...

However it won't give you any indication (unless you recompile it with log messages like I do for debugging emulation issues), so I am not sure how useful this could be. At least, your other drivers sound flawlessly and at the right volume.
Anyway, even if it does not include debug features, it's always faster to test rom on the emulator than on real hardware which imply to copy rom to my sd card, put it in everdrive, flash the internal eprom (which take sometime when you have a big rom like my sound test one) etc ;)
At least now, i'll include your emulator in the "test tools" as it provides more accurate emulation than others on some points :)
I did not thought about it initially but you should give a try to Nemesis own emulator project, Exodus, which you can find last public version here

viewtopic.php?t=851

It claims to have the most accurate YM2612, PSG, Z80 & 68k existing cores (though nothing is known on what exactly make them more accurate) and, despite the VDP core still apparently misses a lot of features, it's quite stable now and provides the best debug environment I have ever seen...

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Sun Apr 10, 2011 10:16 am

Tomy wrote:Hi Stef,

Why your sound sample missing all music *.h ?
Then how to compile ? Thanks.
The headers should be automatically generated by using the makefile.gen file so they aren't needed :)

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Sun Apr 10, 2011 10:18 am

Eke wrote: I did not thought about it initially but you should give a try to Nemesis own emulator project, Exodus, which you can find last public version here

viewtopic.php?t=851

It claims to have the most accurate YM2612, PSG, Z80 & 68k existing cores (though nothing is known on what exactly make them more accurate) and, despite the VDP core still apparently misses a lot of features, it's quite stable now and provides the best debug environment I have ever seen...
Haaa thanks i was looking after it !
I remember it was quite slow but very interesting because of its very high level of accuracy :) Adopted in my testing tools =)

Post Reply