Hi,

I'm having a problem with the 83+ version of the TxtView program. TxtView is a text viewer which doesn't support text formatting or images inserting, but which runs on all TI-76, TI-82, TI-82Stats, TI-83, TI-83+ and TI-84+.
(which is important in France, as the cheaper and most common models sold are basic TI-83 renamed as TI-82Stats or TI-76).
http://www.ticalc.org/archives/files/fileinfo/107/10774.html

The problem happens on TI-83+ and TI-84.
As soon as one of the text files is archived, we've got many problems in the text file list displayed by TxtView:

- corrupted text file title
- same text file entry duplicated and listed several times (which is a problem as only 9 entry can be displayed and there is no scrolling)
- when an archive text file is opened, we can see the text file header, or even the TxtView program data...

Problem is confirmed on my calculators and students calculators, whether using ION or DoorsCS. All this seems to show that for an archive text file, the returned offset to read data forum can be (is?) wrong.

I just find it strange that the 83+ porter, which claimed 83+ support and archive compatibility would have missed this... I'm not sure I will get an answer from the porter after all those years, so could you help me? Here is the TxtView listing loop:


Code:
SearchLoop:
 ld ix,ID            ; ix -> TxtView file ID string
 push bc
 call ionDetect
 pop bc
 jr nz,Done
 xor a
 cp (hl) \ jr nz,KeepSearching
 inc hl
 ld a,l \ ld (bc),a \ inc bc
 ld a,h \ ld (bc),a \ inc bc
 ld hl,num_files
 inc (hl)
KeepSearching:
 ex de,hl
 jr SearchLoop
Done:
 ld a,(num_files)
 or a \ ret z            ; No files found, return to shell

http://www.ticalc.org/cgi-bin/zipview?83/asm/programs/ion/txtview.zip;TxtView.asm.txt

And the IonDetect documentation:
Quote:
ionDetect:
Find a file in the VAT.
Input: hl=place to begin search
ix->detection string (zero terminated)
Output: de=place stopped + 1
hl->program data (after detection string)
z=0 for success, z=1 if failed
Destroys: af bc de hl

http://joewing.net/programs/calc/ti83/ion/libs.shtml#detect

What could be wrong in case of an archive file?
Why would the offset be wrong?

Has the ROM page to be switched?
Is the returned offset supposed to point Flash data or temporary RAM data?

Thanks for reading.
Does it display any of the proper data? To read archived files, you need to either use one of the purpose-built bcalls, or map the requisite page somewhere in memory so that you can read from it directly. I recommend the former, since App-based shells like Doors CS like to be in the $4000-$7FFF bank to provide libraries. If the author is just trying to read the addresses as if they're in RAM, that's obviously not going to work. Would you like to get this working, or would you be happy just using something like Document DE?
KermMartian wrote:
Does it display any of the proper data?


It displays some data from a bad offset, I'm going to check if I get the archive data by scrolling up/down.


KermMartian wrote:
Would you like to get this working, or would you be happy just using something like Document DE?


Unless Document DE has basic TI-83 support, I'd like to get this working.
We don't have the choice in France... Most students buy the cheap TI-82Stats which is a basic TI-83.
So 83+ asm programs and applications won't work.

So we need a text editor/viewer which can work on both TI-83+ and basic TI-83.
critor wrote:
KermMartian wrote:
Does it display any of the proper data?


It displays some data from a bad offset, I'm going to check if I get the archive data by scrolling up/down.




Ok, it doesn't seem to display any of the archived text file.

The text file title in the list is corrupted (system chars) and when opened it displays some area of the RAM with bad offset and size.

I can see the TxtView reader data (in text) and other unarchived text files data, but not the archive file data.
(May I please ask you to not double-post in the future?)

I'd be happy to go with one of two routes:

1) Try to strip down Document DE and remove its Doors CS-dependence into something that can run on the TI-82/83.
2) Fix the archive support in TxtView. I might just give it the ability to read Document DE files anyway, if that's what we choose.
KermMartian wrote:
(May I please ask you to not double-post in the future?)


Sorry KermMartian. Wink

KermMartian wrote:

I'd be happy to go with one of two routes:

1) Try to strip down Document DE and remove its Doors CS-dependence into something that can run on the TI-82/83.
2) Fix the archive support in TxtView. I might just give it the ability to read Document DE files anyway, if that's what we choose.


Fixing TxtView would be fine - and we would be very grateful to you in France if you accept to do it although it's not your program Smile

I'm just wondering if the 83+ porter has missed or failed something related to opening archived text files:
http://www.ticalc.org/cgi-bin/zipview?83/asm/programs/ion/txtview.zip;TxtView.asm.txt
Well, he seems to store the address of the file in dataptr, but does nothing with the page, as far as I can tell. He doesn't skip the VAT-style header prepended to every archived file, and he doesn't seem to do anything special to read contents from archived files. I'm suspicious of whether he actually tested reading archived files at all. :/
Hm... So the readme & description on ticalc.org mention archive support although it won't work at all.

Maybe he just checked the archive files showed up in the list but didn't try to open them... Or maybe he uploaded the wrong version... In both cases he doesn't answer.


If nothing has been done to support archived text files, it might be easier to port one of your readers for the basic TI-83 ?
No, it looks like his code will be relatively easy to modify to do what you want with a few hours of work and debugging. I actually just got a shipment of six TI-83 calculators today, so I'll even be able to test out my work after I write it. Smile I'll see if I can get to it tomorrow.
Thank you very much for accepting to check this, KermM Smile
critor wrote:
Thank you very much for accepting to check this, KermM Smile
No problem. I'll post updates as I start looking into the code and trying to play with it.

Edit: To my great confusion, I grabbed the existing source, compiled it for the TI-83+ with the Doors CS SDK, and dropped it onto my TI-84+ emulator. I archived the ReadMe file, and it read it fine. Sad
KermMartian wrote:
Edit: To my great confusion, I grabbed the existing source, compiled it for the TI-83+ with the Doors CS SDK, and dropped it onto my TI-84+ emulator. I archived the ReadMe file, and it read it fine. Sad


Could you share your build so that I can test if it works better for some reason?
Thanks.
critor wrote:
KermMartian wrote:
Edit: To my great confusion, I grabbed the existing source, compiled it for the TI-83+ with the Doors CS SDK, and dropped it onto my TI-84+ emulator. I archived the ReadMe file, and it read it fine. Sad


Could you share your build so that I can test if it works better for some reason?
Thanks.
I used the one from the very first link:
http://www.ticalc.org/archives/files/fileinfo/107/10774.html

I can share the executable if need be.
+ionDetect should handle archived variables. I think it loads the file into RAM and leaves the pointer to the byte after the detection string (essentially the first character of text). I just tried testing it with an emulator but ion seems to bug when the included text files are archived. I'll try later with DoorsCS.

EDIT: It seems like the last file will always overwrite the others. I think this is because the file gets loaded into (tempMem) (the start of free RAM, i think) but never updates the pointer. So every file gets loaded into the exact same place in memory. This is also a pretty inefficient way to do this, as every file will end up being copied into RAM. I think it'd be better to perhaps copy the description strings into RAM (you could probably fit them into safeRAM) then either read the file you want directly from FLASH or copy it into RAM. But just copy one file, and not all of them. Here the issue i think is with ionDetect. Apparently older versions didn't use ionDetect, so an older version might work, though the void website said the 83+ version of v1.52 didn't work, for whatever reason.

EDIT2: It should read the archived file fine, since it just copies it into RAM (if there's enough free space) and stores the address to a list in textShadow. The issue seems to be when you have multiple archived files. I'm not sure what would cause garbled text, though. Btw, the readme says you can move to the next set of files by pressing right (if you've got more than 9 files).
  
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
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement