News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_arnolde

Arkos Tracker 2 - Problem with Minimalist Player

Started by arnolde, 08:50, 05 April 22

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

arnolde

Hello folks,

I played around with the minimalist player from Arkos Tracker 2 because I want to use it in my next game project. I'm using Winape, so I followed the Howto for using it in a production with another assembler than Rasm. Everything compiled nicely, but no sound except a long beep. So i tried compiling it directly with Rasm. Same effect. Maybe the AKM export by the Tracker was faulty?
So as a last experiment, I compiled the original "PlayerAkmWithSoundEffectsTester_CPC" from the "tester" subfolder as it is, using the included example music files (Dead on time). I compiled with Rasm (no errors) and loaded the bin file to WinApe (yes, to the right adress). That should work, shouldn't it? But: No music either. Same long beep. (The tester itself seems to work, i can see the CPU markings and the border color indicating the active interrupt)

I'm really stuck here – am I too dumb to understand something basic or could the AKM player in the AT2-Package be faulty? Did any of you use the minimalist player successfully in a project?
I now that the master Targhan himself is on a CPC break now, that's why I put this here. Thank you for your help!

(I attached the .bin file of my compilation of the official tester, it's compiled to org #4000)

gurneyh

Hi,
Can you share the source with us instead? It will be easier to help.

Here you will find a working example using the AT2 class player, but the principle is the same with a light format

https://rasmlive.amstrad.info/edit/R4wLxaz3ARBLTfts7
of course, the idea is to use includes, and not to paste as it is done in this example

arnolde

Thank you for your reply. The sources I used are exactly the ones included with V.2.0.1 of Arkos Tracker. (I only changed org from 1000 to 4000)
For "easier" sharing, I pasted them all together in one big file (so you can try it in RASM live as well)
Now it's no more a long beep, it even sounds as if some instruments are used, but not really in a recognisable form.

Jean-Marie

Quote from: arnolde on 18:28, 06 April 22(I only changed org from 1000 to 4000)
This might be your problem. I think you must relocate your song.
From CPCTelera manual :
How to relocate songs
Relocating a song is complicated.  All data values inside the song point to absolute memory locations, and the format of the Instrument is not that simple.  The easiest way to relocate a song is to open it in Arkos Tracker and export it again to the desired new memory location address.

arnolde

Quote from: Jean-Marie on 18:51, 06 April 22
Quote from: arnolde on 18:28, 06 April 22(I only changed org from 1000 to 4000)
This might be your problem. I think you must relocate your song.
But... I'm quite sure that's only the case if you export a binary. I used the source code of the music where all labels and links are processed by reference and not absolute... Am I wrong?

Jean-Marie

I've experienced the same trouble as you, but using Arkos Tracker 1, and an AKS file.The program I worked on uses the data array below :
;;;
;;; File generated by cpct_aks2c CPCtelera script
;;; Souce file of this conversion: c:\cygwin\home\broncode\cpctelera\anthill\src\assets\Inside_the_anthill_3.aks
;;; Generation time: jeu.  6 janv. 2022 20:19:49
;;;

;;; Set absolute memory addressing
.area __musica (ABS)
.org 0x3053

;;; Music data start (210 bytes)
;;;
_musica::
.db 0x41, 0x54, 0x31, 0x30, 0x01, 0x40, 0x42, 0x0f, 0x02, 0x06, 0x42, 0x00, 0x67, 0x30, 0x70, 0x30
.db 0x7d, 0x30, 0x8c, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x69, 0x30, 0x01, 0x00, 0x22
.db 0x2b, 0x16, 0x29, 0x12, 0x27, 0x0e, 0x23, 0x0d, 0x69, 0x30, 0x01, 0x00, 0x0c, 0x0c, 0x08, 0x04
.db 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x0d, 0x69, 0x30, 0x01, 0xfe, 0x08, 0x08, 0x08, 0x04, 0x04
.db 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x0d, 0x69, 0x30, 0x24, 0x00
.db 0x00, 0x00, 0xb1, 0x30, 0x00, 0xfd, 0x30, 0xb3, 0x30, 0xd5, 0x30, 0x01, 0xa7, 0x30, 0x31, 0x00
.db 0x94, 0xe0, 0x00, 0x00, 0x01, 0x55, 0x55, 0x55, 0x04, 0x55, 0x04, 0x55, 0x42, 0x00, 0x06, 0x55
.db 0x42, 0x00, 0x55, 0x55, 0x55, 0x04, 0x55, 0x04, 0x55, 0x02, 0x55, 0x06, 0x55, 0x04, 0x55, 0x02
.db 0x42, 0x00, 0xb0, 0xe0, 0x00, 0x00, 0x02, 0x75, 0x79, 0x71, 0x75, 0x79, 0x71, 0x75, 0x79, 0x71
.db 0x75, 0x79, 0x6d, 0x71, 0x75, 0x6d, 0x71, 0x75, 0x6d, 0x71, 0x75, 0x6d, 0x71, 0x75, 0x6b, 0x6d
.db 0x71, 0x6b, 0x6d, 0x71, 0x6b, 0x6d, 0x71, 0x6b, 0x6d, 0x71, 0xae, 0xe0, 0x00, 0x00, 0x03, 0x6f
.db 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x6b, 0x6b, 0x6b, 0x6b, 0x6b, 0x6b
.db 0x6b, 0x6b, 0x6b, 0x6b, 0x6b, 0x6b, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x6b, 0x6b, 0x6b, 0x6b
.db 0x6b, 0x6b

If you change the origin of your program & song, you must generate a new array. You cannot simply modify the origin of your current array. The origin value is also hardcoded in some datas, as far as I understood, so the datas must be changed too.

On CPCTelera, we use a script named cpct_aks2c to do this :

Requisites
This scripts uses AKSToBIN.exe utility by Targhan to convert an aks file into a data Array.  AKSToBIN.exe is included in Arkos Tracker 1.0, which is included into CPCtelera.  AKSToBIN.exe works natively on Windows systems but requires mono to be installed under Linux or Mac OSX Systems.
Description
This script converts an Arkos Tracker (aks) file containing music and or sound effects into two source code files (.s/.h) with definition and declaration of am array containing all music data.  The data array will be absolutely located in memory at the desired memory address.  By default, generated binary data will be placed at location 0x100 in memory.  You can change that location using -m modifier.

I guess you'd need to change the script to have it work with AKM files.

gurneyh

With at2 with exported source, you can place your program and data where you want in memory. It seems there is a problem with this particular player. I never used it before. 

gurneyh

The problem seems to come from an evolution of rasm.
Works in rasm version 1.3 but not in 1.6

Currently being checked

arnolde

Quote from: gurneyh on 19:53, 08 April 22Works in rasm version 1.3 but not in 1.6
YES! Thank you so much, that's the solution! I was able to compile it now and also my own music works great.
Now I only hope that "decompiling" with Disark will work. I'll try my luck tomorrow!  

arnolde

It worked! I finally have music and sfx in my game!
Thank you so much, gurneyh, for your help!

pelrun

Looks like the problem is one specific commit in v1.5; I've raised a github issue for it.

roudoudou

#11
bugfixed :-X
will do a full release soon
advanced users can retrieve and compile the sources themselves
thanks to minimal player, it was "easy" to investigate
now there is an autotest in rasm with some parts of AT2
My pronouns are RASM and ACE

pelrun

I checked it out and can confirm it's back to generating an identical binary to v1.3. Thanks!

arnolde

That's great! Thank you for your quick reaction!

Powered by SMFPacks Menu Editor Mod