The shoutbox is currently out of service. Join us on Discord instead.
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: neuronix on July 01, 2016, 01:48:36 pm
In future release, ICE would compile all TI-Basic function?
The program ICE will be very big no?

No, because BASIC has many *useless* functions, that almost nobody uses, like ANOVA(, Fix 5 (no floating-point-numbers), a+bi and more.
Yep, ICE will be big, but I don't care about that. If it would be too big, I gonna implement the same routine as both Cesium and DoorsCE has, dividing itself into a launcher program, and a big, archived, main program ICE. For now, it's still < 8000 bytes.

DJ Omnimaga

That's not big IMHO. Also yeah I think you should stick to the essential game commands overall.

PT_

Oki, some *big* updates from me:
- located the program data at UserMem, no need to calculate offsets. it jumps to the actual data of ICE with this routine:
start:
ld hl, ICEName
call _Mov9ToOP1
call _ChkFindSym
ld hl, ICEStart-start+4 ; skip this pc routine + 4 bytes size+header
add hl, de
jp (hl)
ICEStart:
Now I can mess up UserMem easily
- the variables are now located at $E30800, which has 2 wait states, instead of 3, and thus you can save 1cc each time you get a variable :)
- implemented IS>( and DS<( for respecitively incrementing and decrementing variables :D
- another method for jumping to a function routine. Not a bunch of "cp XX \ jr nz, +_" but a jump table. Much easier for adding functions.

PT_

Compile archived programs:  :D
Pretty easy, but meh




DJ Omnimaga

That's nice :D. By the way, does ICE need to be installed in order to run ICE executables? And can we use a program icon for Doors CE?

PT_

July 02, 2016, 07:08:52 pm #140 Last Edit: July 04, 2016, 08:03:49 pm by PT_
Quote from: DJ Omnimaga on July 02, 2016, 06:31:08 pm
That's nice :D. By the way, does ICE need to be installed in order to run ICE executables? And can we use a program icon for Doors CE?

No. The compiled programs are pure ASM, and it doesn't need a library for it (if such one exists). And yes, in a newer version I gonna add both description+icon support for Cesium, and if possible DoorsCE.

Version 1.1.0: July XX, 2016
   ☑ Custom compiled program name
   ☑ Compile archived program
   ☑ getKey, rand
   ☑ Pause
   ☑ Direct incrementing/decrementing variables
   ☑ Changed accessing variables using ix, located at $E30800
   ☑ Lbl/Goto
-- not done yet --
   ☑ Input
   ☑ Display strings

DJ Omnimaga

Ah ok good. I was wondering because NewProg programs required a proprietary shell in order to run. I don't know if it's because programs used routines from the shell or if it was just because the author wanted things that way, but it was strange since programs were not interpreted.

Also nice additions for version 1.1.0 . Does Pause do like you first described, with a millisecond  delay?

On a side note, how many variables or list of variables can we use at the same time? Can we access them by typing a memory area offset or something? (like list elements in TI-BASIC)

PT_

Quote from: DJ Omnimaga on July 03, 2016, 04:30:42 pm
Ah ok good. I was wondering because NewProg programs required a proprietary shell in order to run. I don't know if it's because programs used routines from the shell or if it was just because the author wanted things that way, but it was strange since programs were not interpreted.

Also nice additions for version 1.1.0 . Does Pause do like you first described, with a millisecond  delay?

On a side note, how many variables or list of variables can we use at the same time? Can we access them by typing a memory area offset or something? (like list elements in TI-BASIC)

Yep, it's not necessary to have ICE installed to run the compiled program. I'm not sure about this is true: maybe I gonna add a token hook, which will 'add' some tokens, in order to have more functions in the CE. Like ReadLine(<line number>,<program> or so. NOT SURE THOUGH!!!
Pause is what I described, it pauses for some milliseconds.
For now, only the variables A-Z+theta are allowed - more than enough I think.
Sneak preview on v1.2: Sprites, GUI and-bits integers :)

DJ Omnimaga

What would ReadLine() do? Would it be like Celtic commands?

Also I think 27 variables is not enough unless you also support lists, because what if a game has tilemaps or what if someone makes an RPG with lots of data?

Also I can't wait for v1.2 :D. Hopefully I have more free time and am less tired when it comes out so I can try doing a little something. :)

PT_

It was more an example of what could be added. Or maybe changing IS>( to Inc( or so. Just a randomidea somewhere iin my giant brain ;)
Lists are not supported yet but you can use them in v1.2. Sorry I can't make more than 27 variables if they don't exists ;)
Hehe me too. I have made a to do list for the next three version XD and they look all promising. Maybe I should split it to more releases :)

Ti64CLi++

A new good feature is in the disp funtion:
If the string contain the character i (the imaginary i), I write the text after this char at a new line ;)
Administrateur de Tout 82
Sur TI Planet depuis Août 2014, rédacteur depuis Août 2015Donnez moi un Internet : c'est gratuit et ne prends pas beaucoup de tempsAdministrateur de Life Game World

DJ Omnimaga

Ooh nice idea actually. This is like @grosged Sprites library. Will Text() do that too? And will thr Text(-1 trick be supported?

PT_

July 04, 2016, 07:48:37 pm #147 Last Edit: July 04, 2016, 08:01:10 pm by PT_
Quote from: Ti64CLi++ on July 04, 2016, 02:06:16 pm
A new good feature is in the disp funtion:
If the string contain the character i (the imaginary i), I write the text after this char at a new line ;)

Sounds like a pretty good idea, but only useful for displaying pure strings, not something like Str0 or so.

Good news: Lbl/Goto works
Bad news: Lbl/Goto doesn't work


:trollface: 


EDIT: it works now fine. I declared the pointer to the compiled program name as a 1-byte integer, while it should be a 3-byte integer ;)

DJ Omnimaga

Wait, did the Lbl/Goto bug mess up your VAT or something in that screenshot? I hope it did not corrupt anything archive-related, though. That would be bad if you hit the OS certificate by accident and bricked your calc O.O

PT_

Quote from: DJ Omnimaga on July 05, 2016, 01:51:57 am
Wait, did the Lbl/Goto bug mess up your VAT or something in that screenshot? I hope it did not corrupt anything archive-related, though. That would be bad if you hit the OS certificate by accident and bricked your calc O.O

No, not really. I accidentally set the pointer to the compiled program name to $DD47E1 or something like that. Why it would mess up? I dunno. Btw, I use CEmu and I can easily redownload it ;)

Powered by EzPortal