LisaList2

Advanced search  

News:

2022.06.03 added links to LisaList1 and LisaFAQ to the General Category

Pages: [1]   Go Down

Author Topic: A 68010 in a Lisa?  (Read 15177 times)

jamesdenton

  • Administrator
  • Sr. Member
  • *****
  • Karma: +67/-0
  • Offline Offline
  • Posts: 164
  • ArcaneByte
    • ArcaneByte
A 68010 in a Lisa?
« on: July 15, 2019, 10:50:17 pm »

Ever wonder what happens when you install a Motorola 68010 in a Lisa?

Well, it doesn't blow up.

In my 2/10 (1 MB), you might be greeted by Error 42 (Video Circuit Error):



Upon booting UniPlus UNIX, you'll be told the Serial # cannot be found (likely related to video error):



When booting GEM, you'll get the fish, then the screen goes white and you get Error 75 (Corrupt System Files):




Xenix looks promising, but after you attempt to load the kernel you'll get some screen artifacts:



MacWorks XL 3.0 led me on and dumped a Sad Mac on me (0F000A - Line 1111 Exception?)



Which sorta resembles this other Xenix error I got (playing with parallel vs onboard HD):



BLU hung in there until the end:




Wait, what is that...?



Tom's Mandlebrot plotter is working!




Any attempt to boot Workshop or Lisa Office diskettes simply resulted in Error 75, or an unexpected reset. MacWorks 1.1h reported Error 47 (Unexpected exception).

I might kick around some 3A ROMs and see if MacWorks behaves.

Anyway, enough fun for one night.
Logged

stepleton

  • Sr. Member
  • ****
  • Karma: +127/-0
  • Offline Offline
  • Posts: 424
Re: A 68010 in a Lisa?
« Reply #1 on: July 16, 2019, 07:59:44 am »

Really interesting experiment! I've always wondered...

I guess I'm not really using much Lisa-specific code for the "bare metal" Mandelbrot plotter. I wonder if the 68010 does it any faster than the 68000 does...

--Tom
Logged

jamesdenton

  • Administrator
  • Sr. Member
  • *****
  • Karma: +67/-0
  • Offline Offline
  • Posts: 164
  • ArcaneByte
    • ArcaneByte
Re: A 68010 in a Lisa?
« Reply #2 on: July 16, 2019, 08:16:13 am »

That was the first time I'd run it, so I'm not sure. I didn't time it, but I'm pretty sure it was at least fifteen minutes, probably longer.

Burning some 3A ROMs now and will give 'em a go later on.
Logged

jamesdenton

  • Administrator
  • Sr. Member
  • *****
  • Karma: +67/-0
  • Offline Offline
  • Posts: 164
  • ArcaneByte
    • ArcaneByte
Re: A 68010 in a Lisa?
« Reply #3 on: July 16, 2019, 09:45:57 am »

Burning some 3A ROMs now and will give 'em a go later on.

I didn't burn a matching video ROM, but was able to see through the garbled video that MacWorks reported a Sad Mac, too.

On the bright side, I didn't get an Error 42 this time.
Logged

rayarachelian

  • Administrator
  • Hero Member
  • *****
  • Karma: +105/-0
  • Offline Offline
  • Posts: 772
  • writing the code,writing the code,writing the code
    • LisaEm
Re: A 68010 in a Lisa?
« Reply #4 on: July 16, 2019, 10:20:50 am »

So beyond the obvious speed differences, which are likely causing the serial # misread since some opcodes run faster now, the 68010 may have a slightly different exception frame.

At least keep in mind that bus and address errors are somewhat restartable with certain opcodes on the 68000, but are likely different on the 68010, which means for each of those OSs you'd need to modify their kernel and MMU handling code; also now MOVE SR,<EA> is a supervisor only opcode. The 010 does have a bit of a cache as well which is likely going to affect timing - I don't believe LOS or MW used self-modifying code, so likely the cache won't be an issue there, but for sure, the serial # reading is going to be affected as that's a very tight, timing dependent loop.

You might have better luck with the 68008, but off the topof my head the 008 has slightly different pins so you might need to build a two-DIP socket and change the order around a bit (though this is from wetware, so I might be way wrong.)

Note that both MacWorks and Xenix are both crashing with F-line errors (1111 is F ) in your screenshots- Motorola reserved all the 0xfxxxxxxx opcodes for itself, which it uses for things like the PMMU and the FPU, with some chips these are external, with others, such as the 68040 are internal. (The A-line traps are available for use by operating systems, and Apple uses them in LOS.)

See: http://www.retronik.fr/motorola/68K/68000/M68000_ProgrammerReferenceManual_[Motorola_1992_646p].pdf
PDF pages: 20, 608-612, 628-630.633 (fig B9 on PDF page 633 shows the '10 exception frame is 18 words long vs fig B2 on page 630 which shows 7 words for the '00)

So you're going to have some very low level OS hacking to do in order to get it to work.
Logged
You don't know what it's like, you don't have a clue, if you did you'd find yourselves doing the same thing, too, Writing the code, Writing the code

jamesdenton

  • Administrator
  • Sr. Member
  • *****
  • Karma: +67/-0
  • Offline Offline
  • Posts: 164
  • ArcaneByte
    • ArcaneByte
Re: A 68010 in a Lisa?
« Reply #5 on: July 16, 2019, 10:28:03 am »

Thanks, Ray. I figured you'd chime in with some technical reasons as to why it wouldn't be a drop-in replacement. Not that I expected it to be, mind you. Was just curious to see if/how it would fail.

So you're going to have some very low level OS hacking to do in order to get it to work.

Will likely forgo this route, as it is not my wheelhouse. Time to make a Bitcoin-mining app in 68000 assembly to run as a standalone app.
Logged

rayarachelian

  • Administrator
  • Hero Member
  • *****
  • Karma: +105/-0
  • Offline Offline
  • Posts: 772
  • writing the code,writing the code,writing the code
    • LisaEm
Re: A 68010 in a Lisa?
« Reply #6 on: July 16, 2019, 12:42:09 pm »

Quote
Will likely forgo this route, as it is not my wheelhouse.

Don't give up so fast, writing emulators wasn't in my wheelhouse before I started either. Give it a try and see what happens.
The big question I have would be how would you detect what CPU is in there and decide which ISR to use, assuming you don't want to build specialized versions of these OSs.Maybe you can find a way to build a universal ISR. Not sure how MacOS does it, but from what I recall they have specific ROMs for specific models, but maybe there's a way.
Once you can do that, you might even be able to get an 020 or 030 in there.

Quote
Time to make a Bitcoin-mining app in 68000 assembly to run as a standalone app.
Sure, that sounds like a *useful* thing to run on a Lisa, and if you can mine ~6 bitcoins at today's price, you could buy a Lisa 1 off ebay.  8)
Just be sure you first upgrade all the caps in the power supply.

Logged
You don't know what it's like, you don't have a clue, if you did you'd find yourselves doing the same thing, too, Writing the code, Writing the code

rayarachelian

  • Administrator
  • Hero Member
  • *****
  • Karma: +105/-0
  • Offline Offline
  • Posts: 772
  • writing the code,writing the code,writing the code
    • LisaEm
Re: A 68010 in a Lisa?
« Reply #7 on: July 18, 2019, 12:41:12 pm »

D'oh you won't be able to use a 68008 as it won't have enough address lines. meh.

So if you are brave, I'd say try a 68020 - if you're going to have to modify the BUS ISR you might as well go big. I don't know if an 030 will work or not - it might, but for sure you wouldn't want an 040 as that likely is too far away from what the Lisa's busses can handle - unless you want to go the way of an XLerator card that holds its own RAM/ROM and just talks to the old hardware for I/O. but then you'll have to rebuild the custom Lisa MMU, or rewrite the OS MMU functions to use the 040's PMMU.
Logged
You don't know what it's like, you don't have a clue, if you did you'd find yourselves doing the same thing, too, Writing the code, Writing the code

jamesdenton

  • Administrator
  • Sr. Member
  • *****
  • Karma: +67/-0
  • Offline Offline
  • Posts: 164
  • ArcaneByte
    • ArcaneByte
Re: A 68010 in a Lisa?
« Reply #8 on: July 18, 2019, 05:00:42 pm »

I thought an interesting experiment would be to straddle an Xlerator board with one of the '030 Mac Plus accelerators using a Killy Clip or something along those lines. I have a MicroMac card that supports Plus/Classic/SE, but is the SE variant and is missing one of the GALs used for the Plus (and the clip - it only has the PDS connector).
Logged

rayarachelian

  • Administrator
  • Hero Member
  • *****
  • Karma: +105/-0
  • Offline Offline
  • Posts: 772
  • writing the code,writing the code,writing the code
    • LisaEm
Re: A 68010 in a Lisa?
« Reply #9 on: July 18, 2019, 09:43:35 pm »

It could work, but the solution has to be both software and hardware, in theory you could make an 040 - or even an 060 run Lisa Office System, but significant portions of the kernel would need a rewrite.
I'd suggest building a new XLerator from scratch rather than adding a hack to a hack. I can disassemble the ISR and we can figure out how to make an 010 or 020 or whatever work. The MMU part will be harder, but it can be done too.
One of the biggest issues I see is that LOS doesn't seem to be 32 bit clean, in my most recent experiments with 1.2.7 I see it use the upper byte in both address registers and even in the PC, but I'm unsure in what way or for what purpose, likely it tags it with something like a PID or segment number or something. I don't know if the userland cares about this, which would mean, rewriting the supervisor/kernel parts would be possible, but otherwise, the machine will be limited to 2^24 or 16MB (which all things considered is a lot more than 2MB it has right now.)
Though, I think at this point, if you're going to go through all that trouble of designing an XLerator and making major OS changes, it may be worth going big and all the way and build a "Lisa 3" around an 040 or 060 or whatever the latest Freescale chip that's still being made, and add color and sound and ethernet, wifi, and USB, etc.
Logged
You don't know what it's like, you don't have a clue, if you did you'd find yourselves doing the same thing, too, Writing the code, Writing the code
Pages: [1]   Go Up