Commit Graph

1 Commits

Author SHA1 Message Date
Adolfo 88870d7ac5 feat(LuaGame): Pico API compatibility layer + 17 games ported
- Added renderer, game, INPUT tables mapping Pico monochrome API to RGB565 framebuffer
  - renderer.clear, pixel, line, rect, circle, triangle (filled via scanline), text, text_scaled (8x8 font scaled)
  - game.width/height, vars, set_frame_updates, exit
  - INPUT constants NONE, TOUCH_DOWN/MOVE/UP, BUTTON_0/1, FRAME_TICK, GESTURE
- Event generation: touch down/move/up detection + FRAME_TICK each frame
- is_pico detection via source content (renderer./INPUT.) and game.vars heuristic
- Unified game loop handling both sys API (update(dt)) and Pico API (update(event))
- Generated pico_games.h with all 17 examples from pico-bare-metal:
  2048, air_hockey, asteroids, ball, breakout, counter, flappy_bird, lunar_lander,
  memory_match, pacman, pong, simon_says, snake, solitaire, tetris, tic_tac_toe
- Tested: Pong runs at 17 FPS, 'Pong initialized' log, no Lua errors
- Fixes: renamed breakout_lua_src to embedded_breakout_lua_src to avoid conflict with pico breakout
- Ready for game selector UI (menu wrapper) - currently embedded breakout fast v2 remains default, pico test flag use_pico_test available for dev
2026-07-31 12:56:53 -04:00