OKIDATA Printer emulation - changing max chars per printed line

45 views
Skip to first unread message

Jim McGinnis

unread,
Sep 30, 2019, 8:04:29 PM9/30/19
to Altair-Duino
The OKI emulation in the simulator (printer.cpp; line 213) limits the OKI printer line to 80 chars. I wanted to use the full width of my printer, but was afraid I could be busting the stack in the simulator if I set it to a much larger buffer depth...

I changed the 80 to 132 and was able to send 132 char printer output to the OKI 321T without apparent issues.

213 |           if( buffer_size== 132 )

I wanted to change the character limit to accommodate 14x11 paper at 17 CPI.  But that would require over 200 chars in the buffer. Something like 224 chars for 13.2" at 17 CPI (equivalent print area yielded by 10 CPI/132chars = 13.2").

I am using 8.5x11 paper now and when I set the pitch to 15 CPI or 17 CPI and can easily accommodate 132 columns on the narrow paper.

Since I don't know what scenarios need to be executed to stress the stack to its max, I hesitate to speculate on how wide the carriage buffer can become.
Anyone with thoughts on the stack usage and whether it is close to its ceiling?

I am very happy to get the 132 character LPT: output from the simulator - very nice, indeed!

Cheers

Jim





David Hansel

unread,
Sep 30, 2019, 8:40:55 PM9/30/19
to Altair-Duino
The printer buffer is a global variable and therefore doesn't really change how much stack is used
(although more variable RAM being used does cut down on memory available for the stack).

Anyways there should be plenty of RAM available for an additional 140 bytes. You can actually
get information about available memory by pressing 'h' in the main configuration menu.

Just make sure to increase the actual size of the buffer in line18 so you don't overrun it.

Jim McGinnis

unread,
Oct 1, 2019, 9:43:58 AM10/1/19
to Altair-Duino
Thanks David. I completely forgot that the build status was available via that command.

Thanks!

Reply all
Reply to author
Forward
0 new messages