Skip to content

Replacing configurable output modes#61

Draft
isabelburgos wants to merge 5 commits intomainfrom
outputenable
Draft

Replacing configurable output modes#61
isabelburgos wants to merge 5 commits intomainfrom
outputenable

Conversation

@isabelburgos
Copy link
Collaborator

@isabelburgos isabelburgos commented Jul 8, 2025

Prior work

Currently, OBI can be set to one of three output modes: Sixteen bit, Eight bit, or None.

It would be useful to instead be able to enable or disable output on a per-pixel basis.

Proposed Change

Currently there are 4 bits of Free Real Estate in the header of every pixel command. One of those could be used to enable or disable whether data is returned for that pixel.

Benefits

This change does not solve #43, but provides another tool for handling flyback distortion. For example, one could use VectorPixel with output disabled to define the beam flyback path between subsequent raster frames, or implement a "front/back porch" by disabling output for some RasterPixels within a raster frame.

Drawbacks

This change would be somewhat incompatible with my vision for ArrayCommand, but ArrayCommand hasn't been used to build anything yet anyway.
I've changed the implementation of ArrayCommand to be compatible with pixel commands that have extra metadata.

Examples

Previous

Raster Pixel:

>>> bytes(RasterPixelCommand(dwell_time=2))
b'\xb0\x00\x02'

Array of Raster Pixels:

>>> bytes(ArrayCommand(cmdtype = CmdType.RasterPixel, array_length = 5))
b'\x8b\x00\x05'

New

Raster Pixel:

>>> bytes(RasterPixelCommand(output_en=OutputEnable.Enabled, dwell_time=2))
b'\xb0\x00\x02'
>>> bytes(RasterPixelCommand(output_en=OutputEnable.Disabled, dwell_time=2))
b'\xb1\x00\x02'

Array of Raster Pixels

>>> bytes(ArrayCommand(command = RasterPixelCommand.header(output_en=OutputEnable.Enabled), array_length = 5))
b'\x80\xb0\x00\x05'

@isabelburgos isabelburgos force-pushed the outputenable branch 11 times, most recently from 17ceb15 to fda1acc Compare July 17, 2025 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant