Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: Deep Toaster on January 10, 2013, 03:34:36 pm

Title: DT's ultimate unit converter
Post by: Deep Toaster on January 10, 2013, 03:34:36 pm
Looking through my random junk pile on my flash drive, I found a lot of little tools I'd never published.

Here's a unit converter (I think from 2010) that converts a lot of units. Some stats:Mainly I just like it because it's intuitive. I'm not sure the units I picked were the most useful ones, though. If you try it and find one of the conversions categories is missing a unit you use a lot, please tell me :)

DOWNLOAD (http://www.ticalc.org/archives/files/fileinfo/453/45354.html)
Title: Re: A lot of conversions
Post by: Link on January 10, 2013, 03:37:02 pm
o.O Wow, I didn't know there were that many units. How did you get that black background behind the word Conversion though?
Title: Re: A lot of conversions
Post by: Deep Toaster on January 10, 2013, 03:38:36 pm
o.O Wow, I didn't know there were that many units. How did you get that black background behind the word Conversion though?
TI-BASIC menu titles are white-on-black.
Title: Re: A lot of conversions
Post by: Link on January 10, 2013, 03:40:30 pm
Oh, I never actually used the menu command, probably that's why...
Title: Re: A lot of conversions
Post by: TIfanx1999 on January 10, 2013, 03:41:13 pm
Other wise, there is an ASM flag for inverted text that can probably be accomplished with a small Hex program.
Title: Re: A lot of conversions
Post by: Deep Toaster on January 10, 2013, 03:46:57 pm
Oh, I never actually used the menu command, probably that's why...
It's usually not that great of an idea because using labels in any way tends to slow down the program (I think, not sure), but since this is a utility and not a game it doesn't matter much.
Title: Re: A lot of conversions
Post by: Sorunome on January 10, 2013, 05:40:17 pm
Oh, I never actually used the menu command, probably that's why...
It's usually not that great of an idea because using labels in any way tends to slow down the program (I think, not sure).
It does slow down the program, but i think only while jumping and IIRC DCS had a custome lbl/goto routine which was quicker.

And that are a hole lot of units to convert O.o
That mustve have taken long, lol
Title: Re: A lot of conversions
Post by: Spenceboy98 on January 10, 2013, 05:48:29 pm
Ooo. Could I use this for my Equation Program(I'm too lazy to make my own)? I will give you credit.
Title: Re: DT's ultimate unit converter
Post by: Deep Toaster on June 26, 2013, 01:59:29 am
Dunno of anyone here wants to hear an announcement about a unit converter but ... it's posted to ticalc.org now (download link (http://www.ticalc.org/archives/files/fileinfo/453/45354.html) here).

There's a minor fix for a bug that caused Mass conversion not to show. If you find anything else, please let me know!
Title: Re: DT's ultimate unit converter
Post by: Keoni29 on June 26, 2013, 02:55:36 am
Add a converter for converting bases 2,8,10,16,26 etc.
Title: Re: DT's ultimate unit converter
Post by: Streetwalrus on June 26, 2013, 03:25:50 am
There's already that in Omnicalc and zStart makes it even more handy. ;)
Title: Re: DT's ultimate unit converter
Post by: DJ Omnimaga on June 26, 2013, 04:08:26 am
Add a converter for converting bases 2,8,10,16,26 etc.
That would be nice indeed. Omnicalc/Zstart have one, but the Omnicalc one was a bit confusing to use and some people don't have those apps installed anyway.
Title: Re: DT's ultimate unit converter
Post by: Deep Toaster on June 27, 2013, 12:12:41 am
Add a converter for converting bases 2,8,10,16,26 etc.
That's a good idea—think I'll add it in.

It might make the program significantly larger though because base conversion works in a very different way. (The six temperature units take up a large part of the program for the same reason.)
Title: Re: DT's ultimate unit converter
Post by: DJ Omnimaga on June 27, 2013, 02:33:10 am
By significantly, do you mean like 8000 bytes? O.O
Title: Re: DT's ultimate unit converter
Post by: Sorunome on June 27, 2013, 07:57:14 am
My guess would be more like 1k...
So in the programming you just store then like the ratio (exept for temp) and then put them into the same function?
Title: Re: DT's ultimate unit converter
Post by: Deep Toaster on June 27, 2013, 12:25:02 pm
Probably more like 400 bytes, which doesn't sound like that much but most of the other categories add around just 100 bytes each.

What I'm worried about is that it would have to be added to the common key-detection code, which would slow down conversion for all modes slightly. (All current conversion modes, except for Temperature, don't affect the main code at all.)
So in the programming you just store then like the ratio (exept for temp) and then put them into the same function?
Yep, that's why it's so small, and that's why Temperature and Base conversion are both heavier than the others—they don't align to ratios very nicely.