rastersoft / fbzx-wii

Automatically exported from code.google.com/p/fbzx-wii
GNU General Public License v3.0
1 stars 0 forks source link

48K internal speaker sound problems #14

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I've noticed a problem that also used to happened with old Spectrum emulators 
from the 90's: the 48K speaker sound is [sometimes very] wrong in some games, 
probably due to the interruptions used for key checks, etc.

Example: Arkanoid, Livingstone Supongo 48K.

--ICEknight

Original issue reported on code.google.com by superballena on 2 Sep 2012 at 5:25

GoogleCodeExporter commented 9 years ago
The Arkanoid issue can be solved setting precision emulation on.

I am investigating Livingstone Suppongo issue.

Have you other example of other games with corrupted sound ?

Original comment by olimpier...@gmail.com on 4 Nov 2012 at 1:52

GoogleCodeExporter commented 9 years ago
Very few games require precise emulation. Arkanoid is amongst them. 

Arkonoid needs a precise emulation fo the floating bus:

http://www.worldofspectrum.org/faq/reference/48kreference.htm
(search the word "Arkanoid").

Original comment by olimpier...@gmail.com on 5 Nov 2012 at 9:41

GoogleCodeExporter commented 9 years ago
Livingstone Supongo 48K issue is caused by the emulation of the "contention 
effect" which occurs in Livingstone Supongo 48K. Living Livingstone Supongo 48K 
heavily use the instruction "OUT (FE), A" which causes contention and therefore 
a tremble in the sound.

If you use the +2A/+3 emulation setting, the effect disappears since in the 
+2A/+3 real machines the contention effect was reduced.  

Original comment by olimpier...@gmail.com on 7 Nov 2012 at 2:20

GoogleCodeExporter commented 9 years ago
So, you think it could be fixed?

Those two games are the only ones I could think beforehand, but there may be 
some with that problem that aren't fully compatible with the +2A or +3 modes.

Original comment by iceknigh...@gmail.com on 27 Nov 2012 at 3:35

GoogleCodeExporter commented 9 years ago
Arkonoid issue is already fixed setting precise emultion on as I said above.

I think that Living suppongo 48k is a special case. I tested many games and I 
did not find this problem, likley since there is no reason to heavily use the 
instruction "OUT (FE), A" as this program does.

Original comment by olimpier...@gmail.com on 27 Nov 2012 at 12:10

GoogleCodeExporter commented 9 years ago
Speaking of this, since "Precise emulation" is, well, precisely what everybody 
expects from an emulator, I really think it should always be turned on by 
default.

It could always be automatically disabled just when and if it's needed for the 
"Turbo mode", and turned on when it's not really needed anymore. It's mighty 
annoying having to go into the menu as soon as a 48K game with music has been 
loaded, every time...

Original comment by iceknigh...@gmail.com on 3 Jan 2013 at 6:39

GoogleCodeExporter commented 9 years ago
In the next release there will be in an improvement in the emulation in the 
normal mode (i.e. Arkanoid works properly). See revision 58.
Precision emulation can have some performance issues when also AY-3-8910 is on 
and in the program there is a lot of graphics which causes ULA contention.
I think that now precision emulation is needed only for some demo graphic 
programs  

Original comment by olimpier...@gmail.com on 3 Jan 2013 at 7:53

GoogleCodeExporter commented 9 years ago
Anyhow if you prefer having precision emulation as default you can save it with 
the general configuration.

Moreover in the next release it will be possible to have "auto turbo mode" and 
"precision emulation" on at the same time.

Original comment by olimpier...@gmail.com on 3 Jan 2013 at 8:41

GoogleCodeExporter commented 9 years ago
Thanks, having both activated would be very useful. I still haven't found any 
issues with Precision turned on and I've found many with it off, so in my 
oppinion it should be on by default until the bugs you mentioned are ironed out.

Is there any info somewhere on how would I go around to compiling the new 
revisions? I'd like to try other 48K games with music and see if they sound 
correctly now, since I've just noticed that this problem doesn't only happen 
with Livingstone Supongo (Cauldron 2 and The Trap Door are other examples).

Original comment by iceknigh...@gmail.com on 4 Jan 2013 at 7:31

GoogleCodeExporter commented 9 years ago
I have verified that also Cauldron 2 and The Trap Door work properly with the 
new revision.

In few days I want to release a new version of FBZX which have some (not all) 
the suggestions I received.

Original comment by olimpier...@gmail.com on 4 Jan 2013 at 8:44

GoogleCodeExporter commented 9 years ago
In version 8 the sound issue of normal mode is solved.

Original comment by olimpier...@gmail.com on 7 Jan 2013 at 5:24

GoogleCodeExporter commented 9 years ago
Arkanoid seems to still sound pretty bad in version 9. The sound beeps in the 
main menu should sound perfectly clean.

Original comment by iceknigh...@gmail.com on 21 Jan 2013 at 11:25

GoogleCodeExporter commented 9 years ago
Also, I've just tried Barbarian and the music is equally inaccurate.

Original comment by iceknigh...@gmail.com on 21 Jan 2013 at 5:33

GoogleCodeExporter commented 9 years ago
I've tried Arkanoid in Spectaculator and it sounds perfect there, please try it 
out so you can see the inaccuracies I was talking about (they're more 
noticeable near the end of the title song).

Original comment by iceknigh...@gmail.com on 28 Jan 2013 at 1:29

GoogleCodeExporter commented 9 years ago
Likely the beeper emulation is too simple.

I tried also to implement a low pass filter but the sound does not improve much.

I think I have to implement a better beeper emulation (I hav to study how).

Can you explain the difference you hear? Do you think the sound is too metallic?

Original comment by olimpier...@gmail.com on 28 Jan 2013 at 9:15

GoogleCodeExporter commented 9 years ago
Taken from Spectaculator web site:

High fidelity 48K ZX Spectrum sound. Will even play the multi-channel music on 
games such as Fairlight and Arkanoid correctly.

Definitely Arkanoid requires a special emulation.

Original comment by olimpier...@gmail.com on 28 Jan 2013 at 12:19

GoogleCodeExporter commented 9 years ago
In case it helps, here's some samples of how Spectaculator handles that 
specific part of the title music.

48K, 128K/+2 and +3 models seem to differ slightly.

Original comment by iceknigh...@gmail.com on 28 Jan 2013 at 5:11

Attachments:

GoogleCodeExporter commented 9 years ago
There is a website devoted to 1-bit music:

http://shiru.untergrund.net/1bit/pivot/entry.php?id=118

Now I should understand how to correctly emulate it.

Original comment by olimpier...@gmail.com on 28 Jan 2013 at 5:47

GoogleCodeExporter commented 9 years ago
In this website is explained the reason why the sound in FBZX is not perfect.

http://slack.net/~ant/bl-synth/2.square.html

Fuse uses the library taken from this website to improve the sound. 

Original comment by olimpier...@gmail.com on 19 Mar 2013 at 2:44

GoogleCodeExporter commented 9 years ago
Interesting! Are you planning to implement that library in the future?

Original comment by iceknigh...@gmail.com on 19 Mar 2013 at 8:19

GoogleCodeExporter commented 9 years ago
Yesterday I implemented a simpler and faster method (linear interpolation) 
which is described in this section and it is used by other emulators:

http://slack.net/~ant/bl-synth/12.linear.html

It has improved the sound a lot (I will post the dol file).

In any case in the future I want to test the library too.

Original comment by olimpier...@gmail.com on 20 Mar 2013 at 9:17

GoogleCodeExporter commented 9 years ago
I attach the file with the linear interpolation anti aliasing sound filter.

I also implempeted "jump to block" block which solves the Astro Marine 
corps.tzx issue.

This will possibly be the dol file of version 10.

Original comment by olimpier...@gmail.com on 22 Mar 2013 at 8:39

Attachments:

GoogleCodeExporter commented 9 years ago
Wow, this is such a big improvement! Great work!

There's still some "cricket chirping" noise near the end of the title song of 
Arkanoid, and at the intro scene, but this is great progress in any case!

Original comment by iceknigh...@gmail.com on 22 Mar 2013 at 9:15

Attachments:

GoogleCodeExporter commented 9 years ago
I have further increased the sample frequency. It seems the "cricket chirping" 
have disappeard.

Original comment by olimpier...@gmail.com on 23 Mar 2013 at 9:15

Attachments:

GoogleCodeExporter commented 9 years ago
Nice, that's even better!

Can't it be increased a bit more? I can still hear some artifacts here and 
there, but a little increase might make it perfect.

Original comment by iceknigh...@gmail.com on 24 Mar 2013 at 3:57

GoogleCodeExporter commented 9 years ago
No, it is at maximum now.
I believe that the artifacts can be removed only using the library since the 
method I used does not completely remove the aliasing as it is explained here: 

http://slack.net/~ant/bl-synth/12.linear.html

I will test it for the next release.

Original comment by olimpier...@gmail.com on 24 Mar 2013 at 8:27