graph LR
    subgraph Watch["Pebble Time 2 (watch)"]
        WatchC["Watch app (C)<br/>splash / main / wheel windows"]
    end

    subgraph Phone["Android phone"]
        CFP["Core for Pebble<br/>(PebbleKit JS runtime, separate app)"]

        subgraph Companion["Companion app process"]
            HTTP["NanoHTTPD server :8888"]
            UI["MainActivity / UI<br/>C64DisplayView, C64KeyboardView"]
            JNI["JNI bridge<br/>vice_jni.c"]
            VICE["VICE C64 core<br/>(own pthread)"]
        end
    end

    WatchC <-->|Bluetooth AppMessage| CFP
    CFP <-->|HTTP loopback 127.0.0.1:8888| HTTP
    HTTP --> UI
    UI --> JNI
    JNI <--> VICE
