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.

OffseT

Quote from: roudoudou on 12:01, 24 August 21
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

True. All existing expansion memory do have this issue when used on Plus.


Quote from: Cwiiis on 12:59, 24 August 21[...] does the X-MEM replace the upper 64k of a 128k machine? [...]

Yes. That's why just having it plugged will make any Plus program using (internal) exp 64K together with ASIC page will corrupt memory.


Quote from: Cwiiis on 12:59, 24 August 21[...] Is there more to it than this? This doesn't sound as bad as what people are saying... [...]

This is actually quite bad with 16K pages handling, and a total mess when using 64K pages (&C2 mode).

TotO

#76
Quote from: OffseT on 11:04, 24 August 21
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)

The issue is related to any CPC memory expansion (as previously said).

The X-MEM decode &7Fxx because it is the only port required to handle 512K. It allows to increase the memory next.
&7Exx allows to add one extra 512K RAM (1MB) or to access the internal memory expansion (CPC 6128 and 6128plus).

In this way, it can not avoid the Plus to work properly with the X-MEM expansion. It is not a bug, it is a feature...
A serious software have to considerate the existing hardware features instead of locking it. Just test the &7Exx capability.

Sure, a dedicated memory expansion can be usefull. Using ROM to store the software and save RAM will be nice too. 8)
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

GUNHED

Inicrons 512 KB Battery buffered S-RAM expansion allows you to select if you want to use the 128 KB of a 6128(plus) or the extra 64 KB from external S-RAM (just use a switch). So, no problem with the Inicron stuff. (IIRC Dobbertin does the same, some internal jumper...).
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Zik

Quote from: TotO on 14:15, 24 August 21A serious software have to considerate the existing hardware features instead of locking it. Just test the &7Exx capability.
What a gentle statement! Sorry for releasing software not meeting your standards.
Using port &7E is not a satisfactory solution to me, it is a workaround.

Zik

#79
For people reading through this thread, let me remind you that Soundtracker DMA runs on a bare 6128Plus and does not require additional RAM. I worked hard for it.

ComSoft6128

'CRTC3 main song' - WOW!
A guitar (sample?) that actually sounds like a guitar!
Instead of that metallic screech that I've heard in other older music programs..............

ComSoft6128

#81
Not being a musician means that I can't comment on the compositional side of the program but without a doubt the musical output is a major advance for the Plus, and clearly demonstrates how much the Plus enhancements can (with the right software!) improve on the sound/music generated by the original CPC range.
In this video I play one example track - 'CRTC main song' - which features digidrums(?)  and guitar(!),  after the track has finished I'll then use Protext to quickly display the on-disc manual.

Using headphones or a music system with good stereo separation is required to fully appreciate the music.


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

Website:
https://soundtrackerdma.cpcscene.net/doku.php?id=en:about

A history of CPC music by Tom and Jerry / GPA. (Needs updating now :) )
https://64nops.wordpress.com/2017/12/29/les-logiciels-de-composition-musicale-sur-cpc/

Other links:
https://cpcrulez.fr/applications_music-soundtracker_DMA.htm
https://cpcrulez.fr/info-futurs.htm
https://www.genesis8bit.fr/archives/index.php?news_id=1663
https://www.pouet.net/prod.php?which=89290
http://www.44342.com/amstrad-f646-t984-p1.htm
https://www.cpcwiki.eu/index.php/Plus
http://cpctech.cpc-live.com/docs/cpcplus.html


Not emulated - original hardware and software.
Please note that  the aspect ratio for this YouTube video is 16:9 but the CPC monitor
has an aspect ratio of 4:3 so you may wish to adjust your viewing device accordingly.

TotO

#82
Quote from: Zik on 19:57, 24 August 21
What a gentle statement!
Said that to your brother, because what he said means Orgams, ImpDraw, ImpDos, ... are not serious programs.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

GUNHED

Quote from: Zik on 20:00, 24 August 21
For people reading through this thread, let me remind you that Soundtracker DMA runs on a bare 6128Plus and does not require additional RAM. I worked hard for it.
Yes, and it's a great piece of work!  :) :) :)


With complex software questions arise of course - and they can be solved.  :) :) :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Zik

Quote from: ComSoft6128 on 08:11, 25 August 21A guitar (sample?) that actually sounds like a guitar!
Thank you ComSoft6128. In fact, electric guitar samples are pretty easy to sound right because the sound is saturated and with little dynamic. That said, in this music they are not quite at full volume, so that my conversion method helps. I plan to explain how I proceed on the website of the tool.

By the way, on your video left and right audio channels are reversed and sound is not in sync with video (at least on my side). I am impressed by the number of links you gathered in your post above!

ComSoft6128

Yes any information on how music is created using Soundtracker DMA v2.0 would be very welcome - even better if someone could make a video of the process, that would be fascinating.
The sync problem is something I'm stuck with until I buy better (not yet in existence :( ) recording equipment. 
As to the stereo reversal I don't really get that - I use a Plus specific Scart cable to the OSSC and from that a HDMI cable to the Haughpaugh Rocket. I also have a separate output to an amp using 3.5mm to RCA. I checked both this morning and both give an audio output with the guitar on the right channel. Mmm?

The links are essential - context is everything.
A few members and visitors to CPCWiki will immediately grasp/understand what they are seeing if they look at one of my YT videos, unfortunately many will not, so a a little background info is a very good thing here and on YouTube.


Any plans for more sample files?

https://coolnovelties.co.uk/coolnovelties/amstrad-video-cables/25-amstrad-cpc-464-6128-plus-models-rgb-scart-cable-0705693506586.html

zhulien

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.


Are these issues with ASIC only when writing to ASIC? If ASIC memory is already written to, can we page out to external memory overlapping the ASIC memory map without issues?

zhulien

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!


All my X-Mems are on CPC 6128 Plus machines and so far without issues that I know of - of course I seldom used Plus features.  To me I expected to page in/out ASIC when paging in memory and vice versa - although I didn't know the read situation of ASIC - whether it is like CRTC RAM (always read from main memory regardless of ROMs being paged in or RAM paged in).

zhulien

Quote from: Cwiiis on 12:59, 24 August 21
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?


If it is as Cwiiis suggests, to me it is more a software problem of people not coding their banked software with ASIC in mind.  If it is however incompatible and no matter if all paged out while ASIC is paged in - still corrupts extra RAM, that would be unfortunate.

Cwiiis

#89
Quote from: zhulien on 16:09, 26 August 21

If it is as Cwiiis suggests, to me it is more a software problem of people not coding their banked software with ASIC in mind.  If it is however incompatible and no matter if all paged out while ASIC is paged in - still corrupts extra RAM, that would be unfortunate.

The problem, at least as I understand it, is that the behaviour of an unexpanded 6128 or 464+ is that when you map ASIC memory, writing will only write to ASIC memory, but with every currently available RAM expansion, it will also write to any overlapping mapped external RAM. Couple this with the behaviour that RAM expansions also replace the second 64k on a 6128 and you've now changed behaviour from a stock 6128+ or expanded 464+. This is an issue for compatibility with older software that might use Plus features and 128k ram, although I think I can count the number of titles that do that on the fingers of one hand that is also missing some fingers :)


Perhaps a bigger problem, due to how the memory mapping works, if you don't want to incur the cycle penalty of having to switch banks around ASIC writes, you end up actually losing access to some banks, as there are some banks that can only be mapped to the area that overlaps the ASIC memory mapping. I might be wrong about this one, but it seemed that way from what I've read so far.

While it's possible to work around this if you architect with this limitation from the start, it's still a bit of a shame and a little inconvenient... Hopefully we'll see TotO develop a Plus-enhanced version of the X-MEM sometime in the future :)

BSC

Quote from: Zik on 20:00, 24 August 21For people reading through this thread, let me remind you that Soundtracker DMA runs on a bare 6128Plus and does not require additional RAM. I worked hard for it.

But it's colors don't go very well with my favorite t-shirt! How dare you pushing me into such unpleasant situations?!
** 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.

Zik

Quote from: ComSoft6128 on 07:27, 26 August 21Any plans for more sample files?
Yep. I may release some sample banks (kind of) of simple melodic instruments. The file format supports having several samples in a unique file.

About audio sides reversal, I have got several jack to RCA cables and they are not all identical. I mean that for some cables red RCA is connected to jack tip, while it is supposed to be the reverse as per the standard, I believe. Anyway, "SOUND 1,239" in Basic should play a C to the left channel.

ComSoft6128

Bugger!
It gave right channel.
RCA cables now reversed but this would indicate that the scart cable is wired incorrectly.

zhulien

Quote from: Cwiiis on 19:09, 26 August 21
Perhaps a bigger problem, due to how the memory mapping works, if you don't want to incur the cycle penalty of having to switch banks around ASIC writes, you end up actually losing access to some banks, as there are some banks that can only be mapped to the area that overlaps the ASIC memory mapping. I might be wrong about this one, but it seemed that way from what I've read so far.

While it's possible to work around this if you architect with this limitation from the start, it's still a bit of a shame and a little inconvenient... Hopefully we'll see TotO develop a Plus-enhanced version of the X-MEM sometime in the future :)


I guess we can easily code some tests with ASIC - if ASIC only needs external memory disabled during writes that is not that hard a test.  And if external memory is enabled during ASIC reads that should be pretty easy to cause to fail.

ComSoft6128

Hi @Zik ,

Have you tried any voice samples yet?

I made this video recently - https://www.cpcwiki.eu/forum/applications/pc-sound-file-player-octwaver-v1-0-by-octobear/
and it would be interesting to see (hear!) how your software and the Plus compare with that.

BSC

Quote from: ComSoft6128 on 17:36, 28 August 21made this video recently - https://www.cpcwiki.eu/forum/applications/pc-sound-file-player-octwaver-v1-0-by-octobear/
and it would be interesting to see (hear!) how your software and the Plus compare with that.

I am not Zik but had a look nevertheless. I think releasing a tool like this in 1994 was not very innovative or groundbreaking. Playing a single sample through the AY at a high sample rate has been done by many people much earlier. Makes me wonder if that guy (who seems so impressed by his own work) has been living under a rock the years before. Sorry for the rant, but his language was so over the top. So in conclusion I think that Soundtracker DMA is much more useful (apart from the fact that we are comparing classic CPC versus Plus here) and this PC soundfile player is just a(nother) demonstration of playing samples on the CPC.
** 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.

ComSoft6128

Hi @BSC ,

Indeed the language is over the top but this is the only WAV player I have found so far, are there any others that you know of?
Also the quality of the sampled speech is probably the best I have heard using just the AY, if you know of similar please let me know.
Finally, I am not directly comparing the two programs but I do wonder how much better the Plus output could be. :)

Targhan

#97
I am no Zik either, sorry :). But basically the Plus will not improve how samples are played compared to a CPC old. The advantage of a CPC Plus is that it can buffer the bytes to send to the PSG. This is tremendously useful because it allows to fill the buffer, then do something else. On old, the coder has do feed the PSG continuously, making effects (or other things along with the sample) very tedious to do (Imperial Mahjong has samples along with the game management: it was a nightmare to code).

As for a "sample player", I don't know of any, but I did a part (with Sylvestre) in the cpc meuuuhting, that plays a sample at 44Khz for a 3 seconds. As you can hear, it's not groundbreaking. 4 bits + logarithmic volume is not what's best for high-fidelity!
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

andycadley

Technically, the Plus can play better quality samples than a standard CPC if you're doing it across all three channels, because the DMA can feed the AY chip faster than optimal Z80 code can.


An XMEM+ that handles banking properly when the ASIC is enabled would be awesome though. It's the one niggle that has kept me from getting one in the past.

roudoudou

Quote from: andycadley on 18:38, 31 August 21
Technically, the Plus can play better quality samples than a standard CPC if you're doing it across all three channels, because the DMA can feed the AY chip faster than optimal Z80 code can.
with a mono output like the CPC speaker but the Plus has stereo speakers (and the jack output is always stereo)
My pronouns are RASM and ACE

Powered by SMFPacks Menu Editor Mod