What is Arkos Tracker? › Forums › Arkos Tracker forum › Feature requests › [Done v2.0.0a3 + a4] Add some extra commands to songtoaky
- This topic has 6 replies, 4 voices, and was last updated 6 years, 6 months ago by ggn.
-
AuthorPosts
-
April 29, 2018 at 11:20 am #872ggnParticipant
Hi,
In an effort to export and include source easier for ST, I’d like to start using songtoaky instead of exporting from the player. However I’m missing a couple of features present in the editor, and not only:
– No colon to separate 2 db/dw/etc instructions. Write each instruction in its own line
– Labels postfix option. Necessary as some assemblers require a label to end in a colon
– Make all song offsets relative to 0. For now I’m using a sed command to simply insert a ‘-song_start’ at each file (like https://github.com/ggnkua/Arkos-Tracker-2-ST/blob/master/tunes/Interleave%20THIS!%20014.s#L4179), would be great if this could happen during export.For the last item it could be argued that I could simply assemble the exported source to binary blob at absolute address 0 but that would remove some of its usability. For example XiA asked me if it would be possible to manipulate the linker data directly at runtime. It’d be super trivial to do if the source of the tune is assembled with the code, less trivial with a binary blob.
April 29, 2018 at 4:27 pm #879Alcoholics AnonymousParticipantI was also looking at the portability of the song asm file generated. It’s customizable now under FILE->SETUP->SOURCE_PROFILES which will solve post-colon for labels and using different directives for db and dw.
I’m not sure I understand the need for song offsets relative to 0 in an asm file. You set the org to 0, assemble it and it’s done, unless I misunderstand?
April 29, 2018 at 4:30 pm #880Alcoholics AnonymousParticipant(EDIT button for posts does not work btw)
Just adding: I would second removal of colon separate statements since that’s not too common among assemblers. I haven’t seen that myself though.
April 29, 2018 at 6:31 pm #881TarghanKeymaster(yeah, edit does not work. It’s just a forum, I’m not really going to debug this :)).
Point 1 & 2: the next version include all the mnemonic override from command line, so everything you can make in the Source Profile will be doable from CLI.
Point 3: still not sure it would be a good idea, but we’ll see in a close future.Also, the next version will allow you to have only one different type of instruction in the same line.
I should really finish this alpha3 version. I’ll try to finish it within a week or two, please be patient and stop harassing me with bug fixes and feature requests :).
April 29, 2018 at 8:02 pm #882ggnParticipant“I’m not sure I understand the need for song offsets relative to 0 in an asm file. You set the org to 0, assemble it and it’s done, unless I misunderstand?”
Let me try to summarise the reasons very quickly:
a) The ST by default runs programs that are position independent (unless you’re making boot demos or games)
b) Because of this, you can’t create a standard ST prg and have “org” in your source anywhere
c) The only way to make something like that would be to create a different binary and assemble it using “org” 0, then including it as binary on the main source
d) But (c) means that then you lose the song’s labels. I had a discussion where the musician would like to change the order of patterns during runtime, very simple if you have the labels inside the main sourceThis is what the ST player assumes for now. Worst case I can keep the awful sed commands as a post process step when exporting a tune or do some extra init at runtime to get all song labels relative to song start.
May 11, 2018 at 7:13 pm #910AdminKeymasterOk, now that the Alpha3 is released, I’ll check on that relative feature you want. So to be sure to get this right, I need to subtract the beginning of the song to ALL the reference to the addresses, is it right?
May 12, 2018 at 3:26 pm #929ggnParticipantYes! something like:
dc.w 128 ;Duration in frames.
dc.w Main_Subsong0_Track_6-Main_Subsong0
dc.w Main_Subsong0_Track_13-Main_Subsong0
dc.w Main_Subsong0_Track_14-Main_Subsong0(a full example here: https://github.com/ggnkua/Arkos-Tracker-2-ST/blob/master/tunes/Interleave%20THIS!%20014.s)
-
AuthorPosts
- You must be logged in to reply to this topic.