Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux support #4

Closed
cyberic99 opened this issue Nov 3, 2020 · 5 comments
Closed

Linux support #4

cyberic99 opened this issue Nov 3, 2020 · 5 comments

Comments

@cyberic99
Copy link

Hello @ggnkua , glad to see some activity in this repo!

I tried again to convert a .aks file to a .sndh.

I am using linux and I think there are a few issues in scripts.

Also, my experiments failed, I couldn't convert the .aks successfully.

Here is a recap of commands I typed.

# copy Sarkboteur.ark from AK2 folder
cp ~/opt/Arkos\ Tracker\ 2/songs/ArkosTracker2/3Channels/digidrums/Targhan\ -\ Sarkboteur.aks .

I also added a set x in conv_aks.sh, to get some diagnostics

$ bash -x ./build_sndh.sh "Targhan - Sarkboteur.aks" "Sarkboteur" "Tarhan" 50 SID_VOICES USE_EVENTS
 set -e
+ '[' 'Targhan - Sarkboteur.aks' == '' ']'
+ '[' Sarkboteur == '' ']'
+ '[' Tarhan == '' ']'
+ '[' 50 == '' ']'
++ uname -s
+ unameOut=Linux
+ case "${unameOut}" in
+ extension=linux
+ underscore=Targhan_-_Sarkboteur.aks
+ no_extension='Targhan - Sarkboteur'
+ no_path='Targhan - Sarkboteur'
+ no_path_underscore=Targhan_-_Sarkboteur
+ ./conv_aks.sh 'Targhan - Sarkboteur.aks' Targhan_-_Sarkboteur
+ '[' 'Targhan - Sarkboteur.aks' == '' ']'
+ '[' Targhan_-_Sarkboteur == '' ']'
+ set -e
++ uname -s
+ unameOut=Linux
+ case "${unameOut}" in
+ extension=linux
+ SED=sed
+ bin/SongToAky_linux -spbig -adr 0 -spadr ';' --sourceProfile 68000 -sppostlbl : -reladr -spomt 'Targhan - Sarkboteur.aks' Targhan_-_Sarkboteur.aky.s
Export to AKY successful.
+ bin/SongToEvents_linux -spbig -adr 0 -spadr ';' --sourceProfile 68000 -sppostlbl : -spomt 'Targhan - Sarkboteur.aks' Targhan_-_Sarkboteur.events.words.s
Export of events successful.+ sed -i -e 's/\( *dc.b \)\([[:digit:]]\+\), \([[:digit:]]\+\)/\1\3,\2/gI' Targhan_-_Sarkboteur.aky.s
+ sed -i -e 's/dc\.b/dc.w/gI' -e 's/dc\.w Events_/dc.l Events_/gI' Targhan_-_Sarkboteur.events.words.s
+ echo

+ echo tune:
+ echo .include '"Targhan_-_Sarkboteur.aky.s"'
+ echo .long
+ echo tune_end:
+ echo .if USE_EVENTS
+ echo tune_events:
+ echo .include '"Targhan_-_Sarkboteur.events.words.s"'
+ echo .even
+ echo tune_events_end:
+ echo .endif
+ echo dc.b ''\''SNDH'\'''
+ echo dc.b ''\''TITL'\'','\''Sarkboteur'\'',0'
+ echo dc.b ''\''COMM'\'','\''Tarhan'\'',0'
+ echo dc.b ''\''RIPP'\'','\''Nobody'\'',0'
+ echo dc.b ''\''CONV'\'','\''Arkos2-2-SNDH'\'',0'
+ echo dc.b ''\''TC50'\'',0'
+ SID_VOICES=0
+ USE_EVENTS=0
+ SID_EVENTS=0
+ filename='Targhan - Sarkboteur.aks'
+ shift
+ shift
+ shift
+ shift
+ [[ 2 -gt 0 ]]
+ '[' SID_VOICES == SID_VOICES ']'
+ SID_VOICES=1
+ SID_EXT=_SID
+ shift
+ [[ 1 -gt 0 ]]
+ '[' USE_EVENTS == SID_VOICES ']'
+ '[' USE_EVENTS == USE_EVENTS ']'
+ USE_EVENTS=1
+ EVENTS_EXT=_EVENTS
+ shift
+ [[ 0 -gt 0 ]]
+ bin/rmac_linux -fr -D_RMAC_=1 -D_VASM_=0 -DSID_VOICES=1 -DUSE_EVENTS=1 -DUSE_SID_EVENTS=0 no_path_underscore_SID_EVENTS.s -o 'Targhan - Sarkboteur.sndh'
Cannot open: no_path_underscore_SID_EVENTS.s

It seems there is a missing dollar sign somewhere:

diff --git a/build_sndh.sh b/build_sndh.sh
index 71a6f1b..12c642c 100755
--- a/build_sndh.sh
+++ b/build_sndh.sh
@@ -77,4 +77,4 @@ while [[ $# -gt 0 ]]; do
        shift
 done

-bin/rmac_$extension -fr -D_RMAC_=1 -D_VASM_=0 -DSID_VOICES=$SID_VOICES -DUSE_EVENTS=$USE_EVENTS -DUSE_SID_EVENTS=$SID_EVENTS no_path_underscore$SID_EXT$EVENTS_EXT$SIDEVENTS_EXT.s -o "$no_path.sndh"
+bin/rmac_$extension -fr -D_RMAC_=1 -D_VASM_=0 -DSID_VOICES=$SID_VOICES -DUSE_EVENTS=$USE_EVENTS -DUSE_SID_EVENTS=$SID_EVENTS $no_path_underscore$SID_EXT$EVENTS_EXT$SIDEVENTS_EXT.s -o "$no_path.sndh"

let's retry:

...
bin/rmac_linux -fr -D_RMAC_=1 -D_VASM_=0 -DSID_VOICES=1 -DUSE_EVENTS=1 -DUSE_SID_EVENTS=0 Targhan_-_Sarkboteur_SID_EVENTS.s -o 'Targhan - Sarkboteur.sndh'
Cannot open: Targhan_-_Sarkboteur_SID_EVENTS.s

I cannot find such file:

ls Targhan*.s
Targhan_-_Sarkboteur.aky.s
Targhan_-_Sarkboteur.events.words.s

There also seem to be case issues regarding the filenames.

when I try to rename one of these .s files 'Targhan_-_Sarkboteur_SID_EVENTS.s' and relaunching, I get:

Targhan_-_Sarkboteur_SID_EVENTS.s 4235: Error: cannot output absolute binary without a starting address (.org or command line)

Here is an excerpt of the file:

4210:Subsong0DisarkByteRegionStart1091:
4211:   dc.b 20 ; Duration.
4212:Subsong0DisarkByteRegionEnd1091:
4213:Subsong0DisarkPointerRegionStart1092:
4214:   dc.w Subsong0_RegisterBlock_600 - Subsong0
4215:Subsong0DisarkPointerRegionEnd1092:
4216:
4217:Subsong0DisarkByteRegionStart1093:
4218:   dc.b 10 ; Duration.
4219:Subsong0DisarkByteRegionEnd1093:
4220:Subsong0DisarkPointerRegionStart1094:
4221:   dc.w Subsong0_RegisterBlock_603 - Subsong0
4222:Subsong0DisarkPointerRegionEnd1094:
4223:
4224:Subsong0DisarkByteRegionStart1095:
4225:   dc.b 10 ; Duration.
4226:Subsong0DisarkByteRegionEnd1095:
4227:Subsong0DisarkPointerRegionStart1096:
4228:   dc.w Subsong0_RegisterBlock_572 - Subsong0
4229:Subsong0DisarkPointerRegionEnd1096:
4230:
4231:Subsong0DisarkByteRegionStart1097:
4232:   dc.b 120        ; Duration.
4233:Subsong0DisarkByteRegionEnd1097:
4234:Subsong0DisarkPointerRegionStart1098:
4235:   dc.w Subsong0_RegisterBlock_603 - Subsong0
4236:Subsong0DisarkPointerRegionEnd1098:
4237:
4238:
4239:; The RegisterBlocks.
4240:Subsong0DisarkByteRegionStart1099:
4241:Subsong0_RegisterBlock_527:
4242:   dc.b 131        ; Initial State : software and hardware.
4243:   dc.b 220,5      ; Software period.
4244:   dc.b 47,0       ; Hardware period.

I can do more tests or pull requests if you want.

Thank you
Eric

@ggnkua
Copy link
Owner

ggnkua commented Nov 3, 2020

Hi Eric,

Thanks for the report, I'll check it out later after work!

@ggnkua ggnkua closed this as completed in fe21d5f Nov 3, 2020
@ggnkua ggnkua reopened this Nov 3, 2020
@ggnkua
Copy link
Owner

ggnkua commented Nov 3, 2020

Ok, I pushed a small fix. It seems to work fine with my WSL2 install, let me know if it also works for you and we'll close the ticket then!

@cyberic99
Copy link
Author

yep this is fixed, thanks!

I now have a resulting .sndh file.

however, I can't hear any digi.

Are they supposed to work correctly?

thx again

@ggnkua
Copy link
Owner

ggnkua commented Nov 4, 2020

Hi again,

I forgot to mention this yesterday - samples support is not yet included in the ST player. Furthermore, Targhan has created a couple of new formats and each one has different feature sets. I'm not 100% sure that the AKY format supports samples at all... so I'll have to go and port another replay routine by hand again and then add ST sample code.

Also, see issue #2 :), but I'll call this one done for now if you don't mind....

@cyberic99
Copy link
Author

Thx for your answers!

the script is now working for me, I am closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants