Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
20 May, 2013, 18:33:12 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1] 2 3   Go Down
  Print  
Author Topic: How to use the link port -  (Read 2325 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
Matrefeytontias
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: Today at 12:21:50
Date Registered: 14 October, 2011, 18:48:49
Location: Alone in the Park
Posts: 854


Topic starter
Total Post Ratings: +174

View Profile
« on: 03 January, 2012, 16:53:42 »
0

Hi guys !

I try to make a little link port test with two balls which are moved with the arrows of the other calc. But when I push a key on each calc, the balls don't move.

Why ?
Logged

/\   ><   [-   |_|   _\~   [-   /?



Spoiler for Shameful self-advertising:
/image/37571.png[/img]
If at a certain moment you think that I'm awesome, give an internet (>^_^)>
Xeda112358
Xombie. I am it.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Last Login: Today at 15:26:10
Date Registered: 31 October, 2010, 08:46:36
Location: Land of Little Cubes and Tea, NY
Posts: 3743


Total Post Ratings: +598

View Profile
« Reply #1 on: 03 January, 2012, 16:57:56 »
0

Could you post a some of your code? I imagine if you are only using arrows, you will only need to send 4 bits, too, if that helps Smiley We might be able to help out!
Logged



Grammer Download (2.29.04.12)
Latest update (possibly incomplete)
My pastebin
Spoiler for FileSyst:
FileSyst is an application that provides a folder and filesystem for the TI-83+/84+ calculators. It is designed to be easy to access and use in BASIC, and it can be used to access game files and save data, or to create a command prompt, among other things:

Spoiler for Graphiti:
This is a graph explorer for graph theory. It will require lots of work to finish. Currently you can:
Add/delete vertices
Add edges (direction not shown, but they are directed)
Arrange vertices in a circle (in the future, you will be able to define levels of rings and the number of nodes in each)
Create complete graphs quickly

Plans:
Add adjacency matrix viewer
Deleting edges
Multiple graphs support
Arrows for directed graphs
Planarity testing
Matrix operations
Weighted edges
Chromatic polynomials
Chromatic numbers

Spoiler for Stats:

Samocal             [o---------]
Virtual Processor   [o---------]
EnG                 [oo--------]
Grammer             [ooo-------]
AsmComp             [ooo-------]
Partex              [oooo------]
BatLib              [oooooooo--]
Grammer82           [----------]
Grammer68000        [----------]


Pseudonyms:  Zeda, Xeda, Thunderbolt
Languages:   English, français
Programming: z80 Assmebly
             Grammer
             TI-BASIC (83/84/+/SE, 89/89t/92)
Known For:   -Creator of the Grammer programming language
              (Winning program of zContest2011)
             -BatLib- One of the most feature packed libraries for BASIC programmers available
              with over 100 functions and a simple programming language
             -Learning to program z80 in hexadecimal before using an assembler (no computer was
              available!)
╔═╦╗░╠═╬╣▒║ ║║▓╚═╩╝█


Matrefeytontias
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: Today at 12:21:50
Date Registered: 14 October, 2011, 18:48:49
Location: Alone in the Park
Posts: 854


Topic starter
Total Post Ratings: +174

View Profile
« Reply #2 on: 03 January, 2012, 19:29:33 »
0

Now, no bug when I push a key on each calc, but only one white ball moves (on each calc, there is a black balle moved by the calc and a white ball moved by the other calc).


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
.MULTI

ClrHome
ClrDraw
ClrDrawr

0→A→C→D→X→Y
56→B

[3C7EFFFFFFFFFF7E3C→Pic1J1
[3C428181818181423C→Pic1J2

Repeat getkey(15)
 If getkey(2) and (X>0)
  X--
  1→C
 ElseIf getkey(3) and (X<88)
  X++
  2→C
 Else
  0→C
 End

 sub(GET)
 Send(C,500)
 sub(GET)

 DispGraphrClrDraw

End

ClrHome
ClrDraw

Lbl GET
Get→D
If D=1
 A--
ElseIf D=2
 A++
End
Pt-Off(X,Y,Pic1J1
Pt-Off(A,B,Pic1J2
Return
Logged

/\   ><   [-   |_|   _\~   [-   /?



Spoiler for Shameful self-advertising:
/image/37571.png[/img]
If at a certain moment you think that I'm awesome, give an internet (>^_^)>
saintrunner
Custom Spriter: You ask it! I'll Make it!
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: 09 March, 2013, 02:00:40
Date Registered: 27 October, 2011, 21:52:46
Location: Right here....I think?
Posts: 1776


Total Post Ratings: +97

View Profile WWW
« Reply #3 on: 03 January, 2012, 20:25:34 »
0

Ooooh i love two player games! I hope thats what your going to make! Although good calc gamers are hard to fin at my school Tongue good luck!
Logged

My Sprites Thread   :Updated often Smiley for your viewing pleasure

GAMES:
Nick
LV9 Veteran (Next: 1337)
*********
Offline Offline

Gender: Male
Last Login: Today at 15:10:48
Date Registered: 05 June, 2011, 20:01:07
Location: 51° 12′ 34″ N, 3° 13′ 31″ E
Posts: 1178


Total Post Ratings: +158

View Profile WWW
« Reply #4 on: 03 January, 2012, 20:27:42 »
0

isn't it just because you store the value for both calcs in D ?
when you do that, the sent and gotten value are the same, since it's D for both calcs, get it?
i might be wrong w00t
Logged

Matrefeytontias
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: Today at 12:21:50
Date Registered: 14 October, 2011, 18:48:49
Location: Alone in the Park
Posts: 854


Topic starter
Total Post Ratings: +174

View Profile
« Reply #5 on: 03 January, 2012, 21:51:04 »
0

@saintrunner yes, that's what I'm trying to do Smiley

@Nick it's not that, because variables of each calc are undependant, I believe.
Logged

/\   ><   [-   |_|   _\~   [-   /?



Spoiler for Shameful self-advertising:
/image/37571.png[/img]
If at a certain moment you think that I'm awesome, give an internet (>^_^)>
saintrunner
Custom Spriter: You ask it! I'll Make it!
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: 09 March, 2013, 02:00:40
Date Registered: 27 October, 2011, 21:52:46
Location: Right here....I think?
Posts: 1776


Total Post Ratings: +97

View Profile WWW
« Reply #6 on: 03 January, 2012, 21:52:56 »
0

OOOH! What type of game?
Logged

My Sprites Thread   :Updated often Smiley for your viewing pleasure

GAMES:
Matrefeytontias
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: Today at 12:21:50
Date Registered: 14 October, 2011, 18:48:49
Location: Alone in the Park
Posts: 854


Topic starter
Total Post Ratings: +174

View Profile
« Reply #7 on: 03 January, 2012, 23:16:27 »
0

I don't know right now ; I'll first practice a bit with the link port, and after that make a big game. Coming soon Wink (if I can resolve the current problem Grin )
Logged

/\   ><   [-   |_|   _\~   [-   /?



Spoiler for Shameful self-advertising:
/image/37571.png[/img]
If at a certain moment you think that I'm awesome, give an internet (>^_^)>
kindermoumoute
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 17 May, 2013, 21:33:10
Date Registered: 15 May, 2010, 17:53:56
Posts: 836


Total Post Ratings: +51

View Profile
« Reply #8 on: 06 January, 2012, 22:10:46 »
+1

Ok, the fact : I looked around the forum about link command, but I saw nowhere a complete code that used the port link so improved.
So today I worked on it.

My technique is initially to define a calculator server and a calculator client, in Boolean it mean 1 and 0. To specify if the calculator is server or client, I do it more or less randomly, because for the rest of the program I don't mind the order.

1
2
3
4
5
6
7
8
9
10
11
:.r1 is the number of swap you want to try it work, ussualy 10 is same than 200
:Lbl SYN
:Output(0,,"Synchronisation ...
:0→r2
:Repeat r2>r1 or getKey(15)
:If Get+1
:→r2
:End
:Send(r2,100)
:End
:Returnr2^2
Now we have a server (0) and a client (1), and the first application is to separate server code and client code :

1
2
3
4
5
!If B
:SRV()
:Else
:CLT()
:End
My first idea was to make a program where the server send and the client get each loop, here a funny example :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
:.AXE
:[183C7EFFFF7E3C18]→Pic1
:0→X
:ClrHome
:SYN(200)→B
:Repeat getKey(15) or (B>1
:!If B
:SRV()
:Else
:CLT()
:End
:DispGraphClrDraw
:End
:Return

:.Program host
:Lbl SRV
:If X<96
:Pt-On(X,48,Pic1
:End
:X<192?X++,→X
:Send(X,5000)
:Return

:.Program client
:Lbl CLT
:If X>95
:Pt-On(X-96,48,Pic1
:End
:If Get+1:-1→X:End
:Return

NB : With real calculator there isn't this speed lag, here it's cause of wabbitemu mistake.

Now I thought about a way to send multiple bytes in both directions (for games such as Battleship, Chess, pokemon, and thousands more). My first solution is a system of roundtrip between server and client, after synchronizing calcs.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
:.r1 ==> number of bytes to send
:Lbl ECH
:SYN(10)
:For(I,0,r1)
:!If B
:Send({L1+I},5000)
:GET()→{L2+I}
:Else
:GET()→{L2+I}
:Send({L1+I},10000)
:End
:End
:Return
:
:Lbl GET
:Repeat Get+1→r2
:If getKey(15)
:Goto ERR
:.ERR routine just leave program
:End
:End
:Returnr2-1
And it work perfectly, but I find this routine not very optimized, so I decided to try another way by sending all at once to the server, then to the client... to be continued.  Grin

PS : I can't test my code for the moment because of wabbitemu' mistakes...
Logged

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%
kindermoumoute
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 17 May, 2013, 21:33:10
Date Registered: 15 May, 2010, 17:53:56
Posts: 836


Total Post Ratings: +51

View Profile
« Reply #9 on: 08 February, 2012, 23:12:35 »
+1

I appeal to experts to advise me about the best way to exchange bytes between 2 calcs. Actually the main problem is that link command are bugged : I always loss of bytes with a constant percentage (2~10% according to the calculator). How can we fix and optimize it? w00t


I have attached a program that exchange 20 bytes, and then calculates the sum of received values​​: it should display 190. Try it with real calc please.

* SRC (1).8xp (0.46 KB - downloaded 15 times.)
« Last Edit: 08 February, 2012, 23:12:52 by kindermoumoute » Logged

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%
Xeda112358
Xombie. I am it.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Last Login: Today at 15:26:10
Date Registered: 31 October, 2010, 08:46:36
Location: Land of Little Cubes and Tea, NY
Posts: 3743


Total Post Ratings: +598

View Profile
« Reply #10 on: 08 February, 2012, 23:27:11 »
0

Do I send the program to both calcs and then run the program on both?

EDIT: I tried it 10 times on each calculator and they said 190 each time. Also, I even have a bad cord and it worked! +1 Cheesy

EDIT2: If I can figure out how this code works, can I use it in Grammer? (My link protocol does not work for synchronising and whatnot Undecided)
« Last Edit: 08 February, 2012, 23:45:50 by Xeda112358 » Logged



Grammer Download (2.29.04.12)
Latest update (possibly incomplete)
My pastebin
Spoiler for FileSyst:
FileSyst is an application that provides a folder and filesystem for the TI-83+/84+ calculators. It is designed to be easy to access and use in BASIC, and it can be used to access game files and save data, or to create a command prompt, among other things:

Spoiler for Graphiti:
This is a graph explorer for graph theory. It will require lots of work to finish. Currently you can:
Add/delete vertices
Add edges (direction not shown, but they are directed)
Arrange vertices in a circle (in the future, you will be able to define levels of rings and the number of nodes in each)
Create complete graphs quickly

Plans:
Add adjacency matrix viewer
Deleting edges
Multiple graphs support
Arrows for directed graphs
Planarity testing
Matrix operations
Weighted edges
Chromatic polynomials
Chromatic numbers

Spoiler for Stats:

Samocal             [o---------]
Virtual Processor   [o---------]
EnG                 [oo--------]
Grammer             [ooo-------]
AsmComp             [ooo-------]
Partex              [oooo------]
BatLib              [oooooooo--]
Grammer82           [----------]
Grammer68000        [----------]


Pseudonyms:  Zeda, Xeda, Thunderbolt
Languages:   English, français
Programming: z80 Assmebly
             Grammer
             TI-BASIC (83/84/+/SE, 89/89t/92)
Known For:   -Creator of the Grammer programming language
              (Winning program of zContest2011)
             -BatLib- One of the most feature packed libraries for BASIC programmers available
              with over 100 functions and a simple programming language
             -Learning to program z80 in hexadecimal before using an assembler (no computer was
              available!)
╔═╦╗░╠═╬╣▒║ ║║▓╚═╩╝█


Quigibo
The Executioner
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: 18 May, 2013, 00:55:01
Date Registered: 22 January, 2010, 05:02:37
Location: Los Angeles
Posts: 2022


Total Post Ratings: +1019

View Profile
« Reply #11 on: 09 February, 2012, 05:15:54 »
+1

Maybe the problem is that you left Interrupts on?  Interrupts should be off or custom when using the link port otherwise the OS might decide to alter the ports in the middle of the linking.  Try adding an FnOff at the beginning of your program.
Logged

___Axe_Parser___
Today the calculator, tomorrow the world!
kindermoumoute
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 17 May, 2013, 21:33:10
Date Registered: 15 May, 2010, 17:53:56
Posts: 836


Total Post Ratings: +51

View Profile
« Reply #12 on: 09 February, 2012, 19:37:49 »
0

I tried it 10 times on each calculator and they said 190 each time. Also, I even have a bad cord and it worked! +1 Cheesy
Really ? O_o
Ok Quigibo, I'll try it tomorrow.
Logged

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%
Xeda112358
Xombie. I am it.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Last Login: Today at 15:26:10
Date Registered: 31 October, 2010, 08:46:36
Location: Land of Little Cubes and Tea, NY
Posts: 3743


Total Post Ratings: +598

View Profile
« Reply #13 on: 09 February, 2012, 21:15:02 »
0

Yes and I found that if I pressed clear while it was still synchronizing it returned 20 every time (on either calculator).
Logged



Grammer Download (2.29.04.12)
Latest update (possibly incomplete)
My pastebin
Spoiler for FileSyst:
FileSyst is an application that provides a folder and filesystem for the TI-83+/84+ calculators. It is designed to be easy to access and use in BASIC, and it can be used to access game files and save data, or to create a command prompt, among other things:

Spoiler for Graphiti:
This is a graph explorer for graph theory. It will require lots of work to finish. Currently you can:
Add/delete vertices
Add edges (direction not shown, but they are directed)
Arrange vertices in a circle (in the future, you will be able to define levels of rings and the number of nodes in each)
Create complete graphs quickly

Plans:
Add adjacency matrix viewer
Deleting edges
Multiple graphs support
Arrows for directed graphs
Planarity testing
Matrix operations
Weighted edges
Chromatic polynomials
Chromatic numbers

Spoiler for Stats:

Samocal             [o---------]
Virtual Processor   [o---------]
EnG                 [oo--------]
Grammer             [ooo-------]
AsmComp             [ooo-------]
Partex              [oooo------]
BatLib              [oooooooo--]
Grammer82           [----------]
Grammer68000        [----------]


Pseudonyms:  Zeda, Xeda, Thunderbolt
Languages:   English, français
Programming: z80 Assmebly
             Grammer
             TI-BASIC (83/84/+/SE, 89/89t/92)
Known For:   -Creator of the Grammer programming language
              (Winning program of zContest2011)
             -BatLib- One of the most feature packed libraries for BASIC programmers available
              with over 100 functions and a simple programming language
             -Learning to program z80 in hexadecimal before using an assembler (no computer was
              available!)
╔═╦╗░╠═╬╣▒║ ║║▓╚═╩╝█


Happybobjr
James Oldiges
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 00:20:45
Date Registered: 01 June, 2010, 00:52:05
Location: IN, United States
Posts: 2273


Total Post Ratings: +100

View Profile
« Reply #14 on: 09 February, 2012, 23:46:31 »
0

wish youwould have told me that months ago Quigibo....
awesome
Logged

School: East Central High School

Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Non-Cas |||  OS: 1.1 |||  Build: Old  |||  84+ keypad.   Being lent out
____________________________________________________________
Pages: [1] 2 3   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.379 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.