Author Topic: Mac emulator handoff problems  (Read 6306 times)

dadcore

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Mac emulator handoff problems
« on: April 08, 2016, 10:22:58 PM »
Hello,

First post so sorry if this is in wrong place. I'm trying to use Attract Mode on OS X 10.11 (El Capitan) with the Mac emulator. I'm doing a pop-up arcade of friends indie games, and hoping to use Attract Mode as the front-end launcher. Been using the Cools layout as a starting point.

The problem is when I launch a Mac "rom" Attract Mode then continues to think it should still be running in the background. This is noticeable because I am setting video backgrounds with sound, and the video/audio stops for a second, then starts again while the game is launched successfully in the foreground. So I have two sets of audio going, the actual game's and Attract Mode's.

I also tried just muting all volume in sound settings, however when I launch the game these settings seem to get overwritten and the video background's audio starts playing anyway.

Another thing I tried is setting emulator > mac > minimum run time to a larger value (like 10 seconds). However this just delays this behavior for 10 seconds, but does not stop it from happening.

Totally noob-ish to attract mode but am a programmer, so if there is some editing I need to do to config files and whatnot can figure that out. Already started to do some.

Okay, thanks for any help. I know this is not the most common setup.
« Last Edit: April 08, 2016, 10:24:32 PM by dadcore »

raygun

  • Administrator
  • Sr. Member
  • *****
  • Posts: 393
    • View Profile
Re: Mac emulator handoff problems
« Reply #1 on: April 08, 2016, 10:53:03 PM »
Hi there,

It looks like the mac games you are running aren't blocking and instead return immediately.  The "Minimum Run Time" setting is supposed to deal with this, but I just double checked and I see that this feature is currently broken on OS X!  I'm pretty sure I've fixed it now, so setting the "Minimum Run Time" should work in the future for you and not simply delay the behavior.  You could try the next nightly build for OS X to see if it resolves this issue.

cheers.

dadcore

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: Mac emulator handoff problems
« Reply #2 on: April 09, 2016, 07:44:26 AM »
Wow, that is some kinda crazy fast turn around on my bug. I'll try the nightly....tonight...and follow up here with the result.

Thanks a ton!

inkagnito

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Mac emulator handoff problems
« Reply #3 on: April 09, 2016, 10:40:01 AM »
Check out this thread using attract mode with retroarch.  :)

http://forum.attractmode.org/index.php?topic=600.0

dadcore

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: Mac emulator handoff problems
« Reply #4 on: April 09, 2016, 11:42:07 AM »
Check out this thread using attract mode with retroarch.  :)

http://forum.attractmode.org/index.php?topic=600.0

Hi, thanks for the pointer. I skimmed this thread but didn't see anything specific about the handoff. Anything you think I should be specifically aware of?

I'm able to launch Mac games okay, didn't need to do -a or anything like that. It's really seems to be the communication between Attract Mode and my successfully launched mac games that are the issue.

dadcore

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: Mac emulator handoff problems
« Reply #5 on: April 09, 2016, 09:18:01 PM »
Doh, if I'm reading this right the nightly build for the commit with this fix, 4ff4cf4, failed during the build upload :-[


dadcore

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: Mac emulator handoff problems
« Reply #6 on: April 11, 2016, 07:02:10 PM »
Woohoo, you got the latest build up and it totally fixes my problem. Thanks a ton!

dadcore

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: Mac emulator handoff problems
« Reply #7 on: April 11, 2016, 08:57:53 PM »
Doh, have a new problem, SO close. I'm not sure if this is an error without how I'm doing my layout, or a bug with the mac version and word_wrap, but it's causing a hard crash.

I'm modifying Cools layout as my starting point. One thing I want to add is a description of the game, about a paragraph long description at the bottom. I am pulling this from the Extra field like this:

Code: [Select]
// Description
local desc = fe.add_text( "Blah", 32, 940, lw, 25 );
desc.align = Align.Left;

And adding this line to the transition callback function:

Code: [Select]
desc.msg = fe.game_info (Info.Extra, var);
That's working great, EXCEPT visually it looks like this:



You can see the description at the bottom is cutting off on the right hand side, not wrapping. So I revise my layout.nut to add word_wrap:

Code: [Select]
// Description
local desc = fe.add_text( "Blah", 32, 940, lw, 25 );
desc.word_wrap = true;
desc.align = Align.Left;

And then...Attract Mode crashes on launch. If I comment out word_wrap, it launches fine but look like above.

No error that I can see. But here is a crashlog:

https://gist.github.com/ianfitzpatrick/bff9747f2e576e173329421842b3d624

And here is my full custom layout.nut file:

https://gist.github.com/ianfitzpatrick/7e0c8e19b54f5f39c4b233fa114e92b4

Any help is greatly appreciated!

-Ian

Edit:

Also, here is my console.log. I cleared it right before launching, so should only contain data related this launch/crash of Attract Mode (I hope).

https://gist.github.com/ianfitzpatrick/3bb226469171e6c52fc0fc5d1e6d7636

It seems like this is the last line before the crash:

Code: [Select]
MPAccessSurfaceForDisplayDevice: Set up page flip mode on display 0x04280642 device: 0x7fc961c14490  isBackBuffered: 1 numComp: 3 numDisp: 3
Maybe this means something to you?
« Last Edit: April 11, 2016, 09:12:24 PM by dadcore »

chrisvg

  • Full Member
  • ***
  • Posts: 78
    • View Profile
Re: Mac emulator handoff problems
« Reply #8 on: April 12, 2016, 05:36:57 AM »
There does indeed appear to be a bug in the way that AM handles word wrapping.. I just encountered the same out_of_range crash while working on a layout.

However, I was able to work around it by manually setting the charsize and font, then set wordwrap LAST.  I think while AM parses the script, it encounters an out of range error because it hasn't calculated the size for the font yet and gets caught up figuring out where to wrap .. or something along those lines.

dadcore

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: Mac emulator handoff problems
« Reply #9 on: April 12, 2016, 08:51:16 AM »
However, I was able to work around it by manually setting the charsize and font, then set wordwrap LAST.  I think while AM parses the script, it encounters an out of range error because it hasn't calculated the size for the font yet and gets caught up figuring out where to wrap .. or something along those lines.

Woohoo, that got me there! Here's what I ended up doing.

Code: [Select]
// Description
local desc = fe.add_text( "Blah", 33, 900, lw - 300, 100 );
desc.align = Align.Left;
desc.charsize = 18;
desc.word_wrap = true;

- I had a tiny text box height of only 25. I increased that to 100
- I wasn't explicitly setting charsize!
- I moved word_wrap last

Making the three changes got me squared away. Thanks so much!

I"m going to go ahead and remove the log files from github in case they contain any sensitive information.
« Last Edit: April 12, 2016, 09:05:36 AM by dadcore »

inkagnito

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Mac emulator handoff problems
« Reply #10 on: April 13, 2016, 10:31:35 AM »
Very cool!  I would love to see a video of what you've put together :)

dadcore

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: Mac emulator handoff problems
« Reply #11 on: April 13, 2016, 10:44:54 AM »
Very cool!  I would love to see a video of what you've put together :)

Totally, here is how it's looking, only two games loaded in this video (there will be way more than that).

https://www.youtube.com/watch?v=WwnzwPHY1yI

One constraint I have is that it's pretty hard to get artwork and logos from a bunch of random indie devs. But everyone seems to have a title, a company name, a description, and a trailer. So that's mostly why I went with this design.

It also works really well in screensaver mode, just plays the videos endlessly.

Also if you're interested, I'm doing this all for a popup arcade I'm setting up at our local tech un-conference (bar camp) here in Minneapolis. About 1000 people or so attend it, and we'll be setup with four big screens in the main concourse, all hosting a selection of locally made independent games. All the screens will be using attract mode as the front end.

http://sessions.minnestar.org/sessions/353
« Last Edit: April 13, 2016, 10:50:51 AM by dadcore »