Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: Happybobjr on December 18, 2010, 11:47:40 am

Title: Full Normal Slow?
Post by: Happybobjr on December 18, 2010, 11:47:40 am
Is there any was to make the calc run at something like 5mH? instead of 9?
In axe.


Could it be in a possible update?  How does the full/ normal speed thing work?
Title: Re: Full Normal Slow?
Post by: Ashbad on December 18, 2010, 11:54:55 am
The calc actually runs at 6mHZ regularly, and with Full it goes to 15.  I believe it sets a flag or something and then calls a routine in the OS to set the speed (I am really not sure ezxactly, but it is a built in thing)

to slow something down to let's say 2mHZ, just add an interrupt that has a pause in it or something -- though i wonder why yuo would want to do that :)
Title: Re: Full Normal Slow?
Post by: souvik1997 on December 18, 2010, 12:53:36 pm
I think it outputs something to port 20, iirc.
Title: Re: Full Normal Slow?
Post by: Munchor on December 18, 2010, 12:54:30 pm
What I do to make it run slow is to add lines to the borders :) it then runs slower :D
Title: Re: Full Normal Slow?
Post by: Deep Toaster on December 18, 2010, 01:05:22 pm
Is there any was to make the calc run at something like 5mH? instead of 9?
In axe.


Could it be in a possible update?  How does the full/ normal speed thing work?

It deals with calculator hardware. By default, all 8x models run at 6 MHz (which you can set explicitly using Normal). The 83PSE and 84 models have an option to run at 15 MHz instead (it's basically TI's own form of overclocking), but you can only choose between these two values because the hardware can only handle them.

If you want to make your program slower, just use Pause(#) inside the main loop, or if it makes your grayscale glitchy, use a DS<( loop with DispGraphr/DispGraphrr outside the block and everything else inside.
Title: Re: Full Normal Slow?
Post by: souvik1997 on December 18, 2010, 01:07:04 pm
It is actually underclocking, not overclocking.
Title: Re: Full Normal Slow?
Post by: Munchor on December 18, 2010, 01:07:26 pm
Quote
If you want to make your program slower, just use Pause(#) inside the main loop, or if it makes your grayscale glitchy, use a DS<( loop with DispGraphr/DispGraphrr outside the block and everything else inside.

We can indeed use it or ask Quigibo to make a Slow program in the next version :D
Title: Re: Full Normal Slow?
Post by: Runer112 on December 18, 2010, 01:50:20 pm
The processor can only run at 6MHz or 15MHz (with 15MHz not being available on the 83PBE). There is no "Slow" speed mode available.
Title: Re: Full Normal Slow?
Post by: Munchor on December 18, 2010, 01:51:52 pm
The processor can only run at 6MHz or 15MHz (with 15MHz not being available on the 83PBE). There is no "Slow" speed mode available.

It is impossible to make one? How bad... It is rarely useful, but still useful :)
Title: Re: Full Normal Slow?
Post by: DJ Omnimaga on December 18, 2010, 03:12:58 pm
To make a program run slower, just use plenty of Pause commands.
Title: Re: Full Normal Slow?
Post by: Happybobjr on December 18, 2010, 04:23:52 pm
I was thinking of saving power, not just to slow it down.
Title: Re: Full Normal Slow?
Post by: Runer112 on December 18, 2010, 04:26:56 pm
You can use Stop to halt execution until the next interrupt occurs. This is how the OS always operates when waiting for the user to direct input, as it saves power.
Title: Re: Full Normal Slow?
Post by: Happybobjr on December 18, 2010, 04:28:16 pm
but, this is for axe.
Title: Re: Full Normal Slow?
Post by: Deep Toaster on December 18, 2010, 04:28:58 pm
I was thinking of saving power, not just to slow it down.

Ah, in that case, no, unfortunately you can't. 6 MHz is the minimum.

You can always save some power by setting up auto-power down and use Stop (HALT) to slow down the program. Stop saves power by completely stopping execution until the next interrupt.

EDIT: Ninja'd. Twice.

EDIT2: Stop is an Axe command. In ASM it would be HALT.
Title: Re: Full Normal Slow?
Post by: DJ Omnimaga on December 18, 2010, 06:58:56 pm
I didn't knew stop could do that. I take it Stop can also be used to keep your program execution speed in sync with interrupts, right?
Title: Re: Full Normal Slow?
Post by: calcdude84se on December 19, 2010, 02:36:10 pm
It indeed can :)
For example, here's a program that should count upwards at about 5 numbers per second:
Code: [Select]
0->X
Repeat getKey(0)
For(A,0,21
Stop
End
Disp X+1->X>Dec,i
End
Title: Re: Full Normal Slow?
Post by: DJ Omnimaga on December 19, 2010, 04:03:23 pm
Ah that's cool ;D
Title: Re: Full Normal Slow?
Post by: Deep Toaster on December 20, 2010, 05:55:50 pm
Sort of unrelated, but that's what Mirage uses to pause the program when you press ON, right?
Title: Re: Full Normal Slow?
Post by: calcdude84se on December 20, 2010, 06:24:44 pm
Actually, it uses a custom interrupt. It pauses the program by simply not returning control until you release on ;D
Title: Re: Full Normal Slow?
Post by: Deep Toaster on December 20, 2010, 06:40:11 pm
:P I never see the simple stuff.
Title: Re: Full Normal Slow?
Post by: Munchor on December 23, 2010, 04:50:56 pm
Actually, it uses a custom interrupt. It pauses the program by simply not returning control until you release on ;D

I started using that today, thanks :) My Ahead game, I wanted it slower :)
Title: Re: Full Normal Slow?
Post by: calcdude84se on December 23, 2010, 05:51:46 pm
Do you mean using the [ON]+FKey (Y=, ZOOM, etc.) combos in MirageOS or do you mean using Stop?
If you used the former, note that not everyone who plays your game will be able to do that ;)
Title: Re: Full Normal Slow?
Post by: Compynerd255 on December 24, 2010, 12:34:39 am
I think that the best way to make a game slower is to embellish it. If you have a lot of processor power, don't waste it with Pause commands or whatnot. Make your game look better. Put in some nice looking grayscale or something!

But yes, if you are looking to save power, then I don't know how to help you. I don't think it can be done, unless you want to lower the contrast on the calc automatically (that should lower power consumption). The battery life on those things lasts for about a year anyway. AAA batteries aren't that expensive.
Title: Re: Full Normal Slow?
Post by: willrandship on December 24, 2010, 02:21:59 am
I know what you mean :P I consider it a special occasion when I change my batteries.
Title: Re: Full Normal Slow?
Post by: AngelFish on December 24, 2010, 02:42:57 am
The battery life on those things lasts for about a year anyway.

Not mine :P
/me berates himself for leaving his calc on for six hours with APD disabled.
Title: Re: Full Normal Slow?
Post by: jnesselr on December 24, 2010, 11:08:38 am
The battery life on those things lasts for about a year anyway.

Not mine :P
/me berates himself for leaving his calc on for six hours with APD disabled.
First off, congrats on 1000 posts. Second of all, I never disable APD. I don't think there is a way other than with ASM, is there?
Title: Re: Full Normal Slow?
Post by: Happybobjr on December 24, 2010, 08:20:56 pm
I think that the best way to make a game slower is to embellish it. If you have a lot of processor power, don't waste it with Pause commands or whatnot. Make your game look better. Put in some nice looking grayscale or something!

But yes, if you are looking to save power, then I don't know how to help you. I don't think it can be done, unless you want to lower the contrast on the calc automatically (that should lower power consumption). The battery life on those things lasts for about a year anyway. AAA batteries aren't that expensive.

when you start programing on your calc 24/7 you will see a major decrease in its life.
I occasionally leave it running for an hour to test the speeds of different commands.
Title: Re: Full Normal Slow?
Post by: Builderboy on December 25, 2010, 02:06:41 am
wow, an hour?  Usually 30 seconds is enough to see if there is any significant difference between commands
Title: Re: Full Normal Slow?
Post by: Happybobjr on December 25, 2010, 10:58:31 am
:P  I like knowing with more precision,
Title: Re: Full Normal Slow?
Post by: AngelFish on December 25, 2010, 03:58:11 pm
The battery life on those things lasts for about a year anyway.

Not mine :P
/me berates himself for leaving his calc on for six hours with APD disabled.
First off, congrats on 1000 posts. Second of all, I never disable APD. I don't think there is a way other than with ASM, is there?

Some TI-BASIC commands disable it and I forgot to exit the program, assuming that APD was on.
Title: Re: Full Normal Slow?
Post by: Iambian on December 25, 2010, 06:38:39 pm
If you are able to, use of the HALT instruction put the processor in a low-power mode until the next interrupt occurs. I suppose that would be the easiest way to save power in a program.

Asm(76) in a loop ought to work, tho I'm not sure if that's actually what Axe's pause command does.
Title: Re: Full Normal Slow?
Post by: Runer112 on December 25, 2010, 06:41:06 pm
Iambian, assembly's halt already exists as Axe's Stop. No need for using hex opcodes. :P
Title: Re: Full Normal Slow?
Post by: Deep Toaster on December 26, 2010, 04:59:50 pm
The battery life on those things lasts for about a year anyway.

Not mine :P
/me berates himself for leaving his calc on for six hours with APD disabled.
First off, congrats on 1000 posts. Second of all, I never disable APD. I don't think there is a way other than with ASM, is there?

Some TI-BASIC commands disable it and I forgot to exit the program, assuming that APD was on.

That once made me lose several of my BASIC projects >:( So from then on I added APD in my BASIC programs. It's pretty easy to do -- just set up a counter that sets up a Pause when time runs out, so that three minutes after that the calculator goes into APD.
Title: Re: Full Normal Slow?
Post by: DJ Omnimaga on December 26, 2010, 05:03:23 pm
The battery life on those things lasts for about a year anyway.

Not mine :P
/me berates himself for leaving his calc on for six hours with APD disabled.
First off, congrats on 1000 posts. Second of all, I never disable APD. I don't think there is a way other than with ASM, is there?

Some TI-BASIC commands disable it and I forgot to exit the program, assuming that APD was on.

That once made me lose several of my BASIC projects >:( So from then on I added APD in my BASIC programs. It's pretty easy to do -- just set up a counter that sets up a Pause when time runs out, so that three minutes after that the calculator goes into APD.
Usually when I stopped coding, I just did ClearEntries on the home screen, because I often accidentally launched a game/program, otherwise, thus, draining all my battery power while I am away and then causing a RAM clear.

Also back then I wasted one set of Duracells a month because I coded so much in one day.
Title: Re: Full Normal Slow?
Post by: Deep Toaster on December 26, 2010, 05:13:14 pm
The battery life on those things lasts for about a year anyway.

Not mine :P
/me berates himself for leaving his calc on for six hours with APD disabled.
First off, congrats on 1000 posts. Second of all, I never disable APD. I don't think there is a way other than with ASM, is there?

Some TI-BASIC commands disable it and I forgot to exit the program, assuming that APD was on.

That once made me lose several of my BASIC projects >:( So from then on I added APD in my BASIC programs. It's pretty easy to do -- just set up a counter that sets up a Pause when time runs out, so that three minutes after that the calculator goes into APD.
Usually when I stopped coding, I just did ClearEntries on the home screen, because I often accidentally launched a game/program, otherwise, thus, draining all my battery power while I am away and then causing a RAM clear.

Also back then I wasted one set of Duracells a month because I coded so much in one day.

At one point I had to switch batteries every two weeks ;D Good memories.

I still run ClearEntries when I turn off my calc because I keep leaving my spriter on and draining all my batteries.
Title: Re: Full Normal Slow?
Post by: jnesselr on December 26, 2010, 05:51:51 pm
What I hate is when I am coding, and I know I almost got it working, but got a "error: batteries need replacing".
Title: Re: Full Normal Slow?
Post by: Builderboy on December 26, 2010, 06:17:59 pm
So from then on I added APD in my BASIC programs. It's pretty easy to do -- just set up a counter that sets up a Pause when time runs out, so that three minutes after that the calculator goes into APD.

You know what?  Thats pretty nifty!  I think i am going to start doing that in all of my Basic programs :D
Title: Re: Full Normal Slow?
Post by: DJ Omnimaga on December 27, 2010, 03:02:53 pm
Yeah I thought about doing that before, but I was in extreme need of speed so I couldn't afford to lose 0.1-0.2 FPS on that.
What I hate is when I am coding, and I know I almost got it working, but got a "error: batteries need replacing".
I only get that when archiving and a garbage collect is needed. The worst part is when you want to backup your files from the TI-Nspire to the computer or another calc and it says batteries are low, archiving says batteries are low, but swapping batteries causes a RAM clear... Sadly, some TI-Nspire OSes won't save your RAM content in 84+ mode when changing batteries...
Title: Re: Full Normal Slow?
Post by: jnesselr on December 27, 2010, 03:36:21 pm
What I hate is when I am coding, and I know I almost got it working, but got a "error: batteries need replacing".
I only get that when archiving and a garbage collect is needed. The worst part is when you want to backup your files from the TI-Nspire to the computer or another calc and it says batteries are low, archiving says batteries are low, but swapping batteries causes a RAM clear... Sadly, some TI-Nspire OSes won't save your RAM content in 84+ mode when changing batteries...
When I'm doing USB stuff and transferring apps a lot, it kills the batteries.
Title: Re: Full Normal Slow?
Post by: DJ Omnimaga on December 27, 2010, 06:45:06 pm
WHHHHHHHHAAAAAAAAATttttttttttttt????????

Darn I guess those who would make multiplayer games via USB in the future should limit data transfers between calcs. X.x
Title: Re: Full Normal Slow?
Post by: jnesselr on December 27, 2010, 07:02:56 pm
WHHHHHHHHAAAAAAAAATttttttttttttt????????

Darn I guess those who would make multiplayer games via USB in the future should limit data transfers between calcs. X.x
It's not USB stuff that's killing it. I'm re-writing apps over and over again, because no emulator supports it. USB itself won't kill batteries any more than usual.
Title: Re: Full Normal Slow?
Post by: DJ Omnimaga on December 27, 2010, 10:47:13 pm
Oh phew, I was scared. X.x

On the PSP, when wi-fi is turned ON, batteries power is drained like crazy compared to normal.
Title: Re: Full Normal Slow?
Post by: Compynerd255 on January 27, 2011, 10:37:53 am
.
Oh phew, I was scared. X.x

On the PSP, when wi-fi is turned ON, batteries power is drained like crazy compared to normal.
That's because its using a transmitter to connect to a wireless router. Any sort of RF transmitter eats away power, which means that when you have any device connected to Wi-Fi, you should have your device connected to AC Power. USB is simply flipping on 5 V switches in a cable, which doesn't take nearly as much power. So USB on-calc isn't as serious a power drain, but Wi-Fi on calc...
Title: Re: Full Normal Slow?
Post by: Xeda112358 on January 27, 2011, 10:46:32 am
... would still be freaking awesome! I am thinking of hooking up old Gameboy SP batteries to my calc or modding it to let me plug it in to a power supply, anyway. I've done it with AA battery packs back in the day :P
Title: Re: Full Normal Slow?
Post by: DJ Omnimaga on January 29, 2011, 10:07:43 pm
Holy necropost o.o

Yeah I guess I understand though. If I ever get a wi-fi router I doubt I'll ever use my PSP in wi-fi mode unless necessary and when I do it will be connected all the time to the adapter. X.x
Title: Re: Full Normal Slow?
Post by: Xeda112358 on January 29, 2011, 11:44:52 pm
Wait, I just read something and now I want to know what "Stop" does in Axe.
Title: Re: Full Normal Slow?
Post by: ztrumpet on January 29, 2011, 11:45:31 pm
Stop = Halt = 76h
Title: Re: Full Normal Slow?
Post by: Xeda112358 on January 29, 2011, 11:47:04 pm
Well, I mean what is it supposed to do? I though stop would stop program execution.
Title: Re: Full Normal Slow?
Post by: ztrumpet on January 29, 2011, 11:47:58 pm
In TI Basic is Stops it.  In Axe is just waits for the next interrupt. ;)
Title: Re: Full Normal Slow?
Post by: Xeda112358 on January 29, 2011, 11:49:50 pm
Ah, okay. It seems like it would be more useful if it stopped the program, in my opinion. Then again, I don't code in Axe, so it might be better that way.
Title: Re: Full Normal Slow?
Post by: JosJuice on January 30, 2011, 02:01:22 am
Ah, okay. It seems like it would be more useful if it stopped the program, in my opinion. Then again, I don't code in Axe, so it might be better that way.
Isn't there another command that stops the program? Like Return or something...
Title: Re: Full Normal Slow?
Post by: Xeda112358 on January 30, 2011, 02:03:04 am
Oh, okay. Yeah I seem to remember that now... It has been a long while since I checked Axe... Doesn't that end calls and routines, too?
Title: Re: Full Normal Slow?
Post by: ztrumpet on January 30, 2011, 12:08:59 pm
Return is like ret in Assembly.  Basically, there's no "Stop program right now" command, but there's not one of those in Assembly either. ;D
Title: Re: Full Normal Slow?
Post by: Xeda112358 on January 30, 2011, 12:17:26 pm
Well of course there is! I use it in BatLib...
Just kidding, kind of. What I do is I save SP and then when I need to do an emergency exit, I jump to a call that restores SP and then exits.
Title: Re: Full Normal Slow?
Post by: Binder News on January 30, 2011, 03:03:52 pm
Couldn't that mess up the stack though?
Title: Re: Full Normal Slow?
Post by: Xeda112358 on January 30, 2011, 03:08:22 pm
Nope, that is why you save the stack pointer to a spot in RAM. Then, if you need to exit, you just restore it and use C9. So for example, in BatLib, OP5 and OP6 are never used, so I use some RAM there. Here is some code at the beginning:
ED73AF84

Then I have a call that ends with this (I call it HardExit):
F3             ;disable interrupts
ED7BAF84
C9
Title: Re: Full Normal Slow?
Post by: ztrumpet on January 30, 2011, 03:22:56 pm
Doesn't that fill up the stack though?  Couldn't that cause the stack to overflow if used enough?
Title: Re: Full Normal Slow?
Post by: calc84maniac on January 30, 2011, 03:45:18 pm
No, more like it empties the stack all at once.
Title: Re: Full Normal Slow?
Post by: Quigibo on January 30, 2011, 03:55:47 pm
Yeah, its a nice idea.  I use it in a lot of my programs, sometimes because I'm just too lazy to keep track of the stack, but the reason I don't have a single command for that in Axe is because its a 2 part command.  You would need a "save stack" and "restore stack" command.  Calling the restore stack without saving first though is pretty much a guaranteed ram clear.
Title: Re: Full Normal Slow?
Post by: Xeda112358 on January 30, 2011, 03:59:21 pm
Ah, okay! Cool! Again, I'm not Axe literate, so I was just curious. So are you saying that you can do this in Axe? There is a command to save it and a command to restore it? That would be useful for programs that require user input that could destabilize the stack.
Title: Re: Full Normal Slow?
Post by: Quigibo on January 30, 2011, 04:02:42 pm
No I don't actually have one yet since I can't think of a good token for it, but maybe I'll add that feature in the future.
Title: Re: Full Normal Slow?
Post by: Xeda112358 on January 30, 2011, 04:05:11 pm
Ah, okay. Still, it is pretty easy to just type in the hex if you find that you need it. I have used the Asm( token for Axe (but that is about it :D )
Title: Re: Full Normal Slow?
Post by: Builderboy on January 31, 2011, 11:50:40 am
Maybe Save and Restore Stack would make a good axiom :)