Jump to content



Photo
- - - - -

Help Programming With MLC


  • Please log in to reply
22 replies to this topic

#1 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 09 September 2007 - 07:45 AM

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.

#2 Guest_tommo91_*

Guest_tommo91_*
  • Guests

Posted 14 September 2007 - 05:16 AM

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?

#3 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 14 September 2007 - 01:38 PM

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:

#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:
#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.

#4 Guest_tommo91_*

Guest_tommo91_*
  • Guests

Posted 16 September 2007 - 11:06 AM

Ahhh i see. If i don't want pixels to loop do i ignore the or make it '1'?

#5 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 16 September 2007 - 02:49 PM

I believe according to the MLC 1 standard, if you don't want the pixels to loop you set it to .0.

#6 Guest_tommo91_*

Guest_tommo91_*
  • Guests

Posted 17 September 2007 - 01:48 AM

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?

#7 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 17 September 2007 - 03:27 AM

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.

#8 Guest_tommo91_*

Guest_tommo91_*
  • Guests

Posted 17 September 2007 - 09:06 AM

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.. :D

#9 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 18 September 2007 - 12:22 AM

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.

#10 Fez

Fez

    Casio Freak

  • Members
  • PipPipPipPip
  • 162 posts
  • Gender:Male
  • Location:Australia

  • Calculators:
    Casio fx-9860G AU

Posted 23 September 2007 - 02:30 AM

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

#11 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 23 September 2007 - 07:58 AM

I almost forgot about that. I'll try getting work done on the editor soon.

#12 Fez

Fez

    Casio Freak

  • Members
  • PipPipPipPip
  • 162 posts
  • Gender:Male
  • Location:Australia

  • Calculators:
    Casio fx-9860G AU

Posted 23 September 2007 - 10:50 AM

WOOT :lol:
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

#13 Guest_tommo91_*

Guest_tommo91_*
  • Guests

Posted 23 September 2007 - 02:10 PM

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 :) ) and personally i prefer typing on the computer to writing on the calc... but thats just me ;)

#14 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 23 September 2007 - 06:10 PM

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 :lol:, 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.

#15 Fez

Fez

    Casio Freak

  • Members
  • PipPipPipPip
  • 162 posts
  • Gender:Male
  • Location:Australia

  • Calculators:
    Casio fx-9860G AU

Posted 25 September 2007 - 05:46 AM

programming in the restroom

Well most ppl seem to think Epiphanies happen on the can, so why not :lol:

#16 Guest_etotheex_*

Guest_etotheex_*
  • Guests

Posted 27 September 2007 - 02:03 PM

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

#17 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 27 September 2007 - 11:11 PM

Hello Etotheex and welcome to the UCPF! :D

About bitmaps in MLC, is there a tool for creating them or something?

Yes, you can download this utility: http://ucpf.programb...ails.php?file=4. Hope it helps. :)

#18 Guest_etotheex_*

Guest_etotheex_*
  • Guests

Posted 28 September 2007 - 08:33 AM

Hi and thanks.
I got that sorted (and i worked out the method of creating them without the tool).

#19 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 29 September 2007 - 01:28 PM

No problem. :) That's great to hear.

#20 Fez

Fez

    Casio Freak

  • Members
  • PipPipPipPip
  • 162 posts
  • Gender:Male
  • Location:Australia

  • Calculators:
    Casio fx-9860G AU

Posted 14 October 2007 - 03:20 AM

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

#21 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 14 October 2007 - 01:14 PM

That doesn't sound bad. A tutorial would be awesome. :D

#22 bfr

bfr

    Newbie

  • Members
  • Pip
  • 8 posts

  • Calculators:
    TI-84 Plus Silver Edition
    TI-86
    TI-89 Titanium
    Voyage 200

Posted 05 April 2008 - 06:31 PM

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.

#23 E_net4

E_net4

    Casio Freak

  • Members
  • PipPipPipPip
  • 189 posts
  • Gender:Male
  • Location:Output("Error: Coord type not specified");
  • Interests:Programming 'n' stuff...

  • Calculators:
    CASIO fx 9860G SD

Posted 09 April 2008 - 11:19 AM

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


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users