Full Version: Help Programming With MLC
kucalc
This thread is those who need help understanding or learning MLC (Multi-Platform Language for Calculators). Feel free to go ahead and ask your questions about MLC coding.
tommo91
I'm a little confused as to how the SHFT function works. When its used does it shift the screen in the direction and magnitude chosen (x and y values) and wrap things that go off the screen? or does it just move the screen in the direction chosen?
kucalc
SHFT will hopefully be working in the next release. But I should explain it anyway since it will probably be most likely supported in the next release.

The MLC documentation has it written out as this:
QUOTE
#SHFT - Used for scrolling, specifies looping state (-1 = Loop, 1-3 standard colors)


and are used to determine how many pixels to shift. let's you select if you want the pixels that have been "shaved" off to go fill the empty space caused by moving the picture.

For example:
CODE
#SHFT .0 .1 .-1

This moves the screen 1 pixel down along the y-axis. The .-1 indicates that the pixels "shaved" off go back to the top, thus in the STARS example, this creates a loop.
tommo91
Ahhh i see. If i don't want pixels to loop do i ignore the or make it '1'?
kucalc
I believe according to the MLC 1 standard, if you don't want the pixels to loop you set it to .0.
tommo91
I've got another question, i could probably work it out by looking at PHALANX or something but i'm at school at the moment... anyway. How is a sprite 'deleted' once its used. For example if i wanted to place a bomb or something expendable and then it is destroyed, where does it go? Is there a way to stop it apperaring without.. moving it off the screen?
kucalc
I believe there are different approaches to this. One way is to erase the bitmap by placing over a empty bitmap. Another way is to erase the screen and never draw the sprite again until it's needed.
tommo91
QUOTE (kucalc)
Another way is to erase the screen and never draw the sprite again until it's needed.


This is generally what i've been using, but it involves drawing everything again. For some reason I thought that "white" was transparent, i forgot i could just paste over with another bitmap.. biggrin.gif
kucalc
It's also time consuming when you have to erase everything and draw again. I would highly suggest using a "blank white" sprite and draw it over the old sprite.
Fez
just asking, is the on calc editor done. If not how long do you think it will take. Because it is a bit confusing learning to do it in note pad XD
kucalc
I almost forgot about that. I'll try getting work done on the editor soon.
Fez
WOOT laugh.gif
I reckon that this would be the best thing to on calc game making since... well... Casio BASIC XD
but seriously take your time. Some of the best things in history could have been better if they weren't rushed.
EG, Microphones that dont slip out of the holder XD
tommo91
QUOTE (Fez)
Because it is a bit confusing learning to do it in note pad XD


... I'm not sure the on-calc editor is going to be much different (correct me if i'm wrong kucalc smile.gif ) and personally i prefer typing on the computer to writing on the calc... but thats just me wink2.gif
kucalc
You guys can program with whatever tools you like. I too also like programming on my PC because it's a lot more comfortable (with the big keyboard and the comfy chair), but I also would like to program on my calculator because of that portability feature (programming in the restroom laugh.gif, jk, or anywhere).

What I was thinking about doing is using the fx-9860G's BASIC editor as the MLC editor, but after exiting MLC, it wipes the main memories so it would be pretty pointless.
Fez
QUOTE
programming in the restroom

Well most ppl seem to think Epiphanies happen on the can, so why not laugh.gif
etotheex
I have a quick question...
About bitmaps in MLC, is there a tool for creating them or something?
Or at least i would like to know how to interpret them myself.

-Etotheex
kucalc
Hello Etotheex and welcome to the UCPF! biggrin.gif
QUOTE (Etotheex)
About bitmaps in MLC, is there a tool for creating them or something?

Yes, you can download this utility: http://ucpf.programbytes.com/downloads/details.php?file=4. Hope it helps. smile.gif
etotheex
Hi and thanks.
I got that sorted (and i worked out the method of creating them without the tool).
kucalc
No problem. smile.gif That's great to hear.
Fez
i think it will be kool if someone writes a tutorial for MLC. I want to get into MLC but can't be bothered learning from reading. Remember menno on CK and he made a tutorial for making pong on SDK, how about someone writes a tutorial to make pong on MLC?
XD i think it's a good idea XD
kucalc
That doesn't sound bad. A tutorial would be awesome. biggrin.gif
bfr
MLC 68K (for the TI-89/TI-92+/Voyage 200) is nearing completion (all that's left are sprites/bitmaps/tilemaps, the WRTE and READ commands, and a few small other things, such as having FRUN and FGOB not mess up the counter which keeps track of which line is currently being run, for the user's convenience), but there a few things I'm uncertain about. I don't remember all of them now, so I'll post the rest later.

1. What is the format for bitmaps?
2. Which variable types do you allow WRTE and READ read and write? What's the maximum file "position" you're supporting?
3. Are you requiring literal numbers to be prefixed with a ".'? I think I remember reading multiple documents that say that literal numbers (1,2,3, etc.) are supposed to be prefixed with a dot, but MLC for the TI-86 doesn't allow literal numbers to be prefixed with a dot. Currently, MLC 68K allows you to include or exclude the dot prefix.
E_net4
1.
CODE
8x8 bitmaps
#BITM [NAME 8
HHHHHHHHHHHHHHHH
HHHHHHHHHHHHHHHH
HHHHHHHHHHHHHHHH

16x16 bitmaps
#BITM [NAME 6
HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH

The first line is the light grey buffer, the second line is for the dark grey buffer, and the third is for the mask.
These are hexadecimal values. On 8x8 bitmaps, each 2 characters, wich represent 1 byte, store 8 pixels, since 1 bit = 1 pixel

3. You should follow the regular MLC "rules" and put a dot prefix on the values.

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.