Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
Joined: Feb 2014
Posts: 802
Likes: 24
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 802
Likes: 24
Hi all,

I was trying to override the artwork so I didn't have to compile every time I made a change, but -override_artwork didn't seem to be working.

So I analyzed the code and what it's looking for is:

artwork/<name>/<name>.lay

So for example:

-override_artwork lchicken

will look in artwork/lchicken/lchicken.lay

(or even a zipfile at artwork/lchicken.zip with lchicken.lay inside.)

The command line options page doesn't give much info on the subject.

Quote
-override_artwork

Specifies override artwork for external artwork and internal driver layout.

Example:

mame galaga -override_artwork puckman

Now I can make changes and see them immediately on launching mame. Much faster than compiling.

Last edited by Golden Child; 12/26/21 08:04 PM.
Joined: Feb 2004
Posts: 2,344
Likes: 61
Very Senior Member
Online Content
Very Senior Member
Joined: Feb 2004
Posts: 2,344
Likes: 61
You don’t need override_artwork to test layout files, you can just put them in the regular place MAME expects them to be.

Joined: Mar 2002
Posts: 1,248
Likes: 36
H
hap Offline
Very Senior Member
Offline
Very Senior Member
H
Joined: Mar 2002
Posts: 1,248
Likes: 36
Right. Let's say I want to update the internal artwork for merlin. I copy merlin.lay to my_mame_folder/artwork/merlin/merlin.lay, then start mame.exe merlin. I can modify that file, and each time I want to test, simply press Shift+F3 in MAME to refresh the artwork.

Joined: Feb 2014
Posts: 802
Likes: 24
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 802
Likes: 24
Ohhh, ok. So that's the normal place they're expected. Now I understand. I kept putting the .lay file directly in the artwork directory without putting it in a subdirectory. No wonder it didn't work.

I tried copying lchicken.lay into artwork/apple2p/apple2p.lay and launching apple2p and sure enough, it loaded the lay file. Cool.



My dumb experiment of the day, taking the motor position of lchicken and trying to model the cam movement for a little block to move horizontally and vertically in the layout. I think all the processing to do that can be in the layout file.

I saw a video on the innards of I took a lickin from a chicken and thought, hmmm just take the coordinates and turn it into polar (radius and angle), pair that with a vertical position value (depth of the cam) and use the radius for x coordinate, and vertical position for the y coordinate.





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

Joined: Feb 2014
Posts: 802
Likes: 24
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 802
Likes: 24
[Linked Image from i.imgur.com][Linked Image from i.imgur.com]

I drew a very simplified chicken in inkscape. As far as I know, you can't rotate svg images in layouts so I'm going to try to make some rotated chicken svg images programmatically.

Here's the cam converted to an svg from Sean's cam picture:

[Linked Image from i.imgur.com]

So my idea was to use firefox's svgpath.getTotalLength() and svgpath.getPointAtLength() to examine the coordinates of the track and convert to polar coordinates.

Last edited by Golden Child; 12/29/21 05:22 AM.
Joined: Jan 2011
Posts: 248
Likes: 3
Senior Member
Offline
Senior Member
Joined: Jan 2011
Posts: 248
Likes: 3
I have a boxed one of these at work, let me see if I can get you some better pictures..

Joined: Feb 2014
Posts: 802
Likes: 24
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 802
Likes: 24
Cool! Do you also have the instructions? this was all I could find on the net: (from http://www.inthe00s.com/archive/inthe80s/1061490908.shtml)

Quote
Subject: I Took A Lickin From A Chicken
Written By: CoreysGirl on 08/21/03 at 12:35 a.m.

OK, So, there was this really old message asking how to play "I Took a Lickin' From a Chicken". Well, I recently pulled my old chicken game out of the closet and this is how you play if anybody cares:

Game Requires 4 C batteries.

Turn game on, and it should play old McDonald had a farm.
There are four games on mine:
#1: Tic-Tac-Toe
#2: Follow The Leader
#3: Addition Game
#4: Addition Game

#1
This is the classic tic-tac-toe game. However the bird gets to go first.

#2
In this game the bird should first select a number and you will hear the sound of the #. (However, i just played that game, and what happened to me was that the computer chip or whatever is in this crazy thing, made the pattern play first and then the chicken started moving and selected the numbers almost as usual.) ok, so after the chicken goes it will be the players turn and the object is that you have to remember the patteren that the chicken shows you. Each time the chicken goes, one more # is added on, until a certain # of #'s is reached. (I forget for sure, I haven't played w/ it that much, but i think it's like 9 or 10 #'s.)

#3 & #4
As far as I can tell these two games are EXACTLY the same. When you select 3 or 4 some of the numbers light up on the display board thing, you have to look at them and add them as quickly as you can in your head, then type in the answer. If the answer is right, the thing will play old McDonald, if you're wrong, i think it should squak @ you, but i think mine just stops the game cuz it's so old.

Anyway, if anyone cares, I used to love this thing SO much, so I thought i'd respond to that really old message for kicks. hope it helps SOMEONE!!!

Joined: Feb 2014
Posts: 802
Likes: 24
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 802
Likes: 24
What'd be pretty cool is if the chicken could be 3d modeled with photogrammetry.


I found this javascript library called SVGPathCommander and was able to load my svg from inkscape and use it to generate a rotated path.

Since it was pretty simple picture, with paths for the chicken, beak, glasses and comb, I named the ids in inkscape and made a textarea to hold the svg text:

A one liner in the javascript console generated the element:

Code
 newtext.value=""; newtext.value = newtext.value + 
`
<element name="chicken_rot`+rot+`" >`;
for(rot=0;rot<360;rot++) {
["beak","glasses","chicken","comb"].forEach( 
  function(i) {docsvg.getElementById(i).setAttribute("d",
   new SVGPathCommander(newsvg.getElementById(i).getAttribute("d")).transform({rotate:rot,origin:[405,350]}).toString());})
newtext.value = newtext.value + 
`
    <image state="`+rot+`">
     <data>  
        <![CDATA[
`+ document.getElementsByTagName("svg")[1].innerHTML +
`
                        ]]>
                </data>
                </image>
`
;
} newtext.value = newtext.value+`
	</element>`

Just a quick test of setting the element state to the motor_pos value:

[Linked Image from i.imgur.com]

and if I vary the bounds parameters I can make a "bounce" effect.

[Linked Image from i.imgur.com]

Last edited by Golden Child; 12/29/21 06:33 PM.
Joined: Feb 2014
Posts: 802
Likes: 24
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 802
Likes: 24
One thing I wanted to try was to adjust the bounds of a layout element using the keyboard arrow keys and the left shift key:


Code
function code_pressed(code) return machine.input:code_pressed(machine.input:code_from_token(code)) end


	file.views["Internal Layout"].items["chicken_pos"]:set_bounds_callback(
		function ()
                local b = emu.render_bounds()
		if code_pressed("KEYCODE_LEFT") and not
		code_pressed("KEYCODE_LSHIFT") then myx0 = myx0-.01 end
		if code_pressed("KEYCODE_RIGHT") and not
		code_pressed("KEYCODE_LSHIFT") then myx0 = myx0+.01 end
		if code_pressed("KEYCODE_UP") and not
		code_pressed("KEYCODE_LSHIFT") then myy0 = myy0-.01 end
		if code_pressed("KEYCODE_DOWN") and not
		code_pressed("KEYCODE_LSHIFT") then myy0 = myy0+.01 end

		if code_pressed("KEYCODE_LEFT") and
		code_pressed("KEYCODE_LSHIFT") then myx1 = myx1-.01 end
		if code_pressed("KEYCODE_RIGHT") and
		code_pressed("KEYCODE_LSHIFT") then myx1 = myx1+.01 end
		if code_pressed("KEYCODE_UP") and
		 code_pressed("KEYCODE_LSHIFT") then myy1 = myy1-.01 end
		if code_pressed("KEYCODE_DOWN") and
		code_pressed("KEYCODE_LSHIFT") then myy1 = myy1+.01 end

			b:set_xy(myx0,myy0,myx1,myy1)
			
			return b
		end)

Joined: Feb 2014
Posts: 802
Likes: 24
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 802
Likes: 24
Here's an idea for modeling the 3d chicken: something like this javascript svg 3d library called Zdog:

http://zzz.dog

[Linked Image from i.imgur.com]

Page 1 of 2 1 2

Link Copied to Clipboard
Who's Online Now
2 members (Rik, 1 invisible), 23 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,071
Posts118,945
Members5,014
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