Previous Thread
Next Thread
Print Thread
Page 77 of 80 1 2 75 76 77 78 79 80
Joined: Feb 2014
Posts: 1,213
Likes: 221
G
Very Senior Member
Very Senior Member
G Offline
Joined: Feb 2014
Posts: 1,213
Likes: 221
Thought I'd try to make an imagewriter control panel layout:


[Linked Image from i.imgur.com]

Joined: Feb 2014
Posts: 1,213
Likes: 221
G
Very Senior Member
Very Senior Member
G Offline
Joined: Feb 2014
Posts: 1,213
Likes: 221
Now the buttons and leds are "hooked up".

Code
	output_finder<> m_power_led;
	output_finder<> m_paper_error_led;
	output_finder<> m_select_led;

add to the constructor:
Code
	m_power_led(*this, "power_led"),
	m_paper_error_led(*this, "paper_error_led"),
	m_select_led(*this, "select_led")

and don't forget to resolve() them. Forgot to do this...
Code
	m_power_led.resolve();  // will get segfault if you forget to resolve
	m_paper_error_led.resolve();
	m_select_led.resolve();

then just assign them a value in the code:
Code
	m_select_led = !m_ic17_flipflop_select_status;


There's something really satisfying about clicking on buttons and seeing it work. 8-)


[Linked Image from i.imgur.com]

Joined: Mar 2001
Posts: 17,284
Likes: 268
R
Very Senior Member
Very Senior Member
R Offline
Joined: Mar 2001
Posts: 17,284
Likes: 268
Clickable artwork buttons are indeed surprisingly satisfying.

Joined: Feb 2014
Posts: 1,213
Likes: 221
G
Very Senior Member
Very Senior Member
G Offline
Joined: Feb 2014
Posts: 1,213
Likes: 221
Just for fun, let's make the pressed button have more bling:

Code
	<element name="pushbutton_rect" defstate="0">
		<rect state="0">
			<color red="0.0" green="0.0" blue="0.0" />
		</rect>
		<rect state="0">
			<bounds x="0.02" y="0.02" width=".96" height="0.96" />
			<color red="0.92" green="0.91" blue="0.75" />
		</rect>
		<rect state="1">
			<color red="0.5" green="0.5" blue="0.5" />
		</rect>
		<rect state="1">
			<bounds x="0.02" y="0.02" width=".96" height="0.96" />
			<color red="0.0" green="0" blue="0" />
		</rect>
		<disk state="1">
			<bounds xc=".5" yc=".5" width=".90" height=".90" />
			<color red="1.0" green="1.0" blue="0" alpha = "0.50" />
		</disk>
		<disk state="1">
			<bounds xc=".5" yc=".5" width=".50" height=".50" />
			<color red="1.0" green="1.0" blue="0" alpha = "0.85" />
		</disk>
		<text string="Pressed" state="1">
			<color red="1.0" green="0.0" blue=".25" alpha = "1.0"/>
			<bounds xc=".5" yc=".5" width="1.0" height="1.0" />
		</text>
	</element>
[Linked Image from i.imgur.com]

Joined: Mar 2001
Posts: 17,284
Likes: 268
R
Very Senior Member
Very Senior Member
R Offline
Joined: Mar 2001
Posts: 17,284
Likes: 268
That's a bit excessive smile

Joined: Feb 2014
Posts: 1,213
Likes: 221
G
Very Senior Member
Very Senior Member
G Offline
Joined: Feb 2014
Posts: 1,213
Likes: 221
Ok, I'm not an expert on subclassing, but I made an imagewriter15 as a subclass of the regular imagewriter, but with 15 inch wide paper.

I tried to make it a PORT_CONFNAME/PORT_CONFSETTING configuration option, but ioports aren't available during device_add_mconfig time (as far as I know).


Only a few variables have to be changed:

Code
class apple_imagewriter15_printer_device : public apple_imagewriter_printer_device
{
public:
	apple_imagewriter15_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
	apple_imagewriter_printer_device(mconfig, tag, owner, clock)
	{	
		PAPER_WIDTH_INCHES = 15.0;
		PAPER_WIDTH = PAPER_WIDTH_INCHES * dpi * xscale;  
		m_right_edge=((PAPER_WIDTH_INCHES + MARGIN_INCHES) * dpi * xscale - 1) ;
	};
};

DECLARE_DEVICE_TYPE(APPLE_IMAGEWRITER_PRINTER, apple_imagewriter_printer_device)
DECLARE_DEVICE_TYPE(APPLE_IMAGEWRITER15_PRINTER, apple_imagewriter15_printer_device)


The break in the middle is me switching the jumper from 8 inches to 15 inches and resetting while holding down FF.

[Linked Image from i.imgur.com]

Joined: Mar 2001
Posts: 17,284
Likes: 268
R
Very Senior Member
Very Senior Member
R Offline
Joined: Mar 2001
Posts: 17,284
Likes: 268
Was there actually a wide-carriage ImageWriter? I don't remember how that worked in real life.

Joined: Feb 2014
Posts: 1,213
Likes: 221
G
Very Senior Member
Very Senior Member
G Offline
Joined: Feb 2014
Posts: 1,213
Likes: 221
The imagewriter 15 was model A9M0305 and from what I can tell from Apple's imagewriter schematic, it's the same motherboard, just has a jumper that grounds the 8085's SID input.



It reads that input when it starts up, I just made a config option previously so I could set it to 1 or 0, but now I've got this in:

Code
//-------------------------------------------------
//    i8085 Main cpu in sid function
//-------------------------------------------------

uint8_t apple_imagewriter_printer_device::maincpu_in_sid_func()
{
	return (PAPER_WIDTH_INCHES == 15.0) ? 0 : 1;  // for imagewriter15, will be 0, regular imagewriter will be 1
//	return ioportsaferead("WIDTH");
}


Joined: Mar 2001
Posts: 17,284
Likes: 268
R
Very Senior Member
Very Senior Member
R Offline
Joined: Mar 2001
Posts: 17,284
Likes: 268
Ahh, yeah. In that case the separate 8.5 and 15 inch devices is the right call. Fortunately Vas fixed it recently so devices can share ROMs.

Joined: May 2004
Posts: 1,016
Likes: 130
D
Very Senior Member
Very Senior Member
D Offline
Joined: May 2004
Posts: 1,016
Likes: 130
I'll assume you're all going to read this: https://us.macmillan.com/books/9780374602581/laserwriterii wink

Page 77 of 80 1 2 75 76 77 78 79 80

Link Copied to Clipboard
Who's Online Now
1 members (fhub), 200 guests, and 2 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,372
Posts122,600
Members5,085
Most Online1,529
Jun 7th, 2025
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Powered by UBB.threads™ PHP Forum Software 8.0.0