Previous Thread
Next Thread
Print Thread
Page 7 of 8 1 2 3 4 5 6 7 8
Joined: Feb 2014
Posts: 871
Likes: 54
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 871
Likes: 54
Okay, I think I know how the jx-80 handles its color ribbon.

Functionally, the main board of the jx-80 is the same as the fx-80. In fact, the schematic given in the jx-80 manual is for the FXMB fx-80 main board. However, it doesn't show the additional board that the jx-80 has which controls the ribbon motor and ribbon home sensor.

Looking at the manual for the LX-300 also gives some clues as to how the ribbon and the sensor works (they call is a CS Motor, Color Select maybe?), even though it's a completely different design.

The upgrade rom works for both the FX and the JX printers and it includes the CS Motor support, which looks at E800 for the CS home sensor (MSBit) and writes to E801 for the motor drive bits 6 and 7 (with bit 5 to activate the motor circuit possibly).

[Linked Image from i.imgur.com]


Just to give you an idea, here's the code that reads the ribbon home sensor at E800,

and also where it writes the stepper patterns to E801, writing 20, A0, 60, E0 and keeping the current value in $93FC.



Code
1f8b: 70 69 00 e8  MOV     A,($E800)
1f8f: 47 80        ONI     A,$80
1f91: b8           RET     
1f92: b9           RETS    
1f93: 52           DCR     B
1f94: cf           JR      $1FA4
1f95: 70 69 fc 93  MOV     A,($93FC)
1f99: 07 df        ANI     A,$DF
1f9b: 70 79 fc 93  MOV     ($93FC),A
1f9f: 70 79 01 e8  MOV     ($E801),A
1fa3: b8           RET     
1fa4: b2           PUSH    DE
1fa5: 70 6c fc 93  MOV     D,($93FC)
1fa9: 69 00        MVI     A,$00
1fab: 74 6b 00     NEI     C,$00
1fae: d7           JR      $1FC6
1faf: 74 4c 80     ONI     D,$80
1fb2: c5           JR      $1FB8
1fb3: 74 4c 40     ONI     D,$40
1fb6: c6           JR      $1FBD
1fb7: c7           JR      $1FBF
1fb8: 74 4c 40     ONI     D,$40
1fbb: c5           JR      $1FC1
1fbc: c6           JR      $1FC3
1fbd: 69 e0        MVI     A,$E0
1fbf: 69 60        MVI     A,$60
1fc1: 69 a0        MVI     A,$A0
1fc3: 69 20        MVI     A,$20
1fc5: d6           JR      $1FDC
1fc6: 74 4c 80     ONI     D,$80
1fc9: c5           JR      $1FCF
1fca: 74 4c 40     ONI     D,$40
1fcd: c6           JR      $1FD4
1fce: c7           JR      $1FD6
1fcf: 74 4c 40     ONI     D,$40
1fd2: c5           JR      $1FD8
1fd3: c6           JR      $1FDA
1fd4: 69 20        MVI     A,$20
1fd6: 69 a0        MVI     A,$A0
1fd8: 69 60        MVI     A,$60
1fda: 69 e0        MVI     A,$E0
1fdc: 70 79 fc 93  MOV     ($93FC),A
1fe0: 70 79 01 e8  MOV     ($E801),A
1fe4: a2           POP     DE


Since other roms have different fuse roms, the CS7 (chip select 7) would show up at different addresses in the memory map.

Code
CS7 (pattern 7f) is at e800/e801:
                                                                                       vv
fe fe fe fe fd fd fd fd ff ff fe fe fe fe fe fe ff ff fb f7 ff ff ff ff ff ff ef df bf 7f ff ff 
00 08 10 18 20 28 30 38 40 48 50 58 60 68 70 78 80 88 90 98 a0 a8 b0 b8 c0 c8 d0 d8 e0 e8 f0 f8

Code
the address map for the M20214GA puts the same 7f pattern chip select 7 (CS7) at c800/c801
                                                                           vv
fe fe fe fe fe fe fe fe bf bf bf bf bf bf bf bf fd f7 fb ff ff ff ff ff ff 7f ef df ff ff ff ff
00 08 10 18 20 28 30 38 40 48 50 58 60 68 70 78 80 88 90 98 a0 a8 b0 b8 c0 c8 d0 d8 e0 e8 f0 f8
M20214GA

Last edited by Golden Child; 03/07/22 09:04 AM.
Joined: Feb 2014
Posts: 871
Likes: 54
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 871
Likes: 54
Yay! Got the mx80 to do something somewhat recognizable. Kinda. Still more stuff to figure out.

It will line feed and form feed from the buttons.

[Linked Image from i.imgur.com]

It uses an 8049 along with an 8041 to handle cpu chores, along with an 8155 to handle some i/o.

I forgot to set a cpu clock for the 8041, leaving it zero and I couldn't figure out why the debugger wouldn't want to stop when I set the focus to the 8041, it just took off when I changed the focus. Once I set it to 6mhz it acted normally.

Joined: Feb 2014
Posts: 871
Likes: 54
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 871
Likes: 54
Something that looks a little better:

[Linked Image from i.imgur.com]

The next step is to add some code to i8155.cpp that will handle the ALT 3 port strobed mode for port c which handles the strobed mode for input port A and uses PC3-PC5 as output ports.

Port A is connected to the centronics data and PC0 will trigger an interrupt on the 8049, PC1 will hook up to centronics busy and PC2 hooks up to centronics strobe.

[Linked Image from i.imgur.com]

1 member likes this: robcfg
Joined: Feb 2014
Posts: 871
Likes: 54
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 871
Likes: 54
yes! finally figured out why the mx80 wouldn't go online when I hit the online button...

Port 10 is hooked up to the Online lamp, so I thought it was just an output. Turns out the 8049 reads the port bit 10 to check to see if it's online, so after adding that to the read function, now it goes online and toggles.

This had me baffled for a while now.

Code
uint8_t epson_mx80_device::port1_r()
{
	// p10 = online lamp
	// p11 = prav' sp20
	// p12 = err' sp23
	// p13 = dirav' sp21
	// p14 = dir sp22
	// p15 = ack
	// p16 = busy
	// p17 = auto feed (connects also to SW2-3)

	return 	BIT(m_8049_p1, 0) << 0 |  // reads online lamp status at 1:61a   YES!  THIS FIXED THE ONLINE SWITCH!
			BIT(m_slave_p2, 0) << 1 |
			BIT(m_slave_p2, 3) << 2 |
			BIT(m_slave_p2, 1) << 3 |
			BIT(m_slave_p2, 2) << 4 |
			BIT(m_8049_p1, 5) << 5 |
			BIT(m_8049_p1, 6) << 6 |
			BIT(ioport("DIPSW2")->read(),2) << 7;  // p17 = auto feed
}

void epson_mx80_device::port1_w(uint8_t data)
{
	m_8049_p1 = data;
	m_bitmap_printer->set_led_state(bitmap_printer_device::LED_ONLINE, BIT(data, 0));
	logerror("P1 W %x %s\n", data, machine().describe_context());
}


Small victories keep me going 8-)

Last edited by Golden Child; 03/28/22 10:34 AM.
Joined: Feb 2014
Posts: 871
Likes: 54
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 871
Likes: 54
First signs of life from the RX-80... Don't know why it stops the self test yet...

Main CPU is a UPD7810 running at 11 MHz.
8K of external rom
uses 256 bytes of ram inside upd7810, no external ram chips

According to http://www.trs-80.org/epson-mx80/:

"In 1983, Epson introduced two new dot matrix printers: the RX-80 and the FX-80.
The FX-80 was a more advanced printer than the MX-80, offering faster printing speeds and
programmable character sets, among other features.

The RX-80 was a lower cost replacement for the MX-80."


[Linked Image from i.imgur.com]

Joined: Feb 2014
Posts: 871
Likes: 54
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 871
Likes: 54
Finally figured out why it wouldn't print properly, it needed a pts (print timing sensor) pulse adjustment, being multiplied by 1/2. I think it's because the disc has pulses every 1/60 inch but the stepper goes at 120dpi.

[Linked Image from i.imgur.com]

1 member likes this: robcfg
Joined: Feb 2014
Posts: 871
Likes: 54
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 871
Likes: 54
Modeling the stepper as a spring and getting the spring tuning just right gives you clean draft printing:

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

1 member likes this: robcfg
Joined: Feb 2014
Posts: 871
Likes: 54
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 871
Likes: 54
Got a little discouraged when the rx80 would mostly work but would go off in the weeds. Maybe time to work on something else, maybe the mx80.

Worked around the strobed input that was lacking from the 8155 and now the mx80 is receiving data:

So when you get a strobe from the computer, the 8155 will generate an interrupt and tell you that the printer's busy. When you read the data it clears the interrupt and the busy.

Just reworked my existing code a little to do those functions and shoehorn the data into port a read:

[Linked Image from i.imgur.com]

Joined: Feb 2014
Posts: 871
Likes: 54
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 871
Likes: 54
It has the capability to switch into an IBM character set and I remember that you could hit the print screen key on IBM PCs and send the text screen to the printer:


top print is with regular char set

bottom print is with IBM char set


[Linked Image from i.imgur.com]

You can also toggle the output from the command line with CTRL+printscreen.

1 member likes this: robcfg
Joined: Feb 2014
Posts: 871
Likes: 54
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 871
Likes: 54
I had so much trouble with making signals work, I made a passthrough centronics device that would let me monitor the status:

[Linked Image from i.imgur.com]



It's pretty simple, just watching the signals flowing forward and backwards, but useful to help see what's happening.
Code
	virtual DECLARE_WRITE_LINE_MEMBER( input_strobe ) override { m_ctx->write_strobe(state); m_input_strobe = state;}
	virtual DECLARE_WRITE_LINE_MEMBER( input_data0 ) override { if (state) m_data |= 0x01; else m_data &= ~0x01; m_ctx->write_data0(state);m_input_data0 = state;}
	virtual DECLARE_WRITE_LINE_MEMBER( input_data1 ) override { if (state) m_data |= 0x02; else m_data &= ~0x02; m_ctx->write_data1(state);m_input_data1 = state;}
	virtual DECLARE_WRITE_LINE_MEMBER( input_data2 ) override { if (state) m_data |= 0x04; else m_data &= ~0x04; m_ctx->write_data2(state);m_input_data2 = state;}
	virtual DECLARE_WRITE_LINE_MEMBER( input_data3 ) override { if (state) m_data |= 0x08; else m_data &= ~0x08; m_ctx->write_data3(state);m_input_data3 = state;}
	virtual DECLARE_WRITE_LINE_MEMBER( input_data4 ) override { if (state) m_data |= 0x10; else m_data &= ~0x10; m_ctx->write_data4(state);m_input_data4 = state;}
	virtual DECLARE_WRITE_LINE_MEMBER( input_data5 ) override { if (state) m_data |= 0x20; else m_data &= ~0x20; m_ctx->write_data5(state);m_input_data5 = state;}
	virtual DECLARE_WRITE_LINE_MEMBER( input_data6 ) override { if (state) m_data |= 0x40; else m_data &= ~0x40; m_ctx->write_data6(state);m_input_data6 = state;}
	virtual DECLARE_WRITE_LINE_MEMBER( input_data7 ) override { if (state) m_data |= 0x80; else m_data &= ~0x80; m_ctx->write_data7(state);m_input_data7 = state;}

	DECLARE_WRITE_LINE_MEMBER( busy_w ) { output_busy(state); m_busy = state;}   // centronics output busy
	DECLARE_WRITE_LINE_MEMBER( ack_w )  { output_ack(state); m_ack = state;} ;    // centronics output ack
	DECLARE_WRITE_LINE_MEMBER( perror_w ) { output_perror(state); m_perror = state;}; // centronics perror
	DECLARE_WRITE_LINE_MEMBER( select_w ) { output_select(state); m_select = state;}; // centronics select out
	DECLARE_WRITE_LINE_MEMBER( fault_w ) { output_fault(state); m_fault = state;};  // centronics fault

1 member likes this: robcfg
Page 7 of 8 1 2 3 4 5 6 7 8

Link Copied to Clipboard
Who's Online Now
2 members (MAMEBase, 1 invisible), 31 guests, and 3 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,113
Posts119,448
Members5,024
Most Online890
Jan 17th, 2020
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Forum hosted by www.retrogamesformac.com