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

Axe Interrupts stop working

Started by p2, August 17, 2016, 09:12:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

p2

I had the following code:

[spoiler].TRY03AXE
1->X
1->Y
fnInt(I,0)
Repeat getKey(15)
X+1->X
Output(1,1,X>Dec
Output(1,2,Y>Dec
End

Goto E

Lbl I
Y+1->Y
ReturnY

Lbl E
LnReg^r
[/spoiler]
It ended with B being set to 3 but X still counting... (Interrupt stopped working)
Then I modified it like this:
[spoiler].TRY03AXE
1->X
1->Y

Repeat getKey(15)
X+1->X
Output(1,1,X>Dec
Output(1,2,Y>Dec
fnInt(I,0)
End

Goto E

Lbl I
Y+1->Y
ReturnY

Lbl E
LnReg^r

I Put the call for teh Interrupt inside the main loop[/spoiler]
Like this it was working (both counting up)..

Then thanks to c4ooo I found another way it was working:
[spoiler].TRY03AXE
1->X
1->Y
fnInt(I,0)
Repeat getKey(15)
X+1->X
Output(1,1,X>Dec
Output(1,2,Y>Dec
fnOn
End

Goto E

Lbl I
Y+1->Y
ReturnY

Lbl E
LnReg^r

Now setting interrupts ACTIVATED every single time in the loop[/spoiler]
But why did the interrupt stop working in the first place? BEcause of the "Output" command or something?

Edit: Fixed massive use of wrong var names sorry >.<
  • 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)

c4ooo

Here's some working [and optimized] code:

.TRY03AXE
1->X->Y
Fix 5
fnInt(INTERRUPT,0)
Repeat getKey(15)
X++
ClrDraw
Text(0,,X>Dec)       .double comma is *Not* a typo
Text(0,9,Y>Dec)
DispGraph
End
LnReg^r
Return

Lbl INTERRUPT
Y+1->Y
Return

It should work. Anyways, what are you trying to accomplish here, if i may ask? :)

p2

#2
Just comparing the speed of the main loop to the interrupt (to see how fast the speed settings 0, 2, 4, 6 are ^^)

Edit:
Just tried jour code.
It works but the interrupt counter is like 10 times faster now O.o
Then the interrupt counter (Y) reaches 1000, the counter in the main loop (X) is only at 85... O.o
And was it the Output( causing the problem?
*Edit of Edit: Actually the interrupt counter is like 2-3x faster while the main loop is muuuuch slower >.<
  • 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)

c4ooo

For me, at speed "0", when the interrupt counter reaches 1000, the loop counter is at around 150. Well using graph screen is slower then home screen i guess;  also my interrupt code is about a dozen T-states faster then yours.

p2

When adding "Full" at the top of the code, I get 150 for X, too (with Y>999). But only the main loop speeds up, the interrupt remains the same speed it seems ^^
what calc are you using? :)
  • 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)

c4ooo

TI-84 plus. Also i dont use Full.

p2

#6
Is there any function to give you the exact time an interrupt at current speed would be triggered per second...? would be interesting >.>


Edit: quote from omnimaga:
Quote from: Hayleia on October 03, 2012, 03:16:42 PM
The speeds for the interrupts are as follow (according to Hot Dog):

Speed // 83+ // 84+
0 // 560 Hz // 512 Hz
2 // 248 Hz // 228 Hz
4 // 170 Hz // 146 Hz
6 // 118 Hz // 108 Hz


And shouldn't there be a warning like "Dont use Output( command it will break your interrupts" or something...?
(As far as I understand it that has been the problem?)
  • 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)

E37

Quote from: p2 on August 17, 2016, 10:00:02 AM
Is there any function to give you the exact time an interrupt at current speed would be triggered per second...? would be interesting >.>


Edit: quote from omnimaga:
Quote from: Hayleia on October 03, 2012, 03:16:42 PM
The speeds for the interrupts are as follow (according to Hot Dog):

Speed // 83+ // 84+
0 // 560 Hz // 512 Hz
2 // 248 Hz // 228 Hz
4 // 170 Hz // 146 Hz
6 // 118 Hz // 108 Hz


And shouldn't there be a warning like "Dont use Output( command it will break your interrupts" or something...?
(As far as I understand it that has been the problem?)
I see what you mean.
The command output sets the position of the cursor, but then is interrupted by the interrupt which moves the cursor.
When it returns back to the first output it continues where the cursor is and displays the text.
Output(x,y,exp)
is the same as :Output(x,y):Disp exp
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

p2

so if I just wanted to display something like a counter (always overwrite the last text at the same position) it'd be faster to once to Output(x,y) and then use nothing but a DISP inside a loop? :)
  • 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)

E37

Quote from: p2 on September 27, 2016, 09:11:00 AM
so if I just wanted to display something like a counter (always overwrite the last text at the same position) it'd be faster to once to Output(x,y) and then use nothing but a DISP inside a loop? :)
No you can't. Disp updates the cursor position. There is a way you can do it but you won't like it as much.
You can simply disable interrupts before the output and enable them after. Thankfully the disable and enable commands take only one byte each.
(what kind of project are you using interrupts on the home screen anyway? I have never heard of interrupts being used for anything other than greyscale)
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

p2

I'm not using it for any seroius project, just curious to learn some more about axe xD
aaaand used interrupt to display a counter since I'm stupid and I just wanted to see how fast these interrupts really are :3
  • 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)

E37

Quote from: p2 on September 27, 2016, 03:28:17 PM
I'm not using it for any seroius project, just curious to learn some more about axe xD
aaaand used interrupt to display a counter since I'm stupid and I just wanted to see how fast these interrupts really are :3
That's the best way to learn!
I hardly ever use interrupts. Unless you are doing a serious graphics projects, or need the most beautiful greyscale, it is best to leave interrupts alone.
More often than not, interrupts are not needed, simply displaying at the end of a loop is sufficient to create acceptable greyscale.
(plus it destroys L2 which is the biggest of all the free ram areas)
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

TheMachine02

Quote from: E37 on September 27, 2016, 03:33:43 PM
(plus it destroys L2 which is the biggest of all the free ram areas)

L1 is the biggest area  :P And it only destroy about 256 bytes of L2 (if I remember well) , so you can still use it.

E37

Quote from: TheMachine02 on September 27, 2016, 03:36:56 PM
Quote from: E37 on September 27, 2016, 03:33:43 PM
(plus it destroys L2 which is the biggest of all the free ram areas)

L1 is the biggest area  :P And it only destroy about 256 bytes of L2 (if I remember well) , so you can still use it.
No, that's untrue. L1 is the same size as L3 and L6.
L2 is the biggest at 800+ bytes.
Axe only lists L2 at 512 bytes, but the actual usable memory extends to beyond 800 (I don't remember the exact number)
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

TheMachine02

Quote from: E37 on September 27, 2016, 03:38:51 PM
L2 is the biggest at 800+ bytes.
Axe only lists L2 at 512 bytes, but the actual usable memory extends to beyond 800 (I don't remember the exact number)

https://www.omnimaga.org/asm-language/8384-free-ram-areas/

well, I guess it could work then. But yeah, who want more than 768 bytes anyway  :P

Powered by EzPortal