VRAM transfers + nice sound

Announce (tech) demos or games releases

Moderator: Mask of Destiny

Post Reply
TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

VRAM transfers + nice sound

Post by TmEE co.(TM) » Mon Sep 24, 2012 5:19 am

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).
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Mon Sep 24, 2012 6:07 am

Ran it on my CDX... it looks and sounds great! Nice work. :D

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Mon Sep 24, 2012 2:42 pm

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...

RedAngel
Interested
Posts: 14
Joined: Wed Feb 07, 2007 7:29 pm

Post by RedAngel » Mon Sep 24, 2012 6:00 pm

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.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Mon Sep 24, 2012 8:27 pm

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).

Post Reply