Creating a tiny Macintosh has been a long-standing dream of mine. As I delved into this exciting project, I discovered a community of like-minded individuals who shared the same desire. Inspired by our collective passion, I decided to compile this article to provide a comprehensive guide on bringing this mini Mac masterpiece to life. Let’s embark on this creative journey together and transform our vision into reality!
I am selling an even smaller one here
Prerequisite:
– A lot of the files you will need are here on my github
– Raspberry Pi Zero or alt (I used the Mangopi MQ-Quad MCore)
– 2.8 inch IPS 480×640 Display For install instructions
– LANMU Micro SD to SD Card Male to Female Extension Cable Adapter
– 3D Printer Filament PLA
– GPIO Ribbon Cable 40Pin Male to Female
Installing Raspberry Pi:
You will need to install the raspberry pi OS. If you are doing this headless try this link for info on how to do it.
SSH into your pi then runsudo raspi-config
Step down to Interface options
then SPI option
and enable it.
Set up screen 3.5 inch:
Here is a comprehencive link on how to install the screen. But the jist of it is
Before plugging the screen in to the following:
NOTE: for 2.8 inch use LCD28-show
When you plug in the screen it will just be white. So you will need to install the drivers.
2.8inch_DPI_LCD
3.5inch_DPI_LCD
Copy these files for
2.8
28DPI-DTBO.zip
3.5
3.5DPI-dtbo.zip
the the folder /boot/overlays/
Clone the driversgit clone https://github.com/djmason9/LCD-show.git
Go to the directory LCD-showcd LCD-show/
Set the privlageschmod +x LCD35-show
Install./LCD35-show
Now Reboot sudo reboot
Rotate your screen
SSH in edit this filesudo nano /boot/config.txt
Add to the bottom
# Rotate 180°
LCD35-show 180
Setup Config
# 3.5 inch display ###################################### gpio=0-9=a2
gpio=12-17=a2
gpio=20-25=a2
dtoverlay=dpi18
enable_dpi_lcd=1
display_default_lcd=1
extra_transpose_buffer=2
dpi_group=2
dpi_mode=87
dpi_output_format=0x6f006
hdmi_timings=640 0 20 10 10 480 0 10 5 5 0 0 0 60 0 60000000 1
dtoverlay=waveshare-35dpi-3b-4b:rotate=0
dtoverlay=waveshare-35dpi-3b:rotate=0
dtoverlay=waveshare-35dpi-4b:rotate=0
display_rotate=0 ##################################### # 2.8 Inch #gpio=0-9=a2 #gpio=12-17=a2 #gpio=20-25=a2 #dtoverlay=dpi24 #enable_dpi_lcd=1 #display_default_lcd=1 #extra_transpose_buffer=2 #dpi_group=2 #dpi_mode=87 #dpi_output_format=0x7F216 #hdmi_timings=480 0 26 16 10 640 0 25 10 15 0 0 0 60 0 32000000 1 #dtoverlay=waveshare-28dpi-3b-4b:rotate=270 #dtoverlay=waveshare-28dpi-3b:rotate=270 #dtoverlay=waveshare-28dpi-4b:rotate=270 #####################################
# BOTH display_rotate=3
Mac Rom:
Download the following files:
disk1.dsk
Get the ROM you want I used 9779D2C4 – Macintosh II.7z and rename it to MacII.ROM
You will also need to executables
Move all files to the PI in a folder called MinivMac
Startup Mac on boot
On your Desktop create a file called start_minivmac.sh
and paste the following code:
#!/bin/bash #Redirect standard output and standard error to a log file exec >> /home/pi/startup_log.txt 2>&1 #Set environment variables and paths export DISPLAY=:0.0 export XAUTHORITY=/home/pi/.Xauthority #Wait for the graphical environment to initialize (increase the sleep time if needed) sleep 20 #Change to the Mini vMac directory cd /home/pi/Desktop/MinivMac/ #Start Mini vMac in headless mode ./Mini_vMac_ARM
Set up the service. Create a new file called minivmac.servicesudo nano /etc/systemd/system/minivmac.service
In there paste the following
[Unit] Description=Mini vMac Service After=graphical.target [Service] User=pi WorkingDirectory=/home/pi/Desktop/MinivMac
ExecStart=/home/pi/Desktop/start_minivmac.sh [Install] WantedBy=graphical.target
In the terminal, reload the systemd manager configuration to pick up the new service unit:sudo systemctl daemon-reload
Enable the minivmac service to start on boot:sudo systemctl enable minivmac.service
sudo systemctl start minivmac.service
Disable annoying voltage bannersudo apt remove lxplug-ptbatt
Rotate Touch
Touch Rotating
After the display is rotated, the position of the touch is incorrect because the touch doesn’t change with the display angle. So the touch also needs to be modified.
1. Install libinput.
sudo apt-get install xserver-xorg-input-libinput
If the system you installed is Ubuntu or Jetson Nano. The installation code is:
sudo apt install xserver-xorg-input-synaptics
2. Create the xorg.conf.d directory under /etc/X11/ (if the directory already exists, proceed directly to step 3).
sudo mkdir /etc/X11/xorg.conf.d
3. Copy the 40-libinput-conf file to the directory you created just now.
sudo cp /usr/share/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/
4. Edit this file.
sudo nano /etc/X11/xorg.conf.d/40-libinput.conf
Find the part of the touchscreen, add the following statement inside, and then save the file.
Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
example:
Section "InputClass" Identifier "libinput touchscreen" MatchIsTouchscreen "on" MatchDevicePath "/dev/input/event*" Driver "libinput" Option "Tapping" "on" # Enable tapping (optional) Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1" # Example calibration matrix (optional) EndSection
Note:
90 degrees: Option “CalibrationMatrix” “0 1 0 -1 0 1 0 0 1”
180 degrees: Option “CalibrationMatrix” “-1 0 1 0 -1 1 0 0 1”
270 degrees: Option “CalibrationMatrix” “0 -1 1 1 0 0 0 0 1”
Make sure you turn off Screen Blanking
