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.

Dream of Omnimaga

Is it due to the GIF or does the game really run at 4 FPS on a real calc? 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 November 08, 2016, 11:11:12 PM
Is it due to the GIF or does the game really run at 4 FPS on a real calc? O.O
It's the framerate. The game itself is pretty smooth, and I've added a Pause too, or it would run too fast!

Dream of Omnimaga

Ah ok, I was a bit worried since, after all, it's Pong lol. In any case, I can't wait to give this and GalagICE a try :)
  • 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'm very happy to say that ICE v1.2 is ready :)

Download here: (sorry, file size is too big)
https://tiplanet.org/forum/archives_voir.php?id=587211

Dream of Omnimaga

#244
Awesome! I'm gonna check it out soon. Does it contain a quick doc about each command syntax and stuff?

EDIT: @PT_ I can't get Pong to work properly, even with the latest Libload:



I can move the pad but it moves at about 10 pixels a second, the ball doesn't move and everything flickers like mad D: . Is it because I am using OS 5.1.5?

EDIT: Also there is a bug: When you compile a program then go to the 2nd+LINK menu, if you press 2nd+MODE to quit back to the home screen then the calc freezes with the run indicator active.
  • 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_

That PONG 'bug' is maybe because I didn't update my example ;)
I will upload a new version soon, but that's not a bug :P

However, I can't exactly replicated your second bug, and I'm not sure I understood it correctly. Can you elaborate that more? :)

Dream of Omnimaga

#246
Compile a program, then go to the calculator linking menu (where you can send/receive files). From there, if you quit with 2nd+Quit (mode), the calculator freezes.


EDIT: I tried on-calc (OS 5.2) and I had no issues @P_T
  • 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 will upload soon a revised version, with some minor bugs fixed, and more examples, to make it more clear what you can do with ICE ;)

This is the famous bounce program:

It should run smooth!

Source:
[i]BOUNCE
det(0
det(5,0
[maxY]0,8,8,"0000E0E0E0E0000000E0E0E0E0E0E200E0E000E2E2E2E2E2E0E2E2E2E2E2E7E7E2E2E2E7E7E7E7E7E2E7E7E7E7E7E7E700E7E7E7E7E7E7000000E7E7E7E70000"
For(G,0,19
remainder(rand,312->L1(G
remainder(rand,232->L1(G+20
1->L1(G+40
1->L1(G+60
End
det(2,0
Repeat getKey
For(G,0,19
L1(G->H
L1(G+20->I
det(42,H,I,8,8
If H=312 or not(H
0-L1(G+40->L1(G+40
End
If I=232 or not(I
0-L1(G+60->L1(G+60
End
H+L1(G+40->L1(G
I+L1(G+60->L1(G+20
det(59,0,L1(G),L1(G+20
End
Pause 5
End
det(1


Copy this into SC, download it, and try it yourself! :D

Dream of Omnimaga

So I hit a roadblock: TokenIDE Convert to hex option is greyed out when I am in xLIBC mode and SOurceCoder lacks xLIBC sprite conversion. MateoC tells me that ConvPng lets me convert my sprites to C/ASM format, but the ICE format is way different, so for now I'll probably be stuck either using low quality sprites converted using Find/replace in Notepad++ after converting them to BASIC colors, or hope for some converter that supports ICE format. D:

  • 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

MateoConLechuga

#249
I added an option to ConvPNG in order to output in the ICE format. Here's how to use it; just post any bug if you have problems :)

1) Download the 5.4 ConvPNG prerelease from here

2) Create a file called "convpng.ini" (Without the quotes, also mind the extension)

3) Copy and paste these lines into convpng.ini:

#GroupICE            : ice_gfx
#Palette             : xlibc
#PNGImages           :


Now, below the #PNGImages line you can simply add the names of the png files you wish to convert, as long as the png files are in the same directory as convpng. For example, if I have 3 pngs named xxxx, yyyy, and zzzz, this is what my convpng.ini file would look like:

#GroupICE            : ice_gfx
#Palette             : xlibc
#PNGImages           :
xxxx
yyyy
zzzz


To run convpng, simply double click on the convpng.exe file. Output will be written to ice_gfx.txt

Enjoy :)



Dream of Omnimaga

Ooh thanks! That's nifty. That tutorial should be included with ICE I think. :)

I converted 1 sprite for now, to see what would happen and this is the data:

(1) | 258 bytes
"10102B2B2170707070210A0A2A0A534B2A2A2A2B212B4B4B4B212B732A4B534B2A2A2A2A212A2A2A2B21534B2A2A532B2A2A2B2B212A2A2B2A212B2B2B2A734B2A2B2121214B732A53212121212121212121212121212121212121212B4B532A2A214B532A53212121212A0A534B2B2A2B21744B2A2B212A2A2A2A2A532B2B2A2B212A2A0A53212A2A2A2A2A532B2A2A2B214B4B2A4B212A2A2A2B0A532B2B2A2B21532B2A2B212A2A2A2A2A212121212121732B2B2A212A4B4B53534B534B532121532B2A2B212A2A4B2B2B2A4B2B2B212A532B2A2A212A532A532B2B2B2A2B2121532A2A2B212A2121212121212121210A70707021212A21212121212170707070"


Is that right? Also does it contain the width/height?


Also PT_ I tried the ball demo and the speed is insane O.O. Great job on ICE so far.
  • 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

MateoConLechuga

Sorry, I think I may have forgotten to tell you I fixed the link. Downloading convpng.exe again from the above link should give you the proper width/height again :)

Also, PT_, can you explain why you did not encode the width/height in the string?

Dream of Omnimaga

  • 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_

#254
I've updated ICE v1.2.1 to v1.2.2 :)

There are now more examples to learn from (5 in total [BOUNCE, FLOODIT, GUESS, PONG, SIERP], more are maybe coming soon ;)), and I've included a post of Mateo where he explains how to convert images to ICE sprite data.

Download ICE Compiler

Have fun! :P

Powered by EzPortal