News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Arkos Tracker 2 and AGD

Started by Hagedasch, 13:04, 18 October 20

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Hagedasch

Hello,

with my Kyd Cadet port i could not use any sound effects, which was quite disappointing for me. Because of this, I looked at some sound tools and found Arkos Tracker 2.

With the help of a tutorial (http://www.julien-nevo.com/arkostracker/index.php/basic-cpc-integration/) I was able to integrate music into the menu screen of my new AGD project (again a speccy port) quite fast. While the music runs at the right speed in the menu, its slows down during the actual gameplay. The game itself runs as fast as before. Is there a realistic chance to play the music at the right speed in AGD using Arkos Tracker 2 and to integrate sound effects as well? If so, how?

Another problem is the memory. The game starts at &07D0 and ends at &9EA8. For my test I had to overwrite a part of the game in memory (start address &8000), which of course made some of the later screens unplayable. In the already mentioned tutorial it was pointed out that the music player should be loaded between &1000 and &9000. With my basicloader I am probably limited in my possibilities regarding the memory usage. Is there a possibility to load the music and SFX player into a free memory area after &9EA8 (in Basic)?

Thanks for your support.

Targhan

From what I gather, this may be "normal" that the music slows down. How to do synchronize the music with the frame flyback? In other terms: in your menu, how MUCH do you wait before calling the next frame of the music player? And HOW do you wait?

During your game, if moving your sprites takes too long, and you play a frame of music afterwards, it will feel slower, of course.
What you must do if put the music under interruption. Maybe AGD has a function for that? Basically, you must play the music every 50hz. If you don't, the music will be faster or slower. Using interruptions will allow you to play at precise occurrence, instead of "when the CPU has time" or "when my game loop is over".
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

Targhan

As for the memory, it is dangerous to put something up to &a600 (this address goes down as you add ROM to your hardware!), unless you get rid of the system and so on.
Maybe you could simply put the player and music in the banks, if you target 128k machines?

But music and players take memory, and there is nothing you can do about it, unless optimizing your game (or depacking parts of it as you go along), or like I said, use additional memory banks.
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

Hagedasch

Hello Targhan,

thanks for the explanations.

I guess you are right about the slowdown. It's "normal" in this case. My integration of the music in AGD follows exactly the tutorial, which leaves the timing completely to the gameplay loop of the AGD engine. I probably should try to use the music only in the menu. During the actual gameplay I could use sound effects only, which might work better.

But the memory problem might already destroy this plans. Actually I wanted to support the 64k machines as well. Anyhow, is it possible to load a bin file into a bank using basic?


Targhan

It is perfectly possible to run an asm code under interruption in Basic (well, it requires an asm code that run the player). I don't have it here though... Make a search and try to do it, come back if you don't manage to make it work. I intended to make a tutorial about it, but ran out of time, sorry.

QuoteBut the memory problem might already destroy this plans. Actually I wanted to support the 64k machines as well. Anyhow, is it possible to load a bin file into a bank using basic?
Of course:
out &7f00,&c4     (this is the first page of the extended 64kb)
call player  (must be between #4000 and #7fff)
out &7f00,&c0


WARNING, this will make what WAS in #4000-#7fff unavailable during this! So watch out from where this is called (do it from the beginning of the code for example).

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

Powered by SMFPacks Menu Editor Mod