How to develop a printer driver for CUPS?

Is there documentation on how to write a printer driver for CUPS? Thought about wring my own driver since the manufacturer doesn’t make Linux drivers nor one for this old dot matrix printer that I have.

Or perhaps Linux has a generic ANSI printer driver?

It would have been nice to know the make/model. Many dot matrix printers support the Epson’s ESP/P protocol, and there is a CUPS driver for this

http://www.openprinting.org/printer/Generic/Generic-ESC_P_Dot_Matrix_Printer

Others worth checking out

http://www.openprinting.org/printer/Epson/Epson-Dot_Matrix

http://www.openprinting.org/printer/Generic/Generic-IBM-Compatible_Dot_Matrix_Printer

If you do need to consider writing a driver (not a trivial task), read this guide

https://wiki.linuxfoundation.org/en/OpenPrinting/WritingAndPackagingPrinterDrivers

It is a Talley-Genicom 4490XT.

It does have a pro-printer I emulation as well as ANSI which ANSI is the default. Don’t have an exact manual for it and tried switching the emulation but to no avail at present. The manufacturer is no help.

Thank you for the link. Wouldn’t expect it would be and is the last resort.