I tried to make a layout file and struggled mightily.

If you want to see mame segfault, just put a stray < somewhere inside the layout file. That was fun to figure out.

I took a layout file from the snspell artwork at Mr. Do's and could not get the buttons to work. I tried and tried and tried, I put the flag MACHINE_CLICKABLE_ARTWORK in apple2p.cpp which didn't help.

COMP( 1979, apple2p, apple2, 0, apple2p, apple2p, apple2_state, empty_init, "Apple Computer", "Apple ][+", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )

I could see the buttons but they didn't work.

I thought I was going to go insane!

And then I found the answer at http://www.mameworld.info/ubbthread...page=&view=&sb=5&o=&vc=1


So I noticed none of the buttons (clickable; move up/down when you press them) in this artwork file (mslug2) worked anymore. I look, and the neogeo driver was updated some time back.

I look some more, and I see that the controllers for neogeo are now bus devices.


> Because Neo Geo controllers are now bus devices, the input tags also need to be
> changed to edge:joy:JOY1 and edge:joy:JOY2. These tags appear in the -listxml output.

Ah... knew it would be something simple. I had simply changed them to JOY1 and JOY2.

That will help me with other thing, too.

Thank you!!! :cheers5:

So after changing INPUTTAG="joystick_3_buttons" to INPUTTAG="sl2:agraphtablet:joystick_3_buttons" they started working!!!

Sure enough, if you look at the ioports table it will be prefaced with sl2:agraphtablet:

[MAME]> print(manager:machine():ioport().ports)
table: 0x555dcaf592b0
[MAME]> function printt(a) for i,j in pairs(a) do print(i,j) end end 
[MAME]> printt(manager:machine():ioport().ports)
:X6	sol.ioport_port*: 0x555dcaf5a5d8
:sl2:agraphtablet:joystick_3_buttons	sol.ioport_port*: 0x555dcaf5ac68
:sl2:agraphtablet:a2mse_y	sol.ioport_port*: 0x555dcaf5acd8
:X2	sol.ioport_port*: 0x555dcaf5a798
:joystick_2_x	sol.ioport_port*: 0x555dcaf5aa38
:sl2:agraphtablet:Position Max	sol.ioport_port*: 0x555dcaf5ae98
:reset_dip	sol.ioport_port*: 0x555dcaf5ab88
:sl2:agraphtablet:joystick_3_y	sol.ioport_port*: 0x555dcaf5af08
:X3	sol.ioport_port*: 0x555dcaf5a728
:joystick_2_y	sol.ioport_port*: 0x555dcaf5a9c8
:joystick_buttons	sol.ioport_port*: 0x555dcaf5a958

I don't know what was worse, struggling to get this working or watching Aquaman at the same time... 8-)

Baby steps...

<!-- taken from snspell.lay and modified -->

<mamelayout version="2">
	<element name="shadow" defstate="0">
		<text string=" ">
			<bounds x="0" y="0" width="1" height="1" />
			<color red="0.0" green="0.0" blue="0.0" />
			<disk state="0">
			<bounds x="0.07" y="0.07" width="0.86" height="0.86" />
			<color red="1.0" green="0.0" blue="0.0" />
		<disk state="1">
			<bounds x="0.07" y="0.07" width="0.86" height="0.86" />
			<color red="0.0" green="0.0" blue="0.0" />
	<view name="Handheld_Artwork">
		   <screen index="0">
			<bounds x="0" y="0" width="5554" height="7842" />

		<!-- Keypad	-->
		<!-- ABCDE -->
			<cpanel element="shadow" inputtag="sl2:agraphtablet:joystick_3_buttons" inputmask="0x10"><bounds y="4484" x="600" width="305" height="305"/><color alpha="0.85" /></cpanel>
			<cpanel element="shadow" inputtag="sl2:agraphtablet:joystick_3_buttons" inputmask="0x20"><bounds y="4484" x="1060" width="305" height="305"/><color alpha="0.85" /></cpanel>

[Linked Image]

Last edited by Golden Child; 04/20/19 05:01 AM.