[Simh] Improved CRT simulation

Paul Koning paulkoning at comcast.net
Fri Dec 14 09:24:42 EST 2018



> On Dec 14, 2018, at 1:17 AM, Lars Brinkhoff <lars at nocrew.org> wrote:
> 
> Hello,
> 
> I'm entertaining the idea of improving the CRT display simulation in
> SIMH.  As an example of what I'd like to see, consider these pictures.
> The first is from the Type 340 simulation, and the second is a frame
> from a film shot at the MIT AI Lab.
> 
> https://github.com/larsbrinkhoff/simh/issues/5#issuecomment-446859516
> 
> If you read the fine print in the 340 documentation, you'll find that an
> a point is .03"-.015" depending on the intensity, compared with the grid
> spacing .0091".
> 
> Does the SIMH video framwork support using shaders written in e.g. GLSL?

Not SIMH, but I wrote a CDC DD60 simulation for use with DtCyber that attempts to model the CRT and spot behavior.  It does that by computing a 2-D Gaussian intensity distribution around the spot center, then sums that into the saved screen pixel value (with saturation).  And then that value is decayed exponentially.

It works pretty nicely but it's expensive.  To make it acceptable, the letter shapes are precomputed, so they just have to be summed in at the correct offsets.  And the decay factor is 0.5 so it can be done as a 64 bit shift and mask on the pixmap.

All this was done with wxWidgets and its direct bitmap access.  It may be that video shaders or GL machinery would be more efficient but I haven't studied how to do that.

In this model, I use the "focus" control to set the width of the Gaussian distribution.  And there are X and Y factors to adjust the character height and width, just as on the original display.  It looks pretty good.  The only significant missing part is a good model of the X/Y display AC characteristics; currently the letter shapes are not as distorted as they were in the original.

	paul




More information about the Simh mailing list