Clock Signal: now a Mac Plus emulator

About Mini vMac and all other 68k emulators, including SoftMac, Executor, and MESS.

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
TomHarte
Student Driver
Posts: 10
Joined: Tue May 07, 2019 4:42 pm

Clock Signal: now a Mac Plus emulator

Post by TomHarte »

Clock Signal, the emulator I write and have mentioned here as being very provisional now emulates the Mac Plus and the two main things that implies — a much more comfortable 4mb of RAM and a SCSI hard drive.

This is a full, low-level hardware emulator, right the way down to access delays if the 68000 tries to get to RAM during video output, the IWM being a real shift register with a virtual spinning platter feeding it whenever it feeds it, and video being serialised with sync signals that the display then decodes to recreate a 2d image. It therefore contrasts with something like Executor in that it needs the system ROMs and with something like Mini VMac in that it provides no high-level reimplementations of hardware functionality.

It is MIT-licensed open source and targets two forms:
  • a native Cocoa edition, with an ordinary Cocoa UI; and
  • a kiosk mode SDL port, which has no overt UI but works across a wide range of UNIX-ishes. Given that you can drag and drop disk images onto the window to mount them, and then drag them to the trash to unmount them, lack of an internal UI is really no big deal.
In both cases the Macintosh window is fully resizable, etc — there's some signal processing underneath so it's pretty smooth, especially on modern high DPI displays. In the Cocoa app you may run as many simultaneous Macintoshes as you feel like; in kiosk mode you'd just launch multiple kiosks.

The link at the top takes you to binary releases.

On forum etiquette: I don't know what feelings are re: a new thread per release in general — criticism welcome — but since my previous thread announced this as a very provisional emulator and I now feel that it's a pretty good emulator, I hoped it might be acceptable to make an exception if one is needed.

On the wiki: if anybody is willing to bless me with wiki access, I'd be more than happy to write the appropriate setup guides and whatever, though there's hardly anything to it.

EDIT: I've been given Wiki access. So see setup details here if you needed them. That's the first version of that page, I'll update and correct as required.
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Clock Signal: now a Mac Plus emulator

Post by adespoton »

Thanks for sharing, Tom! This looks to be a more consistent low-level emulation than Fusion or pce/macos provide as well.

Do you have any plans to implement full printer and modem serial port emulation, including MIDI and LocalTalk handling?
TomHarte
Student Driver
Posts: 10
Joined: Tue May 07, 2019 4:42 pm

Re: Clock Signal: now a Mac Plus emulator

Post by TomHarte »

I have to admit to not having used either Fusion or PCE, though I've read up on PCE and the readme mentions that it might not be engaged in full floppy emulation whereas Clock Signal is, and one can imagine most emulators might not try to be cycle accurate on the 68000, but PCE does fully emulate the serial ports and offers SE and Classic emulation. So I think I'm still behind for now, alas.

My serial emulation is currently virtually non-existent, and I've a few missing spots in my emulation of the SCSI controller. So those are both definitely targets for what to do next. The latter might well imply that I add either or both of the Mac SE (which uses more of the SCSI chip's functionality) and the Apple II SCSI card (as its ProDOS is obviously a completely distinct implementation, so likely to do things differently — and the emulator already also emulates the Apple II).

As to the serial chips, I don't know. It'd be great to have much more available there, though all the options imply a great deal more work so I might have to be selective about my battles. LocalTalk would be great because it'd offer both a potential connection point to MacTCP and perhaps an AFP file host for accessing content on the local machine; some sort of MIDI support in the emulator would also be handy because it maps well to a bunch of other machines.

So, ummm, I'm not really sure exactly what I'm going to do next. There are some code cleanups, a couple of UI tweaks, and some minor fixes for non-Macintosh machines that I want to get out of the way for the next week or two. Those should give me time to figure it out. But, yeah, the priority is definitely improving things that are not yet fully implemented.

Side note: I've added a bunch of screenshots to the Wiki page. They're from a Retina Mac though, so given that I couldn't seem to wrangle BBCode sufficiently to include them here at a reasonable size, I recommend going there for a peek.
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Clock Signal: now a Mac Plus emulator

Post by adespoton »

I was just refreshing myself as to how Mike Fort managed Mini vMac's LocalTalk implementation: https://web.archive.org/http://web.me.c ... index.html -- he basically included a layer that identified LocalTalk SDLC packets, and translated them to LToE packets that can go over Ethernet. The downside is that LToE isn't routable and isn't EtherTalk-compatible.

So it looks like once you've got serial fully functional, the step that'd make this work would be an external function that takes LT packets on the serial channel and converts them; the code for this should be available on Paul's site for Mini vMac; it has changed a bit from when Mike implemented it.

This makes me think that it may be more worthwhile to externalize LocalTalk support as some sort of a system-level daemon, and just pipe the serial I/O to it. That way, we could re-implement Mike's solution that would work for all local network wired Ethernet traffic, but with a few tweaks, someone could make it routable over WiFi etc. without impacting your cycle-exact code at all. It might be slightly slower, but we're talking about max serial speeds of 1MBPS here, so I think any external daemon should be able to keep up.

There's a good writeup here: https://lowendmac.com/1998/macintosh-serial-throughput/ that goes through the implications of a single chip managing the modem and printer ports, the max hardware throughput of different models, and Apple's software limits for internal and externally clocked signals.
Post Reply