English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 12 August 2018, 13:21   #21
earok
Registered User

 
Join Date: Dec 2013
Location: Auckland
Posts: 1,932
Quote:
Originally Posted by carrion View Post
@earok
thanks for your work. I will use it with VSCode on my Mac It even kinda works now but I still have one issue. After the SuperTED start I can't get rid of the welcome splash window with OKEE DOKEE buton and thus the TED can't load the file. Is there a way to get rid of this window automatically so the file loads?

I also don't quite understand how to deal with ascii files and the .xtra config files so I don't have to change number of SHAPES for example in the compiler config.
Cheers! Thanks for confirming it works on Mac.

Re: getting rid of window, I want to know that myself.

Re; ASCII thing, you just need to do something like this

Code:
Copy asciisource.bb2 tokensource.bb2
Blitz2 tokensource.bb2
Asciisource is what you edit and save in visual studio code. Since you're not overwriting the token source xtra file when you copy, you can save that to keep your Max shapes settings etc.
earok is offline  
Old 12 August 2018, 13:26   #22
earok
Registered User

 
Join Date: Dec 2013
Location: Auckland
Posts: 1,932
Slightly off topic, but if the superted source is available somewhere (or at least the ted source), presumably we can remove the acknowledgement window and add more features for auto build etc? Can anyone confirm or deny?
earok is offline  
Old 12 August 2018, 13:41   #23
carrion
Registered User

carrion's Avatar
 
Join Date: Dec 2016
Location: Warsaw area
Posts: 71
@earok
thanks for quick reply.
The thing with splash window is that I can't
go any further and I can't close it either. On WB screen I have other requester saying:

I'm attempting to close my screen.
Please close all visitors windows
RETRY

but the thing is I can't close any requester or window... hm
carrion is offline  
Old 12 August 2018, 16:53   #24
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 3,732
Quote:
Originally Posted by earok View Post
However, some odd quirks - when I quit the game, I still have the "Okee Dokee" and "!PANIC!" windows open, and I can't seem to dismiss them?
Did you end your program with "End"?

Quote:
Originally Posted by earok View Post
Slightly off topic, but if the superted source is available somewhere (or at least the ted source), presumably we can remove the acknowledgement window and add more features for auto build etc? Can anyone confirm or deny?
There is source for SuperTED here: http://www.david-mcminn.co.uk/blitz-2000/archives/bss/

However, I don't know if it's complete enough to be compiled.
idrougge is offline  
Old 13 August 2018, 11:12   #25
MickGyver
Registered User

MickGyver's Avatar
 
Join Date: Oct 2008
Location: Too close to the North Pole
Posts: 344
Quote:
Originally Posted by earok View Post
Hey, that's pretty cool. So, I've got my execute script to include

Code:
run blitz2:blitz2
SYS:REXXC/waitForPort TED_REXX1
SYS:REXXC/rx "address TED_REXX1; SHOWSCREEN"
SYS:REXXC/rx "address TED_REXX1; ACTIVATE"
SYS:REXXC/rx "address TED_REXX1; LOADNEW 'build.bb'"
SYS:REXXC/rx "address TED_REXX1; COMPILE 'build.bb'"
Which runs the game! So I can test the game with the CTRL+SHIFT+B shortcut combination with visual studio code. (To be clear, "Blitz2" here is superted, not ted)

However, some odd quirks - when I quit the game, I still have the "Okee Dokee" and "!PANIC!" windows open, and I can't seem to dismiss them?
The way I have things setup is I only have one configuration in WinUAE. I run WinUAE using that config and then run SuperTED manually once (this could be automated but I don't know how to remove the nag screen of TED either so). Once SuperTED is running I can leave it running and just load/reload and compile bb2 files via a batch file/arexx script by pressing CTRL+F5 in Notepad++. The batch file will copy the bb2 file, load/compile the copy via an arexx script and set focus to WinUAE.

To be able to run Arexx scripts in WinUAE from Windows (no OSX version) I made a tool. It is found in this package: http://www.gamephase.net/files/linke...-tools-v10.zip

Everything is explained in detail under "Setting up automation" in this pdf: http://gamephase.net/files/linked/BB...HowTo-v1.3.pdf

This method should otherwise work according to your instructions on setting up the build shortcut in VS Code, the things that differ are how things are set up in WinUAE etc.
MickGyver is online now  
Old 21 January 2019, 18:24   #26
girv
Reticulator of Splines
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 923
Send a message via ICQ to girv
Quote:
Originally Posted by MickGyver View Post
To be able to run Arexx scripts in WinUAE from Windows (no OSX version) I made a tool. It is found in this package: http://www.gamephase.net/files/linke...-tools-v10.zip
Incidentally, these tools work fine on macOS + FS-UAE
  • In FS-UAE set the serial_port custom option in the launcher or via command line.
  • MickGyver's tools can be executed using mono.
I've got SuperTED loading and compiling in FS-UAE by executing a command line on the mac side.
Code:
$ mono ./UAEREXX.exe S:BlitzBasic2Automator.rexx 1000 "BLITZ2:test_asc.bb2"
[edit]

Update: the connection seems very unreliable, sometimes it works sometimes not. Enabling ARexx debugging on the Amiga side shows nothing happening when it fails, so I suspect some kind of transmission/reception error of the rx command line.

Last edited by girv; 22 January 2019 at 02:23.
girv is offline  
Old 22 January 2019, 12:00   #27
MickGyver
Registered User

MickGyver's Avatar
 
Join Date: Oct 2008
Location: Too close to the North Pole
Posts: 344
Quote:
Originally Posted by girv View Post
Incidentally, these tools work fine on macOS + FS-UAE
  • In FS-UAE set the serial_port custom option in the launcher or via command line.
  • MickGyver's tools can be executed using mono.
I've got SuperTED loading and compiling in FS-UAE by executing a command line on the mac side.
Code:
$ mono ./UAEREXX.exe S:BlitzBasic2Automator.rexx 1000 "BLITZ2:test_asc.bb2"
[edit]

Update: the connection seems very unreliable, sometimes it works sometimes not. Enabling ARexx debugging on the Amiga side shows nothing happening when it fails, so I suspect some kind of transmission/reception error of the rx command line.
Nice to hear that it works. Try increasing the 1000 ms delay to 2000 and see if it is more reliable then.
MickGyver is online now  
Old 22 January 2019, 12:23   #28
girv
Reticulator of Splines
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 923
Send a message via ICQ to girv
I had it up to 10 seconds with no difference

As FS-UAE doesn't have the serial_direct option (I think) I also tried tunnelling the TCP connection to the latest WinUAE on a VM, but got the same unreliable results.

I've read your NPP setup document. Is there anything else to configure on the Amiga side, say in Serial preferences? Which AmigaOS version were you using? I'm using a clean install of 3.1.

Aside: there's an Emacs mode for BB2 that also handles tokenised files FWIW ICYMI
girv is offline  
Old 24 January 2019, 00:43   #29
girv
Reticulator of Splines
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 923
Send a message via ICQ to girv
Thumbs up

FINALLY got it working (Mac to FS-UAE) by replacing the standard AUX device with one controlled by AuxSupport_V2.lha from Aminet! I just could not get the standard one working reliably

What I've done:
- modified the VSCode extension to activate only for ".bba" files (Blitz Basic ASCII ... I just made this up)
- hidden .bb2, .xtra, .bak, .info, .uaem files in VSCode explorer
- set up a build task in VSCode to run the bash script below with the Amiga-side path and "main" .bba file name as parameters. You'll need to change these two values to suit each project.

tasks.json
Code:
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build",
            "type": "shell",
            "command": "./onbuild.sh BLITZ2:AI2019 main.bba",
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}
onbuild.sh
Code:
#!/bin/bash

BBPATH="${1}"
BBAMAIN="${2}"

BB2MAIN="${BBPATH}/${BBAMAIN%.bba}.bb2"

BBAFILES=`ls *.bba | grep -v ${BBAMAIN} | xargs`
BB2FILES=""
for src in ${BBAMAIN} ${BBAFILES}
do
    cp -av "${src}" "${src%.bba}.bb2"
    BB2FILES="${BB2FILES}\"${BBPATH}/${src%.bba}.bb2\" "
done

echo SYS:RexxC/RX S:BlitzBasic2Automator.rexx ${BB2FILES} | nc 127.0.0.1 1234
This copies all .bba files to their .bb2 equivalent, then invokes earok's ARexx script via TCP AUX shell (using netcat). This loads and saves each file in turn (to tokenise them) using SuperTED, then compiles and runs the "main" bb2 file.

For completeness, this is the ARexx script I'm actually using:

S:BlitzBasic2Automator.rexx
Code:
/* Blitz automation */

/* Get all command line parameters */
PARSE ARG commandline
count = 0
DO WHILE LENGTH(commandline) > 0
   commandline = STRIP(commandline, 'B')
   count = count + 1
   IF LEFT( commandline, 1 ) = '"' THEN DO
      PARSE VAR commandline '"'parameter.count'"' commandline
   END
   ELSE DO
      PARSE VAR commandline parameter.count commandline
   END
END
DROP commandline
parameter.0 = count

/* Address Ted and show it */
ADDRESS TED_REXX1
SHOWSCREEN
WINDOWTOFRONT
ACTIVATE

/* Load and save all the non-main files to ensure they are tokenized */
DO counter = 2 TO parameter.0
   LOAD parameter.counter
   SAVE
END

/* Load and save the main project file (first command line parameter) */
LOAD parameter.1
SAVE

/* Compile the main file */
COMPILE
I still need to get FS-UAE to become the focus when build is run, but it's a start
girv is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Amiga Assembly extension for Visual Studio Code prb28 Coders. Asm / Hardware 35 02 October 2018 00:17
Blitz Basic 2 source code Retro1234 Coders. Blitz Basic 8 25 May 2016 06:07
very basic C/ASM/Visual Studio hand holding Sephnroth Coders. C/C++ 2 08 March 2016 21:15
Somebody teach me to code in Blitz Basic, please!!! Toni Galvez Coders. Blitz Basic 18 21 May 2015 01:03
3D code and/or internet code for Blitz Basic 2.1 EdzUp Retrogaming General Discussion 0 10 February 2002 12:40

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 13:41.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.07310 seconds with 13 queries