Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
Vampire05 Regular Member Joined: 06/12/2020 Location: GermanyPosts: 88
Posted: 02:28pm 10 Dec 2020
Copy link to clipboard
Print this post
Hi guys, I'm currently trying to port Donut Dilemma (by Nick Marantes) to the CMM2. I have some questions about MOD files:
Old interface: PLAYMOD file [, dur]
New interface: PLAY MODFILE file$ [,samplerate]
1st problem: How can I implement the duration parameter on the CMM2?
2nd problem: Playing sound effects from SD card is too slow. Is it possible to put the MOD sample into RAM or Flash and play it from there?
yock1960 Senior Member Joined: 18/08/2020 Location: United StatesPosts: 167
Posted: 04:53pm 10 Dec 2020
Copy link to clipboard
Print this post
If you only want to play the modfile for a limited time, regardless of the files actual playtime, you can use settick [interrupt period, target subroutine, interrupt # (1-4)]. The interrupt sub can stop or change the modfile...whatever you want. I'm not sure what you mean by too slow. How big are your modfiles? I added support for modfiles to the Mandelbrot16 program, files up to 500k load plenty fast. I have noticed, when playing around with Mauro Xavier's vgmfile stuff, that there can be issues with loading files, depending on the basic progam's size...apparently...I haven't quite figured it out. Perhaps it's an issue with your SD card timings....this is a known issue, that I haven't personally experienced AFAIK.
Steve
Vampire05 Regular Member Joined: 06/12/2020 Location: GermanyPosts: 88
Posted: 06:33pm 10 Dec 2020
Copy link to clipboard
Print this post
Thank you yock1960. You are right, "play modfile" from sd card is fast enough. It was my mistake with the "play modfile" command
My next question is the BLIT command. On the original Maximite, blit moves an area of the video screen. On the CMM2, blit copies an area of the video screen.
Is there an alternative to the old blit command?
yock1960 Senior Member Joined: 18/08/2020 Location: United StatesPosts: 167
Posted: 10:41pm 10 Dec 2020
Copy link to clipboard
Print this post
Blit can still do that, though the syntax may be different. What it won't do, is copy black pixels and I guess that is on account of the 12 bit modes and black being seen as transparent there.