Page 1 of 1

VRAM transfers + nice sound

Posted: Mon Sep 24, 2012 5:19 am
by TmEE co.(TM)
http://tiido.rocketcat.info/BitShit/ANIM.BIN

I had quite a bit of fun getting things to a point where animation is still fast and sound does not suffer from VDP FIFO overflow induced system halts.
Reading VDP control port breaks address pointer so I had to do things in a blind manner, move data and wait and move again hoping things work.
I start off sending data in tile quantities using 68K loop (68K cannot overwhelm VDP in VBL) and unlike DMA, 68K won't keep bus closed off from Z80. I switch to slow update loop when there's active display.

I coded a new WAV playback program for this one, my old code is just horrible haha. I am very happy with this one, it took me a while to do but it works like a charm.

26.5KHz, so this means sounds best on real hardware ! (emulators seem to have problems with high PCM rates).

Posted: Mon Sep 24, 2012 6:07 am
by Chilly Willy
Ran it on my CDX... it looks and sounds great! Nice work. :D

Posted: Mon Sep 24, 2012 2:42 pm
by Stef
Very very nice audio quality indeed, well done :)
I always try to avoid DMA when it is possible, as well as locking bus during active period as anyway that is a big loss in cpu time.

Street Fighter 2 game is well known to have scratchy voices, not necessary because the samples are bad, but because of the quantity of DMA during the extended VBlank. With Gens KMod i saw the game can transfer 3 times the same vram block in a single frame which is definitely a bad programming issue. I initially though that modifying DMA transfers to software transfers would fix the bad voices issues but as the game can transfer severals times the same block during Vblank software code could not be fast enough unfortunately. I would really want to see this game with "fixed" voices, i wonder if someone already tried to patch it...

Posted: Mon Sep 24, 2012 6:00 pm
by RedAngel
While Rammstein is not my cup of tea I must admit that the quality of sound you have achieved is really good.

About Street Fighter 2 you can listen to the voices in Audacity directly in the rom, and the samples are ok so it is a problem of the Capcom sound code.

Posted: Mon Sep 24, 2012 8:27 pm
by Stef
RedAngel wrote:About Street Fighter 2 you can listen to the voices in Audacity directly in the rom, and the samples are ok so it is a problem of the Capcom sound code.
Of course it is :) just because they play sample while they do large DMA transfer. To fix voices, you just need to avoid 68k bus lock and so avoid DMA transfer (can be done in software).