[mc1000/jupiter ace/sc3000][sound][bitbang & psg] missing explosion sounds in bitbang - psg produces beeps
PSG is not working as expected for the MC1000 target: all effects in my game sound horribly wrong.
Bit bang works ok except for noise effects that are reproduced as beeps.
some (few) noise effect uses the rom data as random data for white noise, but the mc1000 does not have a visible ROM when in games mode. What do you get if running in BASIC mode? The psg support is still missing iirc
@zx70 same issue on same effect on the Jupiter Ace
SC3000 is also badly affected by sound issues: bit-bang has extremely long and wrong sounds.
Sound is very subjective :)
I suspect there's a constant wrong somewhere for the speed of the PSG device
However, could you:
a) Attach an example program that shows the fault (including command line) b) Attach a recording of it working properly (say which port) c) Attach a recording of it failing on the port that's wrong
And then these issues will be a lot easier to investigate!
@suborb sure, I will try to produce something. The problem is not a matter of taste, which would not be a bug. Even if sounds were different across targets, it would not be a bug because it may be impossible to reproduce the same sounds. If a presumed explosion/noise effect sounds like a long pulsing beep that locks the computer for a few seconds, them we have a problem.
I am reporting on different targets the following kind of problems:
- noise being both totally wrong and taking several seconds (overflow issue?)
- noise sounds not being noises (rom-related problem? maybe bank switching?)
I will list the exact sounds that fail badly on specific targets.
@suborb The following example shows some of the issues.
One of the worst issues are the first two sounds on the m5 (third sound is OK on the m5).
I compile the m5 case with:
$(Z88DK_PATH)$(MYZ88DK) +m5 -create-app \
-vn -lndos \
$(SOURCE_PATH)/../experiments/sounds.c
The following code:
#include <sound.h>
#include <stdio.h>
int main(void)
{
printf("Press any key to start");
getchar();
printf("bit_fx(1) Fast increasing scale\n");
// M5 and SC3000 have an issue with this
bit_fx(1);
getchar();
printf("bit_fx(7) Medium duration moving down, then up\n");
// M5 and SC3000 have an issue with this
bit_fx(7);
getchar();
printf("bit_fx3(0) Quick noisy high pitch buzz / break noise\n");
// ACE, MC1000, SC3000 have an issue with this
bit_fx3(0);
getchar();
return 0;
}
@zx70 @suborb I have attached a recording of the two very wrong sounds on the m5. I am not asking for good sounds but the two sounds should at least vaguely resemble their description.
@zx70 @suborb I have attached the binary produced for the Sepcrum, which has the good sounds but I am not picky about the sounds. The sounds could be different as long as it vaguely resembles their description and do not last multiple seconds when they are described as short/quick. spectrum_ok.zip
Thanks for the samples, they clarify several things. This problem is not related to the white noise generation, it affects the effects based on bit_beep (square wave generation). My first impression is that the impacted targets are those machines using the new SN76489 library: https://github.com/z88dk/z88dk/blob/master/libsrc/psg/sn76489.inc
Yes, indeed. We also have a noise issue on some targets, which is a different issue.
I think I found one of the problems you experimented with the sound rountines: part of them used Self Modifying Code, which cannot be run in ROM. I changed the section assignments to smc_clib where necessary, so that the segment initialization will do the proper job at startup. Please check it after the next nighty build ;)