sjasm aarch64

ページ 1/2
| 2

By ibantxuyn

Expert (127)

ibantxuyn さんの画像

26-09-2022, 20:13

Hello!
I've migrated all of my workstations to ARM and I'm trying to compile the "old" sjasm under Linux/aarch64, with no luck. I found that the problem itself is not the architecture but a combination of the compiler (newer gcc) with old-fashion code. I tried to cross compile the sjasm from an x86_64 architecture but the problem remains. I tried to hack the Makefile with custom parameters for gcc and even hack the source code, but this is a pretty big challenge to me because we're talking about a assembler compiler and I'm not an expert in this matter. I've already a lots of source code ready and well prepared for the sjasm compiler and over the years I've had no problems, but you now, I'm struggling to get my old code compiled in a newer platform.
So my question is if anyone already haves a sjasm binary/executable file for aarch64 that can be shared. Doesn't matter if the file a static-compiled file, I just want to run sjasm under a ARM CPU.
Oh, I also tried to use the modern sjasmplus but it's not yet prepared for the MSX but the ZXSpectrum (or I have no idea to update the code for this version).
Thanks in advance (aye, my english sucks, sorry)

ログイン/登録して投稿

By Daemos

Prophet (2165)

Daemos さんの画像

26-09-2022, 21:01

You have mail Wink

By Ped7g

Expert (67)

Ped7g さんの画像

26-09-2022, 21:29

You can contact me any time about helping to migrate to z00m's variant of sjasmplus.
(not promising it will be success, but I can take a look and help if it's easy to do)

If you do git clone the z00m's repo, you can see my email in commits, then send me some sample project to see if I can convert it. Also I will be very thankful if you would report any issues with building sjasmplus, INSTALL.md should be up to date and working for all common platforms, and building on macos or linux should be "simple" (as long as you don't mind CLI and terminal).

( https://github.com/z00m128/sjasmplus - the variant I'm helping to maintain and extend)

By ibantxuyn

Expert (127)

ibantxuyn さんの画像

27-09-2022, 11:34

Thanks @Daemos and @Ped7g for your help.

I'll need to investigate more closely how sjasmplus works, as my (simple) source code does not work properly with this compiler.

Also the libraries for pletter and pt3 doesn't work (I didn't write them) nor the whole mechanism for creating the ROM header for the MSX machine. I must investigate how to adapt all this code to your compiler, but I was wrong in thinking that sjasmplus is backwards compatible with sjasm code, my fault :-)

I'll be happy if I can use a modern compiler instead of sjasm, which is pretty old for gcc :-(

By Ped7g

Expert (67)

Ped7g さんの画像

27-09-2022, 15:10

Daemos was porting huge MSX project from tniASM to sjasmplus, I made blog with some notes from me helping to do initial machine-conversion:
https://github.com/z00m128/sjasmplus/wiki/Case-study:-migrat...

Converting from sjasm to sjasmplus may be similar or less effort (hopefully not more).

And yes, they are not compatible, as sjasmplus diverged from sjasm around 0.39 IIRC, while sjasm made quite some syntax/feature changes afterward. But usually you can find same feature in sjasmplus, and syntax adjustments shouldn't be too drastic either.

MSX ROM header/etc... is all doable with the macro language, but it takes to understand a bit how sjasmplus works and be familiar with some extras. But if there would be enough traction among MSX devs and good consensus about most-wanted features and how they should work, I can add MSX specific features also directly into the assembler (the macro interpreter is somewhat slow, like for example calculating checksum from 2MiB ROM may bump the assembling time by few hundreds of milliseconds, probably crossing even 1 sec, etc... while built-in solution would be probably in tens of ms.

(edit: but the main point is of course, that you should be able to extend/bend sjasmplus the way you need yourself, making you independent from some legacy binary... technically this may still not help in case similar to your current situation, when you have source of sjasm, but it's just too old, but hopefully sjasmplus will be actively maintained for some years :) )

By santiontanon

Paragon (1830)

santiontanon さんの画像

27-09-2022, 17:57

I also would recommend transitioning away from sjasm. But if you are desperate and need a compiled binary of sjasm for aarch64, I was able to compile it fine a few months ago, and I'd be happy to share the binary (unless that's what Daemos already shared with you via email haha)

By Daemos

Prophet (2165)

Daemos さんの画像

27-09-2022, 19:07

santiontanon if you have the binary of sjasm aarch64 send it. I had a sjasmplus compiled for aarch64

By Metalion

Paragon (1628)

Metalion さんの画像

27-09-2022, 19:41

santiontanon wrote:

I also would recommend transitioning away from sjasm

And why is that ?

By ibantxuyn

Expert (127)

ibantxuyn さんの画像

27-09-2022, 20:25

Guys, you are awesome!! <3 <3

I've a talk via email with one sjasmplus contributor and he is helping me to port the code to the newer sjasmplus.

I think that sjasm is fine but is old and unmaintained and it can't be compiled with a newer gcc toolchain, so dinnae waste your time porting the current code, and perhaps is better to put the focus on a newer assembler. sjasmplus looks polished and it's currently well maintained so aye, the newer, the better ;-)

Anyway @santiontanon (hello man, long time!) if you please can share your binary with all users, I think this will help to somebody like me.

Thanks again!!

By santiontanon

Paragon (1830)

santiontanon さんの画像

27-09-2022, 22:00

Haha, sure!

I uploaded a couple of sjasm binaries (different versions) here:
https://braingames.santiontanon.dev/uploads/tmp/sjasm042b8
https://braingames.santiontanon.dev/uploads/tmp/sjasm042c

You might have to add the execute permission after downloading to be able to use them :)

As for why would I recommend moving away from sjasm. The main reason is that it's not maintained :) There are other details such as some inconsistency between versions (the reason for which I had to compile both versions above), and some design decisions that I do not particularly like (e.g. automatic "code" block relocation, numeric temporary labels that are bug-magnets, etc.), but those are just small details. The main reason is that it has not received updates for a while, and if there is a bug you can't report it :) (I have a special case in MDL to handle a bug that sjasm has, and that some code-bases had exploited haha)

By ibantxuyn

Expert (127)

ibantxuyn さんの画像

28-09-2022, 12:32

@santiontanon: both files downloaded, many thanks, man!! I appreciate it :-)

And for the sjasmplus developers: ¡thank you! thank you very much for your time helping me in this matter <3

I'll share the details of a barebones project for the MSX with sjasmplus in the next days.

ページ 1/2
| 2