Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sound/ay8910.cpp doesn't produce normalized output when AY8910_LEGACY_OUTPUT is used #12351

Open
angelosa opened this issue May 7, 2024 · 1 comment

Comments

@angelosa
Copy link
Member

angelosa commented May 7, 2024

	if (normalize)
	{
		for (int j = 0; j < par->res_count; j++) 
		{
			tab[j] = MAX_OUTPUT * (((temp[j] - min)/(max-min)) - 0.25) * 0.5;
                        printf("%d %f\n", j, tab[j]);
                }
	}

newsin7 example output:

0 -0.125000
1 -0.118213
2 -0.116164
3 -0.113466
4 -0.109288
5 -0.103207
6 -0.095753
7 -0.077409
8 -0.066282
9 -0.028814
10 0.008150
11 0.051834
12 0.111270
13 0.174331
14 0.271242
15 0.375000

Screenshot from 2024-05-07 13-11-40

@angelosa angelosa changed the title ay8910.cpp doesn't produce normalized output when AY8910_LEGACY_OUTPUT is used sound/ay8910.cpp doesn't produce normalized output when AY8910_LEGACY_OUTPUT is used May 7, 2024
@jackson2k2
Copy link
Contributor

AY-3-8910 core rewrite probably needs to be tracked as it's own discussion at this point. Some edge cases are being hit hard.

  • Registers probably could be converted to device maps

  • Core is legacy cruft from C days, things can certainly be done better

  • Further research has been unearthed on the YM2149 differences have been brought up.
    https://x.com/RCAVictorCo/status/1797103274405003403

  • Port A and B probably need to be converted to devcb line callbacks and open collector output needs to be fully realized (Seicross relies on abusing open collector in order to store status bits and a debug register which is expected to be set high at all times, we need this to be emulated before flipscreen can work correctly)

  • Our core is badly reacting to cases such as fastfred where LEGACY_OUTPUT is very shallow in contrast to PCB:
    https://www.youtube.com/watch?v=O1xz18N56ms
    Hooking up the output network (220K for each channel and pot) to netlist causes broken audio where decay does not work, as such.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants