Quick start
S:\mgCode\waveshare-c64-ready COM43 main
Build
cd S:\mgCode\waveshare-c64-ready
C:\Users\Malko\.platformio\penv\Scripts\platformio.exe runBuild and upload
C:\Users\Malko\.platformio\penv\Scripts\platformio.exe run --target upload --upload-port COM43Serial monitor
C:\Users\Malko\.platformio\penv\Scripts\platformio.exe device monitor --port COM43 --baud 115200Create the local Git repository
mkdir S:\mgCode\waveshare-c64-ready
cd S:\mgCode\waveshare-c64-ready
git init -b main
git remote add origin https://codex.malko.net/helios/waveshare-c64-ready.git
git remote -vFirst commit and push
git add .
git commit -m "First working C64 READY screen"
git -c credential.username=helios push -u origin mainPush-to-create is disabled on this Gitea server. Create the empty remote repository first.
Create the Gitea repository by API
Use a personal access token placeholder. Never save a real token in source control.
$headers = @{ Authorization = "token <GITEA_TOKEN>" }
$body = @{ name="waveshare-c64-ready"; description="C64 READY screen for Waveshare ESP32-S3 LCD"; private=$false; auto_init=$false } | ConvertTo-Json
Invoke-RestMethod -Method Post -Uri "https://codex.malko.net/api/v1/user/repos" -Headers $headers -ContentType "application/json" -Body $bodyDetect the board port
Get-CimInstance Win32_SerialPort | Select-Object DeviceID,Name,PNPDeviceIDThe board appeared as USB Serial Device COM43, VID 303A, PID 1001.
Files and what changed
waveshare-c64-ready/
├── platformio.ini ESP32-S3, 16 MB flash, OPI PSRAM, LVGL 8.4
├── README.md Build instructions and source links
├── cheat-sheet.html This portable reference page
└── src/
├── main.cpp I²C → LCD/LVGL → backlight startup
├── c64_ui.c C64 colors, ROM glyphs, cursor timer
├── c64_ui.h c64_ui_create() declaration
├── user_config.h Pins, 640×172 rotated dimensions
├── lvgl_port.c/.h Display flush, rotation, touch and LVGL task
├── i2c_bsp.c/.h I²C setup
├── axs15231b/ Official Waveshare LCD driver
├── lcd_bl_bsp/ Backlight PWM driver
└── touch/ Capacitive touch driver
| Task | File | Important setting |
|---|---|---|
| Rotate right 90° | src/user_config.h | #define Rotated USER_DISP_ROT_90 |
| Use real C64 glyphs | src/c64_ui.c | 8-byte uppercase/graphics ROM rows |
| PAL blink | src/c64_ui.c | lv_timer_create(cursor_blink, 400, cursor) |
| Show custom UI | src/lvgl_port.c | c64_ui_create() |
| Fix PlatformIO includes | src/lvgl_port.c | axs15231b/... and touch/... |
Normal Git workflow
git status --short
git diff --check
git diffgit add src/c64_ui.c src/user_config.h
git commit -m "Describe the change"
git -c credential.username=helios push origin maingit log --oneline -3
git status --shortFinal C64 values
| Background | #40318D · RGB 64,49,141 |
|---|---|
| Text/cursor | #7869C4 · RGB 120,105,196 |
| Text | READY. |
| Font | C64 uppercase/graphics ROM, 8×8 raster glyphs |
| Cursor | Square cell on the line below |
| PAL timing | 400 ms visible + 400 ms hidden |
| Rate | 800 ms cycle · 1.25 blinks/second |
Formula: 20 system ticks ÷ 50 Hz = 0.40 seconds per state.
Commit history
- c81cb49First working C64 READY screen
PlatformIO project, Waveshare drivers, C64 palette and initial UI. - de99bf6Use rotated authentic C64 bitmap font
90° rotation and exact character-ROM glyph bytes. - 1fea7b1Maximize READY and set two-blink cursor
Experimental full-width READY layout. - 9dea865Restore READY layout and authentic cursor timing
Restored READY. and cursor below. - 631d3a1Keep cursor visible longer than hidden
Experimental asymmetric timing. - 88141a7Match PAL C64 cursor timing
Final symmetric 400 ms on/off timing.
Troubleshooting
| Upload cannot connect | Hold BOOT, tap RESET, release BOOT, retry and recheck COM port. |
|---|---|
| HTTP 403 on first push | Create the Gitea repository through UI/API before pushing. |
| Authentication failed | Refresh Gitea token/credential, retry the push. |
| Wrong Arduino include path | Remove the leading src/ when files already live beneath PlatformIO src/. |
| Clean rebuild | platformio.exe run --target clean, then platformio.exe run. |