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

Space Invaders sound is close but not correct #3

Open
dshadoff opened this issue Dec 26, 2020 · 14 comments
Open

Space Invaders sound is close but not correct #3

dshadoff opened this issue Dec 26, 2020 · 14 comments

Comments

@dshadoff
Copy link
Member

The sounds do not seem correct... especially the 'shoot' sound (should be less shrill, and have more of a white noise-mixed type sound), and the background bass line (should be deeper and more of a sine wave than a square wave type sound).

@wizdude
Copy link

wizdude commented Mar 21, 2021

+1 but none of the audio is correct in this game. the shooting noise, the alien hit, the movement of the aliens, the UFO or player death are not the same as the original boards. albeit i understand that the exact audio does vary between PCB's, but this rendition is nothing like any of them.

for some examples, see here for some original PCB videos:
Midway board: https://youtu.be/9oXoryvRQ-0?t=85
Taito board: https://youtu.be/H4spsw_sxKc?t=7

if i understand correctly, the PCB actually has dedicated sound circuitry for these effects and i know in emulated versions of this board (MAME etc) they simply replace all of this with a sampled audio file.

is there anything that can be done to provide authentic sound for this game?

many thanks for all the fine work you've put into this board to get it where it is today. cheers.

@wizdude
Copy link

wizdude commented Mar 27, 2021

going through some of the code in this repository, i can see support for handling sample files. are there some additional files I am missing for the space invaders audio to be correct?

@wizdude
Copy link

wizdude commented May 8, 2021

just checking in to see if there was anything that i could be doing re: sample files or similar to try and fix this issue? cheers.

@tacertain
Copy link

tacertain commented Sep 25, 2021

I have started looking into this. As far as I have been able to find, none of the sampled audio files I have found are correct (the MAME sounds are also incorrect). If somebody has correct samples, I'm happy to update them. From what I can tell looking only cursorily at the HDL, somebody made an attempt to model the audio generators from the game, so I don't know if there's just something simple wrong (like the clock frequency is wrong), if they modeled the wrong thing, or what. In addition, there is a source of random noise that is mixed in to some of the sounds which may have been missed.

The original SI boards have a dedicated analog circuit per sound based on LM3900 op amps. So direct modeling in FPGA digital logic is out. I am proceeding down two paths. One is to see if I can tweak the current implementation to deliver the correct sound. The second is to build the analog circuits in Easy EDA and try and generate wave files from them.

If anybody has an actual board and can do a wave capture from each of the circuits, that would be the easiest.

@wizdude
Copy link

wizdude commented Oct 8, 2021

do any of these help?
https://www.classicgaming.cc/classics/space-invaders/sounds

even if they aren't perfect, they would be significantly better than the sounds being used now.

@tacertain
Copy link

I knew about those, but I don't believe they are representative of the sounds produced by the original hardware (looking at the hardware circuits and the wave forms that are in those files, I don't think the wave forms could possibly come from those circuits). So I don't know that it makes sense to add those into an official release. However, the core is already set up to use samples, so they could be added without any core changes - just adding them to the MRA file.

How comfortable are you with figuring out the format needed for rtl/Samples.vhd? If not, how comfortable are you with running an MRA that isn't in an official release?

@wizdude
Copy link

wizdude commented Oct 12, 2021

I'm totally ok with running an MRA that isn't in an official release.

i've been going through the repository and trying to work out how samples are actually implemented. i'm assuming by the reference to rtl/Samples.vhd that the samples themselves need to be raw and encoded with a specific bitrate and the like. i can't see any reference to any external files. i'm guessing they need to be then hex encoded and included into the MRA somehow.

i'm keen to implement some more realistic samples to try and make this game more authentic, so i'm happy to assist where i can.

@tacertain
Copy link

tacertain commented Oct 12, 2021 via email

@tacertain
Copy link

I have pushed a start on the MRA here: tacertain@9cf7fac

It doesn't work yet, but I don't have more time right now to debug. See the commit message.

@wizdude
Copy link

wizdude commented Oct 23, 2021

i thank you very much for starting work on this and your efforts are most appreciated.

@tacertain
Copy link

OK. I've got the sounds as close as I can get them. If you can find a sample for the "bonus base" sound, I would be happy to add it.

https://github.com/tacertain/Arcade-SpaceInvaders_MiSTer/blob/4a6f8ea73ef595554b54c133d0403ebec5d86dd9/releases/Space%20Invaders.mra

@tacertain
Copy link

At this point, all the other sounds are plausible, but the invader hit one is not.

@wizdude
Copy link

wizdude commented Feb 19, 2022

i never got the chance to thank you for this work you did before, so I apologise for that. thank you :-)

sometime during a (recent?) MiSTer update i suddenly noticed a new MRA file that appeared called "Space Invaders (Samples)" which is very similar to your MRA though not identical. is this the result of work you have committed back upstream?

cheers, wizdude.

@tacertain
Copy link

You're welcome! I did not try to upstream what I did, as when I discussed this issue on the discord I was told that since MiSTer was about preservation, unless I had sampled the original hardware, there was no way to know it was correct, so it would not be accepted. MacroFPGA may have sampled a real board.

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

No branches or pull requests

3 participants