Author Topic: TIPC-Basic  (Read 9395 times)

0 Members and 1 Guest are viewing this topic.

Offline coolsnake

  • LV2 Member (Next: 40)
  • **
  • Posts: 36
  • Rating: +2/-0
    • View Profile
TIPC-Basic
« on: September 07, 2010, 05:28:57 pm »
Description
TIPC-Basic or “Tipsy”-Basic is a library written for use with the computer programming language FreeBASIC.
When installed it allows you to program in Freebasic by using a syntax that is extremely similar to the one of TI-Basic on the TI-84+ graphing calculator while
still having access to all the commands of FreeBASIC.

List of all the commands
Spoiler For Spoiler:
Supported commands
abs(
checkTmr(
ClrDraw
ClrHome
Disp
fPart(
inString(
int(
length(
Pause
Prompt
PxlChange(
PxlOff(
PxlOn(
PxlTest(
rand
randInt(
startTmr
Stop
Text(

Renamed commands
CircleTI(
GetKeyTI(
LineTI(
OutputTI(
subTI(

New commands
BigScreen
Cursor(
CursorX
CursorY
GetMouse(
GraphScreen
HomeScreen
inStringRev(
NormalScreen
Str(
Val(

Installation instructions
First make sure that FreeBASIC is installed (http://freebasic.net/)
Also install an IDE of choice. I've used FBIDE.( found at the bottom of the downloads page)
The default directory for FreeBASIC is
Code: [Select]
C:\FreeBASIC
Place “TIPC-Basic.bi” in
Code: [Select]
C:\FreeBASIC\inc
Place “libTIPC-Basic.a” in
Code: [Select]
C:\FreeBASIC\lib\win32
Add the following line to the top of your source code in FBIde
Code: [Select]
#include "TIPC-Basic.bi"
Now you can use the same commands as in TI-Basic.
Check the User Manual for more information about the syntax.
For a complete rundown of the commands, check “commandlist.html”.
To compile and run your program press F9 or go to run->compile&run.

Feedback
How this project evolves lies in your hands now. Please give me your opinions on what new commands to add, what commands need to change etc
Reports of bugs or spelling mistakes are of course very welcome too.
Please mail them to [email protected] or post them here.

EDIT: updated install instructions in post & in zip file
« Last Edit: September 08, 2010, 08:49:41 am by coolsnake »
Unpretty Integrals
This program gives you a graphical representation of the "fnint(" function, which allows you to calculate definite integrals. It is extremely similar to the functionality MathPrint provides, minus the extreme bloat that slows your calculator down to a crawl.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: TIPC-Basic
« Reply #1 on: September 07, 2010, 05:32:17 pm »
Nice project! I know Miotatsu was working on a similar project but standalone, and it did not see much progess lately :(. I'm glad to see such language for the computer. EventuallY I'll have to try this out, although it may take a while since I had a few other stuff going on lately.
* DJ Omnimaga hopes this is 64-bit compatible, though, noticing the win32 part of the name.

EDIT: Mhmm now I installed FreeBASIC but I do not understand how to run it. Also, in which file do I put "#include "TIPC-Basic.bi"?
« Last Edit: September 07, 2010, 05:42:25 pm by DJ Omnimaga »

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: TIPC-Basic
« Reply #2 on: September 07, 2010, 06:22:08 pm »
This is pretty cool and should be hand for people to learn FreeBASIC easier.

@DJ
The reason BasiC++ hasn't seen much progress I think is mainly because of PiWorld and the fact that I think he lost all his progress on BasiC++. I don't completely remember though.

As for your edit question. "#include 'TIPC-Basic.bi'" doesn't go into any file. When you start a new file inside of the IDE you usually have some sort of header portion that includes the programs, files, etc. that you will be referencing within the program you are working on in the file. Basically that line just goes up in it and is telling the IDE that you want to use the library coolsnake made to replace commands in the program. So instead of doing what coolsnake said before when you just make a lot of sub-routines to change the code he has already done something like that inside the library so you just put that line at the top and you can use the commands as he changed them. Does that make sense?
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: TIPC-Basic
« Reply #3 on: September 07, 2010, 06:36:59 pm »
Yeah I know, he lost all work he had IIRC. Afterward he focused on Piworld PC.

As for your answer, it makes sense, but it would make even more if I could figure out how to actually run the IDE. I tried double-clicking every EXE that were installed and it did not do anything special. I am on Windows 7 64 bit btw.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: TIPC-Basic
« Reply #4 on: September 07, 2010, 06:55:01 pm »
Did you download the IDE? On the FreeBASIC download page it looks like you can download the binaries (which I'm not sure what that is exactly) and then FBIDE is a third-party tool. Check here if you need to download it still.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: TIPC-Basic
« Reply #5 on: September 07, 2010, 07:28:31 pm »
Oh ok I just downloaded the binaries. I'll download the other thing now.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: TIPC-Basic
« Reply #6 on: September 07, 2010, 07:33:36 pm »
Hopefully that should fix it then :)
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: TIPC-Basic
« Reply #7 on: September 07, 2010, 07:35:28 pm »
Awesome!

So
Code: [Select]
#include "TIPC-Basic.bi"
OutputTI(1,1,"The Game")
Pause
Works!

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: TIPC-Basic
« Reply #8 on: September 07, 2010, 07:49:54 pm »
Sweet! Glad to hear :)
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline coolsnake

  • LV2 Member (Next: 40)
  • **
  • Posts: 36
  • Rating: +2/-0
    • View Profile
Re: TIPC-Basic
« Reply #9 on: September 08, 2010, 08:43:55 am »
EDIT: Mhmm now I installed FreeBASIC but I do not understand how to run it. Also, in which file do I put "#include "TIPC-Basic.bi"?

I could've sworn there was a default IDE included, but apparently there isn't. Sorry, my bad.
When you've installed FreeBASIC you also need to install an IDE. You can find them at the bottom of the FreeBASIC download page.
I've used FBIDE, they all are similar though.
http://www.freebasic.net/index.php/download

EDIT:
I know what happened now. I downloaded the bundle pack of FBIDE and FreeBASIC from
http://fbide.freebasic.net/index.php?menuID=56
I then updated the older version of FreeBASIC to the latest one.
« Last Edit: September 08, 2010, 08:57:05 am by coolsnake »
Unpretty Integrals
This program gives you a graphical representation of the "fnint(" function, which allows you to calculate definite integrals. It is extremely similar to the functionality MathPrint provides, minus the extreme bloat that slows your calculator down to a crawl.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: TIPC-Basic
« Reply #10 on: September 08, 2010, 12:57:26 pm »
Yeah don't worry I got it solved. It works now. :)

I'Ll need to learn how to use this a bit, to see how to actually use images and the like (if possible). This might actually push my ASM learning further even more but it wasn't in my priorities anyway since Axe and some BASIC suits my needs for calcs for now.

Offline coolsnake

  • LV2 Member (Next: 40)
  • **
  • Posts: 36
  • Rating: +2/-0
    • View Profile
Re: TIPC-Basic
« Reply #11 on: September 09, 2010, 04:32:04 am »
Yeah don't worry I got it solved. It works now. :)

I'Ll need to learn how to use this a bit, to see how to actually use images and the like (if possible). This might actually push my ASM learning further even more but it wasn't in my priorities anyway since Axe and some BASIC suits my needs for calcs for now.

I've been checking on how you can incorporate images in your program. I think I have a good grasp of the basis now.
The way I see it is that you can incorporate BMP images or images generated from "raw" data in FB.
Also when it compiles your sourcecode it puts the images you use into your exe, so you won't need anything else when distributing your program.

It uses the BLOAD and BSAVE commands if you're interested in some raw FreeBASIC.  :P
http://www.freebasic.net/wiki/wikka.php?wakka=KeyPgBload
http://www.freebasic.net/wiki/wikka.php?wakka=KeyPgBsave

I'll probably write up a userfriendly routine for that, good that you mentioned that!
Keep them good ideas coming!
Unpretty Integrals
This program gives you a graphical representation of the "fnint(" function, which allows you to calculate definite integrals. It is extremely similar to the functionality MathPrint provides, minus the extreme bloat that slows your calculator down to a crawl.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: TIPC-Basic
« Reply #12 on: September 09, 2010, 09:24:45 am »
Interesting. I'll check out those commands. I hope we don't need to convert the images to a certain format by hand, though, or have to find a converter like in ASM and Axe (to convert to hexadecimal in that case) x.x

Offline coolsnake

  • LV2 Member (Next: 40)
  • **
  • Posts: 36
  • Rating: +2/-0
    • View Profile
Re: TIPC-Basic
« Reply #13 on: September 09, 2010, 12:48:23 pm »
Hm if you're asking if you need to convert the bitmaps in some way, then no you don't need to do that.
Here's something I slapped together in FB using two 48x48 bitmaps in 24bit + source code and commentary.
Unpretty Integrals
This program gives you a graphical representation of the "fnint(" function, which allows you to calculate definite integrals. It is extremely similar to the functionality MathPrint provides, minus the extreme bloat that slows your calculator down to a crawl.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: TIPC-Basic
« Reply #14 on: September 09, 2010, 06:11:41 pm »
Aah nice. One day, I need to attempt a tilemapper or something with that. First, the basics, though :P (Moving shit around, displaying text, etc, lol)