The Teensy 4.0 is a small footprint, breadboard friendly, 600MHz ARM Cortex M7 microcontroller.
I bought a handful of these earlier this week and I am finding it an ideal platform to simulate experimental or retro cpus.
My first experiments were with a 6502 simulation, with ehBASIC preloaded into the Flash. This ran with a simulated speed of about 45MHz.
Next, I loaded up some simulation code that I have been developing for a 16-bit DIY processor. This worked perfectly at around 20 million simulated instructions per second.
Tonight, I have come across a PDP-8 simulator - originally written by Jean Claude Wippler from Jeelabs. Another trawl found a version adapted for Arduino with FOCAL-69 preloaded into ROM. With this I have successfully got the Lunar Lander game to run.
Code:
FIRST RADAR CHECK COMING UP
COMMENCE LANDING PROCEDURE
TIME,SECS ALTITUDE,MILES+FEET VELOCITY,MPH FUEL,LBS FUEL RATE
= 0 = 120 = 0 = 3600.00 = 16000.0 K=:0
= 10 = 109 = 5016 = 3636.00 = 16000.0 K=:0
= 20 = 99 = 4224 = 3672.00 = 16000.0 K=:0
= 30 = 89 = 2904 = 3708.00 = 16000.0 K=:0
= 40 = 79 = 1056 = 3744.00 = 16000.0 K=:0
= 50 = 68 = 3960 = 3780.00 = 16000.0 K=:0
= 60 = 58 = 1056 = 3816.00 = 16000.0 K=:0
= 70 = 47 = 2904 = 3852.00 = 16000.0 K=:170
= 80 = 37 = 1474 = 3539.86 = 14300.0 K=:200
= 90 = 27 = 5247 = 3140.80 = 12300.0 K=:200
= 100 = 19 = 4537 = 2710.41 = 10300.0 K=:200
= 110 = 12 = 5118 = 2243.83 = 8300.0 K=:200
= 120 = 7 = 2284 = 1734.97 = 6300.0 K=:200
= 130 = 3 = 1990 = 1176.06 = 4300.0 K=:200
= 140 = 0 = 5040 = 556.96 = 2300.0 K=:168
= 150 = 0 = 986 =- 13.63 = 620.0 K=:0
= 160 = 0 = 922 = 22.37 = 620.0 K=:0
= 170 = 0 = 330 = 58.37 = 620.0 K=:30
= 180 = 0 = 48 =- 20.19 = 320.0 K=:0
= 190 = 0 = 80 = 15.81 = 320.0 K=:12
ON THE MOON AT= 193.96 SECS
IMPACT VELOCITY OF= 11.73M.P.H.
FUEL LEFT:= 272.49 LBS
CONGRATULATIONS ON A POOR LANDING
Lunar Lander is exceptionally challenging for the newcomer. I eventually hit upon the technique of free-falling for 70 seconds, then an 80 second main burn, which consumes almost all the fuel, followed by a small corrective burn resulting in a rather bumpy landing.
The 6502 simulator with ehBASIC is here
https://forum.arduino.cc/index.php?topic=193216.0 The PDP-8 simulator with FOCAL-69 in Program memory is here. You need to increase the MEMSIZE to 32768
https://github.com/KedalionDaimon/DEC-PDP-8-on-ArduinoThe Lunar Lander program is documented towards the end of the Wikipedia article here:
https://en.wikipedia.org/wiki/FOCAL_(pr ... g_language)
The Teensy 4.0 costs about $20 (£18.50 in UK) it makes an ideal platform for simulation processors from bygone times.