Author Topic: zStart - an app that runs on ram clears  (Read 341652 times)

0 Members and 1 Guest are viewing this topic.

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: zStart - an app that runs on ram clears
« Reply #555 on: November 19, 2011, 08:59:40 pm »
I'm not sure if this is related to zStart either, but whenever the calc garbageCollects the calc starts screwing up...I've gotten "ERR:?" twice now and it likes to deposit junk tokens on the homescreen.
Vy'o'us pleorsdti thl'e gjaemue

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: zStart - an app that runs on ram clears
« Reply #556 on: November 20, 2011, 02:03:10 pm »
(thepenguin will have a lot of posts to check :P)
Another one :P

Feature request:

-Instead of having one app/program set on start-up, I'd like to be able to set several ones, in a particular order. That would also mean that you would have to change the way of setting them :-/

-Instead of being able to only set 10 programs/apps with ON+[one digit number], I think that would be great if we could have several digits available, digits that we input while the ON key is pressed :D


After reading my post, it sounds to me that I only asked impossible things D:
« Last Edit: November 20, 2011, 02:03:21 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: zStart - an app that runs on ram clears
« Reply #557 on: November 20, 2011, 02:21:36 pm »
I just got another idea: maybe make it somehow possible to insert any hook and it is restored when ram is cleared. I don't know if that is possible..........

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: zStart - an app that runs on ram clears
« Reply #558 on: November 20, 2011, 02:38:42 pm »
Another problem that is not a bug: in a basic program with Input, we can do 2nd Quit and the temporary program stays in RAM.

That sounds fixable.

But what would be cool would be damn! I forgot my feature request! :O
Just remembered! It's about the editing when archieved.
It works fine and all if you move the curser to the program and then hit enter, but if I press e.g. 8 it gives me error: archieved.

I know about that, but that is a mega pain to do. It also has the potential to make you end up opening the wrong program ;D

I'm not sure if this is related to zStart either, but whenever the calc garbageCollects the calc starts screwing up...I've gotten "ERR:?" twice now and it likes to deposit junk tokens on the homescreen.

That's not related to zStart, but try this. I wouldn't doubt that you are very close to having a non-booting calculator.

(thepenguin will have a lot of posts to check :P)
Another one :P

Feature request:

-Instead of having one app/program set on start-up, I'd like to be able to set several ones, in a particular order. That would also mean that you would have to change the way of setting them :-/

I've thought about that, it wouldn't be very difficult to do that by setting a program in that position that runs all the other programs. I might make one of those sometime.

Quote
-Instead of being able to only set 10 programs/apps with ON+[one digit number], I think that would be great if we could have several digits available, digits that we input while the ON key is pressed

Ok, but this one wouldn't be easy. It would require major rewrites of anything that involves the appvar, which is like 50% of the app. Then, I would have to completely change how the ON hooks work. I can tell you with certainty that this will not happen. But, do you actually use all 9 shortcuts?

I just got another idea: maybe make it somehow possible to insert any hook and it is restored when ram is cleared. I don't know if that is possible..........

In principle that's not hard, it's just the whole UI that would go along with it would be messy. Not to mention it takes up variable space in the appvar.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: zStart - an app that runs on ram clears
« Reply #559 on: November 20, 2011, 02:42:45 pm »
I just got another idea: maybe make it somehow possible to insert any hook and it is restored when ram is cleared. I don't know if that is possible..........
Maybe somehow like a mix between the omnicalc options menu and the listing of the apps :)
In principle that's not hard, it's just the whole UI that would go along with it would be messy. Not to mention it takes up variable space in the appvar.

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: zStart - an app that runs on ram clears
« Reply #560 on: November 20, 2011, 02:50:57 pm »
(thepenguin will have a lot of posts to check :P)
Another one :P

Feature request:

-Instead of having one app/program set on start-up, I'd like to be able to set several ones, in a particular order. That would also mean that you would have to change the way of setting them :-/

I've thought about that, it wouldn't be very difficult to do that by setting a program in that position that runs all the other programs. I might make one of those sometime.
And it could launch apps too ? O.o That would be awesome :D

-Instead of being able to only set 10 programs/apps with ON+[one digit number], I think that would be great if we could have several digits available, digits that we input while the ON key is pressed

Ok, but this one wouldn't be easy. It would require major rewrites of anything that involves the appvar, which is like 50% of the app. Then, I would have to completely change how the ON hooks work. I can tell you with certainty that this will not happen. But, do you actually use all 9 shortcuts?
Yes I use all of them :P
Yeah, I knew it would be hard, but don't worry, some of the shortcuts I use are not important, and I can redefine them for something more important.
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: zStart - an app that runs on ram clears
« Reply #561 on: November 20, 2011, 03:03:10 pm »
I'm not sure if this is related to zStart either, but whenever the calc garbageCollects the calc starts screwing up...I've gotten "ERR:?" twice now and it likes to deposit junk tokens on the homescreen.
That's not related to zStart, but try this. I wouldn't doubt that you are very close to having a non-booting calculator.
Yeah, I use that fairly often :/
[offtopic]So for the booting thing, would it be possible to fix it with Flashy or something?[/offtopic]
Vy'o'us pleorsdti thl'e gjaemue

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: zStart - an app that runs on ram clears
« Reply #562 on: November 20, 2011, 06:23:38 pm »
And it could launch apps too ? O.o That would be awesome :D
Hmm, that seems useful and doable O.O Would it just require finding the app page and jumping to 4080h?

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: zStart - an app that runs on ram clears
« Reply #563 on: November 20, 2011, 06:55:14 pm »
I think zstart already have that feature. :D
Sig wipe!

Offline DrDnar

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 546
  • Rating: +97/-1
    • View Profile
Re: zStart - an app that runs on ram clears
« Reply #564 on: November 20, 2011, 07:14:15 pm »
And it could launch apps too ? O.o That would be awesome :D
Hmm, that seems useful and doable O.O Would it just require finding the app page and jumping to 4080h?
No. You have to parse the app's header to figure out where its executable code begins; the OS starts an app right after the last byte in the header. There is no need to pad the header to 80h bytes. Fortunately, the OS provides a BCALL that does all of this for you, ExecuteApp. This will probably leak RAM if called from within a RAM program unless you deallocate yourself first.

Incidentally, you can also put whatever you want in the datestamp signature field. Nothing ever checks that signature.
"No tools will make a man a skilled workman, or master of defense, nor be of any use to him who has not learned how to handle them, and has never bestowed any attention upon them. . . . Yes, [] the tools which would teach men their own use would be beyond price."—Plato's The Republic, circa 380 BC

Offline DrDnar

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 546
  • Rating: +97/-1
    • View Profile
Re: zStart - an app that runs on ram clears
« Reply #565 on: November 21, 2011, 04:26:31 am »
Double post for an update: the following assembly program will execute the application named in Ans. This program never returns. Note that applications whose name is less than 8 characters are normally padded with spaces at the end.

This should go without saying, but don't run this from within a shell. (zStart doesn't count as a shell in this case.) It completely subverts the normal way that assembly programs are supposed to quit. Any assembly program can copy itself to scratch RAM and do ld hl, 9D95h \ ld de, (asm_prgm_size) \ b_call(_DelMem) \ b_call(_JForceCmdNoChar). This is what the below program does, except that instead of executing the internal homescreen app, it runs the app you've chosen. This is a horrible way to quit if you're running from within a shell.

Edit: Possible bug fixed due to incorrectly correct .org.

Source:
Code: [Select]
; ExecApp
; This assembly program transfers control to the application named in Ans.  This
; program never returns, unless the application does not exist, or you fail to
; specify a valid name.
; This can probably be improved quite a bit.  Do feel free to steal this source
; and use it in your own, more complete multi-program runner.

.nolist
#include "ti83plus.inc"
;_ExecuteApp .equ 4C51h
.list

curStrPos .equ appBackUpScreen
curBufPos .equ curStrPos+2
strBuffer .equ curBufPos+2

.org 8000h
.db t2ByteTok, tAsmCmp

; For debugging in an emulator . . . can't do any harm.
set LwrCaseActive, (iy+AppLwrCaseFlag)

; Copy self to a temporary area
ld hl, 9D95h
ld de, 8002h
ld bc, 256
ldir
jp actuallyDoChecking
actuallyDoChecking:
; Check the type of Ans
b_call(_RclAns)
ld a, (hl)
cp StrngObj
ret nz
; Convert Ans into a real string.
ex de, hl
ld a, (hl)
inc hl
ld (iy+asm_flag1), a ; Keeps track of how many bytes are left
ld a, (hl)
inc hl
ld (curStrPos), hl
or a
ret nz ; Oops, this string is obviously way too big.
ld hl, strBuffer
ld (hl), AppObj
inc hl
ld (curBufPos), hl
tokenStringToRealStringLoop:
ld hl, (curStrPos)
b_call(_Get_Tok_Strng)
ld de, (curBufPos)
ld hl, OP3 ; The documentation lies.
ldir
ld (curBufPos), de
ld hl, (curStrPos)
ld a, (hl)
inc hl
b_call(_IsA2ByteTok)
jr nz, +_
inc hl
dec (iy+asm_flag1)
_: ld (curStrPos), hl
dec (iy+asm_flag1)
jr nz, tokenStringToRealStringLoop
ld (hl), 0
; Done!  Make sure app exists.
ld hl, strBuffer
rst 20h;rMOV9TOOP1
b_call(_FindApp)
ret c
; Deallocate self
ld hl, 9D95h
ld de, (asm_prgm_size)
b_call(_DelMem)
; Aaaand, run the application.
ld hl, strBuffer+1
ld de, progToEdit
ld bc, 8
ldir
b_call(_ExecuteApp)
.end
.end
« Last Edit: November 21, 2011, 05:05:14 am by DrDnar »
"No tools will make a man a skilled workman, or master of defense, nor be of any use to him who has not learned how to handle them, and has never bestowed any attention upon them. . . . Yes, [] the tools which would teach men their own use would be beyond price."—Plato's The Republic, circa 380 BC

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: zStart - an app that runs on ram clears
« Reply #566 on: November 21, 2011, 06:05:51 pm »
I just encountered a strange bug:
I was toggling back and forth between Radian and Degree modes, and after hitting [On] + [Sin] about three times, the calc froze, and RAM Cleared.  I have no idea how this happened, though based on the timing I think interrupts were to blame.
I have a TI 84+SE running 2.43 with Axe, Omnicalc, and Zstart.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: zStart - an app that runs on ram clears
« Reply #567 on: November 25, 2011, 01:28:22 pm »
I have another bug (is that a bug ? because I like this one :P):
When the calc hits a bug, it turns off, then Ram Clears when turning on.
BUT, if when turning on I keep [Clear] pressed, strange things happen:
-The prog that should run on Ram clears does not launch
-The contrast is not set off
-In fact, everything is like zStart is not installed (no hooks working)
-There is no program in the program Menu
-Launching an app causes crash, and to Ram Clear, and to get everything back to normal ??? (except if I keep [Clear] pressed again)
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Stefan Bauwens

  • Creator of Myst 89 - סטיבן
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1799
  • Rating: +162/-24
  • 68k programmer
    • View Profile
    • Portfolio
Re: zStart - an app that runs on ram clears
« Reply #568 on: November 25, 2011, 02:01:11 pm »
I have another bug (is that a bug ? because I like this one :P):
When the calc hits a bug, it turns off, then Ram Clears when turning on.
BUT, if when turning on I keep [Clear] pressed, strange things happen:
-The prog that should run on Ram clears does not launch
-The contrast is not set off
-In fact, everything is like zStart is not installed (no hooks working)
-There is no program in the program Menu
-Launching an app causes crash, and to Ram Clear, and to get everything back to normal ??? (except if I keep [Clear] pressed again)
I've read a part of the readme and it says like everywhere a million times(:P) that while rebooting and pressing [Clear] zStart won't be installed. So no, it isn't a bug. :)


Very proud Ticalc.org POTY winner (2011 68k) with Myst 89!
Very proud TI-Planet.org DBZ winner(2013)

Interview with me

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: zStart - an app that runs on ram clears
« Reply #569 on: November 25, 2011, 02:16:33 pm »
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112