Sinphaltimus Posted September 13, 2016 Share Posted September 13, 2016 WOW! OK, Later today I will post another update. Same game, nothing changed except some more code optimizing.After Loading the game: 6734 PROGRAM FREEAfter running the game: 6590 PROGRAM FREE I think I have plenty of space to continue development. Gotta run off to work now. L8rs... 1 Quote Link to comment Share on other sites More sharing options...
matthew180 Posted September 14, 2016 Author Share Posted September 14, 2016 TidBit has been updated to V3.0. Lots of changes and bug fixes that were not discovered yet. I rewrote the internal parser to recognize *less*, thus making it simpler and thus less prone to errors. My website has been updated with the latest, and so has the download file in the first post of this thread. 1 Quote Link to comment Share on other sites More sharing options...
matthew180 Posted September 14, 2016 Author Share Posted September 14, 2016 (edited) I know nothing of PHP. http://php.net/manual/en/intro-whatis.php PHP is an interpreted scripting language, much like BASIC, XB, Java, Ruby, Python, JavaScript, etc. It has been around a long time and was designed primarily for building web applications. However, it is a very nice general purpose scripting language too. Running a PHP script is also just like any of those languages, you need to feed the script into the interpreter. I downloaded php for windows but it did not have an installer. You don't need an installer. Just unzip to a folder where you want the PHP interpreter to live. I saw notes on the tidbit page about adding paths so instead of doing that, I just decompressed to my tidbit folder. That is fine, you only need to add PHP to your PATH if you don't want to type the full path to the PHP interpreter every time you run it. I run php, it opens a prompt, It does not work like that. Start a command prompt in windows: right-click the Start Icon select: Run type: cmd hit enter Now change to the directory where you extracted PHP and type: php -v You should see some version information. Now you can run PHP scripts by typing: php <script_name> I run all 3 of the tidbit php files and nothing. Just kinda sits there. You actually did not run anything, so it just sits there. Do I need to install PHP from a different source? Nope, the php.net website it the place to get php. Yes I can add paths to windows no problem. If you want to. It will make running PHP scripts easier since you won't have to always type the full path to the PHP interpreter. I think this is the latest version of php, not sure. First time ever doing anything with it. It came in a zip file : php-7.0.10-nts-Win32-VC14-x86.zip source: http://windows.php.net/download/ That one is fine. Also, Google is your friend. I'm glad to help, but you can usually get faster results with a little searching. Once you have PHP working, you will probably want to run TidBit using the tidbit_cmd.php script. TidBit itself is written as a library (technically a Class) and is contained in tidbit.php. This script will do nothing on its own. I have included two other PHP scripts (tidbit_cmd.php and tidbit_web.php) depending on how you want to run TidBit. Using the command line will be the fastest and easiest for you so go that route for now. To use tidbit_cmd.php you use the following syntax: php tidbit_cmd.php <input source> <starting line> <line increment> [<output file>] Parameters in [ ] are optional, everything else is mandatory. For example, if you have an input source file called test.bas, you convert it like this: php tidbit_cmd.php test.bas 100 10 That will output the converted program to the command line and you can copy and paste to Classic99 or another emulator. If you want the output code to go to a file, then add an output filename as the last parameter: php tidbit_cmd.php test.bas 100 10 test_output.bas The file test_output.bas will be created if it does not exist, and overwritten if it does. I hope this helps. Being comfortable with a DOS or unix command line helps. Edited September 14, 2016 by matthew180 1 Quote Link to comment Share on other sites More sharing options...
Sinphaltimus Posted September 14, 2016 Share Posted September 14, 2016 (edited) Thanks Matthew, my php ignorance is deliberate. I know it's primarily for webpages and that alone kept me from it. Personal reasons I may get in to some day. My only recent interest is strictly tidbit without internet related. But that was a much less priority since I'm almost always near an internet connection. My lack of interest in php kept me from researching even the basics. I pretty much shrugged it off. But since you took the time to post all of that info, I won't waste your time and will make an effort to get it going. Moving to coding more these days has me spread pretty thin so jumping on anything new outside of XB right now is usually met with disdain. Much like my resistance to TidBit to start with. And yet now, I can't imagine not using it going forward. Your all very persuasive, thank you for being so. I suppose distractions can be very rewarding sometimes. 8D Edited September 14, 2016 by Sinphaltimus Quote Link to comment Share on other sites More sharing options...
matthew180 Posted September 14, 2016 Author Share Posted September 14, 2016 Well, just because you are using a program written in some language does not mean you have to learn that language. I.e. you don't need to know PHP to run TidBit. You just need to know how to run the script, which is the same process for most scripting languages (for Python you have the run the python interpreter, for Java you have to have the JVM installed, etc.) A lot of scripting languages have wrappers for running in Windows, and I'm sure PHP does too, somewhere out there. But IMO it is easier to just run from the command line. I like PHP a lot, it is a very nice general purpose scripting language with very powerful and easy to use associative arrays, string handling, file handling, etc. It also has a very relaxed syntax that is very C-ish / Java-ish. If you know any of C, C++, Java, JavaScript, etc. then you pretty much know PHP and will be right at home. An small example of the relaxed syntax is the use of "else if". You can type "elseif" or "else if" and it does not care. This might seem like a small thing, but depending on what language you are coming from you will have habits, and in PHP, either way it will "just work". And that is a Good Thing. Anyway, I digress. Let me know if you find any other bugs in TidBit. 1 Quote Link to comment Share on other sites More sharing options...
Sinphaltimus Posted September 14, 2016 Share Posted September 14, 2016 Thank you again. You're too kind. Quote Link to comment Share on other sites More sharing options...
Sinphaltimus Posted September 16, 2016 Share Posted September 16, 2016 (edited) OK, I attempted to make this a simple as possible. D:\php is the directory I'm in at a cmd prompt.I copied the bas file to the same directory along with tidbit.Attempted without full path and with. I get the same results.my bas files are just plain text files of the source where I changed the extension to bas from txt with a rename. ZOMBtiV035_source.bas D:\PhP>php tidbit_cmd.php d:\php\zombie035_source.bas 100 10 d:\php\zombi035n.bas Warning: file_get_contents(d:\php\zombie035_source.bas): failed to open stream: No such file or directory in D:\PhP\tidbit_cmd.php on line 36 Cannot read input file: d:\php\zombie035_source.bas D:\PhP> Edited September 16, 2016 by Sinphaltimus Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted September 16, 2016 Share Posted September 16, 2016 Some odd behavior noted using TidBit: In this first screen shot I show the TidBit screen and behind it is Notepad++ (simpy for the built in line numbers) To the point: TidBit translates this incorrectly: IF C=0 THEN RETURN ELSE _FALL TidBit's Translation: 920 IF C=0 THEN RETURN ELSE _FALL TidBit3.png TidBit translates this correctly: IF C<>0 THEN _FALL ELSE RETURN TidBit's Translation: 920 IF C<>0 THEN 2020 ELSE RETURN TidBit4.png Here's the source code for the above examples: ZOMBtiV034_source.txt Doing it here as well. TidBit5.png And again, this fixed it TidBit6.png EDIT: I can't seem to get TidBit working locally so I'm using TidBit on the net from here: >>TidBit<< Funny... I wrote Panzer Strike entirely using TidBit and never encountered that error. Good catch! On a side note, I should state that Panzer Strike would likely never have materialized were it not for TidBit. It was just too complex to code using the line by line standard TI editor, particularly when it came to debugging. In TidBit, it's a snap to move blocks of code around, whereas with the standard editor that would be a nightmare... One more time: Thank You Matt!!! 3 Quote Link to comment Share on other sites More sharing options...
Asmusr Posted September 16, 2016 Share Posted September 16, 2016 Have you thought about creating a compiler for TidBit (on the PC side I mean)? 1 Quote Link to comment Share on other sites More sharing options...
matthew180 Posted September 17, 2016 Author Share Posted September 17, 2016 OK, I attempted to make this a simple as possible. D:\php is the directory I'm in at a cmd prompt. I copied the bas file to the same directory along with tidbit. Attempted without full path and with. I get the same results. my bas files are just plain text files of the source where I changed the extension to bas from txt with a rename. Make sure your file names are correct (the windows cmd prompt supports tab-completion). The error is basically telling you that the input source file cannot be found. I downloaded the file and ran the test below. My PHP executable in in C:\php and I have added it to my path. zombi035n.bas Quote Link to comment Share on other sites More sharing options...
matthew180 Posted September 17, 2016 Author Share Posted September 17, 2016 Have you thought about creating a compiler for TidBit (on the PC side I mean)? Thought about it, but I don't really like line number BASIC very much so there is little motivation. 1 Quote Link to comment Share on other sites More sharing options...
Airshack Posted September 24, 2016 Share Posted September 24, 2016 I can't get the version number with "php -v" because, apparently, "VCRUNTIME.dll is missing." Quote Link to comment Share on other sites More sharing options...
matthew180 Posted September 25, 2016 Author Share Posted September 25, 2016 On the PHP download page for Windows binaries (http://windows.php.net/download#php-7.0), on the left are instructions that you need the Visual C++ Redistributable corresponding to whichever version you decide to download. Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted September 25, 2016 Share Posted September 25, 2016 Have you thought about creating a compiler for TidBit (on the PC side I mean)? Thought about it, but I don't really like line number BASIC very much so there is little motivation. The xdt99: cross-development tools has the xbas99, a TI BASIC and TI Extended BASIC lister and encoder. Maybe that one could do the job ? Quote Link to comment Share on other sites More sharing options...
Asmusr Posted September 25, 2016 Share Posted September 25, 2016 The xdt99: cross-development tools has the xbas99, a TI BASIC and TI Extended BASIC lister and encoder. Maybe that one could do the job ? Hmm, I was talking about a compiler from TidBit BASIC to machine code . Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted September 25, 2016 Share Posted September 25, 2016 (edited) Hmm, I was talking about a compiler from TidBit BASIC to machine code . Yep, you said compiler and not encoder, so I thought so ("to machine code" versus "to TI BASIC"). Then Matthew answered your question with something about really not liking line number BASIC, and line numbers shouldn't really be relevant for a TidBit BASIC to machine code compiler. And when you didn't react to that, ... I thought you'd both be thinking encoders. Edited September 25, 2016 by sometimes99er Quote Link to comment Share on other sites More sharing options...
Airshack Posted September 25, 2016 Share Posted September 25, 2016 On the PHP download page for Windows binaries (http://windows.php.net/download#php-7.0), on the left are instructions that you need the Visual C++ Redistributable corresponding to whichever version you decide to download. Thank you! Now I have PHP installed. On to TidBit... Quote Link to comment Share on other sites More sharing options...
matthew180 Posted September 29, 2016 Author Share Posted September 29, 2016 Hmm, I was talking about a compiler from TidBit BASIC to machine code . Ah, I misunderstood. Now that is something I have thought about. However, that becomes a new compiled language, and I would not model it after XB. Thank you! Now I have PHP installed. On to TidBit... I'm glad to hear you got it going. Quote Link to comment Share on other sites More sharing options...
Sinphaltimus Posted October 11, 2016 Share Posted October 11, 2016 And thank you as well, I finally got around to taking care of my php issues. Running TidBit locally. 1 Quote Link to comment Share on other sites More sharing options...
Airshack Posted October 14, 2016 Share Posted October 14, 2016 Enjoying Tidbit as I learn XB. The workflow is simple with classic99's paste feature. A real pleasure vs working on nasty numbered BASIC code. Sent from my iPhone using Tapatalk 1 Quote Link to comment Share on other sites More sharing options...
Sinphaltimus Posted November 30, 2016 Share Posted November 30, 2016 It's time. I've reached the point where I can't imagine a world without TidBit. Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted December 1, 2016 Share Posted December 1, 2016 Glad to see Matt's creation finally gaining some real traction Quote Link to comment Share on other sites More sharing options...
matthew180 Posted December 4, 2016 Author Share Posted December 4, 2016 Thanks, I'm glad it is useful. Please let me know if any bugs are found. 2 Quote Link to comment Share on other sites More sharing options...
Sinphaltimus Posted December 4, 2016 Share Posted December 4, 2016 Thanks, I'm glad it is useful. Please let me know if any bugs are found. I still prefer the web interface. That's about it. Would love to see a stand alone app that mimics the web interface (offline mode). Quote Link to comment Share on other sites More sharing options...
Airshack Posted December 26, 2016 Share Posted December 26, 2016 They seem the same to me? Prefer offline since I travel and am often without internet. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.