News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Targhan

Disark: cross-platform source converter

Started by Targhan, 11:52, 12 May 19

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Targhan

Disark is a new cross-platform software (for Windows/Linux/MacOsX) I developed because I needed it for Arkos Tracker 2.

It is a Z80 disassembler/source converter. I have no idea if it's going to interest anyone, but I present it here.
You can check its website here.

Besides the disassembling part, the main goal of Disark is to convert a source into any other assembler's source.
For example, AT2 Z80 sources heavily rely on RASM macros, which are not understood by other assemblers. So the trick is:
- Assemble the player/music with Rasm (this gives a binary and a symbol file)
- Use Disark on the binary to recreate the source, without all the bothersome macros!

This is a solution for the many people that complained (and rightfully so) about the use of Rasm for AT2 (like @reidrac @ronaldo @Rhino ) and the need to convert the source "manually" into their assembler syntax.

As an example, you can convert something complicated like this:

org #1000
        REPEAT 5,counter         ;Ooh, many assemblers don't understand that!
MyLabel{counter}                 ;Wow, generated labels on the fly!
        ld hl,MyLabel{counter}           ;... and a reference to them!
        REND


Into this:

org #1000
MYLABEL1 ld hl,MYLABEL1   ;No more complicated macros!!
MYLABEL2 ld hl,MYLABEL2
MYLABEL3 ld hl,MYLABEL3
MYLABEL4 ld hl,MYLABEL4
MYLABEL5 ld hl,MYLABEL5


You get a simple, relocatable source for both music and player!
Predefined profiles allows you to convert the sources to Winape, SDCC, Pasmo, Vasm, Orgams...

How does it work? Disark uses the binary and the symbol file, which contain "semantic labels" to indicate which part of the source is a code area, or a byte area, or a reference area. My player and music sources already contain such "semantic labels", so you don't have to do anything more than the two steps explained above, and this must be done only once.

Of course, if you have the same problem (the need to share sources to other assembler's syntax), you can also use Disark for that purpose.

Everything is explained on the website. You can also check the AT2 player sources to understand how it is done. And don't hesitate to contact me for more information.

Thanks for your attention :).

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

reidrac

I wouldn't say I "complained", but thanks a lot for your work on this. Very appreciated!
Released The Return of Traxtor, Golden Tail, Magica, The Dawn of Kernel, Kitsune`s Curse, Brick Rick and Hyperdrive for the CPC.

If you like my games and want to show some appreciation, you can always buy me a coffee.

Targhan

Yeah sorry, you didn't "complain" :). But having to convert by hand the player is a pain. @Arnaud did that too! But now the player is getting too complex to do that easily (ROM player, player configuration...). So I hope this new "Disark" tool will help you use the latest player without any trouble.
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

ronaldo

Well, I didn't actually complain. It effectively takes time to do the conversion from one assembler dialect to other, an so that was a thing I planned to do just once, not having to repeat it with different versions.

Of course, a tool like this is very helpful. Thanks for all your work. It is very much appreciated. Hope to be able to integrate AK2 in CPCtelera in next iteration :) .

GUNHED

Can the output be Maxam compatible source code?
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

norecess464

Fun project you have here!


This reminds me the days where I used to convert .asm files (generated from C compilation with SDCC) to Pasmo-compatible .asm files. High-level code of Phortem demo was created using it. The tool was called "SDCC2Pasmo" back then (reference: http://norecess.cpcscene.net/sdcc-part-3---using-maxam-style-inlined-asm.html).


Of course you project seems to be far more mature that I had accomplished at the time! :D
My personal website: https://norecess.cpcscene.net
My current project is Sonic GX, a remake of Sonic the Hedgehog for the awesome Amstrad GX-4000 game console!

Targhan

QuoteWell, I didn't actually complain.
No you didn't :). No one did... Except those MSX guys :). Anyway I hope this solution proves simple and efficient enough for an integration with Cpctelera.

QuoteCan the output be Maxam compatible source code?
Absolutely. There is a profile for that too.

QuoteThis reminds me the days where I used to convert .asm files (generated from C compilation with SDCC) to Pasmo-compatible .asm files
Well actually, the trick is that I don't convert the source (which would very complicated due to the Rasm macros I heavily use) but recreate it from the binary. It makes Disark more opened to any assembler.
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

norecess464

Quote from: Targhan on 15:16, 16 May 19
I don't convert the source (which would very complicated due to the Rasm macros I heavily use) but recreate it from the binary. It makes Disark more opened to any assembler.



Yeah I understood that!
My personal website: https://norecess.cpcscene.net
My current project is Sonic GX, a remake of Sonic the Hedgehog for the awesome Amstrad GX-4000 game console!

GUNHED


Maxam...
Quote from: Targhan on 15:16, 16 May 19
Absolutely. There is a profile for that too.
Awesome! I'll give it a go!  :) :) :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Powered by SMFPacks Menu Editor Mod