WAVESHARE ESP32-S3-TOUCH-LCD-3.49

READY.

Build · Upload · Git · Gitea · Files · Commits

Quick start

S:\mgCode\waveshare-c64-ready COM43 main

Build

cd S:\mgCode\waveshare-c64-ready
C:\Users\Malko\.platformio\penv\Scripts\platformio.exe run

Build and upload

C:\Users\Malko\.platformio\penv\Scripts\platformio.exe run --target upload --upload-port COM43

Serial monitor

C:\Users\Malko\.platformio\penv\Scripts\platformio.exe device monitor --port COM43 --baud 115200

Create 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 -v

First commit and push

git add .
git commit -m "First working C64 READY screen"
git -c credential.username=helios push -u origin main
Push-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 $body

Detect the board port

Get-CimInstance Win32_SerialPort | Select-Object DeviceID,Name,PNPDeviceID

The 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
TaskFileImportant setting
Rotate right 90°src/user_config.h#define Rotated USER_DISP_ROT_90
Use real C64 glyphssrc/c64_ui.c8-byte uppercase/graphics ROM rows
PAL blinksrc/c64_ui.clv_timer_create(cursor_blink, 400, cursor)
Show custom UIsrc/lvgl_port.cc64_ui_create()
Fix PlatformIO includessrc/lvgl_port.caxs15231b/... and touch/...

Normal Git workflow

git status --short
git diff --check
git diff
git add src/c64_ui.c src/user_config.h
git commit -m "Describe the change"
git -c credential.username=helios push origin main
git log --oneline -3
git status --short

Remote: codex.malko.net/helios/waveshare-c64-ready

Final C64 values

Background#40318D · RGB 64,49,141
Text/cursor#7869C4 · RGB 120,105,196
TextREADY.
FontC64 uppercase/graphics ROM, 8×8 raster glyphs
CursorSquare cell on the line below
PAL timing400 ms visible + 400 ms hidden
Rate800 ms cycle · 1.25 blinks/second

Formula: 20 system ticks ÷ 50 Hz = 0.40 seconds per state.

Commit history

  1. c81cb49First working C64 READY screen
    PlatformIO project, Waveshare drivers, C64 palette and initial UI.
  2. de99bf6Use rotated authentic C64 bitmap font
    90° rotation and exact character-ROM glyph bytes.
  3. 1fea7b1Maximize READY and set two-blink cursor
    Experimental full-width READY layout.
  4. 9dea865Restore READY layout and authentic cursor timing
    Restored READY. and cursor below.
  5. 631d3a1Keep cursor visible longer than hidden
    Experimental asymmetric timing.
  6. 88141a7Match PAL C64 cursor timing
    Final symmetric 400 ms on/off timing.

Troubleshooting

Upload cannot connectHold BOOT, tap RESET, release BOOT, retry and recheck COM port.
HTTP 403 on first pushCreate the Gitea repository through UI/API before pushing.
Authentication failedRefresh Gitea token/credential, retry the push.
Wrong Arduino include pathRemove the leading src/ when files already live beneath PlatformIO src/.
Clean rebuildplatformio.exe run --target clean, then platformio.exe run.