After two days of C++ I think its time to get back into Blueprint for Day 10. The puzzle has us build a 2 instruction CPU and then in part 2 we hook it up to a scan-line display to find out what it prints. The timings are very important. An off-by-one error could ruin your day.
For my answer I created a new Actor type (D10_Actor), which will tick for every cycle. It has integer properties for the X register, the Cycle counter, and an Instruction Pointer (the index into the puzzle input string array). It also has a Component property for the currently running instruction and an asset reference to the running program (the puzzle input, a Plain Text Asset, public & exposed on spawn). It also exposes a Trace event that we will use later.
The Tick then cycles this virtual CPU like so:

The Load method, called when we don’t have a Valid Instruction, looks at the line pointed to by the IP and then spawns either a Noop or an Addx component and set it as the currently running Instruction:

For the Instruction components, I created an Actor Component blueprint with an empty Cycle method as a base class, then derived from it to create Noop and Addx components. Addx has a Cycles property that counts down from 2, and the Value to add, which is set on spawn.

After writing back the modified X, it calls into the owning actors Clear. I am passing the owning actor (as “Container”) is but I could have used the components “Get Owner” node instead.
Clear (not shown) calls Destroy Component in the Instruction, and sets the property to none (null).
Cycle for Noop just calls Clear.
This structure for the CPU works, but the order of Trace Event & the Instruction-Cycle are important, and so is the initial value for the Cycles counter.
Part 1 proves this, handling the Cycle Trace Event with:

Hooking the CPU up to the CRT for Part 2 means creating a new event handler. I have bound the “D10 CRT String” to a Text widget in the game HUD with a fixed width font:

On every cycle we work out if the sprite position (from the X register) is overlapping (within +/- 1 of) the CRT current position (the Cycle value). Since I am building a string bound in the UI I am either appending a space ‘ ‘ or a hash ‘#’ and then at each scan-line end (the ==39 node) I append a new-line.
Watching it draw at 1-cycle per frame is nice (no video, sorry).
