Join us on Discord!
You can help CodeWalrus stay online by donating here.

[TI-84+CE] ICE Compiler

Started by PT_, March 25, 2016, 08:14:17 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

PT_

Quote from: DJ Omnimaga on December 07, 2016, 07:53:01 PM
Awesome. You even got instant goto working. :D

Does it work with any code size and 2-byte tokens?
If everything went right, yes :trollface: Otherwise not, and then I need some more debugging :P

Dream of Omnimaga

#301
Bug report: Numbers can't be used into executable program names. If your header is something like [i]TEST2, the compiler gives an unsupported token error on Line 1.


Also I just tried the L4+Storepic trick and it doesn't work. Because when you run an ICE program, it clears out L4 content upon startup D:. So I guess I'll have to wait a little longer before external saves are supported D:


EDIT: Feature suggestion: Support for Cesium and Doors CE icons
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

PT_

Yep, I was aware of that bug, should be fixed quickly.

Oh well, that's a silent poke to add external variable storage? ;)

Yeah sure, also a nice feature, although for now only Cesium as it seems DoorsCE won't come out in months.

I'm currently working on displaying sprite with an index which is not a constant, but that doesn't work right now :trollface:

PT_

Added some stuff and fixed many bugs... the main change is that you don't need an index with DefineSprite(), it will now automatically insert that. To 'compensate' this, you can now display sprites with a variable index, like A+3 or even getKey, but be sure that sprite IS defined, otherwise you will get weird stuff :trollface:

Download: https://tiplanet.org/forum/archives_voir.php?id=587211

p2

Nice ^^  :)
seeing all those posts about ICE makes me wish I had the time (and a CE) to try it out, too >.<
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CAS, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

Dream of Omnimaga

Awesome to see we can now display sprites from a variable index. I think this is a must for games with multiple sprites :)

Also the commands list should probably specify that lists and indexes start at zero, in case people are unsure.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

PT_

I've uploaded a new version, which adds ReturnIf <exp>, which could be useful, along with many bugfixes nobody knows of. Also I will try to give you some examples about optimization of ICE code:

2+(2*A) can be (A+1)*2

If A=1 can be If not(A-1

For loops where the variable is not used, can maybe be optimized to a 'small For loop', like For(39

Repeat K:getKey->K:End can be Repeat getKey->K:End

66+(32*(B/4)) can be B/4*32+66

Download:
https://www.cemetech.net/programs/index.php?mode=file&path=/84pce/asm/ICECompiler.zip
https://tiplanet.org/forum/archives_voir.php?id=587211

Dream of Omnimaga

Ooh nice update. Thanks for the optimization tricks. Will you include them in the readme in the future? That could be handy :)

Also I didn't know we could do Repeat getKey->K O.O
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

PT_

Quote from: DJ Omnimaga on December 19, 2016, 05:35:03 AM
Ooh nice update. Thanks for the optimization tricks. Will you include them in the readme in the future? That could be handy :)

Also I didn't know we could do Repeat getKey->K O.O
No problem. You can do litereally everything in the Repeat condition as what you normally do, outside of functions, so Repeat getKey->K-3->L1(A)->B is definitely valid :trollface: but Repeat ClrHome is not valid, if I'm right :)

PT_

In case you didn't know, I'm making a new game in ICE for Cemetech Contest 18: Snowball Struggle



It is almost done, but I won't upload it before next Monday, as it is a competition ;)

(it seems to crash at the end of the gif but I already fixed that)

Dream of Omnimaga

I like it so far. I wasn't sure if this was made with ICE or C earlier. Glad to see ICE capabilities being showcased again. I hope this evolves into a full standalone game on ticalc :) (as well as GalagICE)


By the way, do you still plan to add the ability to store stuff into external lists in future releases or even appvars? That would be handy for highscores :) (especially that GalagACE supported highscores :P)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

PT_

Quote from: DJ Omnimaga on December 21, 2016, 09:59:19 PM
By the way, do you still plan to add the ability to store stuff into external lists in future releases or even appvars? That would be handy for highscores :) (especially that GalagACE supported highscores :P)
Yes, but I don't know when, as I have 0% motivation to make big changes :(

Dream of Omnimaga

SOrry to hear. D:

If all else fails, have you considered adding a new command that allows users to prevent ICE games from clearing L4 on startup? Everytime I launch an ICE program, L4 content is pretty much cleared and it would be nice if it was possible to keep what was left behind in it from the last time we launched an ICE program so that we can re-use that data in another ICE program. In summary, this would make the StorePic/RecallPic trick possible.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

PT_

I've finished the game! I've created 17 levels, from simple to extreme, the last one is almost unbeatable. I will upload it next week to the Archives (including the source) so that you guys can play it too. In the meantime, enjoy this screenshot :)



There are 2 Easter Eggs, one is pretty hard to trigger, but it maybe helpful. The other one was added accidentally, I was just playing and then I noticed it :P



ICE remark: I'm busy with adding pointers, currently debugging it, and it saved me 500 bytes lol

Dream of Omnimaga

Glad to see this finished. Good luck with the contest :) This looks very polished by the way :).

Also good luck with ICE pointers. From the IRC convo earlier, they seemed tricky to implement >.<
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Powered by EzPortal