Previous Thread
Next Thread
Print Thread
Page 76 of 78 1 2 74 75 76 77 78
Joined: Feb 2014
Posts: 681
Likes: 9
G
Senior Member
Offline
Senior Member
G
Joined: Feb 2014
Posts: 681
Likes: 9
Printing with MacPaint pictures that are 576x720 (72dpi for 8 inches by 11 inches):

I couldn't figure out why printouts got clipped on the right edge of the page and finally realized that the stepper motor movement is approx 8/9 ~ 9/10 or 1.11 * 144 = 160 steps per inch. If I just scale the page a little bit wider (multiply by 1.11) then everything fits as it should.

Test that fills the 8 inch MacPaint page width:

[Linked Image from i.imgur.com]

Joined: Mar 2001
Posts: 16,834
Likes: 43
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,834
Likes: 43
Good catch on the baud rate. Looking forward to this being submittable!

Joined: Feb 2014
Posts: 681
Likes: 9
G
Senior Member
Offline
Senior Member
G
Joined: Feb 2014
Posts: 681
Likes: 9
Thanks, RB!


I always liked the Japanese woodcut "woman combing hair" and wanted to try printing it.

It took me forever to figure out how to convert it from a gif on macpaint.org back into macpaint format using linux.

I saved it as woodcut.gif.

So I had to install hfsutils on ubuntu. Then make an 800k image with "dd if=/dev/zero bs=1024k count=800 of=kare.dsk"

Then format that with "hformat kare.dsk"

Then convert it to pbm format with imagemagick "convert woodcut.gif -type bilevel woodcut.pbm"

Then convert from pbm to macpaint "pbmtomacp woodcut.pbm > woodcut.macp"

Then "mount" the disk with "hmount kare.dsk"

Then copy the file to the disk with "hcopy woodcut.macp :woodcut " (colon for the root of the disk)

Then set the file type attributes "hattrib -c MPNT -t PNTG :woodcut " (MPNT is file creator MacPaint and PNTG is file type MacPaint Painting)

Then list the directory with "hls -l : " to check it.

And unmount the disk with "humount"


Then use the macse driver and use the params "-fdc:1 35dd -flop2 kare.dsk" because you need an 800k disk and the mac512k will crash with the 800k 35dd.

Once you've copied the file over to the macpaint disk, shut down and then launch with the mac512k driver without the 800k disk and it seems to print ok.

But the results are worth it 8-)

[Linked Image from i.imgur.com]

[Linked Image from i.imgur.com]

Joined: Feb 2014
Posts: 681
Likes: 9
G
Senior Member
Offline
Senior Member
G
Joined: Feb 2014
Posts: 681
Likes: 9
Trying out AppleWorks on the imagewriter:

(just noticed that it's missing a part of an "h")

[Linked Image from i.imgur.com]
[Linked Image from i.imgur.com]


since I got 300/1200/2400 baud working, I thought I'd try the a500 (since 9600 baud isn't working properly with the amiga 500 to imagewriter) and it seems to work ok at 1200 and 2400 baud.
There's still some minor glitches but it doesn't look too bad:


[Linked Image from i.imgur.com]
[Linked Image from i.imgur.com]

Last edited by Golden Child; 09/05/21 07:51 PM.
Joined: Feb 2014
Posts: 681
Likes: 9
G
Senior Member
Offline
Senior Member
G
Joined: Feb 2014
Posts: 681
Likes: 9
After discovering that my 8085 cpu clock was 1/2 the proper clock rate, now my simple applesoft test prints without a glitch. Before, it would glitch randomly at the beginning and end of the line, once or twice per page.

[Linked Image from i.imgur.com]


Also it seems to have fixed my a500 glitching too. This print looks uniform:

[Linked Image from i.imgur.com]

Man, that was driving me crazy trying to figure out what was wrong.

Joined: Feb 2014
Posts: 681
Likes: 9
G
Senior Member
Offline
Senior Member
G
Joined: Feb 2014
Posts: 681
Likes: 9
Ok, I'm getting closer to cleaning up the Imagewriter driver, and one thing has really perplexed me when trying to get it to work with the ct486. It appears that what they call DTR is actually RTS and vice versa.

I ran a neat little program called "SERIAL" by Bret Johnson http://bretjohnson.us/ and it seemed that it was dropping DSR periodically instead of CTS.

It shows the DSR and CTS status on the screen in the upper right.

[Linked Image from i.imgur.com]

The gap between DTR and RTS is where DSR would be since DSR is now off. It's a little hard to read because I've put mame in pause.

[Linked Image from i.imgur.com]


Reading the imagewriter manual it says:

Quote
(page 103)

Signal Descriptions

Request to Send: Output signal from the printer; logic 0
(Spacing) when the printer is turned on.

Fault: Output signal from the printer.

Data Terminal Ready: Output signal from the printer, logic 0
(Spacing) when the printer is on and able to receive data; logic 1
(marking) when unable to receive data.




Data Transfer Ready Protocol
Whenever the capacity of the input buffer becomes less than 30
characters, the printer sends a busy signal by setting the DTR line
false. The computer must stop transmission within the next 27
characters; if it does not, the printer will ignore the excess data.
The DTR line is also set false when the printer is deselected, and
when it receives a DC3 character. The DTR line is true whenever
there is room for at least 100 characters in the input buffer, when
the printer is turned on, selected, and has received a DC1
character.


watchpointing io port 61 (write command), you can see it drop DTR

Code
data written to 61  =  27   pc=13D9

(drops DTR bit 1)

data written to 61  =  25

data written to 61  =  25   pc=1397

Reading wikipedia's article on https://en.wikipedia.org/wiki/Data_Terminal_Ready
Quote
Use for flow control

On some printers with serial interfaces, the DTR line is used for hardware flow control, similar to the use of RTS and CTS for modems. This practice is not consistent; other printers define RTS for this same purpose.

When DTR is used for flow control, it manages the flow of data from the printer to the computer. However, because during printing, the bulk of the data is from the computer to the printer, the importance of flow control in the opposite direction is minimal.


So this makes sense because when I hook up DTR to CTS, it is able to print a full page. Hooking up DTR to DSR causes the print to fail midway.

I think the Imagewriter falls into the "using DTR for flow control instead of CTS" category.



I've been using a configuration ioport to flip things around and invert them instead of recompiling.

Code

	PORT_START("DTR")
	PORT_CONFNAME(0x3, 0x01, "Connect DTR ->")
	PORT_CONFSETTING(0x0, "No connect")
	PORT_CONFSETTING(0x1, "DSR")  // default to DSR
	PORT_CONFSETTING(0x2, "CTS")
	PORT_CONFSETTING(0x3, "DSR + CTS")

	PORT_START("RTS")
	PORT_CONFNAME(0x3, 0x02, "Connect RTS ->")
	PORT_CONFSETTING(0x0, "No connect")
	PORT_CONFSETTING(0x1, "DSR")
	PORT_CONFSETTING(0x2, "CTS")  // default to CTS
	PORT_CONFSETTING(0x3, "DSR + CTS")

	PORT_START("INVERT1")  // for testing / inverting various things without having to recompile
	PORT_CONFNAME(0x1, 0x01, "Invert1 DTR")
	PORT_CONFSETTING(0x0, "Normal")
	PORT_CONFSETTING(0x1, "Invert")

	PORT_START("INVERT2")
	PORT_CONFNAME(0x1, 0x01, "Invert2 RTS")
	PORT_CONFSETTING(0x0, "Normal")
	PORT_CONFSETTING(0x1, "Invert")


//-------------------------------------------------
//    i8251 DTR and CTS Handlers
//-------------------------------------------------

void apple_imagewriter_printer_device::dtr_handler(uint8_t data)
{
//	output_dsr(data);
	if (ioport("DTR")->read() & 0x1) output_dsr(data ^ ioport("INVERT1")->read());
	if (ioport("DTR")->read() & 0x2) output_cts(data ^ ioport("INVERT1")->read());
}

void apple_imagewriter_printer_device::rts_handler(uint8_t data)
{
//	output_cts(data);
	if (ioport("RTS")->read() & 0x1) output_dsr(data ^ ioport("INVERT2")->read());
	if (ioport("RTS")->read() & 0x2) output_cts(data ^ ioport("INVERT2")->read());
}


so for apple2 and the ssc, it seems to work with DTR->DSR and RTS->CTS and normal
so for apple2gs with the printer port, it seems to work with DTR->DSR and RTS->CTS and normal

for the mac512k , it seems to work with DTR->DSR and RTS->CTS and inverted

for the ct486, it seems to work with DTR->CTS and RTS->DSR and normal

for the amiga a500, DTR->CTS and RTS->DSR and normal allows me to print at 9600 bps

Last edited by Golden Child; 09/16/21 02:34 AM.
Joined: Feb 2014
Posts: 681
Likes: 9
G
Senior Member
Offline
Senior Member
G
Joined: Feb 2014
Posts: 681
Likes: 9
printing with a500

[Linked Image from i.imgur.com]

printing from apple2gs/printer with some DeluxePaint pix (opened in Platinum Paint)

[Linked Image from i.imgur.com]

[Linked Image from i.imgur.com]

and the classic King Tut:

[Linked Image from i.imgur.com]

Joined: Feb 2014
Posts: 681
Likes: 9
G
Senior Member
Offline
Senior Member
G
Joined: Feb 2014
Posts: 681
Likes: 9
Fun find of the day:

printing a mac screendump to an imagewriter:

caps-lock + command shift + 4

(don't know exactly, but no caps lock is just do current window?)

from Apple Macintosh Encyclopedia
By Gary Phillips

I like how he says "for screen dump, see screen (current) printed."

[Linked Image from i.imgur.com]

[Linked Image from i.imgur.com]

[Linked Image from i.imgur.com]

Joined: Feb 2014
Posts: 681
Likes: 9
G
Senior Member
Offline
Senior Member
G
Joined: Feb 2014
Posts: 681
Likes: 9
Supposedly the imagewriter is the same as the c-itoh 8510, which looks like the Apple DMP, and the NEC PC-8023 printer.

Apple DMP
[Linked Image from i.imgur.com]
C.Itoh 8510
[Linked Image from i.imgur.com]
Nec PC-8023
[Linked Image from i.imgur.com]




so I was trying the imagewriter with the BBC Micro (bbcb), but the dumpmaster rom didn't have the imagewriter or the citoh 8510, but it did have the PC-8023:

The PC-8023 is # 11
[Linked Image from i.imgur.com]

*FX 5,2 selects serial port
*FX 8,7 selects 9600 baud
*PRINT P11 prints to the NEC 8023 which is pretty much the same as imagewriter control codes.

[Linked Image from i.imgur.com]

Joined: Feb 2004
Posts: 2,289
Likes: 18
Very Senior Member
Offline
Very Senior Member
Joined: Feb 2004
Posts: 2,289
Likes: 18
The promised RS-232 patch box has been added, so you can loop back control lines and other tricks without adding hacks to every serial device.

The actual source has been added now, too. Sorry everyone.

2 members like this: Golden Child, R. Belmont
Page 76 of 78 1 2 74 75 76 77 78

Link Copied to Clipboard
Who's Online Now
0 members (), 31 guests, and 6 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,990
Posts118,128
Members5,005
Most Online890
Jan 17th, 2020
Forum Host
These forums are hosted by www.retrogamesformac.com
Forum hosted by www.retrogamesformac.com