Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI 68K => Topic started by: bfr on September 16, 2006, 06:08:00 am

Title: MLC 68k
Post by: bfr on September 16, 2006, 06:08:00 am
Well, I'm going to try to make a version of MLC for 68k calculators.  Unfortunately, I don't know 68k assembly very well, and to my knowledge, that is the only way to make a 68k Flash App.  I do know C though, and I can still make MLC in it, but it probably will be just a tiny bit slower, and not a Flash Applications.  I am really busy during the week, and am kind of busy on the weekend, so unfortunately, progress is going to be really slow.  Also, since this is another thing to work on, this probably will slow down progress on Omnimaga - The RPG (btw I've gotten some awesome tiles for it, but I'm asking permission to use them).

EDIT:  I decided to post a summary of the progress here

Progress:  

Parsers:  3/5
Commands:  1/20
Variables/VAT:  2/5

Plan (note that the order may change, some steps may be combined and intertwined, etc.):  

- Finish parsers and VATs; will take *some* time

- Add many commands; will take *some* time

- Talk to programmers of MLC for Casio calculators, and try to fix any incompatibilities; won't take too long

- Beta testing and optimization;

-- Release MLC 68K 1 ->  Hopefully by the end of the summer of 2007, maybe sooner or later

- Finish the MLC converter; will take quite a while

- Finish MLC sprite and tile-map editor; will take a while

- Work on an editor for MLC 68K 2; will also take a while

- Slightly change the parsing of MLC commands to work with editor, thus creating smaller and faster programs; won't take very long

- Possibly make new commands...any suggestions?

-- Release MLC 68K 2 -> Hopefully by end of the summer of 2008, maybe later
Title: MLC 68k
Post by: Liazon on September 16, 2006, 07:15:00 am
I think what you need is to design MLC 68k to be like PreOS and HW3_Patch, I forget the term, but it means that it's a program that's kind of always running in the background.

It should probably act like a parser like xlib.
Title: MLC 68k
Post by: DJ Omnimaga on September 16, 2006, 07:55:00 am
that sound nice, I hope you can manage to do it ^^
Title: MLC 68k
Post by: Demon on September 16, 2006, 08:11:00 am
QUOTE
I think what you need is to design MLC 68k to be like PreOS and HW3_Patch, I forget the term, but it means that it's a program that's kind of always running in the background.


TSR (Terminate and Stay Resident), I think, is the word you may be looking for - correct me if I'm wrong.
Title: MLC 68k
Post by: Liazon on September 16, 2006, 12:24:00 pm
ya, that's what I meant, TSR.  iirc, if it's a TSR, it's not really an APP, but you still will need to do it mostly in ASM.

Do 68k flash apps still need to be sent to TI in order to be signed, or did they release the app signer?  Kevin Kofler told me that TIGCC does not support apps though.
Title: MLC 68k
Post by: DJ Omnimaga on September 17, 2006, 02:25:00 am
i think it should be made a normal program, in C if possible. of course you can add your asm knowledge too if you desire
Title: MLC 68k
Post by: bfr on September 22, 2006, 12:25:00 pm
Since this should probably go in this thread...

QuoteBegin-Liazon+-->
QUOTE (Liazon)

perhaps require a special MLC heading so that MLC games can still be made with the basic editor. MLC will have to search for basic programs with these headers. This alone may be enough


Actually, there is already a special header (which is "MLC:", without the quotes).  Also, at the moment, the user can edit MLC programs in the text editor or the TI-BASIC editor.  But I might end up choosing one or the other.  What would you all prefer?  The text editor or the TI-BASIC editor?
Title: MLC 68k
Post by: Liazon on September 23, 2006, 03:05:00 am
That's a good question.  I've never programmed much in 89 basic, so I dunno.  Is there an advantage for one or the other, and how come the AMS allows you to use both??
Title: MLC 68k
Post by: bfr on September 23, 2006, 05:33:00 am
Well, the text editor is kind of like the TI-BASIC editor; naturally, it would let me use either one.  I think TIGCC has some functions specifically for the text editor though, so I might use the text editor, but on the other hend, I might not even need those functions.  For now though, MLC 68K programs are planned to be edited in the text editor.
Title: MLC 68k
Post by: bfr on September 23, 2006, 09:41:00 am
MLC 68K now detects MLC programs.   :)smile.gif Here is a screenshot:

user posted image

Right now, the only way to run an MLC program is as an argument.  I'll work on the other stuff later, such as letting MLC programs be selected from a list and ran.
Title: MLC 68k
Post by: Liazon on September 23, 2006, 12:02:00 pm
awesomeness!!! I knew you could do it.
Title: MLC 68k
Post by: bfr on September 23, 2006, 02:10:00 pm
QuoteBegin-elfprince13+-->
QUOTE (elfprince13)

@bfr: contact me if you need help with a parser. I can't code the routines to handle the commands, but I can help with some basic stuff like the parsing itself and probably control structures.


I've come to that part.  All MLC commands are prefixed with "#", and probably for a reason  They probably tell the parser the difference between a command and a variable.  So, I guess the parse should check for "#" first, and then if it encouters it, then it should compare it to a list of commands or something, or else, treat it as a variable or something.  Hmmm...variables will be interesting.  I'll have to make my own variable-allocation table or something...or ues TI-BASIC variables, which might be slower to access.  
Title: MLC 68k
Post by: DJ Omnimaga on September 23, 2006, 04:17:00 pm
sound nice, keep in mind if you use the #$%&@ char you'Ll need alternative for z80 version as those cant be accessed from BASIC editor
Title: MLC 68k
Post by: bfr on September 23, 2006, 04:34:00 pm
Hmmm...this poses some complications for the TI-83+ version.  Should all of the versions be changed, or should their be a convereter that converts the "#" to whatever the TI-83+ would use?

EDIT:  This is starting to get a bit off-topic of MLC 68K, but I guess it's fine if we get back on topic soon.....
Title: MLC 68k
Post by: Ranman on September 23, 2006, 04:42:00 pm
The TI BASIC editor may impose other limitations too -- I don't know.

If you go with the text editor, then you may not have any limitations.
Title: MLC 68k
Post by: tifreak on September 23, 2006, 04:57:00 pm
That character can be accessed...

http://www.ticalc.org/archives/files/fileinfo/384/38404.html

It just might require that program to access alot of different characters :)smile.gif
Title: MLC 68k
Post by: DJ Omnimaga on September 24, 2006, 02:44:00 am
someone was finally kind enough to find this program I was searching for a year or two now o.oblink.gif  thx for the link
Title: MLC 68k
Post by: bfr on September 24, 2006, 01:06:00 pm
Well, he did make it, so I would hope that he knows where the link to it is.  :Ptongue.gif

QuoteBegin-Ranman+23 Sep, 2006, 22:42-->
QUOTE (Ranman @ 23 Sep, 2006, 22:42)
The TI BASIC editor may impose other limitations too -- I don't know.

If you go with the text editor, then you may not have any limitations.

I think xlibman meant that the TI-83+ version of MLC can't edit access #$%&@, and there isn't a builit-in (not preinstalled application) for it anyway, at least to my limited knowledge of the TI-83+.  Or am I the one misunderstanding something...hmmm...   o.oblink.gif
Title: MLC 68k
Post by: DJ Omnimaga on September 27, 2006, 01:25:00 am
thats what i mean  
Title: MLC 68k
Post by: Alex on October 06, 2006, 12:33:00 pm
MLC for the 68k sounds like a great thing. I personally love programming on the go, and if an option faster than BASIC would be available, I'd be sure to use it :)smile.gif

- Alex
Title: MLC 68k
Post by: bfr on November 03, 2006, 02:47:00 pm
w00t MLC 68K has its first real command!  I need to make a variable-allocation table, a variable-name parser and expression parser, and a *better* command parser, but this is an important moment in MLC history ^^.  Once I make a better command parsing system, I'll add many more commands :)smile.gif.

The command is...CLRS.  It clears the screen.  :Ptongue.gif

Also, elfprince13, I think you were offering help with the parser, so, I'm working on the parser now, just so you know.

EDIT:  Added two commands  - PAUS and DRAW.  Commands may also begin with "#" (for compatibility with other versions of MLC) or "|" (for easy access on 68K calculators, but no compatibility.  Maybe in the converter, I could make it convert "|" into "#").  PAUS obviously pauses the program, waiting for any key press, not just enter.  DRAW updates the screen, because all drawing commands are drawn to hidden buffers.  This makes MLC programs automatically double-buffered :)smile.gif

EDIT AGAIN:  Added another command - HALT.  It stops execution of the program.
Title: MLC 68k
Post by: bfr on November 05, 2006, 06:05:00 am
MLC's first command with an argument, that is at least moderately complicated has been added: STOP!  No, it doesn't stop the program or something like I first thought when I was programming in MLC for the TI-86.  It stands for STOre Picture.  This command stores the current contents of the screen in a buffer that you get to name.  w00t, so that means you can do something like this:

#STOP mybuffer

Note that the name can only be up tp 8 characters.  This command also doesn't use a complex string parser or anything - it just uses the all of the characters up to a newline or whitespace character, and the maximum is 8.  The maximum amount of pictures that one can have is 5, but I can increase that (or decrease that) if you all feel that more (or less) are needed.  I'm probably going to increase that amount.

This can be compared to: StorePic 1 in TI-BASIC on the TI-83+, or StoPic mybuffer in TI-BASIC on 68K calculators.  The MLC version is better though because it's faster, supports grayscale pictures, and the names don't have to be numbers (on 68K calculators, the names don't have to be numbers either, but...).

EDIT:  It's still buggy though, because after running a test MLC programs a few times, the calculator froze.

EDIT AGAIN:  It's bug-free!  :)smile.gif
Title: MLC 68k
Post by: Liazon on November 05, 2006, 07:09:00 am
lol, when i saw #STOP, i immediately thought "STOP!!!!" not storepic lol
Title: MLC 68k
Post by: bfr on November 05, 2006, 12:43:00 pm
Yeah :Ptongue.gif.  Maybe it should be changed to "SPIC", but then it wouldn't be compatible with the current version of MLC 86 and MLC Casio AFX.  

Now that I've got STOP working, time to get working on the next command:  RCLP.  I also need to make a good expession parser and a good variable system.  
Title: MLC 68k
Post by: tifreak on November 05, 2006, 01:25:00 pm
cool stuff.

Curious though... this is supposed to be cross platform compatible... Even though they will still have to include all the programs for each calc in the zip, since you cannot send a .83p to an .86p and expect it to work...
Title: MLC 68k
Post by: bfr on November 05, 2006, 02:39:00 pm
That's why there is the http://omnimaga.org/index.php?showtopic=819 ;)wink.gif

I added RCLP, which is like RecallPic in TI-BASIC for the TI-83+ (I think it's RecallPic, isn't it?).  RCLP didn't take much work because I basically copied the code from STOP and slightly modified it.

I'm going to try to get a screenshot up of a demo MLC program.  It's going to use a command called AAAA which really isn't an MLC command, but it'll  be there just for the demo.  It just writes some zeros and stuff on the screen.  When I finish the TEXT command though, it won't be needed.

EDIT:  Here's a screenshot:

user posted image
Title: MLC 68k
Post by: Alex on November 05, 2006, 05:27:00 pm
Great work Bfr! This is quite exciting :)smile.gif

- Alex
Title: MLC 68k
Post by: necro on November 06, 2006, 04:39:00 am
so when will sprites and such get implemented
Title: MLC 68k
Post by: Alex on November 06, 2006, 09:55:00 am
necro, doctor says: change your avatar.

- Alex
Title: MLC 68k
Post by: bfr on November 06, 2006, 04:15:00 pm
Alex:  Thanks :)smile.gif

necro:  I honestly am not really sure.  I just kind of work on what I feel like working on, but sometimes certain things have to come before others.  I plan to add a few more simple commands this weekend, and maybe add sprites in a few weeks.  Sorry, I don't have much time to work on MLC Monday through Thursday, and my time on the weekend is limited.  But, I should have some other (simpler) graphics-related (and non-graphics-related) commands ready soon.  I also plan to add tilemapping, but that will definitely come much later, if I even incorperate it at all.  
Title: MLC 68k
Post by: Liazon on November 06, 2006, 04:57:00 pm
don't worry man! progress is progress, and progress in any way, shape, or form is good

most of us are also busy a lot, so don't worry.
Title: MLC 68k
Post by: bfr on November 18, 2006, 08:08:00 am
I've now implemented integer variables, floating (decimal) variables, and character variables.  I'm working on probably one of the most annoying parts - expression parsing.  So far, MLC can store an integer constant to an integer variable.  
Title: MLC 68k
Post by: DJ Omnimaga on November 18, 2006, 08:27:00 am
sound amazing, btw how many vars will mlc allow?
Title: MLC 68k
Post by: bfr on November 18, 2006, 10:21:00 am
5 picture variables, 50 integers, 50 decimal numbers, and 20 strings.  There are other variable types, including MLC 2-only variable types, such as pointers, that I don't know how many I will allow yet.  I can increase the amont of variables, and even make it unlimited (limited to only the amount of the calculator's memory, but it would be a bit tricky).  
Title: MLC 68k
Post by: DJ Omnimaga on November 25, 2006, 07:59:00 am
aah i see, should be reasonable for arcade type games
Title: MLC 68k
Post by: Liazon on November 25, 2006, 01:06:00 pm
Pity variables and all that can't be easily implemented dynamically on z80 calcs.  Correct me if I'm wrong.  I think if the variables could be implemented dynamically, we could have unlimited variables?  But then we'd need some kinda of memory checking mechanism to check errors.  that'd make it slow wouldn't it?  what if the program defines the max memory it will use at any given time and make the calc check if it's available.

I'm just throwing ideas out.  So far things look awesome.
Title: MLC 68k
Post by: bfr on November 25, 2006, 01:30:00 pm
I see what you mean.  It probably would be a little slower and would require an error checking mechanism, which would make it even slower.  I might just leave it as it is now though unless I encounter some horrible problems or many people start to complain.  
Title: MLC 68k
Post by: bfr on December 09, 2006, 06:38:00 am
I'm rewriting the expression parser because it was horrendously organized before and didn't completely work anyway :Ptongue.gif.  It's going to be done hopefully sometime between this Sunday and the end of Christmas break.  I've never really written a mathematical expression parser before, so I don't really know how long it will take.  
Title: MLC 68k
Post by: bfr on December 11, 2006, 02:58:00 pm
I've decided to use a (slightly slower) dynamic variable system, due to weird errors probably due to stack overloading.  The dynamic variable system will be better than the current variable system in all ways except for that it will make MLC slightly larger and MLC programs slightly slower.  Other than that, the dynamic variables systems means better memory error prevention, better random weird error prevention, and unlimited variables (the only limit is the calculator's memory).  I might not be able to finish this any time soon, but I'll hopefully finish the new variable system along with the mathematics expression parser by the end of December.
Title: MLC 68k
Post by: necro on December 11, 2006, 07:34:00 pm
so, have you implemented sprites yet?  Also, how does the C code parse the files?
Title: MLC 68k
Post by: DJ Omnimaga on December 12, 2006, 03:06:00 am
providing it wont go insanely slow (like BASIC) it should be fine :)smile.gif
Title: MLC 68k
Post by: necro on December 12, 2006, 06:31:00 am
I am wondering because I am still early into learning C
Title: MLC 68k
Post by: bfr on December 12, 2006, 11:46:00 am
necro:  No, sorry, sprites haven't been implemented yet. They'll come after a good variable system and the expression parsers are finished.  MLC can't parse the sprite commands' arguments without an expression parser and the sprites' arguments can't be variables without a variable system.  I know sprites are an important part of MLC, so I'll try to work on them soon after finishing the new variable system and the expression parsers.  

And how does it parser files?  Well, don't try this with computer C, but I'm using low-level http://tigcc.ticalc.org/doc/vat.html.  I'm using those routines as opposed to http://tigcc.ticalc.org/doc/stdio.html, because it allows for smaller and faster programs.  With the higher-level ANSI-compatible routines, one could merely do:  

FILE* file = fopen("myfile","w"); // w for write mode

By using routines from vat.h, it's a tiny bit more complicated.  Besides, to me at least, it is more fun to use the vat.h routines.   :Ptongue.gif
Title: MLC 68k
Post by: DJ Omnimaga on December 13, 2006, 02:46:00 am
Question: do u think something like this could be done in MLC?

user posted image

Basically this use 4 truncated road pics and two lists (L2 and L3), and depending of if the list element is a turn or coast it display a different road sprite where it's supposed to display. However sprite size keep varying in height, depending of if you are in a coast or not. I was wondering if such program could be done in MLC?

EDIT: that thing is written in BASIC+xLIB btw, don't wonder why it isn't too smooth
Title: MLC 68k
Post by: Liazon on December 13, 2006, 10:19:00 am
was that your xlibman?  cuz that's insanely good!
Title: MLC 68k
Post by: bfr on December 13, 2006, 10:51:00 am
MLC 68K will pretty much have everything that xLIB has.  :)smile.gif
Title: MLC 68k
Post by: tenniskid493 on December 13, 2006, 05:44:00 pm
very cool work bfr...keep up the progress
Title: MLC 68k
Post by: DJ Omnimaga on December 14, 2006, 01:45:00 pm
that would be amazing, are u planning to have sprite clipping?
Title: MLC 68k
Post by: bfr on December 15, 2006, 11:33:00 am
xlibman:  probably.

Until winter break for me starts (which will be 3 days before Chirstmas or something like that), progress on MLC will most likely be slow.  
Title: MLC 68k
Post by: Liazon on December 15, 2006, 11:57:00 am
lucky for you, I hope to see progress continue at this rate or faster.

x.x as for me, it's still a week before break and I've already got more school work due the day after than I can chew. x.x
Title: MLC 68k
Post by: DJ Omnimaga on December 15, 2006, 02:02:00 pm
christmas homework should be banned from the world, its christmas time after all x.x
Title: MLC 68k
Post by: bfr on December 22, 2006, 11:12:00 am
The MLC integer parser is almost complete.  Integers can be added, subtracted, multiplied, divided, and exponents are even availible.  What isn't done, yet?  I still might add roots, and I definitely have to make it so that integer variables can be added/subtracted/multipled... to each other, not just constants.
Title: MLC 68k
Post by: elfprince13 on December 22, 2006, 01:17:00 pm
I can teach you how to calculate square roots by -h-a-n-d- code.
Title: MLC 68k
Post by: bfr on December 22, 2006, 01:20:00 pm
I actually have a few (but not very good) formulas/ways to calculate the square root of a number.

Could you teach me your method?  
Title: MLC 68k
Post by: elfprince13 on December 22, 2006, 02:10:00 pm
sure, I assume you are familiar with binary searching a sorted array?

if not you should go read up on it. otherwise here's some fairly easy to translate java code for it (assuming you have floating point capability.....if you dont care about the decimals it should work anyway.)

c1-->
CODE
ec1public static double sqrt(double value){
 
Title: MLC 68k
Post by: DJ Omnimaga on December 22, 2006, 04:01:00 pm
that sound nice, I hope to see it in action soon
Title: MLC 68k
Post by: bfr on December 23, 2006, 02:14:00 pm
Thanks, elfprince13.  I'll try to add square root capabilities soon.

I've added full support for integers and floating-point numbers.  Both of their ranges are huge and accessing them and storing values to them is really fast.  The range for floating-point numbers is 1e-999 to 9.999999999999999e999 the value for integers is -2147483648 to 2147483647.  These ranges should be more than enough.  :)smile.gif

The next variable types I'm going to add with the new VAT system are probably going to be "pictures" and strings.

EDIT:  I've come up with an idea, which I think is pretty awesome.  I'm going to allow MLC programs to manipulate the VATs in all sorts of awesome ways, to allow the VAT to act as an array, and to allow pseudo-pointers and all sorts of crazy stuff (there will be normal arrays and regular pointers to be backwards-compatible with MLC 86).  Here's some pseudo-code to demonstrate what I mean (kind of a combination of C and MLC and a made-up language :Ptongue.gif):

%int=534  // First VAT item
%int2=745 // Second VAT item
IntVatItem(1).name="int2" // Change first VAT item's name to int2
IntVatItem(2).name="int" // Change first VAT item's name to int
%int3=55555; // Make third VAT item
// Time to use the VAT as an array
for(%a=0;%a<3;%a++){
IntVatItem(%a).value=%a
if(IntVatItem(%a).name="int2"){
display("Name is int2")
}
}
Title: MLC 68k
Post by: bfr on December 29, 2006, 07:04:00 am
Here's the new MLC website (it's under construction though...):

http://bfr.tifreakware.net/cgi-bin/mlc.cgi

(My new website is at http://bfr.tifreakware.net)
Title: MLC 68k
Post by: DJ Omnimaga on December 31, 2006, 09:25:00 am
wow nice so far, you need to update some of the links tho. Omnimaga still says RPG headquarter while it is also a programming group now and it still go to the old URL
Title: MLC 68k
Post by: elfprince13 on December 31, 2006, 01:27:00 pm
hehe, and its no longer really multi calc either :Ptongue.gif just a fun new language. anyway, awesome work, do you have any sort of functional demo?
Title: MLC 68k
Post by: DJ Omnimaga on December 31, 2006, 01:59:00 pm
wow bfr i missed your post above the one about your site, I,M glad this will support number higher than 255 or 65536. Does it still run fast?
Title: MLC 68k
Post by: Halifax on December 31, 2006, 09:05:00 pm
wow how do you do that?? make it support numbers higher than 65536. What do you like combine 16 bit registers to make a 32 bit register?
Title: MLC 68k
Post by: Liazon on January 01, 2007, 03:11:00 am
or using floating point registers.  68k is 32 bit anyways.  iirc it has 16 32 bit registers for addressing and data manipulation purposes
Title: MLC 68k
Post by: bfr on January 17, 2007, 12:34:00 pm
So, MLC has been coming along...slowly.  The next steps are to complete the string parser, the variable name parser(s), the new VAT system for pictures, and the new VAT system for strings.

Would you all be interested in a demo?  I've got finals coming up soon, but if you would like, I could release a demo of MLC within a few weeks.

Also, I'm trying to keep MLC 68K backwards-compatible with MLC for the TI-86, but I'm not sure if it's going to be completely compatible with MLC for the Casio AFX, unfortunately, because there was little communication between the one programming MLC for the Casio AFX.  The MLC converter will take care of any minor incompatibilities though between MLC 68K and MLC for the TI-86 (and hopefully for the TI-83+, some time), such as changing "|" to indicate a command, supported by MLC 68K but not MLC for the TI-86, to a "#" to indicate a command.  I might just have the converter generate errors or warnings for major incompatibilities, such as advanced VAT manipulation.  Hopefully, even if MLC 68K and MLC Casio AFX are completed independently, I can let the MLC converter handle any incompatibilities.
Title: MLC 68k
Post by: DJ Omnimaga on January 17, 2007, 02:07:00 pm
sound nice, any screenshot planned soon?
Title: MLC 68k
Post by: bfr on January 17, 2007, 02:20:00 pm
Hmm...I could take new screenshots, but there wouldn't really be anything interesting to take a screenshot of at the moment.  Watching variables being declared isn't very exciting.  :Ptongue.gif  Once I complete all of these parsers and VATs (which could take anywhere from probably a couple weeks to maybe a month or so), though, then loads of new commands are going to be implemented, including graphics/sprites/tile-mapping commands, which is going to be a good thing to take screenshots of.  
Title: MLC 68k
Post by: DJ Omnimaga on January 17, 2007, 03:07:00 pm
aaah ok i was just asking in case there was new addition into graphics or example of games in action :Dbiggrin.gif
Title: MLC 68k
Post by: lachprog on January 18, 2007, 08:15:00 am
Nice to see that MLC is progressing :)smile.gif
I'm looking forward to be able to program in this!

And btw, a demo would be nice  ;)wink.gif
Title: MLC 68k
Post by: DJ Omnimaga on January 18, 2007, 01:09:00 pm
hey lachprog nice to see you there! And yea mlc sound nice I can't wait to see it in action :)smile.gif

(now i should remember to check mario 68k progress more often as well %)rolleyes2.gif )
Title: MLC 68k
Post by: bfr on April 04, 2007, 09:27:00 am
I'll try to get a demo up sometime (which might not be until summer, but...).  

Anyway, after not working on MLC 68K in months, and having a lot of time due to Spring Break, I decided to work on it.  The code was really disorganized (because things were in the middle of being changed from the static VAT to the dynamic VAT, and because I also just have a bad habit of coding things in a disorganized way) and hard to make sense out of, especially after not doing much C for a while, and there were routines that were partially finished which I didn't really know where I left off, so I've just created a new TIGCC project file (this is not really a new project...just a different file) for an organized rewrite.  Basically the only things that I don't need to rewrite are the initial MLC program detection/checking for the "MLC:" header, and the mathematical expression parser (the string parser was supposed to be easier, yet I never finished it...).

I'll hopefully have a cool screenshot (or even demo, but probably not) to show to you all by this Saturday, but if not, then the next progress on MLC might occur as late as in May or June, due to a really intense forth quarter history project and other things....
Title: MLC 68k
Post by: Madskillz on April 07, 2007, 04:16:00 pm
Sounds great bfr...sorry it has been taking me so long, but I have one month left until summer break. I will however hit this again probably sometime in the coming week. I have been coding like mad lately on a few different projects, I am gonna see how many I can get done before school starts again in the fall. I working MLC demo for the 83+ is high on my list. There WILL BE A DEMO hopefully before June, but for sure before July.
Title: MLC 68k
Post by: bfr on April 07, 2007, 04:48:00 pm
Awesome, and nice to see you here, Madskillz.  :)smile.gif

I seriously would be really upset with myself if I don't finish MLC within a year (it will hopefully be done by the end of this summer), and there should be a demo probably whenever after I get sprites or something cool like that finished (which might be sometime around June or July).  I could release a demo now, but stuff like pausing and clearing the screen and declaring variables isn't that exciting.  I'm not really going to be able to work on MLC much the rest of this school year, particularly during the next few weeks, because I have a lot of work - mainly a dreadful forth quarter history project in which I must prepare a varied lesson plan for a few weeks for a unit and then present, in front of the class, a portion of it.
Title: MLC 68k
Post by: bfr on April 18, 2007, 12:44:00 pm
I didn't have much homework today, and I accidentally left my mathematics book at school, so I decided to work on MLC today and yesterday (I forgot my book both days :Ptongue.gif).  Anyway, I made some progress on the string parser and the declaration of strings.  At the moment, the string parser can parse literal strings, which wasn't really complicated to code, and strings can be declaraed.  What still needs to be done?  The string parser can't parse variables that are strings yet, and the values of strings that are already declared can't be changed.  Both of these things should be fixed by the end of this weekend.

Here's a screenshot:  user posted image

The weird stuff being displayed is temporary debugging stuff that shows that it is working, and the error that occurs at the end is because I didn't make the program counter update by the proper amount after declaring a string (which should be fixed by this weekend).
Title: MLC 68k
Post by: Insanity on April 18, 2007, 12:47:00 pm
*Insanity
Title: MLC 68k
Post by: Liazon on April 19, 2007, 04:32:00 am
89 has more compatibility w/ old games AFAIK, 89t just has a lot of flash

good work bfr!
Title: MLC 68k
Post by: graywolf on April 19, 2007, 11:01:00 am
Very nice!

And 89t might support usb68k in the future  ;)wink.gif  (for game storage :Ptongue.gif).
Title: MLC 68k
Post by: bfr on April 21, 2007, 12:07:00 pm
Thanks for the support, Insanity, Liazon, and graywolf!  It really keeps me motivated.  :)smile.gif

And I just finally finished stuff with strings!  Meaning that the string parser is finally complete, and strings can be declared and their values can be manipulated.  :)smile.gif  This also means that more commands are going to be on their way that use strings and/or numbers for arguments, such as the "text" command.
Title: MLC 68k
Post by: Halifax on April 21, 2007, 12:44:00 pm
Has any work been done on the z80 version of MLC?
Title: MLC 68k
Post by: bfr on April 21, 2007, 01:21:00 pm
Sorry, I don't know, Madskillz would know.

EDIT:  I got part of the "text" command working.  Its syntax is:  text x,y,"String",color .  I also am going to try to make it so that the string parser can convert numbers into strings.

EDIT AGAIN:  The text command almost completely works.  Here is a screenshot:  user posted image

ANOTHER EDIT:  Grayscale text is now supported.   B)cool.gif
Title: MLC 68k
Post by: graywolf on April 22, 2007, 10:30:00 am
Grayscale text?!?! That's amazing.
Title: MLC 68k
Post by: bfr on April 22, 2007, 11:10:00 am
Grayscale pixel plotting(/erasing, I guess, if the pixel drawn is white...) has been added.  :)smile.gif

I've been kind of banned from programming though (my mom...) for two weeks (but I have a lot of homework then anyway), except I'm allowed some time on Friday, so don't expect much progress for until those two weeks are over  :/confused.gif:(sad.gif

Title: MLC 68k
Post by: bfr on June 15, 2007, 05:30:00 am
I think it's about time I make the "MLC tokenizer."  It is a seperate program that converts MLC programs that are made of readable code into smaller and more compact tokens (that are consequently read faster, so MLC programs would run faster).  The actual MLC "shell" will then parse the tokens.  

I have a question though - what should the tokenized program be?  A text file?  If so, then it would be editable (even if it is kind of unreadble) from the Text Editor.  Or A custom file type?  This would make it uneditable from any of TI's editing applications, and would allow for "closed-source" programs (although it wouldn't be too hard to make a detokenizer that converts the tokens in the custom file type back into readable code in a text file).

EDIT:  I might be able to make it so that users will be able to choose whether the tokenized program is stored in a text file or a custom file, but then I might have to modify some code in the MLC parser/shell....
Title: MLC 68k
Post by: bfr on December 27, 2007, 12:43:00 pm
It's been a while....  But I also said I wouldn't let MLC die.

I worked on the MLC tokenizer for a few hours yesterday, and then for a few more hours today (after not working on it in months)...and now it's finished.

What does it do?  It converts human-readable MLC source code (stored in a TI-OS text file) into a more compact format (the custom MLC file type).  This of course not only makes the resulting program smaller, but makes the MLC interpreter able to interpret it faster.

While at the moment it's fully functional and supports tokenization of all of the MLC commands, I still could probably improve it a bit more to not only make the resulting tokenized programs be smaller, but the MLC tokenizer itself be smaller.

Anyway, to give you an example of how much smaller it can make MLC programs, here are some sample inputs and outputs:

Input: 30 bytes Output: 21 bytes
Input: 51 bytes Output: 42 bytes

UPDATE: I've actually found a bug when tokenization certain source files...I'll hopefully have it fixed soon

EDIT:  The bug is that for whatever reason, sometimes the calculator freezes with the BUSY indicator (TIGCC programmers here...what is this normally a sign of?) after tokenizing a file.  Even if you don't know anything about TIGCC/C, any testing at all would be nice.

You can download the latest version of the MLC tokenizer with the following links (Remember: The MLC tokenizer is still unstable and may damage your calculator, download at your own risk) http://bfr.tifreakware.net/miscarchives/mlc/mlctok.89z http://bfr.tifreakware.net/miscarchives/mlc/mlctok.9xz http://bfr.tifreakware.net/miscarchives/mlc/mlctok.v2z

Note that the file type of the outputted program should be "MLC", and NOT "EXPR" or anything else.  http://web.archive.org/web/20060710202041/http://dysfunction.earthforge.com/?p=mlc-readme.php lists some commands you can test with (don't worry about the arguments for the commands...anything, correct or not, should be able to be tokenized at the moment).  You can also try typing in random text to see what happens.  Anything with the "MLC:" header should get tokenized, otherwise, the tokenizer should return an error.
Title: MLC 68k
Post by: DJ Omnimaga on December 27, 2007, 01:37:00 pm
great that you're working on this again, I hope to be able to make games soon :)smile.gif
Title: MLC 68k
Post by: Liazon on December 28, 2007, 04:55:00 pm
good to hear you're still working on this