128 Internet coding

Started by xlar54, June 05, 2006, 04:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

xlar54

Ive completed the userport --> PC serial port connector, which when using Brain's tcpservj program, allows you to connect to telnet BBSs and QLink.  (Basically it acts as a hayes compat modem).  Once I get my setup back up and running (Ive moved rooms and I needed to temporarily take down the 128), Im hoping to write a windows service in C# that will do what tcpservj does.  Then, Id like to start hacking at the 128, writing simple web browsers (text only of course), an irc client, etc. This will be an interesting project, even though it relies on the PC for internet connectivity.  Slow as christmas Im sure, but it will be fun. I quite miss the simplicity of coding on the 128.  Is this something anyone else might be interested in?

Guest

If you want to start your Windows Service as open source I'll help out.

xlar54

Sounds like a plan. Anything I write for this will be open source of course.

Guest

I would recommend using Source Forge.  I'm learning the Open Source processes and tools and so I would like us to standardize on Tortoise CVM as that's the one I'm planning on learning.  I'm a very experience C# developer, and have lots of experience with Windows Services in C#.  I would recommend we use .Net 2.0 since it includes direct access to the user port in managed code.

xlar54

Ive done the coding for the service and it works well, but I dont have 2005 at home, so I had to use the 1.1 framework. Downside is that 1.1 does not have built in serial port capability, so it uses Win32.  Works great, as a replacement for tcpserj, the only annoying thing (and admittedly its my coding), it pegs the CPU at 100% because it runs in an endless loop.  Ill send you what i have and you can take a look. Meanwhile, Ill see if I can drum up a copy of 2005.

enigma

I have put together a Webserver on the C128.



It's based on uIP 1.0 by Adam Dunkels and uses also a CS8900A.
Currently it loads the files from disk and thats rather slow. The NIC is wired to the IDE connector and is programmed by PIO.
I know thats rather slow (infact its veery slow ;) ) and it will soon be moved to the grey connector at the front of the interface. So it will be memory mapped and I can use the HDD for the files.
I plan to implement also some more advanced functions like getting data from forms....

christianlott1

Xlar, I'd like to see this code also. I'm using vs2005. I've been learning VB but I think I can understand C#.

I'd like to follow the project.

On my previous message I mentioned the KL program I disassembled.

If I can send commands through a buffer to a sql database and recieve data within a set area of memory, I'll be far along.

Can your code do this - recieve a sql connection and query parameter and return a buffered data table (functionally a table adapter) within a parameterized area of memory?

Ideally this would be a forward and backward scrollable data set, so the returned data would be buffered on the PC/Server and just serve me the bite sized chunks my ~40k of free memory can handle.

christianlott1@yahoo.com

xlar54

>> Xlar, I'd like to see this code also. I'm using vs2005. I've been learning VB but I think I can understand C#.
>>
>>I'd like to follow the project.

Sure thing. Ill get it uploaded sometime this weekend.

>>On my previous message I mentioned the KL program I disassembled.
>>
>>If I can send commands through a buffer to a sql database and recieve data within a set area of memory, I'll be far along.
>>
>>Can your code do this - recieve a sql connection and query parameter and return a buffered data table (functionally a table >>adapter) within a parameterized area of memory?
>>
>>Ideally this would be a forward and backward scrollable data set, so the returned data would be buffered on the PC/Server and >>just serve me the bite sized chunks my ~40k of free memory can handle.

Hmm... I suppose you could query a database, and return a table of data, sure. Using some kind of paging mechanism (even SQL based), you could handle the size issue.  Could be done.  Ill let you know when i post the code.

David Nelson

About the database access thing, a thought popped up. Since your 128 is connecting to a PC for internet, you should be able to either adapt the program (tcpserj?) it's communicating with or write one, that can also handle the database queries for you. In essense your 128 sends a special code sequence that the PC-side recognizes. The PC acknowledges and the 128 sends the parameters for the database it's requesting. The PC then forms the proper SQL query (easy enough to do with APIs and the like on the PC) and manipulates the return data to a format the 128 can understand and sends this back to the 128.

Ah you'll probably need a special communications program on the 128 side as well. Since the program you're working with has serial communication routines, if you're able to tap into that and modify and extend it, all is well. Then all should work.


Just some thoughts.
-David

Blacklord

Hi David,

Quote from: dnelsonflAbout the database access thing, a thought popped up. Since your 128 is connecting to a PC for internet, you should be able to either adapt the program (tcpserj?) it's communicating with or write one, that can also handle the database queries for you. In essense your 128 sends a special code sequence that the PC-side recognizes. The PC acknowledges and the 128 sends the parameters for the database it's requesting. The PC then forms the proper SQL query (easy enough to do with APIs and the like on the PC) and manipulates the return data to a format the 128 can understand and sends this back to the 128.

Ah you'll probably need a special communications program on the 128 side as well. Since the program you're working with has serial communication routines, if you're able to tap into that and modify and extend it, all is well. Then all should work.


Just some thoughts.
-David
Some good ideas there, and sort of on the lines of what I initially posed - do we believe this is doable guys ?

Lance

Guest

This is doable for the BBS if we do one of two things:

1) Create a custom host for the PC that replaces TCPSER4J (or similar) and uses a protocol to communicate with the 128 during the lifecycle of a BBS session.  This precludes the traffic being passed verbatim in/out of the 128 and makes the PC just as much part of the BBS as the 128.

2) We require the 128 to have two serial connections to the PC; one with RS232 from the Userport and one from a Swiftlink/Turbo232.  This would give the bbs the ability to perform queries to a special service running on the PC while allowing the user's connectivity to be routed through TCPSER4J (or similar).

David Nelson

@plbyrd,

Just use one connection. The 128 most likely needs a connection to the PC anyhow. You can use special character sequences that are not likely to show up in most data situations. If on the rare occasion it does, the PC can just send the data on after briefly attempting to begin the handshake and failing. I think a custom host on the PC is the way to go, then, and no need to write/use two processes on the PC.

-David

Guest

If we choose to write a single-solution that gives the C128 the ability to query the PC over the same serial link, we'll effectively been eliminating TCPSER4J and BBSServer as modem emulators and forcing sysops to use our tool.  It will also make development larger and more difficult than just a SQL query tool.

David Nelson

Quote from: plbyrdIf we choose to write a single-solution that gives the C128 the ability to query the PC over the same serial link, we'll effectively been eliminating TCPSER4J and BBSServer as modem emulators and forcing sysops to use our tool.  It will also make development larger and more difficult than just a SQL query tool.
Perhaps, but it'd be everything in one package. An all-in-one solution. And all guaranteed to work together. :)