English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. Blitz Basic (https://eab.abime.net/forumdisplay.php?f=126)
-   -   New PC Project: Blitz Source Converter (https://eab.abime.net/showthread.php?t=97800)

BippyM 20 June 2019 18:27

New PC Project: Blitz Source Converter
 
Hi Guys,


I am going to take a short break from my SwosEditor in light of the Swos2020 release.. so I have decided I might look into writing a blitz source converter and maybe even a PC editor (pipedream haha).


I have not started anything yet, but I hope to have a GUI and hopefully using QT make it cross platform.


The purpose of this thread.. Ideas and suggestions to start, and also as much info about the blitz library system as possible.


I will chuck a mock gui together shortly


Edit: I am aware of this >> https://github.com/grovdata/pyblitz2 but it hasn't been updated in a while

Edit2: I am also considering an Amiga version

BippyM 20 June 2019 18:29

Post for suggestions and ideas:
  • -=[ General ]=-
  • Preference settings window
  • Config files
  • Library settings configs
  • Save converted code as ascii
  • undo/redo
  • Blitz2 / Amiblitz compatability checking
  • Blitz2 / Amiblitz compiling (through winuae/fs-uae etc)
    **** Delete old library identifying code **** --> 5th April 2020


    -=[ GUI ]=-
  • Make scalable
  • Full redesign of layount
  • source viewer
    * Move to tabs for open source code
    * Syntax highlighting
    * Font settings
    * Context sensitive right mouse clicks
    *
  • Provide a dark mode, or mayme make skinnable
  • Progress bars for lib loading, and long operations.

    -=[ Source Code ]=-
  • Accurate display of '????' and suggestions for the correct token
    * This can be achieved by looking at the number of parameters passed to the token
    and then cross referencing all library/tokens that mach the number of parameters
    * Option to repair the BB2 file if a fix is found (although save as ascii, and load)
  • Right mouse gives options on command below the cursor
  • Cursor position wil give the help for command below/left of cursor

    -=[ Libraries ]=-
  • Allow loading of individual libraries
  • Allow multiple deflibs files to load
  • Remove directory scanning - Or replace with a lister that lists all libs. Only load
    when the user wants to load them
  • Library matching/Scanning more accuracy - Get MD5 from file and deflibs/acidlibs
    and use that to cross reference, giving better accuracy
  • Check versions of libraries, and inform user of outdated libraries (MD5 maybe)
  • Detailed library analysis:
    * tokens, subs, dummy tokens
    * Number of parameters passed to each token
    * Type of parameter to be passed to each token (byte, word, long, float, string etc..)
  • Export all libraries and tokens to file
  • Create new deflibs/acidlibs
  • Identify internal libraries (lib numbers --> 65500)

BippyM 20 June 2019 19:08

Post for blitz library structure and info

rcman 25 June 2019 19:45

Just want to say you're awesome!

RC

Zener 25 June 2019 21:11

Great idea, if you need some people to test try count with me

BippyM 22 November 2019 21:38

Today I have done more investigation to the blitz library structure, and have managed to work out the best way to get the library commands out.

Next I am going to document how the bb2 files store info and tokenisation. Maybe it's time to start some coding!

Pyromania 23 November 2019 15:12

Great idea, I’ll follow the progress and enjoy seeing where this goes.

MickGyver 27 November 2019 10:27

Quote:

Originally Posted by BippyM (Post 1360735)
Today I have done more investigation to the blitz library structure, and have managed to work out the best way to get the library commands out.

Next I am going to document how the bb2 files store info and tokenisation. Maybe it's time to start some coding!

You have probably already figured this out but keywords are tokenized with a two byte (word) id and new lines are the null character (0) instead of LF (10). This project on github might help: https://github.com/richardjdare/bb2-mode

BippyM 22 December 2019 11:06

I have made a little bit of progress with the development here :)

I have started programming, and deflibs/acidlibs files are recognised, libraries identified and what not. Next is the routine to identify each library command, and the associated help text. Once the library identification is working fully, I will then look at source code recognition.

BippyM 29 December 2019 19:24

A quick update.

The program now recognises deflibs/acidlibs and library object files. Here is a video demonstrating the loading of a deflibs file. It will separate each library, and get the commands, along with info like library number, and offset within the file.

The layout currently is for demonstartion purposes while I figure out the full direction I want to take this. Right now I am thinking of having a source window for the bb2 code, with a lister giving each library etc. I am also thinking of allowing the prog to scan through your blitz libs files (.obj) and then match each deflibs library and get the library name etc..

Youtube video


Any suggestions for where I can take this is definitely welcome

BippyM 02 January 2020 13:33

I have updated the Blitz Code Converter. It now has a library settings window (Still very early) and shows the loading of the blitz libraries.

https://youtu.be/8hEwY98LF00

BippyM 28 March 2020 17:57

Here is a more updated preview of the BLitz Basic code viewer/editor and converter for PC.

There is a lot of work still to do, but this can now load in BB2 tokenised code :) I will add an export function next, then it will have an actual use. Currently code can be copied and pasted.

https://youtu.be/fzdyS9erPLs

BippyM 06 April 2020 01:34

There was a bug in my library analysis code, which was a result of many blitz libraries having dummy tokens, and sub tokens. This are not easily visible, and serve no purpose from an end user perspective. I had to go back and completely rewrite the library analysis code. I did this by converting the token reading routine from the ab3libmanager to C++ and implementing. After speaking to Sven Dröge he has confirmed I can use any code from AB3, so hopefully this will speed up development.



I fully understand the blitz library, and how tokenisation works now and can comfortably load in most source.


I have updated post 2 with my current todo list. I am thinking about making this into a complete Blitz development IDE, and if I am able to compile amiga-side using winuae.


I am still open to feature suggestions.





Quote:

Originally Posted by MickGyver (Post 1361664)
You have probably already figured this out but keywords are tokenized with a two byte (word) id and new lines are the null character (0) instead of LF (10). This project on github might help: https://github.com/richardjdare/bb2-mode



All times are GMT +2. The time now is 17:26.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04455 seconds with 11 queries