• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

Experimental VNC (Remote Desktop) Server for the Classic Macintosh

marciot

Well-known member
Hello everyone,

I wanted to share with you a project I have been working on since last year. It is a remote desktop server I wrote from scratch using MacTCP.


To my knowledge, it is the first VNC server that can run on a Macintosh computer with a 68000 processor (there was at one point something called ChromiVNC but that required Open Transport and at least a 68030 CPU). Anyhow, this project is pretty much a work-in-progress and it's not tremendously stable or usable for real work.

Not sure whether it's my code or whether MacTCP is inherently unstable. Does anyone here have any development experience with MacTCP and can tell me whether they've had problems with it crashing under load?

Anyhow, if you want to learn more about how I accomplished this, please subscribe to my channel. I had to rely on a lot of technical hacks to get this to work and I've definitely been down several rabbit holes. If there is interest, I might post a video with a more behind-the-scenes look at this project.
 

cheesestraws

Well-known member
This is very nifty, well done!

Not sure whether it's my code or whether MacTCP is inherently unstable

I've always classified it as 'fragile' rather than 'unstable' but the distinction is perhaps academic. It's certainly very easy to crash...

If there is interest, I might post a video with a more behind-the-scenes look at this project

I'd like to know the tricks you found, but I have to admit I find video explanations of technical content almost totally unbearable and would vote for a written explanation if at all possible, so probably won't actually watch any videos about it.
 

marciot

Well-known member
I've always classified it as 'fragile' rather than 'unstable' but the distinction is perhaps academic. It's certainly very easy to crash...

This is what I feared. While I can fix bugs in my own code, if MacTCP has bugs in it too, there is less I can do about that. I've done my best to implement my code in an interrupt-safe manner and even wrote parts of it in assembly for efficiency, but even a very simple test case causes MacTCP to freeze the system occasionally, so I suspect it may not be something I can necessarily work around.

I'd like to know the tricks you found, but I have to admit I find video explanations of technical content almost totally unbearable and would vote for a written explanation if at all possible, so probably won't actually watch any videos about it.

That's a good point. I could certainly do a blog about it. For my video, in keeping with the 80s theme, I was thinking of making a presentation in HyperCard and then voicing over it, but I can see how a writeup might be better...
 

demik

Well-known member
The issue may as well be on the VNC Client. Both VNC Viewer and Tight VNC can crash/disconnect in a few cases as well.
MacTCP for sure doesn't help.

Anyway, that's impressive on its own, good job !
 

Nixontheknight

Well-known member
Hello everyone,

I wanted to share with you a project I have been working on since last year. It is a remote desktop server I wrote from scratch using MacTCP.


To my knowledge, it is the first VNC server that can run on a Macintosh computer with a 68000 processor (there was at one point something called ChromiVNC but that required Open Transport and at least a 68030 CPU). Anyhow, this project is pretty much a work-in-progress and it's not tremendously stable or usable for real work.

Not sure whether it's my code or whether MacTCP is inherently unstable. Does anyone here have any development experience with MacTCP and can tell me whether they've had problems with it crashing under load?

Anyhow, if you want to learn more about how I accomplished this, please subscribe to my channel. I had to rely on a lot of technical hacks to get this to work and I've definitely been down several rabbit holes. If there is interest, I might post a video with a more behind-the-scenes look at this project.
Can I volunteer to test with my Macintosh Classic?
 

marciot

Well-known member
I mean, I know it works poorly and the keyboard isn't implemented yet, but if you're a glutton for punishment, I've attached the file 😛

I'd be more curious to see how well it does on a faster machine, like an SE/30...
Can I volunteer to test with my Macintosh Classic?
 

Attachments

  • MiniVNC v0.1a.sit.hqx
    27.2 KB · Views: 9

Nixontheknight

Well-known member
I mean, I know it works poorly and the keyboard isn't implemented yet, but if you're a glutton for punishment, I've attached the file 😛

I'd be more curious to see how well it does on a faster machine, like an SE/30...
I’ll try it on my LC III if I have your permission to put it on Macintosh repository
 

marciot

Well-known member
I rather not see it in the Macintosh repository -- it's way, way too alpha for that. It may run on your LC III, as I've been developing it on Basillisk II and I added some code to make it work, but because it is meant for B&W Macs, on a color Mac it will only show the upper-right corner of the screen in B&W.
 

Nixontheknight

Well-known member
I rather not see it in the Macintosh repository -- it's way, way too alpha for that. It may run on your LC III, as I've been developing it on Basillisk II and I added some code to make it work, but because it is meant for B&W Macs, on a color Mac it will only show the upper-right corner of the screen in B&W.
noted. I'll see if I can move it to a floppy disk and put it on that way
 

marciot

Well-known member
You use the Macintosh Repository to transfer files to your LC III? What's special about the Macintosh Repository that you can download files from it and not from here? Even if this site doesn't render, can't you just manually type the URL to the attachment on your LC III?
 

marciot

Well-known member
Also, curious how you connect your LC III to the Internet. I did not think those machines had built-in Ethernet.
 

Nixontheknight

Well-known member
Also, curious how you connect your LC III to the Internet. I did not think those machines had built-in Ethernet.
It does but it doesn’t, I have a farralon PDS Ethernet card installed. And it showed the top left of the screen in monochrome but preliminary testing works on my LC III, only side effect I saw was the cursor was blinking. I was running OS 8.1 on my LC III
 

marciot

Well-known member
You also won't see the cursor in the remote client. This is because on color Macs I am asking Mac OS to copy a portion of the screen to an offscreen B&W buffer that simulates a B&W display and MacOS will not copy the cursor. On a real B&W Mac, I read directly from video memory and you do get the cursor transmitted to the VNC client.

Anyhow, I imagine that on any color capable computer like the LC III, you could probably run ChromiVNC.
 

Nixontheknight

Well-known member
You also won't see the cursor in the remote client. This is because on color Macs I am asking Mac OS to copy a portion of the screen to an offscreen B&W buffer that simulates a B&W display and MacOS will not copy the cursor. On a real B&W Mac, I read directly from video memory and you do get the cursor transmitted to the VNC client.

Anyhow, I imagine that on any color capable computer like the LC III, you could probably run ChromiVNC.
I did run ChromiVNC, but it draws the screen really slow like downloading an image on an old modem, which is why I'm hoping you can eventually expand this to work in color on color macs, I think it would make a really good vnc client if you make it work without an extension on color macs
 
Last edited:

marciot

Well-known member
I did run ChromiVNC, but it draws the screen really slow like downloading an image on an old modem, which is why I'm hoping you can eventually expand this to work in color on color macs, I think it would make a really good vnc client if you make it work without an extension on color macs
Interesting. Part of the reason may simply be that transmitting color images requires at least eight times as much bandwidth for 8-bit color, and possibly up to twenty-four times as much bandwidth for 24-bit color. In my server, I use a trick to transmit 1-bit images without color conversion, which isn't fully compliant with the VNC specifications but seems to work for the clients I have tried. MacTCP may lack the speed necessary for transmitting color, which would mean I couldn't necessarily do better. But perhaps I could, if I limited it to very specific color depths or resolutions.
 

Nixontheknight

Well-known member
Interesting. Part of the reason may simply be that transmitting color images requires at least eight times as much bandwidth for 8-bit color, and possibly up to twenty-four times as much bandwidth for 24-bit color. In my server, I use a trick to transmit 1-bit images without color conversion, which isn't fully compliant with the VNC specifications but seems to work for the clients I have tried. MacTCP may lack the speed necessary for transmitting color, which would mean I couldn't necessarily do better. But perhaps I could, if I limited it to very specific color depths or resolutions.
I wonder if it would work with 640x480 at at most 16 colors?
 

marciot

Well-known member
I wonder if it would work with 640x480 at at most 16 colors?
Color conversions tend to be expensive because they rely on the CPU doing a lot of bit-shifting, the 68000 is very slow at this and I do not know if the 68030 is any better. I suspect that it is this, combined with the fact that MacTCP is slow to begin with, that makes any remote desktop solution a challenge on a color system. I don't wish to shatter your hopes, but my guess is ChromiVNC isn't doing things so badly that there is a huge margin for improvement.
 

LaPorta

Well-known member
This is really cool and could be an incredible thing to use. Imagine instead being able to remotely control your vintage Mac from your modern Mac via Mini vMac! Next, do that over AirTalks for the non-Ethernet ones! There’s some real cool stuff going on here on these forums these days!
 

marciot

Well-known member
This is really cool and could be an incredible thing to use. Imagine instead being able to remotely control your vintage Mac from your modern Mac via Mini vMac! Next, do that over AirTalks for the non-Ethernet ones! There’s some real cool stuff going on here on these forums these days!
I'm not sure why you would need Mini vMac for this, but on that topic, it would be amazing if Mini vMac, or some other Mac Plus emulator were to borrow the DaynaPort SCSI emulation code from the RaSCSI project to add Ethernet support to a virtual Mac Plus. I did submit that as a suggestion in the Gryphel page, but I don't know how often that is looked at -- the last update seems to have been a year ago.
 
Top