pcw.cpp: fix clocking of printer data, add bitmap_printer to handle p… #12979
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…rinter
bitmap_printer: add calccrpos for intermediate stepper position, add set_screen_update function
This fixes the clocking in of data to the pcw printer, as previously it was looking for just the clock being high, and not looking for the transition to high. So multiple writes to the printer with the clock remaining high would clock in data, causing corruption in the printout.
Using the bitmap printer device would allow quite a bit of code in (pcw.cpp) pcw_stepper_callback to be removed, I've left the original printer and stepper code in and it still works to render a second (identical) printing screen.
Also the print key is assigned to the backslash key (so you can do the printer functions, like feeding paper).
I've also added a function to the bitmap printer device for a screen update callback, so a driver using the bitmap printer device can add it's own drawing to the screen (as there's a few other drivers that I'm working on that could use it, for example to render a color ribbon).
Running pcw8256 loco203 allows you to print the readme file, use keypad . to move the cursor down to select the readme, use p to print the document, keypad Enter to accept the dialogs, and backslash to activate the printer menu, where you can feed the paper and continue the print.