Server mode Ethernet in Basillisk II not working

About BasiliskII, a 68k Mac emulator for Windows, MacOSX, and Linux that can run System 7.x through MacOS 8.1.

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
marciot42
Inquisitive Elf
Posts: 39
Joined: Wed Feb 26, 2014 2:21 pm

Server mode Ethernet in Basillisk II not working

Post by marciot42 »

Hello,

I was trying to do some MacTCP server development under Basillisk II using Mac OS 8.0 on a Window 10 host and I've noticed that I am able to do outgoing connections, but incoming connections are not working. I have Basillisk II set up to forward port 80 in the GUI. At first I suspected it was my code, but then I was able to reproduce the problem using Web Sharing, which is a built-in Mac OS feature.

Further investigation with "netstat -ab" showed that Basillisk II is listening on port 80, as I would expect. I was also able to "telnet" to port 80 and am able to connect when Basillisk II is running, but not when it is not running, which again is exactly what I would expect. So this rules out any firewall issues. However, despite the connection being live, I don't get any response and from the Mac OS side of things, no connection is made.

It seems like the Basillisk II Router is functional, but not forwarding any incoming packets. Any ideas?
marciot42
Inquisitive Elf
Posts: 39
Joined: Wed Feb 26, 2014 2:21 pm

Re: Server mode Ethernet in Basillisk II not working

Post by marciot42 »

Nevermind... I was using some unknown version of Basillisk II :???: With the latest, it seems to work fine! Making progress!
User avatar
KnuddlMac
Granny Smith
Posts: 123
Joined: Thu Apr 06, 2017 9:32 am
Location: Southern Bavaria

Re: Server mode Ethernet in Basillisk II not working

Post by KnuddlMac »

I was trying to do some MacTCP server development under Basillisk II using Mac OS 8.0 on a Window 10 host
That's cute! What IDE (maybe Code Warrior?) are you using for programming on Mac OS 8.0?

I got stuck with System 7 and mostly use THINK C 7.

Basilisk's Ethernet support is a fantastic feature, because I continue to use old Macintosh gear and still can exchange files from these old SCSI drives.
Would be interesting, what you are developing.


Good luck,
Knuddlmac!
marciot42
Inquisitive Elf
Posts: 39
Joined: Wed Feb 26, 2014 2:21 pm

Re: Server mode Ethernet in Basillisk II not working

Post by marciot42 »

KnuddlMac wrote: Mon Dec 13, 2021 5:57 pm That's cute! What IDE (maybe Code Warrior?) are you using for programming on Mac OS 8.0?
I've been using both "Code Warrior 8" and "Symantec C++ 7" for my recent experiments, as I have a lot of sample code to start with from when I was a developer back in the 90s.

I recently used Code Warrior 8 to develop a SCSI tool:

https://hackaday.com/2021/12/08/mac-tip ... az-drives/

I would probably use Code Warrior 8 for everything now a days, except that it lacks an inline assembler. This means that for anything involving system extensions or system traps Symantec is a better choice. Unfortunately, Symantec C++ has numerous bugs (like "printf" only works with "%ld", "memset" seems to not work at all and it gets really angry when you copy a project from one disk to another), so it's not ideal for anything else!

Anyhow, my current project is developing a VNC server so I can remote into my Mac Plus when using a RaSCSI (https://github.com/akuker/RASCSI) as an Ethernet adapter. I now have a basic VNC server working in Basillisk II, but it is slow and it probably will be even slower on the Mac Plus, if it runs at all. But I still have some ideas on how to optimize it, but I have no doubts that having a useable VNC server on a Mac Plus will be a huge challenge, which is what makes it interesting!

Anyhow, I am putting together a 68k hacking page, keep your eyes peeled for more stuff:

https://www.marciot.com/mac68k-hacks/
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: Server mode Ethernet in Basillisk II not working

Post by mabam »

Sorry to go off topic here but reading your post I was reminded of something.
marciot42 wrote: Mon Dec 13, 2021 6:30 pm I've been using both "Code Warrior 8" and "Symantec C++ 7" for my recent experiments, as I have a lot of sample code to start with from when I was a developer back in the 90s.
Do you happen to have INIT sample code for Code Warrior as described in a different topic here:
viewtopic.php?p=72427#p72427 and would you be willing to share it for this purpose?
kanjitalk755 wrote: Mon Nov 08, 2021 5:41 am Unfortunately the samples are not suitable.
It should continue to receive null events until the OS shuts down.
marciot42
Inquisitive Elf
Posts: 39
Joined: Wed Feb 26, 2014 2:21 pm

Re: Server mode Ethernet in Basillisk II not working

Post by marciot42 »

mabam wrote: Mon Dec 13, 2021 8:16 pm Sorry to go off topic here but reading your post I was reminded of something.

Do you happen to have INIT sample code for Code Warrior as described in a different topic here:
I don't have sample code for Code Warrior, but I do have a lot of INIT and CDEV code for Symantec C++. The problem with Code Warrior (specifically version 8) is that it does not have an inline assembler that allows you to mix C and assembly in one function like Symantec C++ does. The later is good as you can use some boilerplate inline assembly at the start and end of your C functions, while doing the bulk of the work in C, which is far easier to do. With Code Warrior, you can only write complete assembly functions, so it requires more understanding.

The only Symantec C++ INIT/CDEV code I have published so far is the code for ScreenChooser, but it is humongous and is definitely not a good place to try learning -- I can barely understand it all myself! But if you want to see it, the source is here:

https://archive.org/details/screen-chooser

I have a lot of smaller INITs that I wrote in the 90s and I could probably find the source for those and publish them.
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Server mode Ethernet in Basillisk II not working

Post by adespoton »

marciot42 wrote: Mon Dec 13, 2021 6:30 pm
KnuddlMac wrote: Mon Dec 13, 2021 5:57 pm That's cute! What IDE (maybe Code Warrior?) are you using for programming on Mac OS 8.0?
I've been using both "Code Warrior 8" and "Symantec C++ 7" for my recent experiments, as I have a lot of sample code to start with from when I was a developer back in the 90s.

I recently used Code Warrior 8 to develop a SCSI tool:

https://hackaday.com/2021/12/08/mac-tip ... az-drives/

I would probably use Code Warrior 8 for everything now a days, except that it lacks an inline assembler. This means that for anything involving system extensions or system traps Symantec is a better choice. Unfortunately, Symantec C++ has numerous bugs (like "printf" only works with "%ld", "memset" seems to not work at all and it gets really angry when you copy a project from one disk to another), so it's not ideal for anything else!

Anyhow, my current project is developing a VNC server so I can remote into my Mac Plus when using a RaSCSI (https://github.com/akuker/RASCSI) as an Ethernet adapter. I now have a basic VNC server working in Basillisk II, but it is slow and it probably will be even slower on the Mac Plus, if it runs at all. But I still have some ideas on how to optimize it, but I have no doubts that having a useable VNC server on a Mac Plus will be a huge challenge, which is what makes it interesting!

Anyhow, I am putting together a 68k hacking page, keep your eyes peeled for more stuff:

https://www.marciot.com/mac68k-hacks/
I wonder how hard it would be to just create a virtual second monitor for the Plus via SCSI port, and in reality make it an Arduino or rPi board that takes the framebuffer data and presents it as a VNC session....
marciot42
Inquisitive Elf
Posts: 39
Joined: Wed Feb 26, 2014 2:21 pm

Re: Server mode Ethernet in Basillisk II not working

Post by marciot42 »

adespoton wrote: Wed Dec 15, 2021 12:25 am I wonder how hard it would be to just create a virtual second monitor for the Plus via SCSI port, and in reality make it an Arduino or rPi board that takes the framebuffer data and presents it as a VNC session....
Joshua Stein actually did this:

https://twitter.com/jcs/status/1320204158159511552?s=20

I just decided to see if I could do an actual VNC server, since the RaSCSI also supports TCP/IP via the RaSCSI.

-- Marcio
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: Server mode Ethernet in Basillisk II not working

Post by mabam »

marciot42 wrote: Mon Dec 13, 2021 8:46 pm I don't have sample code for Code Warrior, but I do have a lot of INIT and CDEV code for Symantec C++. The problem with Code Warrior (specifically version 8) is that it does not have an inline assembler that allows you to mix C and assembly in one function like Symantec C++ does. The later is good as you can use some boilerplate inline assembly at the start and end of your C functions, while doing the bulk of the work in C, which is far easier to do. With Code Warrior, you can only write complete assembly functions, so it requires more understanding.

The only Symantec C++ INIT/CDEV code I have published so far is the code for ScreenChooser, but it is humongous and is definitely not a good place to try learning -- I can barely understand it all myself! But if you want to see it, the source is here:

https://archive.org/details/screen-chooser

I have a lot of smaller INITs that I wrote in the 90s and I could probably find the source for those and publish them.

Thanks you for your effort and your posts in the other thread. I’m curious whether kanjitalk755 can use it.
marciot42
Inquisitive Elf
Posts: 39
Joined: Wed Feb 26, 2014 2:21 pm

Re: Server mode Ethernet in Basillisk II not working

Post by marciot42 »

mabam wrote: Wed Dec 15, 2021 12:12 pm Thanks you for your effort and your posts in the other thread. I’m curious whether kanjitalk755 can use it.
I was very active in the 90s writing Shareware, and I archived *all* my files, so I got tons of code samples doing all sorts of fairly sophisticated things like INITs, CDEVs, XCMDs, etc. I could definitely see myself creating a Advanced Retro Macintosh Development course or something, but I suspect I would be able to count on one finger the number of people who would actually sign up to take such a course!

I do think the Macintosh is in a unique place where as a retro computer, as it is surprisingly capable. I wonder how much you could actually do with it if you pushed it to the limits with new code.
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Server mode Ethernet in Basillisk II not working

Post by adespoton »

marciot42 wrote: Wed Dec 15, 2021 5:15 pm
mabam wrote: Wed Dec 15, 2021 12:12 pm Thanks you for your effort and your posts in the other thread. I’m curious whether kanjitalk755 can use it.
I was very active in the 90s writing Shareware, and I archived *all* my files, so I got tons of code samples doing all sorts of fairly sophisticated things like INITs, CDEVs, XCMDs, etc. I could definitely see myself creating a Advanced Retro Macintosh Development course or something, but I suspect I would be able to count on one finger the number of people who would actually sign up to take such a course!

I do think the Macintosh is in a unique place where as a retro computer, as it is surprisingly capable. I wonder how much you could actually do with it if you pushed it to the limits with new code.
Ah; I thought I recognized some of your stuff! I used your XCMDs and XFCNs in the 90s! I have to admit I'm guilty of not paying the shareware fee; I was a starving student at the time.
marciot42
Inquisitive Elf
Posts: 39
Joined: Wed Feb 26, 2014 2:21 pm

Re: Server mode Ethernet in Basillisk II not working

Post by marciot42 »

adespoton wrote: Fri Dec 17, 2021 12:37 am Ah; I thought I recognized some of your stuff! I used your XCMDs and XFCNs in the 90s! I have to admit I'm guilty of not paying the shareware fee; I was a starving student at the time.
No worries! I still have the source code for a lot of those XCMDs. Which ones did you use?
User avatar
KnuddlMac
Granny Smith
Posts: 123
Joined: Thu Apr 06, 2017 9:32 am
Location: Southern Bavaria

Re: Server mode Ethernet in Basillisk II not working

Post by KnuddlMac »

marciot42 wrote: Mon Dec 13, 2021 6:30 pm
KnuddlMac wrote: Mon Dec 13, 2021 5:57 pm That's cute! What IDE (maybe Code Warrior?) are you using for programming on Mac OS 8.0?
I've been using both "Code Warrior 8" and "Symantec C++ 7" for my recent experiments, as I have a lot of sample code to start with from when I was a developer back in the 90s.

I recently used Code Warrior 8 to develop a SCSI tool:

https://hackaday.com/2021/12/08/mac-tip ... az-drives/

I would probably use Code Warrior 8 for everything now a days, except that it lacks an inline assembler. This means that for anything involving system extensions or system traps Symantec is a better choice. Unfortunately, Symantec C++ has numerous bugs (like "printf" only works with "%ld", "memset" seems to not work at all and it gets really angry when you copy a project from one disk to another), so it's not ideal for anything else!

Anyhow, my current project is developing a VNC server so I can remote into my Mac Plus when using a RaSCSI (https://github.com/akuker/RASCSI) as an Ethernet adapter. I now have a basic VNC server working in Basillisk II, but it is slow and it probably will be even slower on the Mac Plus, if it runs at all. But I still have some ideas on how to optimize it, but I have no doubts that having a useable VNC server on a Mac Plus will be a huge challenge, which is what makes it interesting!

Anyhow, I am putting together a 68k hacking page, keep your eyes peeled for more stuff:

https://www.marciot.com/mac68k-hacks/
Shame on me, I just see your reply now! - One year later…

As a result of bugs I can‘t fix with Symantec C and Microsoft FoxPro 2.5/2.6, I completely lost interest in my Mac zoo.
Now I even stopped buying MacBook 100 on eBay, which is kind of sad.

For this weekend I was planning to proceed with my Nvidia Xavier AGX project playing with AI.
But I found another thread here in the forum, that makes me somewhat 68k nervous…

I should get in touch with Ronald or CAT_7 to clarify, why my 68k motivation is gone and how to reinvoke that karma!

Best,
-Pit
Post Reply