News for hackers. Stuff that matters.
Re:Early Macintosh Emulation Comes to the Archive by mambodog on Sunday April 16, 2017 @03:17PM (#14127040)
I did the initial work of porting this emulator to the browser (most credit should go to the original emulator author however: http://hampa.ch/pce).

I wrote up the process and hacks that went in to making this possible here: https://jamesfriend.com.au/porting-pce-emulator-browser

The most gross/fun part was how I made the Mac OS mouse position align with your real mouse cursor: by writing its position directly to the emulated computer's memory. Classic Mac OS held the mouse position in a few fixed global memory locations. I realised I could just write to those memory locations every few CPU cycles. I could have instead written a driver which ran inside the emulated OS to communicate with the emulator program, but this was simpler!

Re:Early Macintosh Emulation Comes to the Archive by programd on Sunday April 16, 2017 @04:21PM (#14127322)
Awsome! I need to finish that game of Fool's Errand [1] I started a quarter century ago and doing it on a modern machine seems just wrong.

1. http://www.thefoolandhismoney.com/02-FE/index.htm

Re:Early Macintosh Emulation Comes to the Archive by pmarreck on Sunday April 16, 2017 @09:45PM (#14128719)
That, and 3 in Three, were such unique puzzle games!

EDIT: A sequel came out a mere 25 years later called http://www.thefoolandhismoney.com/06-FM/index.htm

Re:Early Macintosh Emulation Comes to the Archive by wiredfool on Sunday April 16, 2017 @04:23PM (#14127328)
And 3 in Three.
Re:Early Macintosh Emulation Comes to the Archive by macrael on Sunday April 16, 2017 @03:58PM (#14127208)
Sadly it's not working for me, seems to be off by half. The emulated mouse is always at x/2 y/2 compared to the real mouse pointer.
Re:Early Macintosh Emulation Comes to the Archive by db48x on Sunday April 16, 2017 @07:01PM (#14128040)
I believe Chrome misreports the mouse position if you zoom the page, or if you have a hidpi display. Care to share more details?
Re:Early Macintosh Emulation Comes to the Archive by macrael on Wednesday April 19, 2017 @04:07PM (#14151289)
This was in Safari on a retina mac book pro
Re:Early Macintosh Emulation Comes to the Archive by fiddlerwoaroof on Sunday April 16, 2017 @05:30PM (#14127638)
Is this a Retina display issue, perhaps?
Re:Early Macintosh Emulation Comes to the Archive by mambodog on Sunday April 16, 2017 @04:22PM (#14127323)
Interesting. What browser are you using?
Re:Early Macintosh Emulation Comes to the Archive by wiredfool on Sunday April 16, 2017 @04:17PM (#14127295)
heh. Enterprising pranksters could also rewrite those locations using an init. I believe gravity mouse was the name of it.
Re:Early Macintosh Emulation Comes to the Archive by tropo on Wednesday April 19, 2017 @01:25PM (#14149650)
Your mouse hack is funny. I take it you don't implement hardware other than the CPU for the emulator?

The norm would be to disable the real mouse cursor (make it invisible) and then feed the guest mouse movement via MMIO and an IRQ. You don't need a driver because classic MacOS already has one for the emulated hardware.

Re:Early Macintosh Emulation Comes to the Archive by krallja on Sunday April 16, 2017 @08:56PM (#14128549)
I see that most of the work you did on PCE.js is 3-4 years old at this point.

What happened in the meantime?

Why did you choose PCE over (e.g.) Basilisk II?

How do you provide the Macintosh ROM?

Re:Early Macintosh Emulation Comes to the Archive by mambodog on Sunday April 16, 2017 @11:50PM (#14129114)
PCE has very simple code, and unlike Basilisk II, doesn't make use of threads (which Emscripten didn't support at the time). Basilisk II also uses a SIGSEGV handler to catch invalid memory accesses, this would have to be coded around. I'd still like to port Basilisk II, which is feasible now due to new browser APIs, but it's a big project.

The Macintosh ROM is up to the website (e.g. archive.org) to provide, along with the disk images.

Re:Early Macintosh Emulation Comes to the Archive by tropo on Wednesday April 19, 2017 @01:21PM (#14149602)
What about Executor and syn68k from ARDI? It got open sourced. You'd get something like MacOS system 6.0.7 or 7.0.0 running on an emulated 68LC040.

At the very least, that gets you a ROM.

Re:Early Macintosh Emulation Comes to the Archive by dmolony on Monday April 17, 2017 @12:02AM (#14129149)
I tried it out on a MacBookPro, and the tap to click function on the trackpad appears to not be working. A physical trackpad click works though.