Refactor mame XDK rule