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 z80 & ez80 Assembly 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. Z80 & 68k Assembly => z80 & ez80 Assembly
Author Message
anduril66
Anduril is the Flame of the West!


Member


Joined: 25 May 2003
Posts: 129

Posted: 08 Oct 2003 12:49:02 pm    Post subject:

I tried the Fake Mem Reset prog by David L. Good, but can I request a customized version (for personal use), with some of the following features:
1)When you call the program, it shows the Mem reset message immediately w/o the starting menu.
2)ROM version 1.14 instead of 1.12
3)Exit with any keypress.
Many thanks.
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 08 Oct 2003 01:41:48 pm    Post subject:

I am already on it.

I can fix it so it says 1.14, but I cannot do much else to it without the source.
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 08 Oct 2003 02:53:47 pm    Post subject:

Okay,

Download this, unzip it, and send it to your calculator.


Then Asm(prgmMODIFY

What it will do is edit ZCLEAR to make it display 1.14

How it works.

It finds the location of ZCLEAR, calculates the position of 2 in 1.12, and then increases it by one.

So, if you run it once, it will return 1.13
if you run it again ZCLEAR will print 1.14
...
It shoud be good to 1.19

So, if you upgrade your calc os, just run Asm(prgmMODIFY until ZCLEAR returns the number you want.

It will not ever go to 1.20 instead, it will find the next ascii character, so if you did it enough, you could have it dispplay A which is 41h...

If ZCLEAR is not present, this program will exit causing no harm.

If you have a program called ZCLEAR that was not written by David L, it will screw up the program.

It uses write back to work.
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 08 Oct 2003 05:22:28 pm    Post subject:

whoa, thats awesome! Smile i think thats cool how you can do that Jbirk! maybe, since David is back (Wink), you could get the source from him Wink Smile
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 08 Oct 2003 05:27:46 pm    Post subject:

Here is the source, Adm.Wiggin.

It is really simple to do what I did.



Code:
#include   "ti83plus.inc"

  .org    $9d93
  .db     $BB,$6D

   ld hl,modify
   rst 20h
   bcall(_chkfindsym)
   ret c

   ld hl,$A1
   add hl,de

   ld a,(hl)
   inc a
   ld (hl),a

   ret  

modify:
.db protprogobj,"ZCLEAR",0

.end
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 08 Oct 2003 05:40:09 pm    Post subject:

cool... so that really just takes the $9F th byte of the program and changes it? wow...
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 08 Oct 2003 09:26:59 pm    Post subject:

No

It finds the program DE points to the data/size

Then it adds $A1 to the address and the byte is at the address.

Then it reads and writes to that area of ram.

ld hl,de is de+hl->hl
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 09 Oct 2003 04:54:38 pm    Post subject:

yes, so you add 2 to the program location, then you must add the offset for the byte you wish to change Smile
Back to top
anduril66
Anduril is the Flame of the West!


Member


Joined: 25 May 2003
Posts: 129

Posted: 10 Oct 2003 11:03:08 am    Post subject:

Is there a way to make a program hide or delete itself (without crashinhg the calc) after completing a task?
Back to top
David
The XORcist!


Advanced Member


Joined: 20 May 2003
Posts: 268

Posted: 10 Oct 2003 01:05:15 pm    Post subject:

Huh, Jbirk wrote a patcher for ZCLEAR Smile
Anyways, point 1 and 3 will be easy to fix. Point #2 (correct rom version), is also rather easy. I have considered using the TI-OS system routine for retrieving the basecode version, thus making it more realistic.

Anduril, yes, it's possible make a program hide/delete itself. It's just to do it the normal way. It might sound dangerous to delete a program while it's running, but nothing will strange will happen, providing you run it from TI-OS, running from a shell won't work thought, because it will try to write back to a program that doesn't exist any longer . TI-OS doesn't perform any writeback, it just deletes the program copy and doesn't care about whether the original program exists or not.
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 10 Oct 2003 02:56:32 pm    Post subject:

#include "ti83plus.inc"

.org $userMem-2
.db $BB,$6D

ld hl,modify
rst 20h
bcall(_chkfindsym)
ret c

ld hl,$A1
add hl,de

ld a,(hl)
inc a
ld (hl),a

ret

modify:
.db protprogobj,"ZCLEAR",0

.end


How this program works:

It loads the address containing the object type and zeroterminated name into hl, then rst20h copies this information to OP1. Next, bcall(_chkfindsym) looks up the information from the sym table (VAT); in other words, it finds the program.

After finding the program,
HL -> Sym Table Entry Object/Type byte (you could change this byte to protect/unprotect 5=unprotected 6=protected)
DE -> Size bytes (ther are two with the LSB first) inc de twice to get to the actual data in ram.
B = Flash page (if 0, in ram, else in archive)
C flag will be returned if the program is not found.

So, ret c exits if ZCLEAR is not found.

ld hl,$A1 ;loads hl with the number of bytes the program is in from the first size byte
add hl,de ;HL+DE->HL

HL now points to the 2 in 1.12

ld a,(hl) ;read from that mem address and store the 2 or whatever it is in A.
inc a ;A+1->A
ld (hl),a ;A-> value at memory address defined in HL; put simply, write the new value back.

ret ;Exit the program


Going the extra distance:

After the ret c, you should add something I think.

add this:

ld a,b ;flash page to accumulator
or a ;same as cp 0; are we on page 0, ram?
ret nz ;If not in ram, exit

Add that to prevent unpredicatle results if you have ZCLEAR archived.
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 10 Oct 2003 03:10:08 pm    Post subject:

andruil66 wrote:
Is there a way to make a program hide or delete itself (without crashinhg the calc) after completing a task?

Yes here is how:

ld hl,label
rst 20h
bcall(_chkfindsym)

;we will assume it exists, sience you are running it

;bcall(_delvararc) will delete this regardless of wheater it is in ram or the archive

;if you wish to hide, then don't delete instead:

; hl point to the obj type

ld bc,-6
add hl,bc

;now hl points to the first character of the programs name

res 6,(hl) ;hide it by subtracting 40h

ret ;exit

;you can unhide with an asm program, MirageOS, or the beta of NimbusOS


;Below is the data section

label:
.db progobj,"NAME",0

You use protprogobj for protected programs, and I do not think you need the 0 termination if you have 8 or more characters, but I can't remember for sure, nor do I wish to enter the flash debugger to find out.


Last edited by Guest on 10 Oct 2003 03:12:41 pm; edited 1 time in total
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 10 Oct 2003 04:33:03 pm    Post subject:

you dont need the 0 if it is 8 chars... it cant be more Smile
Back to top
anduril66
Anduril is the Flame of the West!


Member


Joined: 25 May 2003
Posts: 129

Posted: 14 Oct 2003 01:03:01 pm    Post subject:

Thank you very much.
Can you please compile the finished program and show me the source code (because I can't download programs rignt now).

It is very nice of you to do all this work for someone else.
Back to top
JoeImp
Enlightened


Active Member


Joined: 24 May 2003
Posts: 747

Posted: 14 Oct 2003 03:45:31 pm    Post subject:

How do you attach a file. I didnt believe you could.

Imp


Last edited by Guest on 14 Oct 2003 03:45:49 pm; edited 1 time in total
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 14 Oct 2003 06:05:03 pm    Post subject:

you must be an admin to have that privelage set... it was set during the logo contest to upload logos...
Back to top
David
The XORcist!


Advanced Member


Joined: 20 May 2003
Posts: 268

Posted: 25 Oct 2003 09:08:13 am    Post subject:

anduril66 wrote:
I tried the Fake Mem Reset prog by David L. Good, but can I request a customized version (for personal use), with some of the following features:
1)When you call the program, it shows the Mem reset message immediately w/o the starting menu.
2)ROM version 1.14 instead of 1.12
3)Exit with any keypress.
Many thanks.

Ok, Anduril. I got inspired and created an improved version of the ZCLEAR prog. This one uses a key hook to integrate itself in the Mem/Reset menu. So when you try to perform a mem/RAM reset, the program will fake that screen! I also added a routine for displaying the proper base version.

Do you want it this way, or do you just need a fake mem reset screen (w/o) keyhook?
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 25 Oct 2003 12:08:47 pm    Post subject:

thats cool David! you know too much about the TI-OS for me! ;)

wait, Jbirk taught me the theory behind that! you check what menu the user is in, if it is the memory delete, then check if they are on the clearing option, if they are, then you check for when they click it, then just display your screen... is that even close?
Back to top
David
The XORcist!


Advanced Member


Joined: 20 May 2003
Posts: 268

Posted: 25 Oct 2003 12:30:19 pm    Post subject:

Yes, that's pretty close!
There are three bytes starting at (menucurrent) that holds the currently selected menu, sub-menu (eg math and stat menu) and item. So I just read from (menucurrent), and if it's 23h, then we're in the "Reset RAM?" menu Smile

I will post the program here very soon.


Last edited by Guest on 25 Oct 2003 12:30:39 pm; edited 1 time in total
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 25 Oct 2003 12:47:00 pm    Post subject:

sweet!!!!! you could post it under Downloads on unitedti.org... and make a news article that says something like "First Download added to UnitedTI.org!"
Wink
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 1, 2, 3, 4  Next
» View previous topic :: View next topic  
Page 1 of 4 » All times are UTC - 5 Hours

 

Advertisement