Shift838 Posted November 17, 2022 Share Posted November 17, 2022 Not sure if this is out there, but is there a XB Primer to be loaded in high memory maybe to access the various options a TIPI can use like the TCP stack, etc? Quote Link to comment Share on other sites More sharing options...
+9640News Posted November 17, 2022 Share Posted November 17, 2022 12 minutes ago, Shift838 said: Not sure if this is out there, but is there a XB Primer to be loaded in high memory maybe to access the various options a TIPI can use like the TCP stack, etc? Matt has on his wiki code to access the TCP stack already from basic without any assembly. Now, myself, I have assembly code for the AfterHours BBS program that does a number of items already anyone is welcome to use if they so desire. I used pieces of code from the TIPI XOP from MDOS for the Geneve that I used in for assembly for the TI-99/4A implementation. It has substantially more code for more things and if someone is working on something for assembly and needs a jump start, let me know. Beery Quote Link to comment Share on other sites More sharing options...
Shift838 Posted November 17, 2022 Author Share Posted November 17, 2022 what I'm wanting to do is make a primer for remote user vs user games across the tipi. 1 Quote Link to comment Share on other sites More sharing options...
+arcadeshopper Posted November 17, 2022 Share Posted November 17, 2022 basically all that communication is available through standard TI file interface.. open a device to PI.HTTP or PI.UDP and send/receive away you don't need to do any memory hooks for anything. 4 INPUT "WEBPAGE HTTP://":F$ 6 DIM A$(255) 9 O$="PI.http://"&F$ 10 OPEN #1:O$,INPUT ,VARIABLE 128 20 ON ERROR 50 21 D=D+1 30 INPUT #1:A$(D) 40 GOTO 20 50 FOR A=1 TO D 60 PRINT A$(A) 70 NEXT A 1000 INPUT "done":B$ 3 Quote Link to comment Share on other sites More sharing options...
+jedimatt42 Posted November 17, 2022 Share Posted November 17, 2022 5 hours ago, Shift838 said: Not sure if this is out there, but is there a XB Primer to be loaded in high memory maybe to access the various options a TIPI can use like the TCP stack, etc? 4 hours ago, Shift838 said: what I'm wanting to do is make a primer for remote user vs user games across the tipi. I don't understand what you mean by 'primer' at all... can you try some other words? Quote Link to comment Share on other sites More sharing options...
Tuxon86 Posted November 18, 2022 Share Posted November 18, 2022 3 hours ago, jedimatt42 said: I don't understand what you mean by 'primer' at all... can you try some other words? A small bit of code, some boilerplate routines that someone could insert in their program to use generic functionality. At least, that’s my understanding of the term. 1 Quote Link to comment Share on other sites More sharing options...
Shift838 Posted November 18, 2022 Author Share Posted November 18, 2022 5 hours ago, jedimatt42 said: I don't understand what you mean by 'primer' at all... can you try some other words? like a program template just to get 2 TIPIs talking to each other, to allow for users to easily create user vs user games across the internet. Quote Link to comment Share on other sites More sharing options...
+jedimatt42 Posted November 18, 2022 Share Posted November 18, 2022 1 hour ago, Shift838 said: like a program template just to get 2 TIPIs talking to each other, to allow for users to easily create user vs user games across the internet. Typically today, you'd set up a service for 2 parties to connect, both as clients. But if you want to do just 2 4A's, someone has to be the server, and the other one has to be the client. The client would use the PI.TCP device to open a connection to the server 4As public and port forwarded ip address. The server would use PI.TCP device to bind a port for incoming connections... Then try to acquire the incoming connection... Just standard socket communication rules. And example of the BASIC server code can be found here: PI.TCP · jedimatt42/tipi Wiki (github.com) - It's in tidbit syntax instead of plain XB (since TIPI can translate that for you on OLD) But with all things 4A, there isn't a one size fits all 'primer' - Your use case may work better with the UDP support... XB is slow, and TIPI supports accessing the sockets at a lower level messaging API from Asm, or C - Extension TCP · jedimatt42/tipi Wiki (github.com) 1 Quote Link to comment Share on other sites More sharing options...
SteveB Posted November 19, 2022 Share Posted November 19, 2022 On 11/18/2022 at 5:07 AM, jedimatt42 said: And example of the BASIC server code can be found here: PI.TCP · jedimatt42/tipi Wiki (github.com) - It's in tidbit syntax instead of plain XB (since TIPI can translate that for you on OLD) You may also use the TiCodEd integrated version of TIdBiT (under Export/TIdBiT) or change the label BEGIN to something different as BEGIN is a keyword in SXB for BEGIN-END Blocks to get this standard Extended BASIC file. 100 ON ERROR 340 110 OPEN #1:"PI.TCP=*:8080.BIND" 120 PRINT "Bound server port 8080" 130 ON ERROR 290 140 INPUT #1:HANDLE 150 IF HANDLE=255 THEN 280 160 IF HANDLE<>0 THEN 190 170 CALL SOUND(1000,40000,30) 180 GOTO 130 190 OPEN #2:"PI.TCP=*:8080."&STR$(HANDLE) 200 PRINT #2:"Hello, I am a TI-99/4A"&CHR$(13)&CHR$(10) 210 PRINT #2:"Who are you? " 220 LINPUT #2:LINE$ 230 IF LINE$="" THEN 220 240 PRINT "Login from: "&LINE$ 250 PRINT #2:"Hello "&LINE$&CHR$(13)&CHR$(10) 260 CLOSE #2 270 GOTO 130 280 PRINT "Accept Error" 290 PRINT "Closing port" 300 ON ERROR 320 310 CLOSE #1 320 CALL SOUND(1000,40000,30) 330 GOTO 100 340 CALL SOUND(3000,40000,30) 350 GOTO 100 Quote Link to comment Share on other sites More sharing options...
GDMike Posted November 19, 2022 Share Posted November 19, 2022 I used tipi to talk with clasdic99 through share in pc 1 Quote Link to comment Share on other sites More sharing options...
Shift838 Posted November 19, 2022 Author Share Posted November 19, 2022 3 hours ago, GDMike said: I used tipi to talk with clasdic99 through share in pc i may need to look into that for some testing.. Quote Link to comment Share on other sites More sharing options...
Shift838 Posted November 19, 2022 Author Share Posted November 19, 2022 it would be great if you could run 2 different instances of Classic99 both with TiPi emulation and work out programs to communicate between the two Classic99 instances running the TiPi, be cool for debugging code.. 2 Quote Link to comment Share on other sites More sharing options...
+jedimatt42 Posted November 20, 2022 Share Posted November 20, 2022 Did you try? Cause it should work. (At least some things should) Quote Link to comment Share on other sites More sharing options...
+jedimatt42 Posted November 20, 2022 Share Posted November 20, 2022 26 minutes ago, jedimatt42 said: Did you try? Cause it should work. (At least some things should) Oh, I forgot cause I don't XB, but I think classic 99 only supports the lower level TIPI messaging API. But, you can attach mame or js99er to a full raspberry PI running the TIPI image configured for emulation. 2 Quote Link to comment Share on other sites More sharing options...
GDMike Posted November 21, 2022 Share Posted November 21, 2022 On 11/19/2022 at 5:34 PM, Shift838 said: it would be great if you could run 2 different instances of Classic99 both with TiPi emulation and work out programs to communicate between the two Classic99 instances running the TiPi, be cool for debugging code.. I setup a Central file on cl99, and depending on a variable in XB(or whatever you choose), I can make decisions about passing other data to another section of a file(s), and, yeah.. you get it. Both the tipi program and the cl99 program can get influence. Quote Link to comment Share on other sites More sharing options...
Shift838 Posted November 21, 2022 Author Share Posted November 21, 2022 1 hour ago, GDMike said: I setup a Central file on cl99, and depending on a variable in XB(or whatever you choose), I can make decisions about passing other data to another section of a file(s), and, yeah.. you get it. Both the tipi program and the cl99 program can get influence. I have that as well, but since the TIPI emulation in classic99 only get's a 127.0.0.1 IP address (loopback) it is really not on the network and I cannot do testing between the 2 instances to try to communicate to each other via the TCP or UDP connections. Unless I am doing somethign wrong. Quote Link to comment Share on other sites More sharing options...
Tursi Posted November 23, 2022 Share Posted November 23, 2022 Classic99: I don't think I planned UDP for receiving data, only sending... for TCP you should be able to bind a listen socket to any address. Not sure if I tested that though. Quote Link to comment Share on other sites More sharing options...
Shift838 Posted November 23, 2022 Author Share Posted November 23, 2022 49 minutes ago, Tursi said: Classic99: I don't think I planned UDP for receiving data, only sending... for TCP you should be able to bind a listen socket to any address. Not sure if I tested that though. I was looking into the ini file but did not find anything where the TiPi emulation was assigning IP address or port and did not see anything mentioned in the manual. Maybe I missed it somewhere. Quote Link to comment Share on other sites More sharing options...
Tursi Posted November 24, 2022 Share Posted November 24, 2022 22 hours ago, Shift838 said: I was looking into the ini file but did not find anything where the TiPi emulation was assigning IP address or port and did not see anything mentioned in the manual. Maybe I missed it somewhere. The TI program specifies the IP and port for the listen socket, at least according to my quick review of the code. I'm on the road at the moment and it's been quite a while since I added that, so I'm not sure if it's correct. I've only implemented the low level object (ie: not PI.TCP, but the code 0x22). My reference was https://github.com/jedimatt42/tipi/wiki/Extension-TCP You would create the socket with the 'bind' command, and receive a connection with the 'accept' command. The codepaths for this are complete and I thought I did at least a rudimentary test with everything, but I know it hasn't been heavily exercised. Make sure you read the debug log if you're trying to use it, no need to guess at what the emulator is attempting to do. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.