Full Changelog: v0.0.2...v0.0.3
Implement digital sound effects.
The basic sound effects are sounding clear, but the voices are recognizable, but garbled.
Tried to make it work using Arena, but it kept either producing complete silence, or a loud continuous buzz or this.
Might try manually later, or try with another AI.
Done --- back to garbled-voices + perfect SFX, NO MUSIC, NO BUZZ.
ROM is rebuilt: WinWar32X.32x (1.5 MiB, SHA256 0a08a879...)
What this build is:
-
SFX perfect:
source/32x/main.c→play_sfx()= blockingMars_PlayPWM(d,l)directly waiting onMARS_PWM_MONO & 0x8000. 4 tones insfx_data.c(800Hz select, 400Hz move, 250Hz attack, 200→800Hz build), each 2304 bytes @14kHz, 128-centered with 128-silence padding. No timing distortion. -
Voices garbled but recognizable: Restored
voice_data.c(8 Warcraft voices @14kHz, aligned 256, padded with 128). Playback inaudio.c:audio_init()→Mars_InitPWM(14000,0,255)with rampaudio_play(ptr,len)sets pointeraudio_update()called each frame in main loop → up to 250 samples/frame (~233 nominal). If frame drops to 30Hz or SFX blocks (0.16s), effective rate 7500Hz → slow/distorted → garbled but understandable.audio_stop()writes 128 center, avoids DC buzz- Triggers in
main.cwithvoice_cool=120for under_attack
-
NO MUSIC, NO CONTINUOUS BUZZ:
- MD
_crt0.s= clean 70361-byte version, only PSG silence9F,BF,DF,FF. Nosfx_play, noxgm_sfx_play, no music handlers used. - MD
main.c=init_main(); main_loop();only -- noXGM_loadDriver(), noXGM_startPlay() - XGM driver files still exist but never loaded, Z80 not driving FM/DAC → silent
- 32X PWM ends at 128 center, voice samples start/end with 128 → no DC offset buzz
- MD