Is it possible to connect a Motorola 68k to an arduino? If so, how?

Now that I think about it a little, with the 6809’s orthogonality you could do all sorts of bad ideas in a ram-less system.:grinning:

You could load XREG or YREG with the subroutine entry point. Exchange the PC with the register and you would be at the subroutine entry with the return address -2 in the register. To return you’d just do a Load Effective Address 2,XorY and another exchange X and PC and you’d be back where you belonged. Or something like that.:stuck_out_tongue_winking_eye:

That might make disassembled code harder to reverse engineer but probably would definitely make it hard to debug.

...and with the 6309, even more! Not sure about ASM support, though...

That was the Hitachi, right? How was it different?

They enhanced the existing instruction set. It's backwards compatible with 6809. Hitachi was contracted to make them by Moto (or maybe they were made under Moto licence), so they added the codes but didn't admit or document them. :slight_smile:

Ah, okay. We used them as a second source but I don’t remember the sooper seekrit instructions.

The full 6809 Motorola databook had a masterclass example in the appendix showing a complete monitor - it is a thing of macro assembly language beauty.

Yeah, I had that burned into an EPROM with some product specific additions as a troubleshooting tool.

That was the silver and purple book, I think. I’ll have to see if I can find mine.

Only with a good emulator. Emulation of other CPUs could take something like 100 host cycles for each emulated CPU cycle. A really good optimized emulator might get that down to the 16 host cycles per emulated cycle needed to emulate an 8MHz CPU on a 133MHz CPU.

A retro computer emulator also has to emulate other pieces of hardware (keyboard, screen, audio, joysticks, etc.). Those take host CPU cycles too.

I worked for a bank owned service bureau. I recall going to the keypunch room to punch some cards. Met a guy working on a box of electronics. He showed me a board with the 4004 microprocessor. It was a keyboard to tape machine. I don't think the company kept it as I never saw it again.

1 Like

This is an online .pdf of that book if anyone is interested.

MC6809-MC6809E Microprocessor Programming Manual

1 Like

I just found mine in the attic!

1 Like

I found one for a PC with a 64K RAM block divided into 16 byte blocks, for the most regular 4K instructions. And nobody asks you to use another near-retro controller to emulate an even older system. Hide a RasPi under the mainboard and everything works like a charm.

Hardware should be emulated at a high software level, catching I/O function addresses instead of hardware addresses.

I built my last machine in the 80s. Based on a 6809 in FORTH with a monitor, floppy disks, online EPROM programmer and system/user separated memory. The EPROM programmer worked with a manual switch to enable the 12V programming voltage and the board logic stopped the controller while a byte was written.

3 Likes

I was thinking this over today. Here is my conception of the "Motorino"

  • 68B09 processor
  • 68B50 ACIA
  • 6522 VIA GPIO/timer IC
  • nonvolatile RAM, with a portion that can be write protected, this will be firmware/bootloader
  • everything on a Mega footprint PCB

Oops I forgot to check whether the 6522 can run at 2MHz...

I'm going to have to dig out my older spares box...

and a shield with rocker switches like a DEC PDP-11 front panel...

Flappy toggles, like a PDP-8

That would probably fit easy-ish. You could add a 328 and make it truly a -uino and give you some useful I/O as well.

I have a larger pcb in mind with a 6821, 6850, 6840 counter timer, RAM and at the moment I'm thinking EEPROM as well but leaning toward your nonvolatile ram approach. I have a PCA9864 in the BOM to easily add I2C but I'm also considering a small microcontroller instead.

Write protecting some of the RAM eliminates one chip, the PROM. It also theoretically makes it easy to write stuff to the PROM. Once you somehow load boot firmware, you could always run some kind of serial bootloader from the monitor whenever you want to update it.

I forgot about 6840, I thought about 6821 but the VIA also has timers, so...

I built a Mits Altair 680. A toggle switch front panel would be fun.

1 Like