Author Topic: How to use the link port  (Read 15588 times)

0 Members and 2 Guests are viewing this topic.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: How to use the link port
« Reply #15 on: February 09, 2012, 05:09:30 pm »
O.O I just modified the source a bit and I just now made a program that exchanges Ans with the other calculator if it is a string o.o I used a few spots of assembly, but it works :D I am going to see if there is some way to make it terminate after receiving a certain byte ...

On another note, I tested this twice earlier by sending 255 bytes 100 times and the checksum worked every time :) (this was between TI-84+ and TI-84+SE)

Offline kindermoumoute

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 836
  • Rating: +54/-3
    • View Profile
Re: How to use the link port
« Reply #16 on: February 10, 2012, 11:11:08 am »
Ok, I identified the problem : when I try between a 83+fr and another 83+fr, it work perfectly. Then when I try with a 83+ and another 83+.. it work perfectly !
The probleme is when I try a 83+ with a 83+fr. :S
After analyzing 25 times, the 83+fr displayed 190 each time, but on the 83+ I have :
  • 18 perfect sends (190)
  • 181
  • 185
  • 187
  • 189 (twice)
  • And twice I needed to force quit because the other calc had finished : 191 O.O
So... we have a problem btw 83+ and 83+fr only. FnOff makes no difference, and I wonder if the "port" command could solve the problem? But I really don't understand how it work...  :(

PS : few people have 83+ in France...

EDIT : I though it could help to understand the problem : link1, link2.
« Last Edit: February 10, 2012, 11:24:13 am by kindermoumoute »
Projects :

Worms armageddon z80 :
- smoothscrolling Pixelmapping : 100%
- Map editor : 80%
- Game System : 0%

Tutoriel français sur l'Axe Parser
- 1ère partie : en ligne.
- 2ème partie : en ligne.
- 3ème partie : en ligne.
- 4ème partie : 10%
- Annexe : 100%

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: How to use the link port
« Reply #17 on: February 10, 2012, 02:05:58 pm »
My friend does not like me at the moment (we got in an argument), so I could not test between the 84+/SE and the 83+ (he has the 83+). Also, I am still trying to work on exchanging two different sized strings.

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: How to use the link port
« Reply #18 on: February 19, 2012, 11:25:50 am »
I found these. I dunno if it works like this with axe.
If you like my work: why not give me an internet?








Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: How to use the link port
« Reply #19 on: February 19, 2012, 03:53:34 pm »
Sorry for the doublepost, but I really need help on getting to know how the AXE protocol works! It's for my TI-nterface schoolproject which has to be finished before the presentations this wednesday!

Please help me out D:
If you like my work: why not give me an internet?








Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: How to use the link port
« Reply #20 on: February 19, 2012, 05:10:11 pm »
Sorry if this is difficult to follow, I didn't really know how to structure the diagram (if you want to call it a diagram). If you have any questions, just ask. Otherwise, I hope this helps!

Code: [Select]
SENDER RECEIVER
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Pull ring low

Repeat up to [ARG 2]*8μs If ring is not low, abort
 | If tip is low, break from loop Pull tip low
If tip is not low, abort

Release tip
Received byte = 0

LOOP 8 TIMES LOOP 8 TIMES
 | Release ring, pull tip low |
 | Wait ~21μs | Wait until tip == ring
 | Rotate byte to send left |
   | If 0 rotated out, pull ring low |
   | If 1 rotated out, release tip |
 | Wait ~12μs | If tip is low, rotate 0 left into byte
 | | If tip is high, rotate 1 left into byte

Release tip and ring
« Last Edit: February 19, 2012, 05:12:28 pm by Runer112 »

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: How to use the link port
« Reply #21 on: February 19, 2012, 08:16:22 pm »
Well that's... different. I had no idea Axe used a delay-based method.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: How to use the link port
« Reply #22 on: February 20, 2012, 07:23:08 pm »
Well, one line acts as a "clock" and the other is the data bit being sent.  The receiver never sends confirmation other than telling the sender to start and thus is necessarily delay based rather than confirmation based.  This is because it is the fastest way to link and guarantees that neither calculator can freeze from dead-lock, interruption, or interference.  However, I do want to overhaul the entire routine at some point because there are definitely cross-compatibility issues such as with 83+ to 83+fr.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Torio

  • LV3 Member (Next: 100)
  • ***
  • Posts: 83
  • Rating: +22/-0
    • View Profile
Re: How to use the link port
« Reply #23 on: February 22, 2012, 03:14:28 am »
Hello, I don't know if it could be useful for your problem, but I coded this routine a few months ago for a 2-player game.
It works perfectly, and takes 3 parameters :
1) - The adress of the variable to store the byte recieved (°A, for example)
2) - The byte to send
3) - The byte to send after you recieved something

Code: [Select]
Lbl RES
-1 -> {r1}r
Repeat {r1}r != -1 and ({r1}r != 255) or getkey(15)
Send(r2,10)
Get->{r1}r
End
Send(r3,50)
Pause 1
Return

For example if you want to send 1, and recieve something in A and then send 2 :
Code: [Select]
RES(°A, 1, 2)
I separated the byte you send before you recieve, and after you recieve, but it can be the same, though.
If you have any questions, just ask me.
Sorry about my mistakes, I'm French.

Projects :  Pokemon TI-89 | Ti-Tank

Offline kindermoumoute

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 836
  • Rating: +54/-3
    • View Profile
Re: How to use the link port
« Reply #24 on: February 22, 2012, 06:02:46 am »
Code: [Select]
{r1}r != -1 and ({r1}r != 255)
Why do you test {r1}r != 255 ???
Projects :

Worms armageddon z80 :
- smoothscrolling Pixelmapping : 100%
- Map editor : 80%
- Game System : 0%

Tutoriel français sur l'Axe Parser
- 1ère partie : en ligne.
- 2ème partie : en ligne.
- 3ème partie : en ligne.
- 4ème partie : 10%
- Annexe : 100%

Offline Torio

  • LV3 Member (Next: 100)
  • ***
  • Posts: 83
  • Rating: +22/-0
    • View Profile
Re: How to use the link port
« Reply #25 on: February 22, 2012, 07:45:15 am »
Because you certainly know that when you don't recieve something from Get, it will store -1 in the variable, but sometimes it could store 255 !
That was a major problem that made me lose a lot of time, I don't know why you can have 255 after a unsucessful Get.
Sorry about my mistakes, I'm French.

Projects :  Pokemon TI-89 | Ti-Tank

Offline kindermoumoute

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 836
  • Rating: +54/-3
    • View Profile
Re: How to use the link port
« Reply #26 on: February 22, 2012, 08:11:01 am »
I think we get the bug... now quigibo you know what you have to do. ;)

Here a new version, I just add a modulo 256 after all Get+1.
EDIT : don't work... :banghead:
« Last Edit: February 22, 2012, 08:31:03 am by kindermoumoute »
Projects :

Worms armageddon z80 :
- smoothscrolling Pixelmapping : 100%
- Map editor : 80%
- Game System : 0%

Tutoriel français sur l'Axe Parser
- 1ère partie : en ligne.
- 2ème partie : en ligne.
- 3ème partie : en ligne.
- 4ème partie : 10%
- Annexe : 100%

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: How to use the link port
« Reply #27 on: February 22, 2012, 10:46:56 am »
Doesn't Axe return -1 (65535) if it was unsuccessful? (not 255)

Offline Torio

  • LV3 Member (Next: 100)
  • ***
  • Posts: 83
  • Rating: +22/-0
    • View Profile
Re: How to use the link port
« Reply #28 on: February 22, 2012, 10:53:53 am »
I'm quite sure, that was the source of all my bugs.
Test my routine, and you will see.
Sorry about my mistakes, I'm French.

Projects :  Pokemon TI-89 | Ti-Tank

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: How to use the link port
« Reply #29 on: February 22, 2012, 11:03:09 am »
Oh, okay, so you mean sometimes it is supposed to return -1, but instead it returns 255?