<feed xmlns='http://www.w3.org/2005/Atom'>
<title>picow/src/input.c, branch main</title>
<subtitle>Launcher for the PICO-8 Wasm Runtime</subtitle>
<id>http://src.lordello.net/picow/atom/src/input.c?h=main</id>
<link rel='self' href='http://src.lordello.net/picow/atom/src/input.c?h=main'/>
<link rel='alternate' type='text/html' href='http://src.lordello.net/picow/'/>
<updated>2026-10-29T18:24:31Z</updated>
<entry>
<title>Add PS Vita Port</title>
<updated>2026-10-29T18:24:31Z</updated>
<author>
<name>Nicholas Rodrigues Lordello</name>
<email>n@lordello.net</email>
</author>
<published>2026-10-29T18:24:31Z</published>
<link rel='alternate' type='text/html' href='http://src.lordello.net/picow/commit/?id=4bfe4900b80c17702d9e2c02b1740c790537d5bd'/>
<id>urn:sha1:4bfe4900b80c17702d9e2c02b1740c790537d5bd</id>
<content type='text'>
Compile PICO-w for the PS Vita :tada:.

Fixes some minor compiler warnings that only showed up because
of the different compilation target, and makes the Makefile port
system a little more opinionated.
</content>
</entry>
<entry>
<title>Support SDL 3.2</title>
<updated>2026-10-29T13:18:39Z</updated>
<author>
<name>Nicholas Rodrigues Lordello</name>
<email>n@lordello.net</email>
</author>
<published>2026-10-29T12:45:32Z</published>
<link rel='alternate' type='text/html' href='http://src.lordello.net/picow/commit/?id=d17db29f66214b478fca83c34eb96cc5e0fbdbe2'/>
<id>urn:sha1:d17db29f66214b478fca83c34eb96cc5e0fbdbe2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Minor Fixes</title>
<updated>2026-10-29T12:33:26Z</updated>
<author>
<name>Nicholas Rodrigues Lordello</name>
<email>n@lordello.net</email>
</author>
<published>2026-10-29T12:22:28Z</published>
<link rel='alternate' type='text/html' href='http://src.lordello.net/picow/commit/?id=838d75bce98ca5a1f90f762e80d2aa649d4e0642'/>
<id>urn:sha1:838d75bce98ca5a1f90f762e80d2aa649d4e0642</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Minor Fixes</title>
<updated>2026-10-29T10:59:24Z</updated>
<author>
<name>Nicholas Rodrigues Lordello</name>
<email>n@lordello.net</email>
</author>
<published>2026-10-29T10:52:30Z</published>
<link rel='alternate' type='text/html' href='http://src.lordello.net/picow/commit/?id=e51027a576a07ffb41b6e7d2bfc3aade6ae091d7'/>
<id>urn:sha1:e51027a576a07ffb41b6e7d2bfc3aade6ae091d7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Implement Cart Shutdown</title>
<updated>2026-10-29T10:31:08Z</updated>
<author>
<name>Nicholas Rodrigues Lordello</name>
<email>n@lordello.net</email>
</author>
<published>2026-10-29T10:31:08Z</published>
<link rel='alternate' type='text/html' href='http://src.lordello.net/picow/commit/?id=f9950fce6f7b7a3743920f0d787fb1857aa05769'/>
<id>urn:sha1:f9950fce6f7b7a3743920f0d787fb1857aa05769</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add Clipboard Support</title>
<updated>2026-10-29T10:30:06Z</updated>
<author>
<name>Nicholas Rodrigues Lordello</name>
<email>n@lordello.net</email>
</author>
<published>2026-10-29T10:30:06Z</published>
<link rel='alternate' type='text/html' href='http://src.lordello.net/picow/commit/?id=668594a0bedec468e976a38bbf9eac871e1353de'/>
<id>urn:sha1:668594a0bedec468e976a38bbf9eac871e1353de</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Implement Remaining Syscalls</title>
<updated>2026-10-28T21:44:04Z</updated>
<author>
<name>Nicholas Rodrigues Lordello</name>
<email>n@lordello.net</email>
</author>
<published>2026-10-28T21:44:04Z</published>
<link rel='alternate' type='text/html' href='http://src.lordello.net/picow/commit/?id=5db0d1702e9ba8b64d71967bbd651cb38b649cd7'/>
<id>urn:sha1:5db0d1702e9ba8b64d71967bbd651cb38b649cd7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix Relative Mouse Motion</title>
<updated>2026-10-28T14:28:33Z</updated>
<author>
<name>Nicholas Rodrigues Lordello</name>
<email>n@lordello.net</email>
</author>
<published>2026-10-28T14:28:33Z</published>
<link rel='alternate' type='text/html' href='http://src.lordello.net/picow/commit/?id=756750924357cae5ea9df48af3f55e17a2fd90e2'/>
<id>urn:sha1:756750924357cae5ea9df48af3f55e17a2fd90e2</id>
<content type='text'>
We do some fixes, namely fixing relative mouse motion which worked
very differently compared to mouse motion outside of pointer lock.
This appears to be something built in to PICO-8 itself (as evident by
keeping track of `STAT(32-33,38-39)` under pointer lock: PICO-8 scales
relative mouse motion by a factor of `.25` before adding to the
absolute mouse position.

Additionally, we support running PICO-w on systems with no audio
playback.
</content>
</entry>
<entry>
<title>Implement Audio Device and Remaining ASM Consts</title>
<updated>2026-10-26T07:42:53Z</updated>
<author>
<name>Nicholas Rodrigues Lordello</name>
<email>n@lordello.net</email>
</author>
<published>2026-10-26T07:32:08Z</published>
<link rel='alternate' type='text/html' href='http://src.lordello.net/picow/commit/?id=4957ca8373273721017fc8106b52d5bc6b2a0180'/>
<id>urn:sha1:4957ca8373273721017fc8106b52d5bc6b2a0180</id>
<content type='text'>
We abstract over SDL's audio subsystem and implement an audio
device that fits into PICO-8's model. We fixed the implementation
for the PICO-8 window focus and key buffer and can now actually
boot into PICO-8 games with working sounds and controls!

There are a few issues that remain:

1. There is no "exit" option in the pause menu, I think it thinks
   that we are on the BBS, and maybe there is someway to fix this?
2. The clipboard textarea is not implemented at all; we should
   keep a text buffer in `pw_input` and interact with SDL's
   clipboard system
3. Multicart's don't always work; in particular Undune II tries
   to download from the BBS, I would like to shim this somehow
   to support both `LOAD("FOO.P8")` and `LOAD("#FOO")` forms
   transparently.
</content>
</entry>
<entry>
<title>Improve Mouse Position Handling</title>
<updated>2026-10-24T10:26:16Z</updated>
<author>
<name>Nicholas Rodrigues Lordello</name>
<email>n@lordello.net</email>
</author>
<published>2026-10-24T10:26:16Z</published>
<link rel='alternate' type='text/html' href='http://src.lordello.net/picow/commit/?id=f43e306bf050b9f96be4b22382cacd96d86b5239'/>
<id>urn:sha1:f43e306bf050b9f96be4b22382cacd96d86b5239</id>
<content type='text'>
After some playing around with devkit mode, I noticed two things:

1. The mouse pointer can be outside of the range [0. 128) in case
   the window is larger than the PICO-8 screen, but it does not
   move to positions that would be outside of the window
2. Under pointer lock, relative positions continue to be reported
   even when the mouse is stuck to the edge of the window

This means our implementation was slightly wrong, as it it did
not properly handle the second case in a few ways:

- We would always round to integer relative mouse mouse motions,
  meaning we would incorrectly approximate in case we collected
  multiple frames of relative mouse motion
- We would compute the relative motion based on the mouse position,
  which is incorrect under pointer lock (as the position doesn't
  change but PICO-8 still needs relative mouse motion)
- We would reset relative mouse motion every frame, meaning that
  we would not correctly accumulate relative motion in case the
  host's refresh rate was faster than PICO-8's (which seems to
  only run its frame logic at 30 FPS).

We fix that here.
</content>
</entry>
</feed>
