Closed larsbrinkhoff closed 5 years ago
Also don't set UNIT_DISABLE.
Also check why DPK only allows one connection.
Also this:
In order for the TMXR layer to know about which units manage which lines, the device reset routine should call:
t_stat tmxr_set_line_unit (TMXR mp, int line, UNIT uptr_poll); t_stat tmxr_set_line_output_unit (TMXR mp, int line, UNIT uptr_poll);
I made the requested fixes to the MTY device. It seems to work exactly like before, no better or no worse. Still sluggish compared to using sim_activate.
The changes are on my branch here:
https://github.com/larsbrinkhoff/ka10-simh/commits/lars/tmxr
If this works, push it to the repo. I am planing on pushing the current system to the main simH tree within the next day or two.
I'll try. If I miss the window, no big deal.
I posted a pull request: #159. I still have to fix DPK to allow more than one connection.
Based on input from @markpizz, I'm reconsidering the implementation of MTY. The other two, TK10 and DPK should be OK.
I'm thinking something along the line of two UNITs for the DEVICE. One unit polls for connections and input. The other is for output. The output unit should keep track of one word being output for each line, and feed data one character at a time to tmxr_putc_ln.
Oh, and the output unit could schedule with sim_activate for speedy service, in case sim_clock_coschedule remains sluggish. It need not be active when all lines are idle.
I'll close this one, because the txdone thing has been fixed.
I'm thinking something along the line of two UNITs for the DEVICE. One unit polls for connections and input. The other is for output. The output unit should keep track of one word being output for each line, and feed data one character at a time to tmxr_putc_ln.
That would be fine. It should be scheduled from DATAO with sim_activate_abs(&unit[1], 0) whenever data is being presented for transmission.
When you do this, don't forget to change the value specified in tmxr_set_line_output_unit() to the second unit for each line.
Oh, and the output unit could schedule with sim_activate for speedy service, in case sim_clock_coschedule remains sluggish.
If you actually want precise timing to reflect the selected line speed across all lines that may be active at the same time, then essentially any sim_activate or sim_coschedule form should be used AS LONG AS you specify a sufficiently long activation interval (100ms will work well with idling). The tmxr internal logic will shorten your supplied activation time as needed to achieve the specified output rates.
It need not be active when all lines are idle.
True, but figuring out that detail may be more complicated than just scheduling a long poll and letting the internal logic work.
True, but figuring out that detail may be more complicated than just scheduling a long poll and letting the internal logic work.
I'll try that. But so far my experience has been that using sim_activate will not let the device idle properly. And sim_clock_coschedule makes it slow. So as a workaround, I'm prepared to add a sim_cancel when all lines are idle.
@markpizz pointed out txdone is private to TMXR.