ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
emu_view.h File Reference

Board-view presentation: frames, composition, input routing, panels. More...

#include <stdint.h>
#include <unicorn/unicorn.h>
#include "board_overlay.h"
#include "emu_presentation.h"
#include "ra8_attributes.h"
Include dependency graph for emu_view.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  board_panel_t
 Display descriptor loaded from a flat key=value panel file. More...

Enumerations

enum  emu_sw_pin_t : uint8_t {
  k_emu_sw_port = 0U ,
  k_emu_sw1_pin = 9U ,
  k_emu_sw2_pin = 8U
}
 EK-RA8D2 user-switch GPIO coordinates (active-low): SW1 P009, SW2 P008. More...
enum  view_cfg_t : uint32_t {
  k_view_default_w = 1024U ,
  k_view_default_h = 600U ,
  k_view_present_every = 16U ,
  k_view_max_chunks = 4000000U ,
  k_view_idle_us = 16000U ,
  k_view_frame_us = 16000U ,
  k_view_yield_us = 2000U ,
  k_us_per_s = 1000000U ,
  k_ns_per_us = 1000U ,
  k_uart_log_max = 64U ,
  k_reboot_settle = 1500U ,
  k_record_ms_per_sec = 1000U ,
  k_record_fps = 20U ,
  k_record_every = 50U
}
enum  board_primary_core_t : uint8_t {
  k_core_m85 = 0U ,
  k_core_m33 = 1U
}
 Which core the firmware targets: gates the M85-only instruction seams. More...
enum  panel_rotate_t : uint32_t {
  k_rotate_0 = 0U ,
  k_rotate_90 = 90U ,
  k_rotate_180 = 180U ,
  k_rotate_270 = 270U
}
 Display rotation (degrees clockwise) applied to the panel for viewing. More...
enum  panel_limits_t : uint32_t {
  k_strtol_base10 = 10U ,
  k_panel_line_max = 256U ,
  k_panel_name_max = 64U ,
  k_panel_dim_max = 4096U
}

Functions

int write_ppm (const char *path, const emu_presentation_workspace_t *presentation)
 Write an RGB565 frame to a binary PPM (P6) for headless inspection.
void unrotate_click (uint16_t cx, uint16_t cy, uint16_t panel_w, uint16_t panel_h, uint32_t deg, uint16_t *nx, uint16_t *ny)
 Map a click in the rotated displayed panel back to native panel coords.
void set_switch (board_overlay_btn_t btn, bool pressed)
 Toggle a user switch's pressed level (active-low) for an on-screen button.
void apply_battery_click (board_overlay_btn_t btn, uint16_t cx, uint16_t disp_w)
 Apply a POWER-section click to the fuel-gauge / core model.
board_overlay_btn_t route_click (uint16_t cx, uint16_t cy, uint16_t panel_w, uint16_t panel_h, uint16_t disp_w, uint32_t rotate_deg)
 Route a composite-space click to the right input model.
bool build_composite (uc_engine *uc, emu_presentation_workspace_t *presentation, const char *app_name)
 Stream the panel and status sidebar into a raw-fd surface.
bool load_panel (const char *path, board_panel_t *out)
 Load a panel descriptor (name / width / height) from a TOML-ish file.
void emu_view_publish (uint32_t pc, uint32_t chunks)
 Publish the run-loop telemetry the board view shows.
void emu_view_mark_stopped (uint32_t pc)
 Mark the run ended: the held frame shows "parked" at pc.
void emu_view_wheel (int32_t notches)
 Page the console scrollback by mouse-wheel notches.
void emu_view_select_console_tab (uint32_t tab_idx)
 Switch the visible console channel to tab_idx (tab-bar click).
void emu_view_reset_console (void)
 Reset the console-scrollback view (warm-reboot support).
board_primary_core_t emu_primary_core (void)
 The primary core the firmware targets (label + seam gating).
void emu_set_primary_core (board_primary_core_t core)
 Select the primary core (CLI –primary-core).
bool emu_low_power (void)
 Whether the M33 4:1-slower low-power clock model is active.
void emu_set_low_power (bool on)
 Set the low-power clock model (CLI –low-power / GUI toggle).

Detailed Description

Board-view presentation: frames, composition, input routing, panels.

Everything the emulator presents or routes for a human: the GLCDC frame build from live register state, the RGB565 -> PPM writer, the status sidebar snapshot, panel rotation and click unrotation, the on-screen switch / battery / console-tab click routing shared by the live window and the headless –click, the panel descriptor loader, the console-scrollback view state, and the core-control state (primary core label + the M33 low-power clock model) the GUI toggles live.

Split out of the ra8_emulator main translation unit; behaviour unchanged.

Since
0.1.0

Definition in file emu_view.h.

Enumeration Type Documentation

◆ board_primary_core_t

enum board_primary_core_t : uint8_t

Which core the firmware targets: gates the M85-only instruction seams.

Enumerator
k_core_m85 

Cortex-M85 primary (default): MVE/long-shift seams armed.

k_core_m33 

Cortex-M33 primary: the M85-only instruction seams stay off.

Definition at line 63 of file emu_view.h.

◆ emu_sw_pin_t

enum emu_sw_pin_t : uint8_t

EK-RA8D2 user-switch GPIO coordinates (active-low): SW1 P009, SW2 P008.

Enumerator
k_emu_sw_port 

Both user switches sit on PORT0.

k_emu_sw1_pin 

SW1 -> P009.

k_emu_sw2_pin 

SW2 -> P008.

Definition at line 35 of file emu_view.h.

◆ panel_limits_t

enum panel_limits_t : uint32_t
Enumerator
k_strtol_base10 

Base-10 radix for strtol parses.

k_panel_line_max 

Max panel-config line length.

k_panel_name_max 

Max panel name (incl NUL).

k_panel_dim_max 

Sanity cap on a panel dimension.

Definition at line 84 of file emu_view.h.

◆ panel_rotate_t

enum panel_rotate_t : uint32_t

Display rotation (degrees clockwise) applied to the panel for viewing.

The firmware always renders at its compiled resolution; –rotate only turns the emulated panel for display (e.g. a 1024x600 landscape app shown as a 600x1024 portrait), so a vertically-mounted screen can be previewed. Clicks are mapped back to native coordinates via unrotate_click.

Enumerator
k_rotate_0 

Native orientation.

k_rotate_90 

90 deg clockwise (-> portrait).

k_rotate_180 

Upside down.

k_rotate_270 

90 deg counter-clockwise.

Definition at line 77 of file emu_view.h.

◆ view_cfg_t

enum view_cfg_t : uint32_t
Enumerator
k_view_default_w 

Default window width (EK-RA8D2 panel).

k_view_default_h 

Default window height (EK-RA8D2 panel).

k_view_present_every 

Present the frame every Nth chunk.

k_view_max_chunks 

Cap in –view; closing the window ends.

k_view_idle_us 

~60 Hz idle pump after the run ends.

k_view_frame_us 

Min wall-us between live presents (~60 Hz).

k_view_yield_us 

Yield this long when a present is skipped.

k_us_per_s 

Microseconds per second.

k_ns_per_us 

Nanoseconds per microsecond.

k_uart_log_max 

Console ring depth (mirrors SCI model).

k_reboot_settle 

Chunks to run before a scheduled –reboot.

k_record_ms_per_sec 

Emulated ms (= chunks) per second.

k_record_fps 

Recorded frames per emulated second.

k_record_every 

Chunks between recorded frames (1000/20).

Definition at line 42 of file emu_view.h.

Function Documentation

◆ apply_battery_click()

void apply_battery_click ( board_overlay_btn_t btn,
uint16_t cx,
uint16_t disp_w )

Apply a POWER-section click to the fuel-gauge / core model.

A click on the battery slider track maps the click column to a 0..100 percent and writes it while preserving the charge state; a click on the CHG toggle flips charging while preserving SOC; the CORE low-power button flips the M33 4:1-clock model live. Shared by the live window and the headless --click so both behave alike.

Parameters
[in]btnThe POWER button hit (slider, CHG, or low-power).
[in]cxClick column in composite pixels (for the slider map).
[in]disp_wDisplayed panel width (the sidebar origin).
Returns
Nothing.
Precondition
btn is one of the POWER-section buttons.
The battery model is initialised.
Postcondition
The battery / low-power state reflects the click.
Note
Not thread-safe; the emulator is single-threaded host-side.
Since
0.1.0
Postcondition
Ownership of caller-supplied storage is unchanged.

Apply a POWER-section click to the fuel-gauge / core model.

A click on the battery slider track maps the click column to a 0..100 percent (board_overlay_battery_pct_at) and writes it while preserving the charge state; a click on the CHG toggle flips charging while preserving SOC. Shared by the live window and the headless --click so both behave alike.

Parameters
[in]btnThe POWER button hit (battery slider or CHG toggle).
[in]cxClick column in composite pixels (for the slider map).
[in]disp_wDisplayed panel width (the sidebar origin).

Definition at line 289 of file emu_view.c.

References board_overlay_battery_pct_at(), board_periph_battery_get(), board_periph_battery_set(), k_board_overlay_btn_batt_chg, k_board_overlay_btn_battery, k_board_overlay_btn_lowpower, and s_low_power.

Referenced by internal_run_loop_tick_inputs(), internal_run_loop_view(), and route_click().

◆ build_composite()

bool build_composite ( uc_engine * uc,
emu_presentation_workspace_t * presentation,
const char * app_name )

Stream the panel and status sidebar into a raw-fd surface.

Clears and fills the fd-backed composite, copies the live GLCDC layer through bounded rotation tiles, then renders the exact legacy sidebar through its clipped rectangle sink.

Parameters
[in,out]ucUnicorn engine (read for the GLCDC framebuffer).
[in,out]presentationOwned fd and caller-owned tile scratch.
[in]app_nameWindow / app title for the sidebar caption.
Returns
Whether every emulated read and raw surface write completed.
Return values
trueThe exact composite is ready.
falseAn engine read or raw-fd sink operation failed.
Precondition
presentation is active, open, and outlives the operation.
Postcondition
Success leaves a complete RGB565 frame in the owned descriptor.
Note
Not thread-safe; the emulator is single-threaded host-side.
Since
0.1.0
Precondition
The call executes on the emulator's single owning thread.
Postcondition
Ownership of caller-supplied storage is unchanged.

Definition at line 371 of file emu_view.c.

References internal_fill_status(), and priv_emu_view_surface_build().

Referenced by internal_run_loop_record(), internal_run_view_maybe_present(), priv_run_hold_view(), and priv_run_write_outputs().

◆ emu_low_power()

bool emu_low_power ( void )

Whether the M33 4:1-slower low-power clock model is active.

Returns
true while the low-power model shrinks the chunk budget.
Return values
falseFull-speed (M85 clock) modelling.
Precondition
None.
None.
Postcondition
No state is modified.
Note
The GUI low-power button flips this live under –view.
Since
0.1.0

Whether the m33 4:1-slower low-power clock model is active; this step is contained within the emu view model and uses bounded caller or module-owned storage.

Postcondition
Ownership of caller-supplied storage is unchanged.

Whether the M33 4:1-slower low-power clock model is active.

Definition at line 645 of file emu_view.c.

References s_low_power.

Referenced by internal_main_load_primary(), and internal_run_inner_budget().

◆ emu_primary_core()

board_primary_core_t emu_primary_core ( void )

The primary core the firmware targets (label + seam gating).

Returns
The selected primary core.
Return values
k_core_m85Default: the M85-only instruction seams are armed.
k_core_m33–primary-core m33: the M85 seams stay off.
Precondition
None.
None.
Postcondition
No state is modified.
Note
Not thread-safe; the emulator is single-threaded host-side.
Since
0.1.0

The primary core the firmware targets (label + seam gating); this step is contained within the emu view model and uses bounded caller or module-owned storage.

Postcondition
Ownership of caller-supplied storage is unchanged.

The primary core the firmware targets (label + seam gating).

Definition at line 633 of file emu_view.c.

References s_primary_core.

Referenced by internal_main_install_run_seams(), and internal_main_load_primary().

◆ emu_set_low_power()

void emu_set_low_power ( bool on)

Set the low-power clock model (CLI –low-power / GUI toggle).

Parameters
[in]ontrue to shrink the chunk budget by the 4:1 clock ratio.
Returns
Nothing.
Precondition
None (safe to flip live).
None.
Postcondition
emu_low_power() reports on.
Note
Not thread-safe; the emulator is single-threaded host-side.
Since
0.1.0

Set the low-power clock model (cli –low-power / gui toggle); this step is contained within the emu view model and uses bounded caller or module-owned storage.

Postcondition
Ownership of caller-supplied storage is unchanged.

Set the low-power clock model (CLI –low-power / GUI toggle).

Definition at line 651 of file emu_view.c.

References s_low_power.

Referenced by internal_args_try_mode().

◆ emu_set_primary_core()

void emu_set_primary_core ( board_primary_core_t core)

Select the primary core (CLI –primary-core).

Parameters
[in]coreThe core to model.
Returns
Nothing.
Precondition
Called during setup, before the seams install.
None otherwise.
Postcondition
emu_primary_core() reports core.
Note
Not thread-safe; single-threaded setup only.
Since
0.1.0

Select the primary core (cli –primary-core); this step is contained within the emu view model and uses bounded caller or module-owned storage.

Postcondition
Ownership of caller-supplied storage is unchanged.

Select the primary core (CLI –primary-core).

Definition at line 639 of file emu_view.c.

References s_primary_core.

Referenced by internal_args_try_mode().

◆ emu_view_mark_stopped()

void emu_view_mark_stopped ( uint32_t pc)

Mark the run ended: the held frame shows "parked" at pc.

Parameters
[in]pcFinal program counter.
Returns
Nothing.
Precondition
The run loop has exited.
None otherwise.
Postcondition
The view telemetry reads not-running at pc.
Note
Not thread-safe; the emulator is single-threaded host-side.
Since
0.1.0

Mark the run ended: the held frame shows "parked" at pc; this step is contained within the emu view model and uses bounded caller or module-owned storage.

Postcondition
Ownership of caller-supplied storage is unchanged.

Mark the run ended: the held frame shows "parked" at pc.

Definition at line 591 of file emu_view.c.

References s_view_pc, and s_view_running.

Referenced by priv_run_report().

◆ emu_view_publish()

void emu_view_publish ( uint32_t pc,
uint32_t chunks )

Publish the run-loop telemetry the board view shows.

Parameters
[in]pcCurrent program counter.
[in]chunksEmulation-chunk counter.
Returns
Nothing.
Precondition
The run loop is at a chunk boundary.
None otherwise.
Postcondition
The next present shows the new PC / chunk count.
Note
Not thread-safe; the emulator is single-threaded host-side.
Since
0.1.0

Publish the run-loop telemetry the board view shows; this step is contained within the emu view model and uses bounded caller or module-owned storage.

Postcondition
Ownership of caller-supplied storage is unchanged.

Publish the run-loop telemetry the board view shows.

Definition at line 584 of file emu_view.c.

References s_view_chunks, and s_view_pc.

Referenced by internal_run_loop_prologue().

◆ emu_view_reset_console()

void emu_view_reset_console ( void )

Reset the console-scrollback view (warm-reboot support).

Returns
Nothing.
Precondition
A warm reboot is re-initialising the console surfaces.
None otherwise.
Postcondition
The view shows the ALL tab at the live tail with autoscroll on.
Note
Not thread-safe; the emulator is single-threaded host-side.
Since
0.1.0

Reset the console-scrollback view (warm-reboot support); this step is contained within the emu view model and uses bounded caller or module-owned storage.

Postcondition
Ownership of caller-supplied storage is unchanged.

Reset the console-scrollback view (warm-reboot support).

Definition at line 624 of file emu_view.c.

References k_board_console_ch_all, s_view_autoscroll, s_view_console_ch, s_view_log_seen, and s_view_scroll.

Referenced by warm_reboot().

◆ emu_view_select_console_tab()

void emu_view_select_console_tab ( uint32_t tab_idx)

Switch the visible console channel to tab_idx (tab-bar click).

Resets the scrollback to the live tail of the newly selected channel, exactly as a tab click in the window does; the headless –click classification shares this path.

Parameters
[in]tab_idxThe board_console channel index selected.
Returns
Nothing.
Precondition
tab_idx is a valid board_console channel.
None otherwise.
Postcondition
The selected tab shows its live tail with autoscroll on.
Note
Not thread-safe; the emulator is single-threaded host-side.
Since
0.1.0
Postcondition
Ownership of caller-supplied storage is unchanged.

Switch the visible console channel to tab_idx (tab-bar click).

Definition at line 615 of file emu_view.c.

References board_console_total(), s_view_autoscroll, s_view_console_ch, s_view_log_seen, and s_view_scroll.

Referenced by internal_run_classify_click().

◆ emu_view_wheel()

void emu_view_wheel ( int32_t notches)

Page the console scrollback by mouse-wheel notches.

Scrolling up reveals older lines AND pauses autoscroll (so new output no longer yanks the view to the bottom); scrolling back down to the tail re-enables autoscroll. The status snapshot clamps the offset and holds the absolute position while paused.

Parameters
[in]notchesWheel notches (positive = up / older lines).
Returns
Nothing.
Precondition
The live window is polling wheel events.
None otherwise.
Postcondition
The scrollback offset / autoscroll state reflect the wheel.
Note
Not thread-safe; the emulator is single-threaded host-side.
Since
0.1.0
Postcondition
Ownership of caller-supplied storage is unchanged.

Page the console scrollback by mouse-wheel notches.

Definition at line 598 of file emu_view.c.

References s_view_autoscroll, and s_view_scroll.

Referenced by internal_run_loop_view().

◆ load_panel()

bool load_panel ( const char * path,
board_panel_t * out )

Load a panel descriptor (name / width / height) from a TOML-ish file.

A flat key = value panel descriptor (see tools/ra8_emulator/panels/), so the board emulator becomes whatever display a config describes – not just the EK-RA8D2 1024x600. The raw descriptor backend rejects files over 4096 bytes, reads into a fixed stack buffer, and parses bounded lines without allocation. Blank lines and '#' comments are ignored and quotes are stripped from the name.

Parameters
[in]pathPanel config path.
[out]outFilled descriptor on success.
Returns
true if a valid width/height were parsed.
Return values
falseThe file was unreadable or the dimensions were out of range.
Precondition
out is non-null.
path is NUL-terminated.
Postcondition
On true out holds the descriptor; on false a diagnostic printed.
Every opened raw descriptor is closed before return.
Note
Not thread-safe; call during single-threaded setup.
Since
0.1.0

< Maximum accepted panel-description byte count.

Definition at line 550 of file emu_view.c.

References board_panel_t::height, internal_parse_panel(), k_emu_io_ok, k_panel_dim_max, memset(), priv_emu_io_close(), priv_emu_io_errf(), priv_emu_io_open_read(), priv_emu_io_read_exact(), emu_io_result_t::status, and board_panel_t::width.

Referenced by internal_main_apply_panel().

◆ route_click()

board_overlay_btn_t route_click ( uint16_t cx,
uint16_t cy,
uint16_t panel_w,
uint16_t panel_h,
uint16_t disp_w,
uint32_t rotate_deg )

Route a composite-space click to the right input model.

A console-tab click switches the visible channel; a console-body click toggles autoscroll; an on-screen SW1/SW2 presses that user switch (active-low); a POWER click drives the battery / low-power model; any other click is unrotated and injected as a GT911 touch – the same path the firmware's real ra8_touch_read drains. Shared by the live window and the headless --click so both behave alike.

Parameters
[in]cxClick column in composite pixels.
[in]cyClick row in composite pixels.
[in]panel_wNative panel width (for the touch unrotate).
[in]panel_hNative panel height (for the touch unrotate).
[in]disp_wDisplayed panel width (the sidebar origin).
[in]rotate_degActive display rotation.
Returns
The button hit, or k_board_overlay_btn_none for a panel touch.
Return values
k_board_overlay_btn_noneThe click was injected as a touch.
Precondition
The overlay geometry matches the composite the click landed on.
The input models are initialised.
Postcondition
Exactly one input model consumed the click.
Note
Not thread-safe; the emulator is single-threaded host-side.
Since
0.1.0
Postcondition
Ownership of caller-supplied storage is unchanged.

An on-screen SW1 / SW2 button toggles that user switch (active-low); any other click is mapped back through unrotate_click and injected as a GT911 touch – the same path the firmware's real ra8_touch_read drains. This is shared by the live window and the headless --click so both behave alike.

Parameters
[in]cxClick column in composite pixels.
[in]cyClick row in composite pixels.
[in]panel_wNative panel width (for the touch unrotate).
[in]panel_hNative panel height (for the touch unrotate).
[in]disp_wDisplayed panel width (the sidebar origin for buttons).
[in]rotate_degActive display rotation.
Returns
The button hit, or k_board_overlay_btn_none for a panel touch.

Definition at line 326 of file emu_view.c.

References apply_battery_click(), board_console_total(), board_overlay_hit_button(), board_overlay_hit_console_tab(), board_periph_touch_inject(), k_board_console_ch_count, k_board_overlay_btn_batt_chg, k_board_overlay_btn_battery, k_board_overlay_btn_console, k_board_overlay_btn_lowpower, k_board_overlay_btn_none, s_view_autoscroll, s_view_console_ch, s_view_log_seen, s_view_scroll, set_switch(), and unrotate_click().

Referenced by internal_run_loop_view().

◆ set_switch()

void set_switch ( board_overlay_btn_t btn,
bool pressed )

Toggle a user switch's pressed level (active-low) for an on-screen button.

SW1/SW2 are momentary push-buttons wired active-low: held down drives the pin LOW, released returns it HIGH. Driving the level directly makes a click behave as a real button (press on mouse-down, release on mouse-up), not a latching switch.

Parameters
[in]btnThe overlay button hit (SW1 or SW2).
[in]pressedtrue while held down, false on release.
Returns
Nothing.
Precondition
btn is one of the switch buttons.
The GPIO input model is initialised.
Postcondition
The switch pin level reflects pressed.
Note
Not thread-safe; the emulator is single-threaded host-side.
Since
0.1.0
Postcondition
Ownership of caller-supplied storage is unchanged.

Definition at line 266 of file emu_view.c.

References board_periph_gpio_set_input(), k_board_overlay_btn_sw2, k_emu_sw1_pin, k_emu_sw2_pin, k_emu_sw_port, and pin.

Referenced by internal_run_loop_tick_inputs(), internal_run_loop_view(), and route_click().

◆ unrotate_click()

void unrotate_click ( uint16_t cx,
uint16_t cy,
uint16_t panel_w,
uint16_t panel_h,
uint32_t deg,
uint16_t * nx,
uint16_t * ny )

Map a click in the rotated displayed panel back to native panel coords.

Parameters
[in]cxClick column in displayed-panel pixels.
[in]cyClick row in displayed-panel pixels.
[in]panel_wNative panel width.
[in]panel_hNative panel height.
[in]degActive display rotation (0/90/180/270).
[out]nxReceives the native column.
[out]nyReceives the native row.
Returns
Nothing.
Precondition
nx and ny are non-null.
deg is one of the panel_rotate_t values.
Postcondition
The native coordinates are written.
Note
Pure mapping; thread-safe.
Since
0.1.0

Map a click in the rotated displayed panel back to native panel coords; this step is contained within the emu view model and uses bounded caller or module-owned storage.

Postcondition
Ownership of caller-supplied storage is unchanged.

Definition at line 242 of file emu_view.c.

References k_rotate_180, k_rotate_270, and k_rotate_90.

Referenced by internal_run_loop_tick_inputs(), and route_click().

◆ write_ppm()

int write_ppm ( const char * path,
const emu_presentation_workspace_t * presentation )

Write an RGB565 frame to a binary PPM (P6) for headless inspection.

Uses bounded RGB conversion plus a synced sibling transaction so a failed export cannot replace an existing target with a partial image.

Parameters
[in]pathOutput file path.
[in]presentationOpen fd-backed RGB565 composite to stream.
Returns
0 on success, -1 when the file cannot be created.
Return values
0The frame was written.
-1Transaction creation, raw write, sync, or publication failed.
Precondition
presentation is open and holds the full composite.
path names a writable location.
Postcondition
On success the P6 file exists with 8-bit RGB expansion.
On failure the pre-existing final target remains unchanged.
Note
Not thread-safe; the emulator is single-threaded host-side.
Since
0.1.0

Definition at line 300 of file emu_view_surface.c.

References emu_presentation_workspace_t::composite_height, emu_presentation_workspace_t::composite_width, emu_io_txn_t::fd, emu_presentation_workspace_t::fd, internal_write_ppm_pixels(), k_emu_io_ok, priv_emu_io_filef(), priv_emu_io_txn_abort(), priv_emu_io_txn_begin(), priv_emu_io_txn_commit(), and emu_io_result_t::status.

Referenced by internal_run_loop_record(), and priv_run_write_outputs().