277 Commits
Author SHA1 Message Date
Andreas T Jonsson cf520e172e fix(rpi): decode USB HID modifier bits for Shift/Ctrl/Alt
KeyStatusHandlerRaw in the Circle baremetal kernel dropped the
ucModifiers byte and sized the keyboard state arrays to 0x100 entries,
too small for libretro modifier keycodes (RETROK_LSHIFT=304, etc.).
As a result, holding Shift (or Ctrl/Alt) produced no XT scan code in
the shared frontend, so shifted key combinations never worked.

- Translate ucModifiers bits to RETROK_LCTRL/LSHIFT/LALT/RCTRL/RSHIFT/RALT
  so the existing RETROK_LSHIFT -> 0x2A / RETROK_RSHIFT -> 0x36 mapping
  in src/frontend/core.c fires correctly.
- Resize key_states/key_states_current and the dispatch / input_state
  loops from 0x100 to RETROK_LAST so modifier and other high keycodes
  fit and are not silently truncated.
- Add bounds guard for mapped raw keycodes.

Also stages long-pending packaging fixes in tools/package/rpi/package-rpi.sh
(Pi 4/5 KERNEL_MAX_SIZE bump, Pi 4 family DTBs, disable_splash, [pi400]
and [cm4] stanzas) and updates docs/STATUS.md.

Verified with 'make rpi' for Pi 3/4/5 and the new kernel images
written to /dev/sda1.
2026-06-04 15:27:07 +02:00
Andreas T Jonsson ad31c0d420 feat(rpi): include egabios.bin and LICENSE.virtualxt in package 2026-05-29 10:47:41 +02:00
Andreas T Jonsson 16c14d396d fix(rpi): correct bcm2712d0.dtbo path in packaging 2026-05-29 10:03:45 +02:00
Andreas T Jonsson faa1ef3404 fix(rpi): build Circle addons (fatfs, sdcard) before kernel 2026-05-29 09:00:54 +02:00
Andreas T Jonsson 2e59fccb95 ci(rpi): add universal Pi package build and itch.io deploy 2026-05-29 08:15:05 +02:00
Andreas T Jonsson 23af71339a feat(pi): CRT offload to Core 2, 4:3 letterboxing, and peripheral status logging
Pi 3 bare-metal improvements:
- Offload CRT filter to Core 2 via CRT_FILTER_EXTERNAL compile flag.
  Core 1 queues frames; Core 2 worker (RenderThread) processes
  asynchronously with 1-frame latency. Trampoline pattern in crt.c/h.
- Add 4:3 letterboxed scaling on Core 2 render thread.
  HW framebuffer created once at physical display resolution
  (CBcmFrameBuffer auto-detect); largest centered 4:3 rect computed,
  black bars cleared once, nearest-neighbor scale into target rect.
- Raise KERNEL_MAX_SIZE to 0x1400000 (20 MB) across Circle Config.mk,
  kernel Makefile, and package-rpi.sh to accommodate ~19 MB .bss.
- Add vxt_peripheral_print_status() in src/vxt/peripheral.c that logs
  CPU type (8088/V20), frequency, installed peripherals, IO map ranges,
  and memory map ranges. Called from retro_load_game() in core.c.

Refs: docs/STATUS.md
2026-05-27 14:25:50 +02:00
Andreas T Jonsson bdb8512cfa Pi 3 bare-metal bring-up: fix boot blockers and add packaging
Fix four critical issues preventing VirtualXT from booting on Raspberry Pi 3B+:

1. vfs_file_load was a stub returning NULL - implement real VFS-backed
   loader using peripheral arena allocator

2. setup_machine_from_ini never wired disk.file_api - refactor to two
   passes (instantiate + wire APIs, then configure)

3. Missing vfs_tell in Circle kernel - null pointer crash when disk
   mount tried to get file size

4. Libretro VFS seek returns position, but disk module expects POSIX
   0/-1 - add adapter in disk_file_seek

Also:
- Add NO_DEFAULT_DISK and NO_SAMPLES build flags for baremetal size
- Replace GLABIOS.ROM with vxtbios.bin in raspberrypi.ini
- Add package-rpi.sh packaging script with cmdline.txt LOGFILE support
- Raise KERNEL_MAX_SIZE to 17 MB for Circle sysinit
- Clean up kernel error handling (halt() instead of error_halt)
- Update STATUS.md with known bugs and recent changes
2026-05-27 10:12:53 +02:00
Andreas T Jonsson e82f9553a3 fix(ci): stop deploying .domains; custom domain handled via Loopia forward
Codeberg's pages-server cert renewal for app.virtualxt.org broke during
the git-pages migration (last cert 2025-09-01). With .domains in the
deployed pages branch, the pages-server 307-redirects every visitor to
the unreachable custom domain. Custom-domain access is now handled by
HTTP forwarding configured at the DNS provider (Loopia) instead.
2026-05-07 16:52:55 +02:00
Andreas T Jonsson f74a2b4fb6 fix(ci): run itch deploy before pages to avoid workspace clobber
The pages deploy script checks out the orphan 'pages' branch into the
shared workspace and never restores the original branch, removing
tools/package/itch/push-web.sh and other source files from the tree.
Running itch deploy first avoids the clobber. Also drop leftover debug
output from the itch script.
2026-05-07 16:03:56 +02:00
Andreas T Jonsson 395640b578 fix(ci): copy hidden files from web-pkg to temp dir 2026-05-07 13:44:32 +02:00
Andreas T Jonsson 6e23726176 fix(ci): copy hidden files (like .domains) in pages deploy 2026-05-07 13:36:41 +02:00
Andreas T Jonsson 1f3eb85ac7 fix(ci): include .domains file in Codeberg Pages deployment 2026-05-07 13:23:45 +02:00
Andreas T Jonsson 9c7a5ce579 fix(ci): use script file for itch deploy to fix working directory issues 2026-05-07 13:19:28 +02:00
Andreas T Jonsson f86a1c7914 fix(ci): ensure deploy steps run from correct working directory 2026-05-07 13:12:21 +02:00
Andreas T Jonsson 14c227e3f0 fix(ci): require CODEBERG_TOKEN secret for Pages deployment 2026-05-07 12:04:00 +02:00
Andreas T Jonsson 455b8f991c fix(ci): use CI_TOKEN for auth and only deploy needed web assets 2026-05-07 11:42:39 +02:00
Andreas T Jonsson 58bbe3eec2 fix(ci): use authenticated clone URL and clean up build artifacts in pages deploy 2026-05-07 11:28:34 +02:00
Andreas T Jonsson f453fe9025 feat(ci): add Codeberg Pages deployment and include icon.svg in web package 2026-05-07 11:06:36 +02:00
Andreas T Jonsson 3d482846eb Updated buildscripts 2026-04-23 09:24:33 +02:00
Andreas T Jonsson 3d84a997df Move libretro build logic into CI pipeline and simplify packaging script
Restructure the libretro release workflow so that .woodpecker/libretro.yaml
owns all cross-compilation orchestration (Zig, Android NDK, Emscripten) and
writes per-target outputs under dist/libretro/, while package-libretro.sh
only stages those prebuilt artifacts into the itch bundle directory. The
Makefile now accepts LIBRETRO_OUT, LIBRETRO_LINK_MODE, and
LIBRETRO_OBJECT_OUT variables so CI can produce target-native filenames
without a separate link step.
2026-04-21 10:41:28 +02:00
Andreas T Jonsson 9998fbc190 Add libretro packaging pipeline and remove legacy Odin build flow 2026-04-20 19:03:41 +02:00
Andreas T Jonsson bdff2ce731 Restructure odin install on Windows 2026-01-08 07:48:30 +01:00
Andreas T Jonsson 096fddbf9e Fixed bad zip format on windows 2026-01-07 19:25:56 +01:00
Andreas T Jonsson 2988457eb5 Need to pull the submodules 2026-01-07 19:05:41 +01:00
Andreas T Jonsson c70f64cb11 Fixed duplicated arch name 2026-01-07 18:37:04 +01:00
Andreas T Jonsson 7946edb26b Updated make file 2026-01-07 17:36:22 +01:00
Andreas T Jonsson 8d8ecb1018 Try build Odin from scratch for RetroArch 2026-01-07 17:19:30 +01:00
Andreas T Jonsson 0944ffc9ff Add freestanding build guards to test files
Work around Odin bug where _test.odin files are included during
regular builds for freestanding targets. Since core:testing imports
core:os and core:thread without freestanding guards, this causes
build failures.

Added #+build !freestanding to all test files and documented the
issue in AGENTS.md.
2026-01-07 15:44:39 +01:00
Andreas T Jonsson c3906536d7 Build libretro with dev-2025-09 2025-11-21 19:37:05 +01:00
Andreas T Jonsson 9f3a30d18c Updated buildscript 2025-11-21 18:07:36 +01:00
Andreas T Jonsson f8be636656 Updated Odin and change subtarget order 2025-11-21 15:00:25 +01:00
Andreas T Jonsson f8cabcac44 Updated to Odin 2025-09 2025-09-16 10:38:09 +02:00
Andreas T Jonsson 50519a28e4 Fixed unzip overwrite issue 2025-06-16 07:00:34 +02:00
Andreas T Jonsson f80897dd49 Switched back to freestanding_arm64 on Android. 2025-06-10 12:54:59 +02:00
Andreas T Jonsson bdde88185e Should export variable 2025-06-10 09:47:37 +02:00
Andreas T Jonsson 58832fc3e7 Changed ODIN_ANDROID_NDK variable init. 2025-06-09 12:58:46 +02:00
Andreas T Jonsson 08598cb8e5 Fixed lib filename extension. 2025-06-09 10:30:43 +02:00
Andreas T Jonsson e1521c0d23 Change NDK root 2025-06-09 10:16:21 +02:00
Andreas T Jonsson 4f9f8ac7e6 Added ODIN_ANDROID_NDK path 2025-06-09 10:11:22 +02:00
Andreas T Jonsson 3f7d61b49c Setting subtarget for android 2025-06-09 09:40:26 +02:00
Andreas T Jonsson 4bae21caf5 Updated CI Odin version 2025-06-07 10:30:10 +02:00
Andreas T Jonsson 4fd0a7a977 Updated buildscripts 2025-05-14 15:58:52 +02:00
Andreas T Jonsson 6f0316933b Updated libretro buildscripts 2025-05-14 15:45:53 +02:00
Andreas T Jonsson 171e920759 Added RaspberryPI target in libretro Makefile 2025-05-05 07:48:50 +02:00
Andreas T Jonsson 9938a8d591 Updated Windows builds 2025-04-15 11:34:55 +02:00
Andreas T Jonsson cee51c430d Updated libretro buildscripts 2025-04-15 07:23:39 +02:00
Andreas T Jonsson 50c29fe8e6 Updated extraction code 2025-04-14 18:17:42 +02:00
Andreas T Jonsson 2d86700862 Updated buildscripts 2025-04-14 17:21:12 +02:00
Andreas T Jonsson f3e038f86d Updated Odin version 2025-04-14 17:11:30 +02:00
Andreas T Jonsson de0361ede8 Back down to Odin 2025-02 2025-03-10 07:57:34 +01:00