Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. Thank you for your support. Tom Speirs

Patreon

PinballX Launching NoxPlayer (Android)


devious626

Recommended Posts

Hi All

First time posting, id like to first of say that the amount of information on the forum has been a huge help to get me started.
I will also say that the ease of downloading tables from the Virtual Pinball Database is refreshing! Cant wait to see more tables added.

So Thanks Everyone!

My end goal and the reason why im here is to create a Virtual Pinball cabinet that i can enjoy at home with Arcade/Pinball combined.
Ive already managed to pick up an Older model Commercial Display LG (42inch) 4212C-BA for $25, this will be the playfield eventually.
Its no 4k monitor but for the price it was worth the risk buying it and so far im happy with it.

I dont have a question for you all, which might be a nice change for a newcomer.

I was wondering if there is much interest to get Arcade/Pinball games launched in NoxPlayer?
I have come across the various posts from other members regarding Bluestacks (which are a little out of date now) so i suppose there are some that would benefit from this sort of information.

Anyway...im rambling on...

I First tried Bluestacks and jumped from forum to forum reading whatever i could to get it going but just couldnt figure it out for some reason....
So i switched across to NoxPlayer and I managed to figure out how to get Pinball X to launch NoxPlayer directly into an Android game and maximise to full screen.
I wouldnt go as far as say its running perfect at the moment but its working and i think sharing my experience would be important to help others, and at the same time more experienced users can probably help me refine the configuration.

Im at work at the moment so you wont be seeing anything useful being posted besides my introduction at the moment, but you know how it is when you have these things on your mind!

If this topic interests you keep this post in mind as i will come back an fill in all the details.

 

  • Like 1
Link to comment
Share on other sites

Welcome to the PinballX forums!

I believe there have been a few that have successfully run Bluestacks via PinballX.

Having someone providing detailed setup instructions for a more recent Android emulator will be welcomed.

Link to comment
Share on other sites

PinballX Launching NoxPlayer

So I managed to upload a quick video of what im up to so far. Here's the rundown

1. Pinball X Launches
2. Im able to select my arcade table from the menu
3. Loading screen appears (then as you will notice eventually flips on its side - Screen rotation kicking in)
4. NoxPlayer appears in Full Screen shows an annoying random advertisement (Trying to figure out how to get rid of this if possible? or Hide it behind Loading screen?)
5. NoxPlayer Opens and you can briefly see the Android Emulator before it launches the Game (Also want to hide if I can...)
6. Playing the game, as you can see im still using the mouse at the moment, this will eventually be configured for Joystick (So ill need to hide the mouse cursor)

So whats going on in the backgound….

Starting with the Software: Im running (Pinball X, Visual Pinball, Pinball FX2, Nox Player and iRotate)
Everything has been installed and is running off my G Drive.

Here is the current settings in Pinball X
As you can see I have some Powershell scripts and Batch files doing all the work for me. Ill post these up for everyone to use.

PinballXNox.thumb.JPG.e758afab83b29875df6ad3088310c48e.JPG

There was some back and forth checking the log files to see how this all worked, heres a snippet of the log files.

PinballXLog.thumb.JPG.9c16c5e0573602f1c22eed608a840a21.JPG

Starting with Launch Before
The Batch file simply calls another Powershell script within the same directory called Rotate_Nox.ps1

/k "cd /d G:\PinballCabinet\PinballX\Scripts" & Powershell -file .\Rotate_Nox.ps1

Rotate_Nox.ps1 is shown below, as you can see this script is where the monitor rotation occurs. It then Proceeds to Launch NoxPlayer (The Fullscreen code in this script may not actually work, I need to review this and update the code accordingly)

#Rotating Screen
Start-Process -WorkingDirectory "G:\Program Files (x86)\iRotate" -FilePath ".\iRotate.exe" -ArgumentList "/rotate=90"

Sleep 2

#Launch Nox
Start-Process -WorkingDirectory "G:\Program Files\Nox\bin" -FilePath ".\Nox.exe" -ArgumentList "-screen:vertical -resolution:768x1360"

#Fullscreen
$wshell.SendKeys('^4')

Now on to Launching the System 2:NoxPlayer

I made a copy of cmd.exe and pasted it in the working directory for the NoxPlayer, I then used this to launch the Powershell script.
You will notice that im parsing an external paremeter into my Powershell script which I will try explain as best as I can. First you need to see the script.

The first few lines is where we obtain our external parameter which is the ID for the android application
State Package Name: This was used in earlier stages to troubleshoot, to ensure the Android ID was being seen correctly by Powershell
Initialise Keyboard: This enables me to execute keyboard commands
Rotating Screen: You may be wondering why this appears again....(Good observation, it may not be required)
Launch Android Game: Telling Powershell where Nox is installed, what executable to run followed by Vertical Mode, my current resolution and the package (Android ID)
Fullscreen: Remember I enabled the keyboard commands...after sleeping for 20sec it will send a CTRL + 4 command and put Nox in Full Screen (This needs work because I believe sometimes this command executes before Nox has loaded the game)

Param([parameter(Mandatory=$true,
   HelpMessage="Enter name and key values")]
   $TABLEFILE)

Sleep 20

#State Package Name
Write-Host $TABLEFILE

#Initialise Keyboard
$wshell = New-Object -ComObject wscript.shell;

#Rotating Screen
Start-Process -WorkingDirectory "G:\Program Files (x86)\iRotate" -FilePath ".\iRotate.exe" -ArgumentList "/rotate=90"

Sleep 2

#Launch Android Game
Start-Process -WorkingDirectory "G:\Program Files\Nox\bin" -FilePath ".\Nox.exe" -ArgumentList "-screen:vertical -resolution:768x1360 -package:$TABLEFILE"

sleep 20

#Fullscreen
$wshell.SendKeys('^4')

So how am I passing the TABLEFILE when this is not a VPX table?
Simple, all my Pinball tables currently live in the folder G:\Pinball Cabinet\Visual Pinball\Tables\
My Arcade "DUMMY FILES" sit in G:\Pinball Cabinet\Visual Pinball\Tables\Arcade
Lets use Crossy Road as an example, I opened notepad clicked Save As and changed the Save as Type to All Files and used the name "com.yodo1.crossyroad" Sure its not a real file but it works.
So when Pinball X runs the command line im able to parse the TABLEFILE into the Powershell script so NoxPlayer knows what game it needs to launch.

GameManager.thumb.JPG.6ed4e98b0f669e000bb667d76358e922.JPG

Im also able to manage my games in the Games List Manager

Launch After

So When I push Q to quit the game the following script is launched with Powershell Nox_Skill.ps1
iRotate kicks in again and rotates the monitor back to normal
The Nox Processes are then killed off to Allow PinballX to be in focus once again for menu selection.

#Rotating Screen
Start-Process -WorkingDirectory "G:\Program Files (x86)\iRotate" -FilePath ".\iRotate.exe" -ArgumentList "/rotate=0"

#Killing Nox
Stop-process -name Nox
Stop-Process -name NoxVMSVC

This is all I have for now, I will update this as I go, and of course if anyone has any recommendations or tips for me on how I can do anything better, please don't hesitate to let me know.
If you have any further questions about my setup im also happy to try and help you out.
 

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...