I confirm the problem. I own a real o2 a few years ago and the first thing i notice is the sound in speedway that was wrong.
seems the problem is in audio.c/audio_process() which is not handling sound correctly, or maybe speedway use particular hardware tricks that are not fully interpreted by the emulator
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Here is the reason :
O2EM generate pseudo-random 1-bit noise using C rand()%2 calls, while real hardware use linear input feed back from it's 24 bit shift register (LFSR) .
Additionally, O2EM only output sound to audio buffer, but forget to rewrite shifted values to odyssey 24 bit shift register.
While noise works in most games, the ones that rely on this to generate more complex sounds (eg : motor) just fail.
If you are looking for accurate odyssey emulation use MESS/MAME which emulate sound properly.
I confirm the problem. I own a real o2 a few years ago and the first thing i notice is the sound in speedway that was wrong.
seems the problem is in audio.c/audio_process() which is not handling sound correctly, or maybe speedway use particular hardware tricks that are not fully interpreted by the emulator
Here is the reason :
O2EM generate pseudo-random 1-bit noise using C rand()%2 calls, while real hardware use linear input feed back from it's 24 bit shift register (LFSR) .
Additionally, O2EM only output sound to audio buffer, but forget to rewrite shifted values to odyssey 24 bit shift register.
While noise works in most games, the ones that rely on this to generate more complex sounds (eg : motor) just fail.
If you are looking for accurate odyssey emulation use MESS/MAME which emulate sound properly.
Here is the file where it is implemented :
https://github.com/mamedev/mame/blob/master/src/emu/video/i8244.c in sound_stream_update()
Here's a quick rewrite of audio_process() in audio.c, it should work now as in MESS/MAME:
void audio_process(unsigned char *buffer){
}
This patch appears to break the intro tune in "Frogger" - a game which relies on the
tweakedaudio
hack. Any ideas?Maybe to check in MAME if bug also exists and if it works, how it's done.