GUNBLADE NY VR (PC)
===================

What this is
  MAME's Sega Model 2 emulation (only that - a small build) with an OpenXR VR mode, the same
  VR layer as the L.A. Machineguns and The Lost World ports. The PC runs the game and streams
  it to the headset. The 3D world is drawn around you, once per eye from your own head
  position; scores and text float on a screen-sized panel in front of you. The cabinet's
  mounted machine gun becomes the controller in your hand.

Before you start (once)
  1. Put gunblade.zip (MAME's "gunblade" set: Gunblade NY, Revision A) in the ROMs folder.
  2. Choose ONE way to connect the Quest and make it the active OpenXR runtime:
     - Virtual Desktop: in the Streamer app on the PC, set "OpenXR Runtime" to VDXR.
     - Meta Quest Link (cable or Air Link): Meta Quest Link app > Settings > General >
       "OpenXR Runtime" > Set Meta Quest Link as active.
     - SteamVR: SteamVR settings > OpenXR > set SteamVR as the OpenXR runtime.

Playing
  1. Connect the headset (Virtual Desktop streaming, Link, or SteamVR running).
  2. Double-click "Play Gunblade NY VR.bat". The game waits until the headset is on.
  3. In the headset:
       Trigger (gun hand) ...... fire (the gun is in the hand chosen in the options)
       A or Y .................. Start
       B or X .................. Coin
       Left menu button ........ options menu (the game pauses; point and pull the trigger)
       Both sticks held in 1 s . options menu too (for controllers whose menu button opens
                                 SteamVR's own menu, e.g. Valve Index); M on the keyboard too
       Either stick click ...... re-centre the view (game screen straight ahead)
       Left grip + left stick click ... Test (operator menu) - not needed to play
  4. Esc on the keyboard quits. The normal MAME window on the PC mirrors the game, and
     MAME's own keys still work there (5 coin, 1 start, F2 test, P pause).
  "Play Gunblade NY (flat window).bat" plays without the headset.

Virtual Desktop settings for smooth play
  Streaming tab: Frame rate 72 / 90 / 120, Synchronous Spacewarp: Disabled.

Options menu (left controller's menu button, both sticks held in for a second, or M)
  Point at an option and pull the trigger to choose it. To move the menu, point at it and
  hold the grip (side) button.
  Comfort  Vignette - darkens the edges of your view while the game's camera turns fast.
           Cinema mode - the game on a big screen in a dark room (Small / Medium / Large,
                      3D depth Flat / Shallow / Full, screen bezel, screen glow).
  Gun      Gun hand - Right / Left.
           Gun model in your hand - Off / Arcade. Arcade: your own model of the cabinet
                      gun as Assets/VRGunModel.obj (not included; metres, grip at the origin,
                      barrel along -Z, +Y up; an .mtl next to it sets the colour and shine).
           Recoil vibration - Off / Light / Strong.
           Aim fine-tune - nudge the aim in 0.1 degree steps.
  Screen   Score / timer / text - Fixed in the room / Follow head / Auto (head during play).
           2D graphics scaling - Soft / Sharp / Smooth edges.
           Hide player 2's corner - leaves out PRESS 2P START / CREDIT during play.
           Texture detail - Arcade / Sharper / Sharpest: the headset shows far more pixels
                      than the arcade monitor, so the 3D textures can use their sharper
                      levels further away.
           Render resolution - 0.5x to 2.0x of the headset's own (next start).
  Changes are saved to Config/GunbladeVR.ini straight away.

Settings (Config/GunbladeVR.ini)
  See the comments in the file. GunbladeVR.log in this folder shows what the VR layer did
  (runtime, eye size, frame rates).

How it works
  Model 2 has no depth buffer: the hardware sorts polygons and paints them back to front.
  The VR renderer takes each polygon from MAME's geometrizer (in the game camera's space,
  before it is flattened onto the screen and cut to the screen edges), keeps the hardware's
  own drawing order, and draws it for each eye with your head pose, with the same texture,
  luminance and colour tables the arcade board uses. Areas the game never meant to show
  (beyond the 4:3 screen) can contain holes or objects popping in: the game only sends what
  its own camera sees.

Licence
  GPL - see LICENSE.txt. MAME: https://www.mamedev.org
