60

Could you built it for me ? My build is sent in 10 seconds (4.1 kB/s ?!?!?), two passes seem sufficient, its very strange !?! It boots... but something goes wrong ... confus
My patches just change some $FFFFFFF[F|E] to avoid the 64b bug.

61

Sent.

62

Bug in bsearch function which failed to detect 'missing' item: fixed by Lionel Debroux, in future RC7.
I forget to add the new command 'menu' in the documentation. It is available since RC1!
Example of use:
echo "#!PedroM" >> file
menu "ls" "ls -h" "cd system" >> file
file

(Ok the construct $( ... ) is missing. I should have added it.)

63

PpHd (./61) :
Sent.

Received, freeflashed and sent. Same result. Did you built it without the symbolic math engine ? Nevertheless, It seems to work fine. Perhaps my build was valid.

When sending the OS, TiLP send a block of 64kB, then it's written, etc... ?

64

Folco (./63) :
Did you built it without the symbolic math engine ?


Yes. The command 'zs' won't work. But it doesn't matter since you have to test the link smile

Bug found: performing twice 'echo Hello > toto | ls' produce a 'Protected Memory' error.

65

./62: bsearch() bug fixed by merely using BSD-licensed libiberty, actually grin
I'll try to finish improving qsort() this week-end.
avatar
Membre de la TI-Chess Team.
Co-mainteneur de GCC4TI (documentation en ligne de GCC4TI), TIEmu et TILP.
Co-admin de TI-Planet.

66

New bug found: hexdump 0x43DE
in upper cases doesn't dump the right addresse but 52BE.
Using lower cases work.

Fixed in future RC7. Here is the patch:
--- a/src/Misc.asm
+++ b/src/Misc.asm
@@ -538,37 +538,9 @@ getenv_si:
 ; Destroy:
 ;      d0-d2/a0
 atol:
-       cmp.b   #'0',(a0)
-       bne.s   \start10
-       cmp.b   #'x',1(a0)
-       bne.s   \start10
-       addq.l  #2,a0                   ; Skip '0x'
-\start16:
-       moveq   #0,d0
-\loop          moveq   #0,d1           ; Read
-               move.b  (a0)+,d1        ; Char
-               beq.s   \end
-               subi.b  #'0',d1         ; From '0'
-               cmpi.b  #9,d1
-               bls.s   \ok
-                       subi.b  #'a'-'0'-10,d1
-\ok            lsl.l   #4,d0
-               add.l   d1,d0
-               bra.s   \loop
-\end:  rts
-
-\start10:
-       moveq   #0,d0
-\loop10                moveq   #0,d1           ; Read
-               move.b  (a0)+,d1        ; Char
-               beq.s   \end
-               subi.b  #'0',d1         ; From '0'
-               move.l  d0,d2
-               lsl.l   #3,d0
-               add.l   d2,d0
-               add.l   d2,d0           ; x10
-               add.l   d1,d0
-               bra.s   \loop10
+       clr.w   d0
+       suba.l  a1,a1
+       jmp     strtol
 
 ;short CU_stop (void);
 ; Destroy only d0

Quite simple, isn't it cheeky

67

TI-Device Information. It fails, Ti-Connect search for :
- Device Type
- Device ID
- OS Version
- BIOS Version
- Language
- Total RAM
- RAM available
- Battery status
- and perhaps ID Lists and installed applications

Echo:
Recv 08A2 0006
Send 9856 0000
Recv 9806 000B
Send 9856 0000
Send 9815 000E


Ti-Device Explorer :
Recv 08A2 0006
Send 9856 0000
Send 9806 000B
Recv 0856 0000
Recv 0809 0000
Send 9856 0000
Send 9815 0020
Recv 0856 0000
Send 9892 0000

68

I don't understand very well. What operation did you do on ticonnect and what did you get on PedroM screen?

69

Ti-Connect has mainly two menus : The first one gives informations about the connected device, the second one browse the calc.

The first log is what appears on the calc screen when Ti-Connect try to get informations about the calc (ID, versions etc...), the second one when I open the calc browser.

70

I think I'll have to add much more information in the dump...

71

Rah, fixed, it's Recv indeed.

72

Could you use a log file somewhere in /sytem ?

73

Recv 08A2 0006  : PC->TI REQ
Send 9856 0000  : TI->PC ACQ
Recv 9806 000B  : PC->TI VAR 
Send 9856 0000  : TI->PC ACQ
Send 9815 000E : TI->PC DATA

Not a Directory Listing, not a Requesting a Variable, not a Sending a Variable.
I don't know this protocol...

Recv 08A2 0006 : PC->TI REQ
Send 9856 0000 : TI->PC ACQ
Send 9806 000B : TI->PC VAR
Recv 0856 0000 : PC->TI ACQ
Recv 0809 0000  : PC->TI CTS 
Send 9856 0000  : TI->PC ACQ
Send 9815 0020  : TI->PC DATA
Recv 0856 0000  : PC->TI ACQ
Send 9892 0000 : TI->PC EOT

A Directory Listing or a requesting of a variable.
Probably a directory listing of the Home directory due to the size (and PedroM answer of 0x20 bytes = 4 null first bytes + 2*14 bytes for each folder - main and system). I don't see anything wrong in it.

If I look at the TI-89 Link Protocol by Roms, I see that:
Data section is made up of several blocks which take the following format (always [b]18 bytes long[/b]) for the directory listing:
Offset 	Length 	Description
0 	8 bytes 	Variable name padded with NULL chars if necessary.
8 	1 byte 	Variable type ID.
9 	1 byte 	Variable attribute: 00h = unlocked, 01h = locked, 03 = archived.
10 	4 bytes 	If folders are listed (phase 1), this field contains the number of variables in this folder.
If variables are listed (phase 2), this field contains the length, in bytes, of the variable data for this variable without the extra four bytes at the beginning of the data packet.
[b]14 	8 bytes 	(V200 only) These eight bytes always have a value of 0.[/b]


First PedroM always sent 14 bytes. Maybe on V200 and TI-89 Titanium, you have to sent 22 bytes instead for each entry? Could someone confirm this hypothesis?
I heard that your calculator was detected as a TI-89 titanium.
(I don't understand where 18 comes from).

[EDIT]: From libticalc: I get in get_dirlist / calc_89.c the following line:
uint8_t extra = (handle->model == CALC_V200) ? 8 : 0;


So it is only for V200, but not for TI-89 Titanium. Could someone confirm this?

[EDIT2]: Help. In libticalc, I have a get_dirlist in calc_89 with support of titanium, and a get_dirlist in calc_89t... Which one is the right one? Both are included in Makefile.am...

[EDIT3]: Ok calc_89 is the classic way through the directlink, whereas calc_89t is through the USB link...

[EDIT4]: It seems I said many wrong statements... Titanium still use 14 bytes.

74

Well, I don't have either a V200 or a 89T... and TI-Connect won't handle VTI and TIEmu links, so I'm afraid I can't help sad
avatar
Membre de la TI-Chess Team.
Co-mainteneur de GCC4TI (documentation en ligne de GCC4TI), TIEmu et TILP.
Co-admin de TI-Planet.

75

Lionel Debroux (./74) :
Well, I don't have either a V200 or a 89T... and TI-Connect won't handle VTI and TIEmu links, so I'm afraid I can't help sad

Trying a directory listing using TILP with TIEmu on 89 titanium directlink is maybe enough.
You just have to see the size of each entry of the directory listing: 14 bytes or 22 bytes?

76

The patch for V200 integrated in RC7:
--- a/src/Link.asm
+++ b/src/Link.asm
@@ -809,6 +809,11 @@ TranslatePacket                                    ; Translate Packet
 \DirLoop                       move.l  a0,d0
                                beq.s   \DirDone
                                add.w   #8+2+4,d4               ; One more file 
+               ifd     V200                                    ; V200 has eight bytes which always have a value of 0 at the end of a directory 
+                               addq.w  #8,d4                   ; One more file 
+                               clr.l   -(a7)                   ; Make it nulls
+                               clr.l   -(a7)                   ; Make it nulls
+               endif
                                lea     -(8+2+4)(a7),a7         ; Alloca on the stack
                                move.l  SYM_ENTRY.name(a0),(a7)         ; Copy SYM NAME (1)
                                move.l  SYM_ENTRY.name+4(a0),4(a7)      ; Copy SYM NAME (2)
@@ -841,6 +846,12 @@ TranslatePacket                                    ; Translate Packet
 \DirDone               ; First Entry is the folder itself if isn't home
                        move.l  a3,d0                           ; Check if it is home
                        beq.s   \NoAddFolderEntry
+                               add.w   #8+2+4,d4               ; One more file
+               ifd     V200                                    ; V200 has eight bytes which always have a value of 0 at the end of a directory 
+                               addq.w  #8,d4                   ; One more file 
+                               clr     -(a7)
+                               clr     -(a7)
+               endif
                                clr.l   -(a7)                   ; Len = 0
                                move.w  #$1F00,-(a7)            ; Type & Flags
                                subq.l  #8,a7                   ; Alloca on the stack
@@ -851,7 +862,6 @@ TranslatePacket                                     ; Translate Packet
                                moveq   #8-1,d0                 
 \FoldNameLoop                          move.b  (a3)+,(a0)+     ; Copy 8 chars
                                        dbf     d0,\FoldNameLoop        ; Name
-                               add.w   #8+2+4,d4               ; One more file 
 \NoAddFolderEntry                      
                        ;       FreeHandle(PACKET_DATA_HD)
                        jsr     FreePacket


Do you know how can I test directory listing with tiemu?

[EDIT]: I have a small idea why it was detected as a 89 Titanium: The returned HW_VERSION shall be between 0 (HW1) 1 (HW2) or 2 (HW3). It returned 1, 2 or 3 instead...

77

PpHd (./73) :
I heard that your calculator was detected as a TI-89 titanium.

I confirm (just checked). I'll perform other tests tomorrow.

78

A Directory Listing or a requesting of a variable. Probably a directory listing of the Home directory due to the size (and PedroM answer of 0x20 bytes = 4 null first bytes + 2*14 bytes for each folder - main and system). I don't see anything wrong in it.

Directory listing, Ti-Connect just displays the list of the directories (indeed, I had just main & system).

The calc browsing seems to work fine. This is the device and system detection which fails (first log I gave to you).

79

Folco (./78) :
Directory listing, Ti-Connect just displays the list of the directories (indeed, I had just main & system). The calc browsing seems to work fine. This is the device and system detection which fails (first log I gave to you).


Ok, so maybe the size of each directory entry is still 14 bytes (I am going to have a headache)
Does it display TI-89 Titanium before and after the wrong detection using "device and system detection " ?

80

Folco (./78) :
A Directory Listing or a requesting of a variable. Probably a directory listing of the Home directory due to the size (and PedroM answer of 0x20 bytes = 4 null first bytes + 2*14 bytes for each folder - main and system). I don't see anything wrong in it.

Directory listing, Ti-Connect just displays the list of the directories (indeed, I had just main & system).

The calc browsing seems to work fine. This is the device and system detection which fails (first log I gave to you).

So receiving / sending files work?

81

Folco (./72) :
Could you use a log file somewhere in /sytem ?

What do you mean?

82

The device detection and the device browsing are totally different.

It doesn't display the result of its detection when I launch the "TI device info" ("device and system detection"). So I can't tell you if the calc is seen as a TI89ti at this moment.
It says that only when browsing the vat.

The complete log (because pedrom displays a second part after that Ti-Connect displays its own error :

- Launch "TI device info"
Recv 08A2 0006
Send 9856 0000
Send 9806 000B
Recv 0856 0000
Recv 0809 0000

- then PedroM throws TWO "Link : format" errors
- then Ti-Connect outputs its error (dialog box)
- then PedroM displays still some data :
Send 9856 0000
Sebd 9815 0020
Recv 0856 0000
Send 9892 0000


cross -> I mean that if you want to echo more info, using a file should be better than echo on the screen
send/receive files : checking

EDIT :
Sending a file to tha calc works
I don't send a file to the PC, because the Ti-Connect shell doesn't show the files confus

83

I mean that if you want to echo more info, using a file should be better than echo on the screen

FYI, Ti-Connects allows to create a folder on the calc ! And it works ! But PedroM displays a lot of info, I can't read all. Ti-Connect seems to send some commands that are printed in the command line and executed by PedroM, but it's very quick, so I can't read what appears, and it overwrites the debug link informations...

EDIT :
When I create a folder, it's created with a variable in it : a1234567. I have not vars named like that in elsewhere in the vat
Some of the executed commands are "delvar <a lot of char>". But it destroys debug infos.
I mean that if you want to echo more info, using a file should be better than echo on the screen

Ok, I get that because PedroM doesn't understand "DelVar" grin

84

Recv 08A2 0006 : PC->TI: Silent - Request Variable (REQ) ==> Which one?
Send 9856 0000 : TI->PC: ACK
Send 9806 000B : TI->PC: Variable Header (VAR) of the requested variable
Recv 0856 0000  : PC->TI ACK
Recv 0809 0000 :  PC->TI Ok to send the data (CTS)
<== ERROR: Link format ==>
<== ERROR: Link format ==>
Send 9856 0000  : TI->PC ACK
Send 9815 0020  : TI->PC Data associated to the requested variable (XDP).
Recv 0856 0000  : PC->TI ACK
Send 9892 0000 : TI->PC END OF TRANSMISSION


You can get this error for:
Receiving VAR / RTS: The variable name field is bigger than 17
Receiving a REQ / Directory listing: folder file name length is bigger than 8.
Receiving a REQ / Other file: Either the file name size is 0, or bigger than 17.

I suspect receiving a REQ / Type ID Byte different of 1A or 1B, and with 0 file name size.
I suspect even:
Requesting ID list
Indeed, the request is as if the TI requested the 'IDLIST' variable: Ty=22 and Nl=00.
This request works only with upgraded calculator (check if TI has been upgraded before). 


For the Checking FLASH
The protocol for checking whether the calculator AMS has been upgraded is described below.
	REQ special: 00 68 00 00.
	ACK: either 98 56 00 10 (not upgraded), either 98 56 10 04 (upgraded).

PedroM answers $1001 (ie. upgraded).
==> ticonnect may suppose it can sens an IDLIST request.

85

Folco (./83) :
I mean that if you want to echo more info, using a file should be better than echo on the screen

FYI, Ti-Connects allows to create a folder on the calc ! And it works ! But PedroM displays a lot of info, I can't read all. Ti-Connect seems to send some commands that are printed in the command line and executed by PedroM, but it's very quick, so I can't read what appears, and it overwrites the debug link informations...

I wouldn't have expected such a thing triso

[EDIT]:
Creating a folder

In fact, Ti-Connect use an ersatz for this: it sends an empy var with full path like 'new_fld\a1234567' and next delete variable.


Folco (./82) :
cross -> I mean that if you want to echo more info, using a file should be better than echo on the screen

Of course.

86

I have edited ./82 & ./83

87

Folco (./82) :
I don't send a file to the PC, because the Ti-Connect shell doesn't shows the files confus.gif

I have an idea why. I'll try a fix.
Folco (./86) :
I have edited ./82 & ./83

So do I.

88

I have done the modificiations which should fix this problem.
But I get a new one:
../bin/flashos/flashos.a: Warning: Section size of 24626 bytes is larger than requested size of 24576.
../bin/flashos/flashos.a: Warning: Section size of 24638 bytes is larger than requested size of 24576.

So I have to fix this before releasing the RC7.

89

Potential bug in sld.asm, ExtractFileFromPack : unexpected behavior if HLock destroys (sp).w
move.w (sp),-(sp) // ROM_THROW HLock // addq.l #2,sp would solve that

90

AFAIK, the AMS 1.00-3.10 HLock doesn't trash (sp).w, and HLock is not the only AMS routine abused that way by various programs - but you're right smile
avatar
Membre de la TI-Chess Team.
Co-mainteneur de GCC4TI (documentation en ligne de GCC4TI), TIEmu et TILP.
Co-admin de TI-Planet.