News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Xyphoe

Burnin' Rubber (& what Plus features have really been utilised?)

Started by Xyphoe, 17:59, 24 April 11

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

dragon

QuoteSo wait.... the "DMA" is not *just* useful for sound, but can be used for other processing features and sub-routines, etc?

You can use dma to use samples ingame.(rick dangerous aghhh  :laugh: ).Or you can use dma to use cpu for better ai more sprites effects etc...

Quoteie even though DMA Channel 0 is enabled in Burnin' Rubber it isn't necessarily being used for the screeching sound fx?

mmm,not necesary.I I think the three dma channels,is connected to three channels of ay.So in pc.Heard left channel only,the right channel only(using windows sound control).So you can listen only the channel correspond to dma 0.And you found what sound is using burning rubber for dma :)

andycadley

Quote from: Xyphoe on 15:34, 25 April 11
So wait.... the "DMA" is not *just* useful for sound, but can be used for other processing features and sub-routines, etc?

Also so when people refer to the 'DMA' it is actually a real chip inside, which has 3 channels that come from where and go to where exactly?
What you can do with the "DMA" is extremely limited, it's pretty much a case of sending a byte to the sound chip, generating an interrupt or basic control flow. There are 3 "DMA Channels" which, in essence, means you can run 3 of these mini DMA programs at any one time - handy if you want to play samples back on each of the three AY channels.

It's not a seperate chip as such, it's just part of the ASIC just like the Gate Array and CRTC are in a plus machine.

Quote from: dragon on 15:55, 25 April 11
mmm,not necesary.I I think the three dma channels,is connected to three channels of ay.So in pc.Heard left channel only,the right channel only(using windows sound control).So you can listen only the channel correspond to dma 0.And you found what sound is using burning rubber for dma :)
Any "DMA Channel" can send sound to any of the AY audio channels, there's no connection other than the fact there are the same number of them.

dragon

QuoteAny "DMA Channel" can send sound to any of the AY audio channels,   there's no connection other than the fact there are the same number of   them.

Then The programmer can be used dma for all sound ingame in burnig rubber :) .

Xyphoe

Thanks!

So is there any way to confirm what exactly is happening and going down DMA channel 0 on Burnin' Rubber?

ssg

About why Prehistorik 2 uses DMA music at the intro: I think programmer wrote the routine for DMA only and did not bother to convert. Maybe they thought of greater animations on that screen but later threw the idea away but kept the music routine.

Xyphoe

This article http://www.cpcwiki.eu/index.php/ASIC seems to suggest DMA is purely only for sound channels?

Under "New Features" - "DMA sound channels" 

fano

Quote from: Xyphoe on 12:49, 25 April 11ps - does anyone have the .dsk file for this? http://www.cpcwiki.eu/index.php/DMA_Music_Demo
http://www.cpc-power.com/cpcdemos/index.php?page=detail&num=1474

About DMA usage on Amstrad +/GX , they are not very usefull for something else than sound , maybe to raise an interruption for a timer but that's all.They are widely used to load a AY register instead of using CPU to do the stuff (and to avoid dealing with this awfull AY port mapping :vomits: )

The greatest usage on my point is to allow to play samples , not only for game SFX but in music too like in the DMA demo.Sadly , there is actually no serious tracker for this on +  :(
I'd dream about something like STarkos/AT with its fantastic player (a great tool , you can integrate music & SFX in less than 15 mins in a project)

About Burning Rubber , DMA0 is used to load some AY registers so we can consider DMA are used for ingame sound.
"NOP" is the perfect program : short , fast and (known) bug free

Follow Easter Egg products on Facebook !

Xyphoe

Ahhh thanks Fano! I was a dumbass and still searching for it on CPC Power in the 'Games' section - DUR!  ::) :-[

That's a great demo, music sounds great - thumbs up!  :)



I still don't really understand why the DMA is needed to produce those high quality samples though with nothing else going on or why a CPC couldn't - maybe without the DMA on a normal CPC the Z80 would be unable to keep up with bits per sample and end up lagging and disjointed perhaps?

dragon

QuoteSo is there any way to confirm what exactly is happening and going down DMA channel 0 on Burnin' Rubber?                                                                                                                                                              

Not without  disassemble game.But I think he uses for all ingame sounds.Only use for derrapage has not sense.

The objetive is win power,not lost power.

fano

On CPC , the CPU must update AY register and this is very slow to access them (awfull mapping through PPI !).You can have high quality samples like in Face Hugger Ultimate Megademo or Orion Prime but you can not do a lot of things.Same things for STarkos that allows you to play 8khz samples with digidrums.
With DMA , ASIC can update directly AY register every line (312 per frame but there are tricks to update twice) , you can have easily 15Khz samples without CPU usage so you can manage a complete game when playing sound. (RD128+ has slowdowns when playing samples but this is because of memory restrictions in main 64K)

About sound effects , in a game on CPC when using interrupts and the CPU , you can update sound 6 time per frame (50hz) , on a + , you can update sound 312 time per frame without CPU usage.
"NOP" is the perfect program : short , fast and (known) bug free

Follow Easter Egg products on Facebook !

dragon


Quote
  The greatest usage on my point is to allow to play samples , not   only for game SFX but in music too like in the DMA demo.Sadly , there is   actually no serious tracker for this on +
 

I found a little app fano.(I don't know if you know it).

At least you can convert ay music to dma->.

"MYMplay v0.4 for Amstrad CPC by AndyC, it  plays MYM music files (converted YM files),  also converts raw YM file to CPC+ DMA list"

http://genesis8.free.fr/frontend/music/mymcpc04.zip


MacDeath

Because the AY is supposed to get its datas with no (or fewer) help from CPU... It is supposed to "feed" automatically...

You are then supposed to be able to play some samples with less CPU intensive process... that's all...Yet it still needs RAM (in central RAM area ?)...

And there are also some bugs in the process...so it doesn't work as well as it should...

Fano would tell more...


Edit : oops he did... merd, grilled by Fano...

villain

Quote from: ssg on 17:40, 25 April 11
About why Prehistorik 2 uses DMA music at the intro: I think programmer wrote the routine for DMA only and did not bother to convert. Maybe they thought of greater animations on that screen but later threw the idea away but kept the music routine.


At the time when Prehistorik 2 was released WEEE! worked on a DMA-tracker for the Plus range. He also made this title tune for Prehistorik 2. For Elmar Prehistorik 2 was also the opportunity to show and use all the advanced features of the Plus.

arnoldemu

Quote from: Xyphoe on 12:49, 25 April 11
Actually talking of DMA sound, to be honest I'm not really 100% sure what this is precisely. Apart from 'Prehistorik 2 title screen has DMA music'.

I can't find an article on the CPC Wiki describing what this is and how it can be used, only a small mention in the Plus/GX4000 hardware article http://www.cpcwiki.eu/index.php/Plus -

"An automatic DMA transfer system for feeding the sound chip was also added but the sound chip itself remained unchanged"

So.... DMA = Direct Memory Access? I'm guessing?
How does that translate into getting better sfx and music?


ps - does anyone have the .dsk file for this? http://www.cpcwiki.eu/index.php/DMA_Music_Demo
The "DMA" sound:

Each line, the ASIC reads 3 commands. It then processes these.
The commands are to stop, repeat, generate interrupts, send value to psg register.
So, the best use is sampled sound, and 3 channel sampled sound.
However, it is limited to the first 64k of ram, and each command is 2 bytes.
So if you want to play some sampled sounds you still need to fill a buffer which it then plays.
Not a biggie, but ... well it's not bad.
The only thing is it's great for sampled sound ( psg registers 8,9,10) but can also be used to write to other registers, but then, it becomes less useful I think and not as quick perhaps as a normal function to write the other registers.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource


andycadley

Quote from: Xyphoe on 19:33, 25 April 11
I still don't really understand why the DMA is needed to produce those high quality samples though with nothing else going on or why a CPC couldn't - maybe without the DMA on a normal CPC the Z80 would be unable to keep up with bits per sample and end up lagging and disjointed perhaps?
It takes something like 40us to write a value to a single PSG register using the CPU, because you have to go a rather round-the-houses way via the PPI (very slow compared, for example, to the 128 spectrums which can talk directly to the AY via two IO ports) and you only have 64us per scanline, so you can manage about 1.5 writes per scanline. The CPC+'s DMA however can write to 3 seperate AY registers every scanline, so that's almost twice as fast as you could possibly accomplish using just the CPU alone.
Quote from: dragon on 20:45, 25 April 11
"MYMplay v0.4 for Amstrad CPC by AndyC, it  plays MYM music files (converted YM files),  also converts raw YM file to CPC+ DMA list"
It's like being famous. :P Actually I'd completely forgotten I'd even written that!

dragon

QuoteIt's like being famous. :P Actually I'd completely forgotten I'd even written that!
And what happen with your web page of MYMplay? :'( :angel:

andycadley

Quote from: dragon on 21:32, 25 April 11
And what happen with your web page of MYMplay? :'( :angel:
I don't think I had one, did I? I didn't write the original, I just ported the source code to the CPC after a thread in csa8 (as did Kev Thacker I believe). The MYM to DMA list program was a bit experimental, I don't think it actually produced particularly optimal or even terribly useful results, to be honest.

Xyphoe

Well the vid is now live...



Enjoy!
Hopefully at the start there where I describe Plus features there isn't inaccuracies - I left it rather vague-ish just in case.

dragon

QuoteI don't think I had one, did I? I didn't write the original, I just   ported the source code to the CPC after a thread in csa8 (as did Kev   Thacker I believe). The MYM to DMA list program was a bit experimental, I   don't think it actually produced particularly optimal or even terribly   useful results, to be honest.

yes!
http://www.bigfoot.com/~AndyCadley

It's funny,can you compile the MYM to DMA an try what happend with song?. ;D

Quote
Enjoy!
Hopefully at the start there where I describe Plus features there isn't inaccuracies - I left it rather vague-ish just in case.
View in youtube.I waiting for see the end.¿You played with keyboard?.


dragon

O.k I see.  great! only the five!.what the hell,you need a warp motor to alcanze the number 1 wtf.

wow,I only rearched the tree lap one time.Great drive!

milamber

This game got a few seconds play on the soap opera - Eastenders!

I also recall CVG magazine laughing at the machine and offering it as boobie prize for one of their competitions.

Being a loyal CPC fan I was disgusted by this and stopped purchasing that mag.

I had an amiga by the time the CPC console came out.  Its not realised that many a 16bit racer was poor compared to this game.



arnoldemu

Quote from: andycadley on 21:44, 25 April 11
I don't think I had one, did I? I didn't write the original, I just ported the source code to the CPC after a thread in csa8 (as did Kev Thacker I believe). The MYM to DMA list program was a bit experimental, I don't think it actually produced particularly optimal or even terribly useful results, to be honest.
I think our code is still available on genesis8.
If not I think I have Andy's lying around and can put it up onto my website if needed.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

arnoldemu

Quote from: andycadley on 21:10, 25 April 11
It takes something like 40us to write a value to a single PSG register using the CPU, because you have to go a rather round-the-houses way via the PPI (very slow compared, for example, to the 128 spectrums which can talk directly to the AY via two IO ports) and you only have 64us per scanline, so you can manage about 1.5 writes per scanline. The CPC+'s DMA however can write to 3 seperate AY registers every scanline, so that's almost twice as fast as you could possibly accomplish using just the CPU alone.It's like being famous. :P Actually I'd completely forgotten I'd even written that!
Ahh when you highlight the timings like that, it is better. Although checking through the information, it mentions something about if you access ppi at the same time as the ASIC is, it delays it... I need to test this to find out exactly how and when it happens.
But a player using ASIC DMA would be a little bit faster than a normal player. Nice.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Powered by SMFPacks Menu Editor Mod