Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C64] [C128] Proposal: Support connections over 1541 Ultimate II network interface #31

Open
rhalkyard opened this issue Jun 22, 2019 · 8 comments

Comments

@rhalkyard
Copy link
Contributor

rhalkyard commented Jun 22, 2019

Recent firmware versions of the 1541 Ultimate II cartridge allow the C64 to open TCP connections on its onboard ethernet interface. I use one, and it would be nice to be able to use that to connect, rather than my (unfortunately rather flakey) wifi-to-serial modem.

While documentation is thin on the ground right now, https://github.com/xlar54/ultimateii-dos-lib provides a library interface and some example applications, and the firmware source code describes the interface in a fairly straightforward manner. I'd be happy to throw together an implementation if you think this would be a useful addition.

Since the Ultimate II handles all the TCP logic and just exposes a byte stream to the C64, this (hopefully) shouldn't require much in the way of architectural changes, but I thought I'd open this issue before I started working on an implementation, in case you had any thoughts about how you'd like it integrated.

My initial thought would be to make it a general-purpose CC65 serial driver that can just be loaded in place of UP2400 or SwiftLink, with an additional driver-specific ioctl interface to specify a host to connect to. That way, the only major change required to the PlatoTerm code would be to prompt the user for a host and port at startup if using the Ultimate II driver.

@rhalkyard rhalkyard changed the title Proposal: Support connections over 1541 Ultimate II network interface [C64] [C128] Proposal: Support connections over 1541 Ultimate II network interface Sep 14, 2019
@rhalkyard
Copy link
Contributor Author

I've got a quick-and-dirty prototype of this working at https://github.com/rhalkyard/platoterm64/tree/u2ethernet. Needs some tidying and comments and the like before it's ready for a PR, but the basics work on the C64 at least.

@tschak909
Copy link
Owner

Dude, I could hug you.

Anything I can do to help?

-Thom

@rhalkyard
Copy link
Contributor Author

Glad to help! It’s been a fun challenge.

The code that I just pushed is all extremely preliminary - i just got it working well enough to post a note, so I thought I’d better put the code out there! I’ll tidy it up and add some comments explaining a bit more about what’s going on, and then we can figure out how best to integrate it.

The standout thing that it’ll need will be some way of choosing a host to connect to - probably a prompt at startup, but it might be nice to save a default into the configuration. Could probably use a lot of the same infrastructure to save a modem dial string as well, which would be kinda neat.

Unfortunately it can only really be tested and debugged on real hardware - I’m not aware of any emulators that support the Ultimate-II. But confirmation that my changes haven’t catastrophically broken the other ports (or serial functionality on the C64 port) would be nice :) - it’ll automatically fall back to serial if the Ultimate-II hardware isn’t detected.

@tschak909
Copy link
Owner

where can I get the hardware?
-Thom

@rhalkyard
Copy link
Contributor Author

where can I get the hardware?

https://ultimate64.com. Looks like they're on backorder right now (they're made in small batches and sell out fairly quickly). A bit pricey, but worth it - drive emulator, flashcart, ethernet interface, 16MB REU, and a whole lot more, all in one box.

The Ultimate 64, available from the same site, is a reproduction of the C64 with all that functionality built in. I don't own one so I can't know for sure, but I gather that the same code should work on that too.

@rhalkyard
Copy link
Contributor Author

As I said in commonotes, I've made a few revisions that (I think) are getting this close to being ready for prime time. It now works on the C128 too, and I've added a simple prompt that allows the user to specify a host to connect to. Just want to get the preferences switching between serial and ethernet working properly, and I think we can call it good!

(Here's a screenshot of the connection prompt; I don't have anything handy that will capture the output of the VDC, so a phone photo of my monitor will have to do 😅)
IMG_8295

@rhalkyard
Copy link
Contributor Author

Since technotron/commodor requested this on IRATA, I've uploaded pre-built .D64s to Google Drive:

I've added support for switching devices - serial is the default, and you can switch between serial and Ultimate-II under I)nterfaces in setup. I haven't tested it extensively yet, so I'd greatly appreciate help in shaking out the bugs!

@tschak909
Copy link
Owner

Groovy, I'll be able to test this in a few days. I am trying to get the Atari cartridge better squared away. This is awesome! I really hoped that a good ethernet solution for the C64 would materialize!

Hopefully on the Atari side, Jeff Piepmeier's ESP cart will firm up for high-speed ethernet on the Atari, and we'll also have a budget-conscious ESP solution for the SIO bus.

The Apple 2 can use the off-loading features of the Uthernet II, I just need to hack it in. (I have a IIgs with an Uthernet II, now that I think about it...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants