Components :
home made hat using "quasi" RasPI compatable IO for VGA output (resistors ladder conversion) (EasyEDA project file (EasyEDA app ))
some bugs in this hat ... when a monitor is connected I must use the secondary usb C port to transfert firmware ... do not know why ( I do not search at all ...)
nice Logitech K410 combined trackpad & keyboard
32 GB micro sd card Fat32, rom file, HD images (2 * 500MB, 2*2GB), 20 GB external FS to exchange data
rasPI "modded" enclosure
old Dell display able to sync at 56Hz at 800 x 600
Software :
Starting from excellent port of basilisk to Arduino TAB5 (I also have one) from amcchord
Heavilly modified to be Arduino IDE compatable, Waveshare board compatable, leading to a very "crude" source code (see at bottom)
More modified to allow the compilation on Xcode from the same basecode to get an "emulated" TAB5 version on MacOS
modding M5GFX and M5UNIFIED as they support SDL backend
allow very fast experiments to test ideas and permit a much better debugging experience ;)
I am not even sure that all those modifications allow the build of a working arduino TAB5 image.
I am only targetting the WaveShare board (large display is better for my old eyes ...)
For the Waveshare board, I choose not to use M5GFX nor M5UNIFIED (better performance, talking to hardware directly)
use of the RGB Interfaced LCD subsystem, at 15 bits depth no overload for the framebuffer, mapping is exact, so no conversion needed and is the best usable mode
15 bits depth is a direct framebuffer for basilisk so running at 56Hz refresh
1, 2, 4, 8 bits depths need a conversion engine so running at around 30 Hz refresh with a dirty line optimisation (less SDRAM bandwith)
640x480 60 Hz display 1, 2, 4, 8 and 15 bits display at 26 MHz pixel clock without display artifact at all depth
800x600 56Hz display 1, 2, 4, 8 and 15 bits display at 36 MHz pixel clock without any display artifacts at 15 bits depth, some tearing at 1,2,4,8 bits depth (36 MHz clock is a lot for the SPIRAM even at octal config, so no artifact when no conversion engine is running)
direct hardware acces permit use of the SD card in 4 lines configuration (better performance)
talking directly at FreeRTOS level permit the use of the extFS of basilisk (posix compliant), so way easier file exchange from and to the emulated HD images
but no more very nice gui Config part ... perhaps later ... all configuration is hard coded in the source code ;(
Very nice result, performance like a mac LCIII with 24MB of RAM (around 33 Mhz 68030 performance)
Network is working over Wifi, no sound actually (perhaps later)
Integrated Ethernet port not used actually, but it is certainly possible to use it
To compile/use with XCode : not sure if it is easily transferable, otherwise see (LINK to configure a SDL2 project with XCODE)
be sure to keep -DWITHSDL & al. in the compile options see following picture, and REMOVE all SANDBOXING in Signing & Capabilities
display is hardcoded at 1280x720 with a scale factor of 2 for the SDL mac display (rendered at 2560x1440 with the dirty boxes optimization from amcchord)
no network is initialized
extFS is not configured, should work with some minor code changes (not done as not needed for tests)
populate Basilisk II/Res with
Q650.ROM file
disk images, you can use those from amcchord github
In Basilisk/BasiliskII/basilisk/prefs_esp32.cpp :
around line 80 for WITHSDL config, adjust the path to the disks, the first one should be your System disk
To compile with Arduino IDE :
install board definitions from ESP32 by Espressif Systems version 3.3.7 (see LINK )
select ESP32P4 Dev Module
config IDE as the picture
use the usb-C port labeled 18 (my VGA hat has a bug somewhere which render the first usb-C port invalid for programming firmware when a monitor is connected)
change the jumper at 8 in the device position, connect your keyboard in the botton left usb A connector (see in first picture) use some combo keyboard/mouse (ie Logitech K410) or a keyboard with integrated usb to connect the mouse ie Apple keyboard A1048 is perfectly working, I connect a wireless M650 logitech in one of the rear port). From memory, your integrated hub in the keyboard should be at USB 1.0/1.1 level and working at "full speed", ie 12 Mbps, not "low-speed", ie 1.5 Mbps
populate your SD card in a "Mac" root directory with
Q650.ROM file
your disk images (could be the same as in 'Res')
create a Shared directory in Mac directory and put your files
you need to have stuffit expander in your mac images to be able to map extension to some usable filetype.
adjust settings in :
Basilisk/BasiliskII/basilisk/wifi_esp32.c :
around line 380 you must put your wifi configuration, the code will try the first and if it failed, the second one and if second failed too the programm will crash/reboot ... ???
Basilisk/BasiliskII/basilisk/video_esp32.cpp :
around line 119, set your display by changing MAC_SCREEN_WIDTH and MAC_SCREEN_HEIGHT for 640x480 or 600x600
around line 1458 you can adjust video timing for 800 600 display resolution (keep the clock at 36000000 or artifacts will appears even at 15 bits depth)
around line 1475 you can adjust video timing for 640 480 display resolution
due to a bug in ESP32P4 hardware, you should use a VIDEO_LCD_V_RES with ONE more line (so 601 or 481 lines)
the hardware start pushing the buffer 8 pixels BEFORE/AFTER the DE output, so to avoid that the "frame buffer seen for the emulator" start 8 pixels before the end of the first line of the "frame buffer configured for the hardware", so we need one more line
Basilisk/BasiliskII/basilisk/prefs_esp32.cpp :
around line 80 for WITHSDL config, adjust the path to the disks, the first one should be your System disk
around line 101 for WAVEP4 config, adjust the path to the disks, the '/sdcard/' is mandatory, this prefix is added when FreeRTOS mount the sdcard in its VFS
ramsize of 24 MB is hardcoded somewhere ...