This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Technology & Calculator Open Topic subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Calculator Tech Support => Technology & Calculator Open Topic
Author Message
DJ Omnimaga
http://i-lost-the-ga.me


Calc Guru


Joined: 14 Nov 2003
Posts: 1196

Posted: 22 Dec 2003 08:29:39 am    Post subject:

Jedd wrote:
I don't think there is a program like that.  Are you worried about people breaking your program while they play?  Because if so, I wouldnt recomend taking that out.  When playing games its always better if the user can simply quit if something goes wrong or they just don't want to go through the menu to quit or something.

It cuz if someone breaks the prgm execution in a battle, he will not be able to restart the game again (especially if it's a n00b)

I will not put that prgm on my game until I finish it.


Last edited by Guest on 22 Dec 2003 08:35:12 am; edited 1 time in total
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 22 Dec 2003 11:16:27 am    Post subject:

62 52 53 53 wrote:
wait, wouldn't it block you from turning it off with the on key?

You turn it off with the [2nd][Off] key combination, not with [on].
Back to top
62 52 53 53
Formerly known as 62 52 53 53


Active Member


Joined: 30 May 2003
Posts: 607

Posted: 23 Dec 2003 03:11:29 pm    Post subject:

and the [off] key is really the same key as [on]
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 23 Dec 2003 04:01:01 pm    Post subject:

Yes, but it's pressed at the same time as [2nd]. Since the homescreen uses something like b_call(_GetKey) to get keys, a key with the 2nd function is different from the key by itself.

If you don't believe me, try pressing [2nd][Mem] to get a plus.
Back to top
DJ Omnimaga
http://i-lost-the-ga.me


Calc Guru


Joined: 14 Nov 2003
Posts: 1196

Posted: 21 Jan 2004 10:31:50 am    Post subject:

Jbirk wrote:
Done, check my members folder.

http://unitedti.org/members/jbirk/

the programs are yeson and noon.

Asm(prgmNOON to block the on button

and the other to unblock it.

You should use it within a basic program.

While 1
End

is an infinate loop, so to freeze your calculator, make a basic program like this and without the on break, you will have to pull a battery.

Asm(prgmNOON
While 1
End

A good test is:

Asm(prgmNOON
For(A,0,1000
Disp A
End
Asm(prgmYESON

I got a problem with NOON. Each time something is archived in my RPG, the ON key is enabled again and CODEX crashes when the ON key is disabled. Why?
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 21 Jan 2004 05:14:27 pm    Post subject:

I think it is because the two programs contradict each other. You might try

Asm(prgmYESON
whatever:Asm(prgmCODEX
Asm(prgmNOON
Back to top
Newbie


Bandwidth Hog


Joined: 23 Jan 2004
Posts: 2247

Posted: 02 Feb 2004 08:51:03 pm    Post subject:

What is the code for yeson and noon so I don't have to download it?
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 02 Feb 2004 11:23:15 pm    Post subject:

im not sure. YESON enables the on button, NOON disables it so that a prgm cant be broken. ask jbirk for the source-he wrote them
Back to top
Justin W.
Shattered Silence


Advanced Member


Joined: 24 May 2003
Posts: 429

Posted: 03 Feb 2004 02:43:53 am    Post subject:

Or you could ask another programmer that knows how it's done.... :lol:

It's a rather interesting trick I might add. It involves using a mode 2 interrupt to call the mode 1 interrupts with a twist. The mode 1 interrupt is used to detect keypresses, batt status, on key press, apd timer, etc etc. Mode 1 interrupts are the standard TIOS interrupts, Mode 2 interrupts are user defined.

As some of you may know we can block the On key from being detected by outputting a value to port 3.

By blocking the on key before each call of the mode 1 interrupts we can prevent the TIOS from recognizing that the On key has in fact been pressed. This is where the Mode 2 interrupt comes in. Rather than having the mode 1 interrupt executed normally, we use our interrupt to block the on key then call the mode 1 interrupt routines from within our interrupt.

The code below is tested and works quite effectively. It is a single program that accepts inputs from the Ans Variable and switches the OnBlock on/off accordingly. The total program size is smaller than JBirk's.

To turn the [On] Block on

0:Asm(prgmONBLOCK

To turn the [On] Block off
1:Asm(prgmONBLOCK


Code:
;************************************************
;OnBlock Program
;
;Installs a mode 2 interrupt to block the [On]
;keypress during basic program execution
;
;Written By: Justin Wales
;************************************************
.nolist
#include "ti83plus.inc"
.org userMem-2
.db $BB,$6D
.list


 bcall(_RclAns)
 bcall(_ConvOp1)
 ld a,e
 or a
 jr z,Install_Interrupt
 dec a
 ret nz
Uninstall_Interrupt:
 im 1
 ret
Install_Interrupt:
 di;disable interrupts (don't want an interrupt before we're ready)
 ld hl,$9900;start of interrupt table
 ld de,$9901;start of interrupt table +1
 ld bc,256;257 - 1 bytes to copy
 ld (hl),$9a   ;load $9a into (hl)
 ldir

 ld   hl,interrupt_start   ;\
 ld   de,$9a9a  ; | copy interrupt routine to $9a9a
 ld   bc,interrupt_end-interrupt_start; |
 ldir     ;/
 ld   a,$99
 ld   i,a  ;load $99 into I
 im   2  ;switch to mode 2
 ei     ;enable interrupts
 ret




Interrupt_Start:
 ex af,af'
 exx
 in a,($03)
 and %11111110
 out ($03),a
 call $003A
 reti
Interrupt_End:
.end
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 03 Feb 2004 08:26:18 am    Post subject:

would a res OnInterrupt thing work instead of the port output? or not?
Back to top
Justin W.
Shattered Silence


Advanced Member


Joined: 24 May 2003
Posts: 429

Posted: 03 Feb 2004 09:42:13 am    Post subject:

No it wouldn't work. The reason being that res onInterrupt,(IY+onFlags) only modifies the flag itself. It would still record the next [On] Keypress. By using port 3 to block the On key, when the mode 1 interrupts are called from our interrupt, the on key press will not be registered.
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 03 Feb 2004 05:45:11 pm    Post subject:

ah, i understand now. thanks for clearing that up Laughing
Back to top
Newbie


Bandwidth Hog


Joined: 23 Jan 2004
Posts: 2247

Posted: 04 Feb 2004 04:31:29 pm    Post subject:

Everytime I go to download his file and I chose to download it from this current position I get a message saying I can't edit it and it wont let me. whats wrong?
Back to top
Newbie


Bandwidth Hog


Joined: 23 Jan 2004
Posts: 2247

Posted: 06 Feb 2004 05:00:14 pm    Post subject:

Somebody give me the code flat out so I can copy and paste it to TI connect and transfer it to my calc. That is for NOOn and YESON. When I mean flat out no telling me whats happening. Smile
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 06 Feb 2004 05:21:28 pm    Post subject:

go to Cirrus Programming and there is an Assembly Disassembler. Use it.

Note: both those are links Laughing


Last edited by Guest on 06 Feb 2004 05:22:24 pm; edited 1 time in total
Back to top
Newbie


Bandwidth Hog


Joined: 23 Jan 2004
Posts: 2247

Posted: 06 Feb 2004 10:04:47 pm    Post subject:

How does the on block work. What would be the code for both if i wnated to edit the one i created? I want to be able to put in mirage OS but I cant because I cant edit them?

Last edited by Guest on 06 Feb 2004 10:05:51 pm; edited 1 time in total
Back to top
Fr0sty


Member


Joined: 27 Nov 2003
Posts: 202

Posted: 09 Feb 2004 11:50:36 pm    Post subject:

This is ASM. You can't edit ASM like a basic program (putting the ":" on the first line). Note: You CAN edit ASM, just not on your Ti calculator.
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 10 Feb 2004 12:25:42 am    Post subject:

correction. you CAN edit asm on your calc. it either looks like hex code (which it is) or random functions, make it impossible to make sense of
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 10 Feb 2004 07:46:39 am    Post subject:

You could also just program in hex on your calc, if you can remember all the codes.

I tried that on a friends calc once, problem was I made a mistake somewhere and his memory was cleared (he didn't like that) I warned him though Smile
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 10 Feb 2004 05:13:21 pm    Post subject:

I have a sheet somewhere of all or most hex equivalents of asm operations, that I put together using Calcsys's disassembler. If anybody really wants it I can post it.
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page Previous  1, 2, 3  Next
» View previous topic :: View next topic  
Page 2 of 3 » All times are UTC - 5 Hours

 

Advertisement