Jump to content
IGNORED

GFA Token File Format


Recommended Posts

Hi folks. Does anyone have information about the format of the GFA basic source files? I would like to build an environment where I can write GFA code on a PC, but use the GFA compiler in a Hatari emulator to compile these sources. However, the compiler requires a GFA file (which is some kind of binary, tokenized format), so I would need to convert my ASCII source files to the ".GFA" format before feeding them to the compiler.

 

So - is there any documentation about the ".GFA" file format anywhere? Any hints appreciated.

  • Like 1
Link to comment
Share on other sites

Hi there,

 

There are certainly tools to do the opposite of what you ask (gfa->lst) but I can't find anything to do what you wish right now.

 

However, @lp060 has been maintaining GFA Basic (compiler side) and has created his own IDE. I suggest you visit his website (http://gfabasic.net) and probably get in touch with him. I also see in his website that there's a discord so they also can help you out.

 

 

Good luck!

Link to comment
Share on other sites

I already did check it out. It helped indeed. At this point, I can kinda read a binary GFA file with a hex editor and can recognize where the variable list is and where the code lines begin :D  I do have an early simple parser which can read a source file, process the header, the variable lists and then all the program lines.

Still, apart from the fact that I need to implement a serialization/deserialization for every single command, there is one part that I don't really understand yet; the 38 4-byte pointers. I guess for your use-case they were not really important and could be ignored, but when I create GFA files, these values need to be correct (I tried setting them to 0; the GFA compiler then hangs when processing the file).

Anyway, your stuff was of great help already, so thanks for that!

Edited by babyface
  • Like 1
  • Haha 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...