Author Topic: Stable offscript for TI-83+  (Read 3304 times)

0 Members and 1 Guest are viewing this topic.

Offline Cholsrea

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 9
  • Rating: +0/-0
  • well, i may be dumb . . . .
    • View Profile
Stable offscript for TI-83+
« on: October 02, 2023, 10:20:38 pm »
Probably will be done in assembly but even if i just changed 1 variable to a set thing id be happy

I found one online (assembly, i wanna avoid the official app is so big) but my calc keeps crashing and it REALLY gets funky when i look at the program that i have booting on startup and almost always crashes
(All crashes lead to ram clear when starting up)

So im assuming all the breaking is from that program.
The official startup app has an offscript and a bootscript as appvars but i cant find any way to actually read those, because if those do what im looking for in a stable way that would be great because i wouldn't need to have the whole program while still having a stable bootscript, or even better have 2 programs load on startup instead of 1

Im pretty new to all this and man is it hard to find info on this stuff. So explaining any solutions you have a bit would be super helpful (mainly assembly, i have no idea about z80asm or any asm for that matter)

Im on a TI-83+ btw



For anyone who did click on this i have a second idea

Possibly make a program that is hidden in the prgm menu? That way the user cannot run it manually only an external thing can?

Edit (Eeems): Merged double post
« Last Edit: October 02, 2023, 10:59:54 pm by Eeems »

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: Stable offscript for TI-83+
« Reply #1 on: October 04, 2023, 05:43:11 pm »
@Cholsrea I'm not sure what you are trying to do. Are you trying to run a program on startup? zStart is a really awesome tool that lets you run programs on startup (among other things). The download has two different apps, one for the 84 and one for the 83 so make sure you install the right one. If that isn't what you are looking for, a lot more details would be helpful.
I'm still around... kind of.

Offline Cholsrea

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 9
  • Rating: +0/-0
  • well, i may be dumb . . . .
    • View Profile
Re: Stable offscript for TI-83+
« Reply #2 on: October 04, 2023, 06:22:37 pm »
well yes running a program on startup would be nice i dont even need that much

But Zstart again has the issue of the main one of having way to many extra features i dont need that takes up alot of space (for gui, other start up stuff, and general interface changes that i don't need) along with issues with crashing

So like do you know of any more specific apps that can run programs on startup, or an assembly code that can change a variable on startup or run a program

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: Stable offscript for TI-83+
« Reply #3 on: October 04, 2023, 07:54:25 pm »
I believe zStart is only one app page. Since app sizes must be a multiple of 16384, it can't be any smaller. (If it is two pages, ignore that) I have used it extensively on the 84+ and not had any issues. What part is crashing?

I get that you are on a 83+ and flash space is tight but you pretty much have to use an App (and pay the full 16k for it) or do it the hard way in asm. Here is the WikiTi page that covers Onscript/Offscript. Note that the code for them is limited to 255 bytes and needs to have its origin at appData+1. That means you can't use Axe since it doesn't let you change the origin from 0x9D95. (Very basic Axe programs would work as long as the compiler doesn't use any position dependent instructions) You will also need to restore the appvar every RAM clear (which zStart does by modifying the OS itself).

There are other features in the OS. If you tell me what your goal is, I may be able to suggest some other feature to do what you are trying to do.
I'm still around... kind of.

Offline Cholsrea

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 9
  • Rating: +0/-0
  • well, i may be dumb . . . .
    • View Profile
Re: Stable offscript for TI-83+
« Reply #4 on: October 07, 2023, 02:32:51 pm »
Actually Offscript would work just as well

Whenever i looked up stuff on offscript in the past nothing showed up. I just need to know the asm code and how to use it properly. If you know how to do that, or just how to decompile, modify, and/or use AppVars within TI-basic (if possible)

My calculator i set up with a user system for dms, message board and whatever other functions i decide later. But i limit people to one dm and one message board message per login (people dumb they'd think it actually is per day bc why would they log out and back in and assume it works) and i have everything locked when you aren't logged in.

The only way to log out is changing Str0 to "-" which again, how would they know, its hidden plus they dont know TI-basic. So if you log in you cant log in again bc Str0 stores your username already decoded for use in any program quicker than re-decoding it

If i can use Offscript to change Str0 to "-" on power off that would work just the same as changing it to that on startup


Thanks for your help btw!

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: Stable offscript for TI-83+
« Reply #5 on: October 07, 2023, 05:26:30 pm »
Warning: Asm can and will crash your calc and reset your ram. Archive anything you care about and ideally back up everything to your PC.

I can't exactly picture how your system works but I'll take that Str0 stuff and run with it. Would deleting Str0 on Offscript work? The assembly for that is very simple. I haven't tested this but it *should* work. It has been a long time since I have messed with TI-Basic strings so I might have messed up the name. Also this won't work if Str0 is archived.
Code: [Select]
;Put the (binary) contents of this in appvOFFSCRPT
.org $8001
    ld  hl, name
    RST rMov9ToOP1
    B_CALL ChkFindSym
    ret c
    B_CALL DelVar
    ret

name:
    db StrngObj, tVarStrng, tStr0, 0, 0
I'm still around... kind of.

Offline Cholsrea

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 9
  • Rating: +0/-0
  • well, i may be dumb . . . .
    • View Profile
Re: Stable offscript for TI-83+
« Reply #6 on: October 09, 2023, 09:37:11 pm »
Deleting Str0 wouldn't work because checking it will throw an error. But i dont keep that archived so the archiving problem isnt an issue

Yeah the Asm i used i believe was the cause of the crashes, if AppVars dont use Asm though how are they functioning?

Also its hard to give more info without knowing what is needed, but bc TI-basic doesn't have error protection or checking, Str0 just needs to be anything besides A-Z, a-z, 0-9 and 1-10 characters long.

Also i don't know anything about AppVars so sorry for my confusion, im not sure how to even turn the code you supplied into an appvars, or how i would interact/use it or enable it


And yeah ik about the crashing, its happened before i used assembly, so i keep everything archived (including most programs) and just use a few smaller programs i have duplicates of unarchived that archive and unarchive the programs, and important lists only as needed. (I use a simple Asm to allow programs to unarchive and archive other programs)

The only Assemblies i use are enabling lowercase on double alpha, battery check, and "programmer mode" which allow unarchiving and archiving programs within other programs
« Last Edit: October 09, 2023, 09:40:40 pm by Cholsrea »

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: Stable offscript for TI-83+
« Reply #7 on: October 14, 2023, 09:06:48 am »
You would use a compiler like spasm-ng to compile the asm code. You can put asm code anywhere as long as it is set up correctly to run. To sidestep the problem, can't you just have a prompt on exiting the program that asks the user if they want to log off? I don't remember exactly how to mess with TI-Basic strings. I think they work just like programs. I usually use Axe for stuff like that so I will have to look up how to do it in asm.
I'm still around... kind of.

Offline Cholsrea

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 9
  • Rating: +0/-0
  • well, i may be dumb . . . .
    • View Profile
Re: Stable offscript for TI-83+
« Reply #8 on: October 14, 2023, 12:03:52 pm »

Each program is sperate, its not a total override of the system, you can still use the calculator as normal but cant use any of the extra features without logging in. So having a prompt on exiting the program would not really work

But thanks for the compiler, ill try to do some more research into how your code works and the asm and maybe figure it out myself

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: Stable offscript for TI-83+
« Reply #9 on: October 15, 2023, 05:09:45 pm »
@Cholsrea
This time I actually did my homework.
I tried modifying Str0 and got it to work as a program but couldn't get it to work as offscript.
So how about deleting a letter variable? Those can be read when deleted. You could set the variable to a special value to mean the login was still valid and if it is 0 then discard it.
I actually tested this and it works for me. You need to run the program SETIY in order for offscript to work. (It is safe to run it multple times) If you have a way to run asm in Basic, you could run FDCB33CE instead.

Code: [Select]
;offscript.asm
;compile with ./spasm -I inc -T offscript.asm OFFSCRPT.8xv
;or spasm.exe -I inc -T offscript.asm OFFSCRPT.8xv if you are on windows
;This deletes the letter variable 'A' but all you have to do is change the letter below and compile if you want a different one
#include "ti83plus.inc"

.org $8001
ld hl, name
RST rMov9ToOP1
B_CALL _ChkFindSym
ret c
B_CALL _DelVar
ret

name:
.db RealObj, 'A', 0, 0 ;you can change 'A' to any other letter you want (make sure it is uppercase) to delete that letter instead
.db 0

Code: [Select]
;set_iy.asm
;compile with ./spasm -T set_iy.asm SETIY.8xv //You are free to rename this program to whatever you want either here or on calc
;or spasm.exe -I inc -T set_iy.asm SETIY.8xv if you are on windows
;All this does is set a single bit to true. If that bit is false, the OS won't run offscript even if it exists
.db $BB, $6D
set 1, (iy+33h) ;sets bit 1 of iy+33h to indicate that there is an offscript installed
I'm still around... kind of.

Offline Cholsrea

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 9
  • Rating: +0/-0
  • well, i may be dumb . . . .
    • View Profile
Re: Stable offscript for TI-83+
« Reply #10 on: October 15, 2023, 08:47:30 pm »
sorry the information on spasm is very hard to understand.
but isn't that already compiled?
if so than how can i change A to W and recompile it, ect

also it seems your commands for spasm are different than the commands listed by spasm, is there multiple versions of spasm?

i feel like im being very stupid about this, so sorry you're having to walk me through each bit.

but yes, your idea with the letter variable does work, thats a great idea, im sad i didnt think of that

but uhh, your assembly code causes an immediate crash, unless it requires the offscript to be there i think theres a mistake in it

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: Stable offscript for TI-83+
« Reply #11 on: October 16, 2023, 05:42:42 pm »
but isn't that already compiled?
Yes, the programs I attached are compiled and ready to use.

if so than how can i change A to W and recompile it, ect
To change A to W, see the second to last line in the offscript.asm from my last post.
There are two seperate programs, offscript.asm and set_iy.asm. You just make the files like a normal text document on your pc and paste in the code for each. My commands assume you created the files in the same directiry as spasm.exe. Then open command prompt in that directory and run the commands to compile each one. The compiled programs will appear in the same folder as the source code. I attached an changed version of offscript that deletes W instead.

also it seems your commands for spasm are different than the commands listed by spasm, is there multiple versions of spasm?
I don't know what you mean by different commands. I used this to compile the programs. I used a fresh download so I am sure that the binaries there work. I did use the linux version so your use for windows may vary slightly. Your spasm installation should have a 'inc' folder where ti83plus.inc is. (it comes with that - but checking for it is a good way to know you have the right folder).

but uhh, your assembly code causes an immediate crash, unless it requires the offscript to be there i think theres a mistake in it
SETIY did? I did test using a ti84 emulator but I can't imagine why it crashed. It doesn't require offscript and should always be safe to use. (Of course if offscript is buggy, you might crash when you turn your calc off but running SETIY on its own should never crash) Offscript won't work if it is archived but I don't think that is what you are doing.
I'm still around... kind of.

Offline Cholsrea

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 9
  • Rating: +0/-0
  • well, i may be dumb . . . .
    • View Profile
Re: Stable offscript for TI-83+
« Reply #12 on: October 17, 2023, 04:25:30 pm »
not gonna lie, i have just been fighting trying to get spasm to work. building it doesn't work, and the prebuilts aren't working either.

like does it no work on windows anymore? I don't get it. its outdated and not updating throws errors, and updating it throws errors

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Stable offscript for TI-83+
« Reply #13 on: October 17, 2023, 04:29:07 pm »
not gonna lie, i have just been fighting trying to get spasm to work. building it doesn't work, and the prebuilts aren't working either.

like does it no work on windows anymore? I don't get it. its outdated and not updating throws errors, and updating it throws errors
It's hard to help you without knowing what errors you are encountering. It should still work on windows, as nobody has opened an issue about it not working since the last update to it 3 years ago.
/e

Offline Cholsrea

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 9
  • Rating: +0/-0
  • well, i may be dumb . . . .
    • View Profile
Re: Stable offscript for TI-83+
« Reply #14 on: October 17, 2023, 08:30:02 pm »
I am not quite sure what was happening but through a lot of effort I was able to get it to work . . . .somehow

anyway, I compiled everything i got it on the calc, but I still don't know how to actually "run" an AppVar, i tried googling for a long time both on a previous day and again now and there's a few things here on Omnimaga, that's slightly useful but that's about it

i translated it into asm like you did
adding the B705 at the end caused mine to not crash after executing the asm, without it when i ran just what you gave earlier it broke

Edit :

I return to this message, it leads to crashes and clearing its own ram afterwards, I was wondering what happened and than immediately after running the asm again it broke (twice), not great. im not really sure whats going on and why it now immediately crashes

the assembly worked, i turned it on and off, OFFSCRPT set W to 0, i ran it probably 10 or so times and it worked each time. i loaded my programs back onto the calculator, ran it, it worked, turned it off, turned it back on, still good, ran program, immediate crash
i did the same setup, different setup, and no matter what now it crashes even on running the asm

is the ti-83+ just super volitile to running a program immediately after booting?
« Last Edit: October 17, 2023, 09:30:50 pm by Cholsrea »