Author Topic: RTB  (Read 5762 times)

ScriptBasic

  • Guest
RTB
« on: August 06, 2013, 11:21:59 pm »
Quote from: Cybermonkey
Hi, I found another nice retro style BASIC based on SDL here: https://projects.drogon.net/return-to-basic/
It was made for the Raspberry PI but works/compiles on other Linuxes, too. Binary and source are provided. Have a lot of fun!

EDIT: I really like it! Very nice if you start in full screen mode, like this (assuming one has a full hd display):



Reminds me of Business Basic in a way. I like it as well. The 64 bit Linux binary runs fine on my Ubuntu 12.04 64 bit laptop.

I'm looking at porting this to Android Linux.

Language Reference Manual (PDF)

Download and install info
« Last Edit: August 07, 2013, 03:01:13 am by ScriptBasic »

Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Re: RTB
« Reply #1 on: August 07, 2013, 08:10:31 am »
Yes, it's really nice. I'll try to port it to Haiku.

Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Re: RTB
« Reply #2 on: August 07, 2013, 07:20:27 pm »
Oh, that was easy ... just needed to install cmake and that's it.
I think I should upload it to haikuware?
EDIT: Here it is: http://www.haikuware.com/remository/view-details/development/language/return-to-basic
« Last Edit: August 07, 2013, 07:48:56 pm by Cybermonkey »

ScriptBasic

  • Guest
Re: RTB
« Reply #3 on: August 07, 2013, 11:23:29 pm »
I hope going to Android is going to be that easy.

I'm going to try the AIDE (Android Java/C/C++ IDE) which would build a APK if I can get it to compile.

This is not on my priority list but something to play with when I need a diversion.


ScriptBasic

  • Guest
Re: RTB Android
« Reply #4 on: August 14, 2013, 06:56:34 pm »
I have made some progress with porting RTB (Return to BASIC) to Android native with SDL support. There are still unicode issues which SDL (1.2) for Android doesn't support. For example I can't type in a quote character and keyboard entry seems a little slow. It's cool just to see it running even though it it isn't ready for prime time. I would like to thank Роман (C4droid author) for his help getting the project to this point.




The Kdb graphic toggles the keyboard.
The arrow key in the upper right corner I'm thinking is a backspace that isn't currently being encoded (unicode ?) correctly.
The circle with arrows seems to be a mouse pad and the center being a return/right mouse button.

These background keys are controlled via the apps SDL preference menu which is a nice codeless feature users will like.



It's nice to see a native C application interacting with the Android Java VM.

I cheated and added a SDL (button one) to do the double quote for me so I could load one of the demo files. (Mandelbrot Set)



Note: The background SDL user interface controls can be toggled off with the application preference menu option.
« Last Edit: August 14, 2013, 10:27:37 pm by ScriptBasic »

ScriptBasic

  • Guest
Re: RTB
« Reply #5 on: August 15, 2013, 04:19:51 pm »


Code: [Select]
HGR
RAD
DIM AnglePattern(3100), TempPattern(3100)
Angle = 0
c = 1
r = 1
NumSides = 3
AnglePattern(0) = -30
AnglePattern(1) = 120
AnglePattern(2) = 120
StartX = gwidth / 2
StartY = gheight / 4
SideLength = 300
//CONST PI = 3.141592654#
CYCLE
  c = 1
  X = StartX
  Y = StartY
  Angle = AnglePattern(0)
  WAIT (1)
  CYCLE
    NewX = X + SIN (Angle * PI / 180) * SideLength
    NewY = Y + COS (Angle * PI / 180) * SideLength
    Angle = Angle + AnglePattern(c)
    //LINE (X, Y)-(NewX, NewY), r
    COLOUR = r
    LINE (X, Y, NewX, NewY)
    IF (c = (NumSides - 1)) THEN c = 0
    c = c + 1
    X = NewX
    Y = NewY
    UPDATE
  REPEAT UNTIL (INT (X) = INT (StartX)) AND (INT (Y) = INT (StartY))
  r = r + 2
  FOR b = 0 TO NumSides - 1 CYCLE
    TempPattern(b) = AnglePattern(b)
  REPEAT
  IF NumSides * 4 > 4000 THEN END
  FOR b = 0 TO NumSides - 1 CYCLE
    AnglePattern(b * 4) = TempPattern(b)
    AnglePattern((b * 4) + 1) = -60
    AnglePattern((b * 4) + 2) = 120
    AnglePattern((b * 4) + 3) = -60
  REPEAT
  NumSides = NumSides * 4
  SideLength = SideLength / 3
  UPDATE
REPEAT

ScriptBasic

  • Guest
Re: RTB
« Reply #6 on: August 16, 2013, 06:33:00 pm »
Cybermonkey (Marcus),

Have you had any luck making contact in any form with Gordon? (RTB author) Both of my comments on his blog remain waiting for approval. I have sent him two e-mails so far with no response. You would think seeing your stuff running on Android unexpectedly would at least deserve a reply.

Maybe forking RTB would make more sense.

John

Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Re: RTB
« Reply #7 on: August 17, 2013, 07:47:51 am »
I had contact to him about his blog. I suggested him to establish a forum for RTB here but he refused and said that he wants to make his own forum on his site. Besides of that he is working on a new version of RTB.

ScriptBasic

  • Guest
Re: RTB
« Reply #8 on: August 17, 2013, 04:53:01 pm »
I've put RTB on the back burner until I know more on where this BASIC is going.

I have asked for help solving the shift key generating a 0 and the delay with keyboard entry from the C4droid author. He seems busy working on SDL 2 and may not have time to help out with this. I'm surprise that RTB is working on Android at all. Everything besides the keyboard issue seems to work fine.


ScriptBasic

  • Guest
Re: RTB
« Reply #9 on: August 18, 2013, 12:54:09 am »
Cybermonkey,

In RTB, how is the shift key handled. I see no reference to it anywhere in the code. It's the only thing holding me up from releasing something.


John

Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Re: RTB
« Reply #10 on: August 18, 2013, 09:01:04 am »
Sorry, but I have really no clue about that.

ScriptBasic

  • Guest
Re: RTB
« Reply #11 on: August 18, 2013, 08:20:25 pm »
Quote
Sorry, but I have really no clue about that.

I was able to get RTB compiled on an alpha release of C4droid's SDL2 development. It compiled fine so I'm working on reversing out the hacks we put in to allow it to run on SDL 1.2. The shift key is the only issue still left on the table.

BTW I just got a reply from Gordon. Seems he is off at camp teaching youngster how to be an engineer like him. He sounds like a great guy with a lot of talent.

I'm on my own with the Android port as the only Android tablet in the house is owned by his wife and is covered under the no techie tricks policy.
« Last Edit: August 18, 2013, 08:38:26 pm by ScriptBasic »

ScriptBasic

  • Guest
Re: RTB
« Reply #12 on: August 21, 2013, 03:17:42 pm »
I was able to get SHIFT working for letters but still working on shifted symbols. (quotes, parens, ...) I'm losing interest in the RTB effort as the DOSBox project that comes with the upcoming release of C4droid is GREAT! Both QB 4.5 and PBDOS 3.5 run great under the emulator. Mouse is supported with touch and it handles all the resizing for you when changing orientation. (landscape / portrait) Check out the All Basic forum for screen shots and downloads of the dosbox.apk and qb45.zip. (unpacked and ready to unzip on your SDCARD)




Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Re: RTB
« Reply #13 on: August 21, 2013, 06:51:55 pm »
Does the device has to be rooted?

ScriptBasic

  • Guest
Re: RTB
« Reply #14 on: August 21, 2013, 09:43:47 pm »
Quote
Does the device has to be rooted?

No.

You do need to be able to allow/install off market apps on your device. There is a DOSBox on Google Play but it's based on older version of DOSBox and isn't free. If you can install my native compiled version of DOSBox on your device, I'm sure you will be happy with it.


« Last Edit: August 24, 2013, 12:34:00 am by ScriptBasic »