CEMETECH
Leading The Way To The Future
Login [Register]
Username:
Password:
Autologin:

Don't have an account? Register now to chat, post, use our tools, and much more.
Latest Headlines
Online Users
There are 92 users online: 1 member, 67 guests and 24 bots.
Members: None.
Bots: Spinn3r (2), Magpie Crawler (3), Googlebot (19).
RSS & Social Media
SAX
You must log in to view the SAX chat widget
    » Goto page Previous  1, 2, 3, 4  Next
» View previous topic :: View next topic  
Author Message
Sorunome


Expert


Joined: 22 Feb 2011
Posts: 636
Location: Somewhere out there

Posted: 15 Mar 2011 07:49:55 am    Post subject:

This looks awsome! But i don't get the ReCode thing, srry... :S
_________________



Back to top
Xeda112358


Power User


Joined: 09 Nov 2010
Posts: 352

Posted: 15 Mar 2011 08:40:01 am    Post subject:

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>>
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55741
Location: Earth, Sol, Milky Way

Posted: 15 Mar 2011 08:40:13 am    Post subject:

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.
_________________


Back to top
Xeda112358


Power User


Joined: 09 Nov 2010
Posts: 352

Posted: 15 Mar 2011 08:59:41 am    Post subject:

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.
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55741
Location: Earth, Sol, Milky Way

Posted: 15 Mar 2011 09:10:44 am    Post subject:

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.
_________________


Back to top
Xeda112358


Power User


Joined: 09 Nov 2010
Posts: 352

Posted: 15 Mar 2011 09:30:34 am    Post subject:

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
Back to top
Sorunome


Expert


Joined: 22 Feb 2011
Posts: 636
Location: Somewhere out there

Posted: 15 Mar 2011 09:50:34 am    Post subject:

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
_________________



Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55741
Location: Earth, Sol, Milky Way

Posted: 15 Mar 2011 09:51:00 am    Post subject:

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
_________________


Back to top
Xeda112358


Power User


Joined: 09 Nov 2010
Posts: 352

Posted: 15 Mar 2011 09:59:40 am    Post subject:

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).
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55741
Location: Earth, Sol, Milky Way

Posted: 15 Mar 2011 11:26:56 am    Post subject:

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).
_________________


Back to top
Xeda112358


Power User


Joined: 09 Nov 2010
Posts: 352

Posted: 15 Mar 2011 11:29:09 am    Post subject:

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
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55741
Location: Earth, Sol, Milky Way

Posted: 15 Mar 2011 12:24:03 pm    Post subject:

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.
_________________


Back to top
Xeda112358


Power User


Joined: 09 Nov 2010
Posts: 352

Posted: 11 Apr 2011 08:53:58 pm    Post subject:

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:
Back to top
merthsoft


File Archiver


Joined: 09 May 2010
Posts: 2735

Posted: 12 Apr 2011 07:55:34 am    Post subject:

Bouncy looks sweet. Is that ReCode or BASIC?
_________________
Shaun
Back to top
Xeda112358


Power User


Joined: 09 Nov 2010
Posts: 352

Posted: 12 Apr 2011 09:04:47 am    Post subject:

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 ^_^
Back to top
merthsoft


File Archiver


Joined: 09 May 2010
Posts: 2735

Posted: 12 Apr 2011 09:10:10 am    Post subject:

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.
_________________
Shaun
Back to top
Xeda112358


Power User


Joined: 09 Nov 2010
Posts: 352

Posted: 12 Apr 2011 11:09:13 am    Post subject:

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
Back to top
Sorunome


Expert


Joined: 22 Feb 2011
Posts: 636
Location: Somewhere out there

Posted: 13 Apr 2011 06:54:29 am    Post subject:

That looks awsome! Smile
_________________



Back to top
merthsoft


File Archiver


Joined: 09 May 2010
Posts: 2735

Posted: 13 Apr 2011 08:04:39 am    Post subject:

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.
_________________
Shaun
Back to top
Xeda112358


Power User


Joined: 09 Nov 2010
Posts: 352

Posted: 13 Apr 2011 11:05:26 am    Post subject:

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.
Back to top
Display posts from previous:   
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
    » Goto page Previous  1, 2, 3, 4  Next
» View previous topic :: View next topic  
Page 2 of 4 » All times are GMT - 5 Hours

 
Jump to:  
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

© Copyright 2000-2013 Cemetech & Kerm Martian :: Page Execution Time: 0.042785 seconds.