News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Soundtracker DMA v2.0 released

Started by Zik, 22:01, 21 June 21

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ast

Ok, that works but, when all registers are ready (from crtc3cre), i see a splendid "Memory Full" :)
I 'm going on my investigations and i will tell to you.
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

Ast

_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

Ast

_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

Zik

Quote from: Ast on 16:32, 09 July 21
still memory full  :o
Thank you for testing. The few comment lines I added to Basic file made it too big for the disc buffers to fit, and apparently I forgot to test after this change.

I have updated the zip file on the website. Now the out.asm file can be saved with no error.

zhulien

In the context of Soundtracker - what makes a SID channel, a SID channel?


There seems to be some real variety in what a real SID can produce...  from Task 3 to Sanxion and others...


Any way to get Task 3 style base and drums on CPC?  or Sanxion style base?



https://www.youtube.com/watch?v=D-z0P1Absk8



https://www.youtube.com/watch?v=jiXTDZy2Hyg



norecess464

Sorry, off-topic: those songs from Frank Endler are just AWESOME.
My personal website: https://norecess.cpcscene.net
My current project is Sonic GX, a remake of Sonic the Hedgehog for the awesome Amstrad GX-4000 game console!

Zik

Quote from: zhulien on 11:32, 19 July 21In the context of Soundtracker - what makes a SID channel, a SID channel?
There seems to be some real variety in what a real SID can produce...  from Task 3 to Sanxion and others...

Any way to get Task 3 style base and drums on CPC?  or Sanxion style base?
"SID" sound in Soundtracker DMA (often called "SID-Voice" on Atari ST that has a similar sound chip) is called after the SID sound chip of C64 because it mimics one type of sound typical to it. But, SID sound chip has obviously many more possibilities (filters, etc.). 

The one in question here is pulse width modulation, which means they can choose the duty cycle of the rectangle wave, while on AY it is fixed at 50% (i.e. a square wave). By rapidly reprogramming the AY to chop the square wave, you can produce a rectangle wave of variable duty cycle. This has a CPU cost (all the more, we do not have a programmable timer like on Atari) that Soundtracker DMA reduces by using sound DMA of CPC+. 

That was a quick explanation but I hope it is clear enough.

zhulien

I think I get it, by switching rapidly between slightly offset square waves you can get a pretty close approximation of that SID sound... I am guessing the typical Warhawk sound...


zhulien

Come to think of it there are a few CPC sounds that I have only ever heard on a CPC - even though other computers share the same sound chip - H.A.T.E. comes to mind...



https://www.youtube.com/watch?v=rMnLJkSi3nE  at 1:48 into it...


I always felt Ghosts n Goblins music had a sid-like base, awesome music!



https://www.youtube.com/watch?v=sqcteYiOHS8

BSC

#59
Quote from: zhulien on 13:26, 20 July 21I always felt Ghosts n Goblins music had a sid-like base, awesome music!

That effect was achieved by playing the same notes on two AY channels, slightly detuned to each other. Actually funny that this effect was almost never used.
I remember playing with the SOUND command in basic really long ago (must have been around the 18th century), doing the same thing with 2 or even 3 voices.
Made my CPC sound like an airplane passing by in the far distance.
** My SID player/tracker AYAY Kaeppttn! on github **  Some CPC music and experiments ** Other music ** More music on scenestream (former nectarine) ** Some shaders ** Some Soundtrakker tunes ** Some tunes in Javascript

My hardware: ** Schneider CPC 464 with colour screen, 64k extension, 3" and 5,25 drives and more ** Amstrad CPC 6128 with M4 board, GreaseWeazle.

tastefulmrship

#60
Quote from: BSC on 22:39, 20 July 21
That effect was achieved by dubbing the bass notes on two AY channels, slightly detuned to each other. Actually funny that this effect was almost never used.
I think it's called a "flange"... but don't quote me on that, I'm not a musician!
It was used quite a bit by Dave Rogers (eg. Battle Valley), Ben Daglish (eg. Future Knight), Dave Whittaker and others back in the day. I use it very often!

EDIT: I can listen to David Whittaker's GHOSTS 'N' GOBLINS track all day! Love it! ^_^

Zik

Quote from: zhulien on 13:26, 20 July 21few CPC sounds that I have only ever heard on a CPC - even though other computers share the same sound chip - H.A.T.E. comes to mind...

Let me complete the very good answers above for H.A.T.E. music, with sounds really typical to Ben Daglish. 

So, if you wonder, the sound at the beginning is something like a normal square sound in higher octaves and pitch slide down, with hardware sawtooth volume envelope at fixed frequency (relatively low, something like &36). I would say the one at 1min28s is the same with lower notes. 

Then at 1min48s it is normal square changing notes with sawtooth fixed at very high pitch (period of 1).

Cwiiis

Seems if I try to run this with the X-MEM attached, I get an error about it not being supported... But I'm on a 6128+, I don't even need the extra RAM! Does anyone have any work-arounds for this beyond detaching the X-MEM? (I'd like to save on wear on the ports :))

Zik

#63
Quote from: Cwiiis on 14:59, 23 August 21with the X-MEM attached, I get an error about it not being supported
This is because X-MEM is not compatible with the Asic I/O page of Amstrad Plus. Actually, no existing memory extension is compatible.

Instead of having some silent memory corruptions, I added this error message. I was not aware that some people were using incompatible extensions on their Plus.
I do not know if there is a switch on X-MEM to disable RAM expansion.

Cwiiis

Quote from: Zik on 18:11, 23 August 21
This is because X-MEM is not compatible with the Asic I/O page of Amstrad Plus. Actually, no existing memory extension is compatible.

Instead of having some silent memory corruptions, I added this error message. I was not aware that some people were using incompatible extensions on their Plus.
I do not know if there is a switch on X-MEM to disable RAM expansion.

This sounds interesting, would you mind elaborating a little?

Zik

Special features of Amstrad Plus are enabled through a register page (which I call Asic I/O register page) that is mapped to &4000-&7FFF memory space. When connected, it has priority. If the external memory extension replaces the internal 64k extension and does not account for Asic page connection, there is a conflict. A software can often avoid this situation by disabling Asic page before connecting an extension bank. But this has a cost and is not always easy to do, especially a posteriori.


Cwiiis

Quote from: Zik on 20:25, 23 August 21
Special features of Amstrad Plus are enabled through a register page (which I call Asic I/O register page) that is mapped to &4000-&7FFF memory space. When connected, it has priority. If the external memory extension replaces the internal 64k extension and does not account for Asic page connection, there is a conflict. A software can often avoid this situation by disabling Asic page before connecting an extension bank. But this has a cost and is not always easy to do, especially a posteriori.

I understand about mapping the ASIC registers, but surely it just always takes priority when it's mapped? If a program decides to map extension RAM into the same address space where the ASIC registers are mapped, that's on them, surely? I may be misunderstanding how extension RAM gets mapped/works of course... But it doesn't seem like just having an extension RAM board connected would have any ill effect on software that uses Plus features?

Zik

Quote from: Cwiiis on 20:44, 23 August 21I understand about mapping the ASIC registers, but surely it just always takes priority when it's mapped? If a program decides to map extension RAM into the same address space where the ASIC registers are mapped, that's on them, surely? I may be misunderstanding how extension RAM gets mapped/works of course...
ASIC registers and extension RAM are both (and independently) connected as 16kB pages at &4000-&7FFF (I will let other modes aside so as not to complicate my explanations). If the RAM extension board does not ignore read/write accesses when ASIC page is on and a bank is connected at &4000, there is a conflict.

Quote from: Cwiiis on 20:44, 23 August 21But it doesn't seem like just having an extension RAM board connected would have any ill effect on software that uses Plus features?
A program that uses Plus features will have issue if it connects ASIC registers page and (an incompatible) RAM extension page (and have some read or write access).

Cwiiis

Quote from: Zik on 21:11, 23 August 21
ASIC registers and extension RAM are both (and independently) connected as 16kB pages at &4000-&7FFF (I will let other modes aside so as not to complicate my explanations). If the RAM extension board does not ignore read/write accesses when ASIC page is on and a bank is connected at &4000, there is a conflict.
A program that uses Plus features will have issue if it connects ASIC registers page and (an incompatible) RAM extension page (and have some read or write access).
Right, so just having it connected is fine, as long as a program doesn't try to map both external RAM and ASIC registers at the same time (which may be awkward for some apps)? In the case of Soundtracker DMA, why does it check for external RAM and error out if it doesn't actually use it?

TotO

#69
Well... @Ast as released a patch to allow the X-MEM to work with Soundtracker DMA and it looks he use it since months w/o issue.
Now, I understand that is more a "security, in case if..." as the X-MEM was designed for the CPC range of computers.

I have an X-MEM+ design done since months, because the number of peoples asking for an Amstrad Plus expansion grow.
It will require to do some tests and I will release it next. Peoples with Amstrad Plus and X-MEM will be able to exchange it.

Thank you again to @Zik for his nice program, it is the work of life!
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Zik

#70
Quote from: TotO on 22:22, 23 August 21Well... @Ast as released a patch to allow the X-MEM to work with Soundtracker DMA and it looks he use it since months w/o issue.
Now, I understand that is more a "security, in case if..." as the X-MEM was designed for the CPC range of computers.
I was not aware of a patch by Ast. I fixed an issue on initialization part (that was causing obvious corruptions) but then it was too risky to fix the rest just before the release, I had no time to re-validate everything. It is easy to have memory corruption without even noticing.

Quote from: TotO on 22:22, 23 August 21I have an X-MEM+ design done since months, because the number of peoples asking for an Amstrad Plus expansion grow.
It will require to do some tests and I will release it next. Peoples with Amstrad Plus and X-MEM will be able to exchange it.
Glad to hear! @TotO Do you decode Asic lock/unlock and connection/disconnection?

Ok, we are getting quite off topic here!

Cwiiis

Quote from: TotO on 22:22, 23 August 21
Well... @Ast as released a patch to allow the X-MEM to work with Soundtracker DMA and it looks he use it since months w/o issue.
Now, I understand that is more a "security, in case if..." as the X-MEM was designed for the CPC range of computers.

I have an X-MEM+ design done since months, because the number of peoples asking for an Amstrad Plus expansion grow.
It will require to do some tests and I will release it next. Peoples with Amstrad Plus and X-MEM will be able to exchange it.

Thank you again to @Zik for his nice program, it is the work of life!

Ooh, please consider me as being in the queue to make that exchange :)

OffseT

You should pay attenton to the fact that the issue is in the X-Mem (which was not designed for Plus range), not in the Soundtracker DMA.

As soon as a X-Mem is plugged on a Plus, all programs which are using memory banks and ASIC page at the same time can fail. They just have to switch both a bank (any bank) and the ASIC page, and then poke an ASIC register; it will immediatly corrupt the underlaying memory.

By chance, you could not notice the corruption because it is in some GFX or secondary data, but for sure there is a corruption.

The only clean way to avoid this issue is to systematically page out the current bank before poking in the ASIC page, and then put it back. Since you cannot know about the current bank, you have to memorize it by some way, and at the end it could become much more complex when dealing with interrupts or 64K bank pages instead of 16K (&C2 mode). In some cases it is just impossible to handle without a huge overhead.

The secondary way is to access memory banks through port &7Exx instead of &7Fxx. Because internal memory respond to both &7Exx and &7Fxx (in fact it only checks A15) while X-Mem only respond to &7Fxx. But this is not a clean way, and even if it could be acceptable in demos, you should really avoid it in serious softwares.

So, any Plus compatible expansion memory is welcome.  8)

roudoudou

it's not an XMEM issue, it's a CPC memory expansion issue
as far as i know, only the MEMCard of RAM7 use a simplified handling of Asic connections
all other memory expansions will fail compatibility test
My pronouns are RASM and ACE

Cwiiis

I'm trying to understand why inherently having an X-MEM plugged in would be a problem - does the X-MEM replace the upper 64k of a 128k machine? Looking at the RAM mapping on the X-MEM instructions pdf, I suppose the issue is if you have X-MEM pages mapped in at #4000-#7FFF, you'll lose use of the part that overlaps with the ASIC registers while they're mapped (or rather, if you write to ASIC registers, you'll corrupt the corresponding part of that page).

So this means you lose access to part of page 1 (or perhaps all pages, depending on how you choose to map the memory) if you choose to map ASIC registers without unmapping extended RAM. Is there more to it than this? This doesn't sound as bad as what people are saying... I don't understand why just having an X-MEM plugged in and not using it would cause corruption?

Powered by SMFPacks Menu Editor Mod