This looks awsome! But i don't get the ReCode thing, srry... :S
It is a little difficult to use if you are not used to it Smile It is a new language, after all. However, here is an example of code:

Code:

<<BASIC code>>
dim(40
Pause 33           ;Pauses for .33 seconds
Disp 2,2,HELLO     ;Similar to BASIC Output(3,3,"HELLO
Pause 33
Text(0,0,Mreow?    ;Displays text on the graph using a fixed 4x6 font
DispGraph          ;Shows the graph screen
While getKey≠15    ;Starts a while loop. 15=Clear
Pause 10           ;Pauses for .1 seconds
Fill(2             ;Inverts the screen
End                ;End for the While loop
Stop               ;Ends ReCode
<<BASIC code>>
Xeda, glad that you're adding so many features. Smile I'm curious if you're mainly motivated to add things that you think of that would be cool, or if there are others somewhere suggesting routines that would be helpful to their own programs or endeavors.
I have been trying to get people to make suggestions and I do get a bunch, but many of the commands were made as I needed them. For example, the Diag command was added because I was working on some games using a matrix and the SubCol, SubRow, ListToRow, and ListToCol commands were added because those are commands that I always thought were needed (I like making RPGs that use matrices/lists to store/load save data).

I still do a lot of BASIC programming, too. The main reason for why I started this was so that I could use it in my BASIC games Smile

ReCode was actually a project I started almost a year ago, but when I learned about Axe Parser, I put it aside, judging by the name that it was a parser. Then when I learned it didn't actually parse code, I was already deep into other projects. Over break I just added on to my simple Pause and Disp commands, fixed up the Line( command, and went crazy making new commands.

Last night I got some requests for commands in ReCode and I have added them, so now these commands have been added:

Code:

RecallPic  Used to recall pics (0~255) from RAM or archive
StorePic   Used to store
'          Okay, this was my idea... It is used to make use of variables A', B', et cetera
Full       used to set the CPU speed (normally at 6MHz)
Pt-On(     Used to draw sprites
"          Used to access BASIC string variables

So ',", were my ideas, Full was an idea I got after somebody asked if that (refering to Block Eater) was as fast as it would appear on an 83+, and Pt-On( has been in the works to be added for some time now.
Nifty, I like those. I think Axe uses Full for the same purpose, does it not? It seems to me that you're overriding an awful lot of tokens with the Parser Hook (assuming that that is the case indeed); what does this do for speed? Unless I'm off-base and you have your own parser independent of TI's.
Yep, it is its own parser Very Happy It starts with a parser hook (dim(40 activates it) but after that it is all parsed independent of the OS. Also, the idea to use Full did actually come from Axe, but the syntax is a little different, I think:
Full sets to 15MHz if possible
Full0 sets to 6MHz
Full1 sets to 15MHz, if possible
Any other value after Full toggles the speed.

The reason I included Full1 was in case you wanted to use a variable. For example, a small snippet of code:

Code:

getKey→A
A=10
If +A=11
Full11-A

That will change it to 15MHz mode if [+] is pressed and 6MHz mode if [-] is pressed.
As an interesting note, interrupts are turned off the whole time >_>
ReCode uses very few B_Calls... in fact, the only place it uses bcalls or are in these commands:

Disp- uses bcall PutPS
StorePic- 3 bcalls: DelVarArc, CreatePict, InsertMem
→! When storing to a BASIC var, it uses CreateReal if it doesn't exist

No other bcalls or rsts are used Very Happy
Xeda112358 wrote:
It is a little difficult to use if you are not used to it Smile It is a new language, after all. However, here is an example of code:

Code:

<<BASIC code>>
dim(40
Pause 33           ;Pauses for .33 seconds
Disp 2,2,HELLO     ;Similar to BASIC Output(3,3,"HELLO
Pause 33
Text(0,0,Mreow?    ;Displays text on the graph using a fixed 4x6 font
DispGraph          ;Shows the graph screen
While getKey≠15    ;Starts a while loop. 15=Clear
Pause 10           ;Pauses for .1 seconds
Fill(2             ;Inverts the screen
End                ;End for the While loop
Stop               ;Ends ReCode
<<BASIC code>>

Thanks, i think i got it! Smile
That makes sense, thanks for explaining. Of course, the downside of that is that you have to handle all the parser internals yourself, including math and stuff, right?

Edit: Just noticed dim(40) and Stop. Now I understand. Smile
yeah, I have to handle it all, but the math can provide some interesting structures. However, the good part about ReCode is that it can be used inside of a BASIC program, so if you need to do some advanced math, you can just exit ReCode, compute stuff in BASIC, then you just go back into ReCode. However, when it comes to math, the basic functions do exist and I plan to add more. (such as raising to a power or taking the xth root).
Xeda112358 wrote:
yeah, I have to handle it all, but the math can provide some interesting structures. However, the good part about ReCode is that it can be used inside of a BASIC program, so if you need to do some advanced math, you can just exit ReCode, compute stuff in BASIC, then you just go back into ReCode. However, when it comes to math, the basic functions do exist and I plan to add more. (such as raising to a power or taking the xth root).
Do those functions come up often in TI-BASIC games? I would think that sin(), cos(), tan(), and the basic four functions would be the most important (plus negation).
Oh yeah, I forgot that I had negation... But yeah, you are right. Thanks! I do have some code lying around for sin/cos and I could come up with one for tan, I am sure. Maybe I will just add square roots and raising to the second and third power
Xeda112358 wrote:
Oh yeah, I forgot that I had negation... But yeah, you are right. Thanks! I do have some code lying around for sin/cos and I could come up with one for tan, I am sure. Maybe I will just add square roots and raising to the second and third power
That sounds like it would be fairly reasonable to me.
Okay, so I took a few weeks off from programming, but I have been doing a bunch of coding this past week. I have added three more commands to the regular commands and several new commands to ReCode. So the regular commands are:
91-DelElements will delete a specified number of elements from a list at a specified offset
92-InsElements will insert 0s into a list at a specified offset
93-InsList will insert a list from RAM or archive into another list at some specified offset

I plan to add similar functions for strings, too.

In ReCode:
added sin(
added cos(
added 2
fixed >
added // for comments
added log(Text( to display numbers in some base

It has been requested that I add an Input function as well as Lbl and Goto support. I also need to fix up/add sprite routines for ReCode and proper data editing tools for it.

So here is the latest uploaded version: BatLib v4.00.95.51

I have a version made that has dim(1 modified so that it now disables the "Done" message, too. Here are some screenies, too:
Commands 91~93

Balltrix:

Bouncy:
Bouncy looks sweet. Is that ReCode or BASIC?
Both of those are ReCode Smile It has been pretty much Scout and I working on example programs and typically if it can be done in ReCode, we stick to that. ReCode tends to be much faster and a little smaller. Also, I am still thinking of adding in new Rectangle routines Very Happy I want to reorder the code a little to accomplish that, but I have gotten it to make rectangles that have borders where some pixels are off ^_^
Have you thought any more about my suggestion of being able to set a dash pattern for lines and shapes? I think that would be a really nice feature.
Yeah, that was actually why I was testing it out XD Hopefully that will allow for patterned borders defined the way you mentioned them Smile
That looks awsome! Smile
Xeda112358 wrote:
Yeah, that was actually why I was testing it out XD Hopefully that will allow for patterned borders defined the way you mentioned them Smile
Awesome. Also, do you know if this chains with the DCS hooks? I'd like to making something using both that neat line drawing, and the DCS raycasting function.
Sorry, it doesn't chain with anything yet until I can figure out a good method for preserving RAM areas (without having to reload the RAM every time). I think I will make a BackUpData command or something as well as an "ReInstall" command for the user to handle if they want to use other hooks.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 2 of 4
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement