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 Your Projects 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. Project Releases => Your Projects
Author Message
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 10 Oct 2007 10:08:56 pm    Post subject:

File Name :: HomescreenPictures
Author :: Harrierfalcon
Category :: Ti-83plus Asm Utilities
Screenshot :: [img]http://www.unitedti.org/index.php?act=downloads&do=imgss&id=312[/img]
Description ::
HomescreenPictures, in short, is a unique but simple program that allows you to take and recall pictures of the text on the homescreen. That's about it. Just note that the size of the program increases with the number of pictures you want. The current limit is 20, but I'll up it if enough people e-mail me about it. (It's tedious work, lemme tell you.)

Updated Fri, Oct 12 2007 8:19 am

View File
Back to top
Demon


Advanced Member


Joined: 17 Jun 2006
Posts: 369

Posted: 10 Oct 2007 10:34:47 pm    Post subject:

Is it safe to keep it archived and use it (copied to RAM only when needed in a program); will the saves stay?

Last edited by Guest on 10 Oct 2007 10:37:23 pm; edited 1 time in total
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 10 Oct 2007 10:41:16 pm    Post subject:

The saves are kept within the program as SMC, so, if I interpret your inquiry correctly, yes.
Back to top
Demon


Advanced Member


Joined: 17 Jun 2006
Posts: 369

Posted: 10 Oct 2007 10:52:14 pm    Post subject:

I got an idea already then -- maybe it should put them into an AppVar or even a List like PicToList does (since they can be [un]archived and deleted from BASIC progs). Then if you wanted to save the screen to use later after the user goes back into the program later, it'll still be there or removes the XTEMP (dynamic loading), it'll still be there next time. And if the program archives the list then nothing will have to stay in RAM.

Last edited by Guest on 10 Oct 2007 10:53:39 pm; edited 1 time in total
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 10 Oct 2007 10:55:43 pm    Post subject:

With no compression, a 128-element list is 1164 bytes. I'm not quite at the point of doing that, or the AppVar, but if I get the time I'll look into it.
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 10 Oct 2007 11:04:47 pm    Post subject:

What if you created a list, and then stored data into it in raw format. That way, it would still take just over 128 bytes, and basic programs could still archive and unarchive it. The only issue is, I'm not certain what would happen if someone tried to edit the list with the normal commands, and not via your program.
Back to top
Demon


Advanced Member


Joined: 17 Jun 2006
Posts: 369

Posted: 11 Oct 2007 06:30:06 am    Post subject:

I tried that with PicToArc. All it did was give me an error when I tried to do operations on it.
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 11 Oct 2007 07:15:07 am    Post subject:

I don't think there'd be any real issues, but you'd have to leave the numbers below 256 or issues will occur.

I'll investigate when I get home from school.
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 11 Oct 2007 08:56:13 am    Post subject:

If you're going to store raw data into a list, there's several things you should be aware of:

First, it's not going to be possible to edit the data in the list through the OS, without using the assembly program again. It will likely give you syntax errors.

Second, you might be able to get away with storing something to L1(5 or some such, but even then you have to know what to store so you don't end up with random garbage, and this is usually going to be impossible (I think).

Third, lists are weird. Instead of having the space they take up in RAM in the first two bytes, like normal things, they store the number of elements there. When you do generic commands like Archive/UnArchive on lists, they probably won't do syntax checking on the list contents, but they will definitely look for this format. That means the way you'd go about doing this in this case, is create an 11-element list (which will give you over 128 bytes of scratch space), and without messing with the two size bytes, store to the rest of the list what you need.
Back to top
Iambian


Advanced Member


Joined: 13 Mar 2004
Posts: 423

Posted: 11 Oct 2007 11:27:20 am    Post subject:

If you want to look at lengthy and confusing code, you could try looking at my attempt at doing this, though it only works with the graphscreen and not the contents of what the screen has.

http://www.unitedti.org/index.php?download=212

The only problem is that my program *isn't* short and sweet, but rather, it's large and bulky. A huge chunk of that space is allocated to two RLE compression and decompression routines, though.
Back to top
Liazon
title goes here


Bandwidth Hog


Joined: 01 Nov 2005
Posts: 2007

Posted: 11 Oct 2007 04:13:41 pm    Post subject:

this is pretty cool! nice job Harrierfalcon!
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 11 Oct 2007 04:56:27 pm    Post subject:

Thanks!

@DarkerLine: Thanks for the heads-up, I'll be careful about what I do. I might just store the list to Ans to 'store' and take the list in Ans to 'recall', that might be easier.
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 11 Oct 2007 05:00:46 pm    Post subject:

Harrierfalcon wrote:
I might just store the list to Ans to 'store' and take the list in Ans to 'recall', that might be easier.
[post="114305"]<{POST_SNAPBACK}>[/post]

How would that help? The programmer would then be left with an invalid list in Ans that they can't store anywhere. The point of storing to a list is not that the programmer could edit it as a list, because you can't. The point is to use it like an appvar, except the programmer could archive it like Demon requested. Of course, an even simpler solution is to use an appvar, and offer a command to archive and unarchive the appvar.
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 11 Oct 2007 05:34:03 pm    Post subject:

Well, I'll admit this was a pretty easy program to write. I'm not quite that advanced into ASM, I have next to no idea as to how to create and manipulate much of anything.

EDIT: After a little perusing of the b_call documentation, I have discovered a few b_call's that will help with the list thing. From what I see, they'll be valid lists that you can edit. I'm looking into compression to shrink the size of the lists.


Last edited by Guest on 11 Oct 2007 05:38:21 pm; edited 1 time in total
Back to top
Demon


Advanced Member


Joined: 17 Jun 2006
Posts: 369

Posted: 11 Oct 2007 06:15:05 pm    Post subject:

Compress 128 bytes of data?
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 11 Oct 2007 06:18:36 pm    Post subject:

A 128-element list is ~1200 bytes, so yeah. I don't think you need to run a lib to archive and unarchive AppVars...

Last edited by Guest on 11 Oct 2007 06:19:05 pm; edited 1 time in total
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 11 Oct 2007 08:20:05 pm    Post subject:

Sorry if I seem to be repeating myself, but why are you creating a valid list at ~1200 bytes? Even if compressed, it will never match the ~128 byte invalid list. And you can't archive and unarchive appvars inside a basic program, which is the only reason to do a list. If you plan on using bcalls to make a valid list with each element a character on the screen, it'll be a waste of space. And since your program will handle the list input and output, there's no reason for the user to want to edit the list. So there's no reason to make a valid list.

The way I see it, there are two logical setups:

1. You give your program three functions. The first saves the screen to a 128 byte appvar. The second restores the screen from the appvar. The third archives/unarchives the appvar.

2. You give your program two functions. The first saves the screen to an invalid ~128 byte list. The second restores the screen from the list. Then, the user archives/unarchives the list with the normal basic functions.

What seems to be your idea, writing a ~1200 byte list, makes no sense, even if it is compressed, when you can write an invalid 128 byte list.
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 11 Oct 2007 08:25:02 pm    Post subject:

I don't really know, I'm still in the "I have to obey all the rules of this language" kind of mode.

I'll go with the invalid list for now.

EDIT: After some major coding time in which I neglected my homework, I created what appears to be a fully functional version, which uses invalid lists instead of SMC.
Inputs:
----- Θ = 0, Recall a pic
--------- = !0, Store a pic
----- Ans = Name of list, without the little L
Outputs:
----- Duh!

If Ans is longer than 5 characters, then it will take the first 5.

There is one issue, which is that occasionally a list is created that has some weird, typically invalid character as the last char of the name. It'd help if you guys could help me figure out when it happens.

Currently, it is set up as such so that, if you store to an archived list or a regular list, it will delete that list, regardless of archive state, and create a new list with the data. I'm working on handling people trying to recall non-existing lists.


Last edited by Guest on 11 Oct 2007 09:53:46 pm; edited 1 time in total
Back to top
Iambian


Advanced Member


Joined: 13 Mar 2004
Posts: 423

Posted: 11 Oct 2007 09:34:49 pm    Post subject:

For the weird name, did you zero-terminate the string prior to creating it?
If, after an LDIR you do this, you can solve this by doing "EX DE,HL \ LD (HL),B", where B would've already been set to zero by the LDIR.
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 11 Oct 2007 09:41:00 pm    Post subject:

By default, the TI-OS doesn't writeback programs, and the area I allocated for temporary storage is 6 zeroes, and I only ldir 5 from Ans. Is there any small way of finding the length of Ans?

Weird, that version doesn't work...It appears to be because it fails to copy it to the temparea...

I'm confused...


Code:
;HomeScreenPictures
nolist
#include    "ti83plus.inc"
.list
.org    $9D93
.db    t2ByteTok, tAsmCmp

   b_call(_RclAns)         ;gets Ans
   b_call(_ChkFindSym)
   ld a,(hl)            ;sees if Ans is a string or not, returns if not
   and %00011111
   cp StrngObj
   ret nz
   inc de               ;copies string in Ans to listdata
   inc de
   ex de,hl
   ld de,listData
   ld bc,5
   ldir
   b_call(_ThetaName)      ;theta holds function number
   b_call(_RclVarSym)      ;   0  = Recall
   ld a,(hl)            ;   !0 = Store
   and %00011111
   cp RealObj
   ret nz
   b_call(_convOP1)
   or a
   jr nz,stoShad
rclShad:
   call getOP1
   inc de
   inc de
   ex de,hl
   ld de,savesscreen
   ld bc,128
   ldir
   ld (hl),b
   b_call(_homeup)
   res AppAutoScroll, (IY +  AppFlags)
   ld hl,savesscreen
   b_call(_puts)
   set AppAutoScroll, (IY +  AppFlags)
   b_call(_homeup)
   ret
stoShad:
   call getOP1
   jr c,createList
   b_call(_delVarArc)
createList:
   ld hl,listName         ;loads the name into OP1
   b_call(_Mov9toOP1)
   ld hl,13            ;creates a 13-element list, which is 128 bytes + [length of name]
   b_call(_createRList)
   inc de
   inc de
   ld hl,textShadow
   ld bc,128
   ldir
   ret
getOP1:                  ;loads the name into OP1
   ld hl,listname         ;and calls FindSym
   b_call(_Mov9toOP1)
   b_call(_FindSym)
   ret
listName:   .db ListObj,tVarLst
listData:   .db 0,0,0,0,0,0
.end
.end
I tried changing it to use savesscreen instead of that 128 byte chunk, but it screwed up and now it won't work either way.

EDIT: Fixed now. Code is updated, as well the program.


Last edited by Guest on 11 Oct 2007 10:23:52 pm; edited 1 time in total
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  Next
» View previous topic :: View next topic  
Page 1 of 2 » All times are UTC - 5 Hours

 

Advertisement