09 March 2017, 11:10 | #1 |
Registered User
Join Date: Oct 2008
Location: Finland
Posts: 643
|
BB2 User Defined Language for Notepad++
Hello! Since it's possible to share the clipboard between WinUAE and Windows I decided to start making a user defined language for Blitz Basic 2 in Notepad++. So far I have just done the basics and only a few keywords are there yet. Having to copy-paste code to Ted in WinUAE is of course an extra step but coding in Notepad++ is otherwise so much smoother (line numbers, code folding, region support, better colours, proper mouse wheel and a lot more)
What do you think? Is this a stupid idea? ------------------ EDIT: I have worked out a good way to use Notepad++ with BB2. Here are the most up to date files and instructions (also attached, look at the end of post): Instructions http://gamephase.net/files/linked/BB...HowTo-v1.4.pdf (updated: 2019-02-09) User defined language http://www.gamephase.net/files/linked/BB2-NPP-v1.0.zip Automation tools http://www.gamephase.net/files/linke...-tools-v10.zip Last edited by MickGyver; 09 February 2019 at 11:30. Reason: Attaching files |
09 March 2017, 12:53 | #2 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,406
|
I think it's a great idea Good stuff!
|
09 March 2017, 16:14 | #3 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,372
|
Feel free to use these scripts for a smoother experience: http://eab.abime.net/showthread.php?t=77610
|
09 March 2017, 16:14 | #4 |
Registered User
Join Date: Oct 2008
Location: Finland
Posts: 643
|
Ok! Now I have added all the commands and functions from the reference manual of Blitz Basic 2 (newer commands from extensions are currently missing). I also started making an auto-completion file, it has all the commands. A few functions also have descriptions etc. but only functions that user parentheses can have descriptions + parameter lists.
I have attached the files here so you can try it out. Please report any problems or suggestions to me in this thread! In the zip file there is a text file describing how to install, it's a very simple procedure. Last edited by MickGyver; 15 January 2018 at 13:59. Reason: Removed attachment (old version) |
09 March 2017, 16:52 | #5 | |
Registered User
Join Date: Oct 2008
Location: Finland
Posts: 643
|
Quote:
|
|
09 March 2017, 16:59 | #6 |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,665
|
Excellent idea, I love Notepad++!
|
09 March 2017, 17:49 | #7 |
Registered User
Join Date: Oct 2008
Location: Finland
Posts: 643
|
Seems that it is more convenient to save the source file directly to the virtual harddrive used by WinUAE and then re-loading the source manually in SuperTed and compiling. I looked at the thread idrougge suggested and made an arexx script like this:
Code:
/* blitz.rexx */ address TED_REXX1 SHOWSCREEN WINDOWTOFRONT ACTIVATE LOADNEW 'WB31:Blitz2/Projects/Test/test.bb2' COMPILE By the way, the source files need to have only the LF character for new lines, you can verify / change to this in Notepad++: Edit / EOL Conversions -> UNIX/OSX Format . It also seems that there needs to be a new line at the end of the source file. |
10 March 2017, 07:16 | #8 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,372
|
There are UAE utilities to run Amiga commands from the PC environment so you can integrate it with your editor.
|
10 March 2017, 09:22 | #9 |
Registered User
Join Date: Aug 2012
Location: RAM:
Posts: 83
|
witchmaster: Here's a list of blitz2 keywords, may be useful to you: https://github.com/grovdata/pyblitz2...er/test/kw.txt
|
10 March 2017, 09:37 | #10 | ||
Registered User
Join Date: Oct 2008
Location: Finland
Posts: 643
|
Quote:
Quote:
|
||
10 March 2017, 15:16 | #11 |
Phone Homer
Join Date: Jun 2006
Location: 5150
Posts: 5,876
|
Whens the Amos version
|
10 March 2017, 17:12 | #12 |
Registered User
Join Date: Oct 2008
Location: Finland
Posts: 643
|
|
10 March 2017, 21:44 | #13 |
AmigaMan
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 765
|
What a good idea. I was thinking in doing the same with CubicIDE but dont know how to start.
Will try this. Thanks! |
11 March 2017, 14:32 | #14 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,372
|
You can also use your deflibs file (or something like that) to read out a list of all your available commands, complete with tokens and help text.
|
11 March 2017, 15:03 | #15 |
AmigaMan
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 765
|
Interesting idrougge. Will try later if I can use it.
Thanks mate! |
11 March 2017, 21:05 | #16 |
Registered User
Join Date: Oct 2008
Location: Finland
Posts: 643
|
Now there is also a working function list, wohoo!
P.S. Don't mind the parameters... |
12 March 2017, 02:28 | #17 |
Registered User
Join Date: Oct 2014
Location: Europe
Posts: 482
|
Here are some outputs of viewcmds tool. Maybe useful.
|
13 March 2017, 17:57 | #18 |
Registered User
Join Date: Oct 2008
Location: Finland
Posts: 643
|
Thanks! These are included as keywords now.
I have now finished a version that seems to work quite well. Keywords from the sources above are included (about 2800 in total). Code folding is working (if you save files with CR LF end of line characters, read about this in the howto text file). Features - A majority of keywords (about 2800) should be highlighted and suggested (auto complete) - Function list shows statements, functions and labels. - Folding of statements, functions, loops, multi-line comments. - Foldable regions can be defined. example: Code:
; region @init [code goes here] ; } I will include info about automating things later. I have managed to get the building process semi-automated. Last edited by MickGyver; 15 January 2018 at 14:00. Reason: Removed attachment (old version) |
13 March 2017, 19:06 | #19 |
Registered User
Join Date: Oct 2008
Location: Finland
Posts: 643
|
EDIT: Don't set up automation according to this post, there is an easier and smoother way, I will soon write a post how to do this.
Setting up semi-automation of the build process ------------------------------ Blitz basic 2 has an AREXX port so it's possible to automate it using AREXX. You can take the following steps to set things up. 1. In WinUae set serial port to TCP://0.0.0.0:1234 and select "Direct" below the drop down box. Save the WinUAE configuration and quit WinUAE, add the following to the configuration file manually (inder the other lines concerning serial): serial_translate=crlf_cr 2. Create the file DEVS:MountList on the virtual harddrive with following content (if it does not already exists) Code:
AUX: Handler = L:Aux-Handler Stacksize = 1000 Priority = 5 Code:
mount aux: newshell aux: Code:
/* blitz automation */ address TED_REXX1 SHOWSCREEN WINDOWTOFRONT ACTIVATE LOAD 'WB31:Blitz2/Projects/Test/test.bb2' COMPILE 6. Start Putty, create a Telnet connection to 127.0.0.1 at port 1234. Uncheck Connection / Telnet / Return key sends Telnet New Line instead of ^M . Save the connection with the name WinUAE. 7a. If you are using the Code Fold version of the BB2 UDL for Notepad++ you might want to download my command line tool that can convert EOL (end of line) characters from CR LF to LF that is required by Blitz Basic 2. Get it below (save the exe file to your Windows directory): http://www.gamephase.net/download/831/ 7b. Create a .bat file in the same folder as your BB2 source file, with the content (destination is your project file path in the virtual harddrive): Code:
ConvertEOL unix "source_file_path" "destination_file_path" Using the semi-automation ------------------------------ 1. Start WinUAE, load your configuration and start the emulation, then run Blitz Basic 2. 2. Show the NppConsole in Notepad++ and run the command: plink WinUAE (You may need to press enter a few times for the shell prompt to show) 3. Edit and save the Blitz Basic source file in Notepad++. If you are saving your source file with CR LF end of line (with code folding) then press F5 and choose the .bat file you created in step 7b previously. This will convert the CR LF to LF and save the source in the BB2 project folder. 4. In NppConsole (remote shell) write "rx blitzproject" (without quotes) and press enter. Blitz Basic 2 should now reload the source file, compile and run. (blitzproject is the name of the AREXX script created earlier). Last edited by MickGyver; 14 March 2017 at 11:11. |
13 March 2017, 19:38 | #20 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,372
|
You can make do with just one script if you just specify the sourcefile on the command line:
Code:
/* blitz automation */ address TED_REXX1 SHOWSCREEN WINDOWTOFRONT ACTIVATE LOAD ARG(1) COMPILE |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Simple question regarding notepad and ram.. | Dharma | support.Apps | 5 | 31 May 2015 22:03 |
Notepad++ | BippyM | Coders. Asm / Hardware | 14 | 28 August 2014 03:42 |
does VASM support a pre-defined symbol identifying itself | Apollo | Coders. Asm / Hardware | 2 | 09 December 2013 16:07 |
Faces which defined the Amiga | Tolls | Nostalgia & memories | 25 | 02 June 2011 22:02 |
BB2 development | LaundroMat | Coders. General | 10 | 01 October 2002 17:58 |
|
|