I was working on the imagewriter II but got stuck trying to figure out the gate array.
I happened to notice a skeleton by AJR for the NLQ401 and thought I'd give it a stab.
I was able to get the cr steppers working, then the lf steppers, and got the buttons working but it just wouldn't go into the self test. After doing some machinations with the debugger, the self test is doing something.
I've got the print head a little backwards but finally, it's doing something recognizable!
ok, got the printhead pins in the right order.
was able to coax a few characters to be printed but there's a flipflop on the schematic that I haven't implemented yet.
Nice work. Could you have a look at the MPS-1230? This code has sat there rotting for 9 years. (https://github.com/mamedev/mame/blob/master/src/mame/commodore/mps1230.cpp) This is a combo NLQ parallel / Commodore IEC printer so it can be used on many different computers. I own a working MPS-1230 if any more info is needed. There's a Guru-Reame in the src.
I've been studying the MPS-1230 a little bit and it looks possible.
The schematic's a little confusing but it looks like it drives the carriage motor left and right with PA0 and PA1 and uses an encoder to detect the movement which sets off interrupts, as opposed to using a stepper motor. I think PA4-PA7 drive the LF motor.
There's accesses in E000-E009 range which must go to the gate array, but that's completely undocumented.
The PEEK rom version has a checksum that will pass if we change the memory map to go up to bfff. The upper areas of the rom is filled with FF.
Thought that the Amstrad DMP1 would be simple, but it has been quite difficult. I've been trying to figure out why my code didn't work, finally realizing that the rotation detector disc spins whenever the motor runs. After realizing that, I read a blurb in the VIC-1515 manual that said "fixed to motor shaft".
It uses a Seikosha uni-hammer design (one single hammer that does the work of 7 pins). It's quite a clever cost reduction, as well as using a spring to return the carriage to the left.
It's very similar to a lot of printers, like the Atari 1029, the MPS-801, and the VIC-1515/1525 (Tandy DMP-100, Gorilla Banana)
I finally got it to do something kind of recognizable.
Maybe it's a bit late since you figured it out already, but here you have some comprehensive info on Amstrad printers, including manuals, service manuals, rom dumps, etc: https://www.cpcwiki.eu/index.php/Peripherals#Printers
Thanks, Rob, the cpc site is my go-to resource for these printers, it's really well done and neatly organized. I probably wouldn't have even tried the nlq401 without the collected technical info.
Could you have a look at the Commodore VIC-1520 Plotter.... should be low-hanging fruit. There's a driver but like a lot of non-essential peripherals it does nothing and hasn't even been implimented correctly as only IEC4 is available. I ran the C64 emulation and added the VIC-1520 (IEC4) and it didn't do anything and just gave me syntax errors just trying to output a simple program listing in direct mode typed directly from the manual. I added a MPS-1200 (IEC4), reset the C64 and all it did was crash to the desktop :-/
The user manual for the 1520 says it's mapped to IEC6 by default and the emulation doesn't expose IEC6 in the slot devices so it will never work regardless. The manual doesn't mention anything about changing the device number so 6 is required for the plotter with no other options. The most basic printing in direct mode is... OPEN 3,6 CMD 3 PRINT #3,"VIC-1520 TEST" CLOSE #3
At PRINT #3 there is an expected 'DEVICE NOT PRESENT' error.
With the 1520 there's no complex/unknown gate array or dot matrix stuff, basically just plot pixels where ever the pen is positioned when it's down and dump it to a png or whatever the normal output method is in MAME for printing devices. Electronically it's very simple using a 6501 with internal ROM and there are 2 ROM versions dumped. There's a rom dissassembly here.... https://www.zimmers.net/anonftp/pub/cbm/firmware/printers/1520/index.html
There are so few (or no) printers working in MAME so it would be nice to have at least one Commodore printing device working and the plotter is likely to be the simplest and easiest one that can be made to work
I hooked up the steppers on the 1520 and finally got something that looks sane. It draws 4 boxes on power up. More stuff to figure out, but looks promising.
The pen up and down signals are reversed on the schematic, when I switched them it looked much better.