house-of-the-dead-vr

House of the Dead VR is a native port of The House of the Dead for PC and VR headsets with online co-op and physical reloads.

README

The House of the Dead VR: a player in a headset fires a pistol at zombies in the mansion

Playing on a Quest 3: the cabinet, then standing in the game

▶ Watch the gameplay video on YouTube

The House of the Dead VR

Sega's 1996 arcade original, running natively on a standalone Meta Quest 3. You stand inside its world in full stereo 3D with a light gun in your hand, and a friend can join you online with voice chat. The same VR game plays on PC VR headsets and Apple Vision Pro, and flat on Windows, the Mac, Android phones and tablets, iPhone and iPad, and Apple TV, and every version plays online with every other.

This isn't an emulator. The arcade board's programs were statically recompiled ahead of time into native code (ARM64 for the headset, phones and Macs, x64 for Windows), and the board's graphics and sound hardware were rebuilt in C++ and GPU shaders. The game logic, the enemies and the rail camera are the arcade's own code, running at the arcade's exact 57.52 frames a second.

This repository contains no game code or data. You load your own MAME ROM set of the arcade game (hotd, Revision A) the first time the app starts.

Cabinet viewImmersive view
The cabinet in the courtyardOn the bridge, a zombie leaping in
Shooting a zombie on the cabinet's screenA zombie hit on the bridge
Aiming the light gun at the cabinetRacking the slide after a new magazine

Captured on a Quest 3. Hold the gun hand's thumbstick click to switch between the cabinet and standing in the game.

Features

  • Inside the arcade's world. The arcade's own polygons, textures and colour tables, rebuilt in 3D around you at real scale, with your head tracked on top of the rail camera's moves. The game only sends what its screen shows, so a hook in its scenery code makes it send the whole area: turn round and the mansion is still there.
  • Light guns. The cabinet's own gun model, red for player 1 and blue for player 2, or a pistol with a moving slide. Recoil, rumble and muzzle flash, and shots go where the barrel points. Both controllers rumble hard when you're hit.
  • Physical reloads. Drop the magazine, push in a new one, rack the slide. The game's "shoot outside the screen" prompt is replaced with step-by-step instructions while you do it. Classic off-screen reloading is one setting away.
  • Cabinet mode. Play on a full arcade cabinet with restored, high-resolution marquee, control panel and side art. Grab it with both hands to move, turn or resize it. Put it in a dark room, in your own room (passthrough), or in the mansion's courtyard, captured from the game itself on your headset.
  • Online co-op with voice, across platforms. Two players over the internet (room codes, quick match) or on your own network with no server. A Quest player and a PC, Mac, phone, iPad, Apple TV or Vision Pro player share the same game, frame for frame, and the game browser shows each game's platform. A partner can join a game already under way. In a headset your partner stands beside you as the game's own agent, Rogan or G, head, arms and legs moving as theirs do; a partner on a screen stands there too, aiming where their gun aims. Your own body is the agent's too (VIEW > Your body). VIEW > Partner shows them as hands and gun alone instead, and HANDS > Your hands picks your own without a body: detailed hands with the gun chosen, the game's own hands and pistol, or none. Voice chat has echo cancellation, noise suppression and push to talk.
  • Made for the headset. In-VR menus for the guns, hands, view, comfort, graphics and sound. Settings are saved. The same VR app runs on a PC headset through OpenXR (SteamVR, Quest Link, Virtual Desktop) and on Apple Vision Pro (hand tracking, PlayStation VR2 Sense controllers).
  • Flat on every screen. On a PC, Mac, phone or tablet the game fills the window at its 4:3 shape, drawn in HD at the window's resolution or as the arcade's original 496 x 384 picture. Aim with the mouse, a light gun that acts as a mouse (Sinden, GunCon 3, Gun4IR), a game pad (its gyroscope too), a touch screen, the phone's gyroscope, or on Apple TV the Siri Remote's touch surface.
  • Rumble everywhere. Each player's pad kicks on their own shots, pulses on a reload and rumbles hard when they're hit; an iPhone or Android phone does too while you play by touch. A DualSense's right trigger resists and snaps like a gun's trigger, firing once you pull through the snap, and its left clicks for a reload; an Xbox pad's trigger motors buzz on each shot (Windows, Mac, iPhone, iPad, Apple TV).
  • Updates in the app. The Quest, Steam Frame and Android apps look for a new release when they start and install it from the menu.

How it works

Part of the arcade boardHere
Intel i960 main CPU (the game)The program is statically recompiled to C++
Motorola 68000 sound CPU and the SCSP's DSPRecompiled; the SCSP sound chip reimplemented
Fujitsu MB86235 (TGPx4) geometry DSPAn interpreter derived from MAME's
Geometrizer, rasterizer, tilemapsReimplemented in C++; the rasterizer's texturing and colour rules as an OpenGL ES 3.0 shader that draws in 3D
The cabinetOn the headsets, one VR app: guns, hands, menus, passthrough, the cabinet room; OpenXR on the Quest, the Steam Frame and PC headsets, Compositor Services and ARKit on Vision Pro. On screens, a flat app per OS (Win32, AppKit, UIKit on iPhone, iPad and Apple TV, Android) round the same game and menu
Two cabinets linkedDeterministic lockstep: the host sends each frame's inputs, and both run the same frame, checked against a checksum of the game's memory. Every compiler builds it with strict floating point, so an x64 PC and an ARM64 headset compute the same game bit for bit

The renderer is one OpenGL ES 3.0 code path everywhere: native on the Quest and Android, desktop GL 3.3 on Windows, and ANGLE on Metal on the Mac, iPhone, iPad, Apple TV and Vision Pro.

MAME, the reference arcade emulator, is used only to check that the results match the real board.

The recompiler and the Model 2 runtime come from RetroValou's Sega Model 2 recompiler, built on alphanu1's Daytona USA arcade recomp (BSD-3-Clause). This project brought The House of the Dead's Model 2C board up on it, then built the VR, the 3D output and online play on top.

What was found in the game to make VR work, with addresses, is in docs/vr.md:

  • the scenery visibility test;
  • where lives, bullets and game state live in memory, so reloads count only in play;
  • the operator settings;
  • the light-gun wiring;
  • the reload prompt;
  • the shape of the 3D output.

Playing it

Every download is on this repository's releases, built from the same code; each release's notes say how to install each one. None contains any of the game: you bring your own MAME ROM set, hotd.zip or hotd.7z, Revision A.

PlatformDownloadStatus
Meta Quest 3 (and 3S)house-of-the-dead-vr-<version>.apkThe main version, tested on a Quest 3. The 3S has the same processor but hasn't been tested
Windows PChouse-of-the-dead-vr-<version>-windows-x64.zipFlat (mouse, pads, light guns), or VR in a PC headset through OpenXR; VR tested with SteamVR's test driver
Mac (Apple silicon)house-of-the-dead-vr-<version>-mac.zipFlat; experimental
Android phones and tablets (64-bit, Android 10+)house-of-the-dead-vr-<version>-android.apkFlat: touch, gyro, pads; experimental, tested in an emulator
iPhone and iPadhouse-of-the-dead-vr-<version>-ios.ipa (SideStore), or TestFlight if invitedFlat; experimental, tested in the simulator
Apple TV (tvOS 17+)TestFlight, if invitedFlat: the Siri Remote as the gun, pads; experimental, tested on an Apple TV 4K and an Apple TV HD
Apple Vision ProTestFlight, if invitedVR: hands, PlayStation VR2 Sense controllers; experimental, tested in the simulator
Steam Framehouse-of-the-dead-vr-<version>-frame.apkThe Quest app for Valve's headset; experimental, not yet run on a Frame

On the Quest:

  1. Install the APK with SideQuest or adb install.
  2. Copy your ROM set to the headset, for example into Download.
  3. Start House of the Dead VR from Unknown Sources. Pull the trigger and choose the ROM set. The app checks it, keeps its own copy and offers to delete the one you copied.

On Windows: unzip anywhere and run HOTDVR/HOTDVR.exe; it asks for the ROM set the first time (or put hotd.zip in HOTDVR/files/arcade first). It isn't code-signed: if SmartScreen warns, choose More info, then Run anyway. It starts in VR when a PC headset is connected (start SteamVR, Quest Link or Virtual Desktop first) and on the screen otherwise; PLAY IN VR / PLAY ON THE SCREEN in the menu's SYSTEM tab switches (--vr and --flat force one).

On the Mac: unzip, move House of the Dead VR to Applications and open it. It isn't notarized: the first time, open System Settings > Privacy & Security and choose Open Anyway.

On a phone, iPhone or iPad: install the APK, or the IPA with SideStore (which signs it with your Apple ID), and choose the ROM set when the app asks for it.

On Apple TV and Vision Pro: TestFlight, if you've been invited (SideStore can't install on either). Vision Pro takes the ROM set from the Files picker. An Apple TV has no Files app, so it shows a web address and a QR code: open it on a phone or computer on the same network and send it the ROM set.

Online play is on the menu's ONLINE tab, and any platform can join any other; the game browser shows each game's platform. The VR menu's CONTROLS button lists every control, as your settings make them.

Updates: the Quest, Steam Frame and Android apps look for one when they start, and the menu's SYSTEM tab shows it (UPDATE TO ...). It downloads the new APK, checks it and hands it to the installer; your ROM set, settings and saves are kept. TEST BUILDS on that tab offers pre-release test builds too. The first update asks you to let the app "Install unknown apps". On Windows and the Mac, unzip the new release over the old one (the files folder is kept).

Controls in VR

The gun is in your right hand unless the HANDS tab says otherwise; "other hand" is the one without it.

Controllers
TriggerShoot. Off the screen: reload (the cabinet view, or Reload gesture OFF)
Reload (Reload gesture MAGAZINE, the default)Other hand's grip takes a magazine: push it into the gun's grip, then pull the slide
Reload (POINT DOWN / OFF)Aim at the floor / shoot off the screen, B or Y, or a firm grip squeeze
B / YDrop the magazine (MAGAZINE); reload (Reload gesture OFF)
A / XCoins and Start; skip a scene
Left menu buttonThe VR menu (the game pauses, except online). Under SteamVR, which keeps that button: double-click a thumbstick
Gun hand's thumbstick click, heldSwitch between standing in the game and the cabinet
Other hand's thumbstick clickOnline, PUSH TO TALK: talk while held
Other hand's grip, at the gunHold the gun in both hands
Both grips, hands apartThe cabinet view: move, turn and size the cabinet
Your hands (no controllers)
PointAim
Index finger pinchShoot. Off the screen: reload
Other hand's middle finger pinchCoins and Start; skip a scene
Left palm toward you, pinchThe VR menu

In the menu: the trigger (or a pinch) chooses what the laser points at, the sticks move, A / X choose, B / Y go back and the grips switch tabs.

Controls on a screen
Mouse and keyboard (Windows, Mac)Game padTouch (phones, tablets)
AimThe pointer (or a light gun that acts as a mouse)Either stick moves a sight; pad gyro aim in GAMEWhere you tap; gyro aim in GAME
ShootLeft buttonRight trigger or R1Tap the picture
ReloadRight button, or shoot off the pictureLeft trigger, L1 or X / SquareA second finger, or RELOAD
Coins and Start; skip a sceneSpace or EnterA / Cross or StartSTART
MenuEscBack / Select / ShareMENU, or Android's Back
Push to talk (online)T, held
Full screenF11 or Alt+Enter (Windows); F11 or Ctrl+Cmd+F (Mac)

In the menu: the arrow keys or the stick move, Enter or A choose, Esc or B go back, Tab or the bumpers switch tabs; the mouse and touch point at it.

Rumble (GAME: Rumble, on): the pad (or the phone, playing by touch) you last shot, reloaded or pressed Start with gives a short kick on each of your shots, a softer pulse on a reload and a strong, longer rumble when you lose a life; in a two-player game each player's pad has only their own. Nothing while the game is paused or the menu is open, and online only your own events. Trigger feedback (GAME, on; Rumble OFF mutes it too): while you play, a DualSense's right trigger resists then snaps like a gun's, shoots only once you pull through the snap and buzzes on each shot, and its left trigger clicks lightly for a reload; an Xbox One or Series pad's right trigger motor buzzes on a shot and its left one on a reload (Windows with SDL3, Mac, iPhone, iPad, Apple TV; not on Android, which has no API for them, nor with XInput alone). The Siri Remote, iPads and Macs have no motor of their own.

Siri Remote (Apple TV)
Swipe the touch surfaceMove the sight, as a mouse (a quicker swipe goes further; GAME: Remote speed)
Click (the newer remote: the centre)Shoot
Click the ring's edge (the newer remote)Reload
Play/PauseReload; held: coins and Start, skip a scene
Back / MenuThe menu; at its top, the Home screen

In the menu: the ring (or a swipe on the older remote) moves, a click chooses, Play/Pause goes back to the game.

Two players on one screen (Windows, Mac, iPhone and iPad, Apple TV, Android; not online, where player 2 is your partner): the arcade's two guns, each on its own device. Alone, everything you hold is player 1's gun. While player 1 is playing, a second player presses Start (A / Cross or Start on a pad, START on a touch screen, Space on the keyboard, or Play/Pause held on the Siri Remote) on another device and joins as player 2, at any moment, as at the cabinet: that device is then player 2's (the blue sight), and Start on it continues player 2. On the continue screen, in a scene or on the title, Start is always player 1's. The keyboard and mouse count as one device, touch as one, the Siri Remote as one, each pad as one.

Building from source

The PC recompiles the game and builds the Quest, Android and Windows apps; the Apple apps are built on a Mac from the PC's checkout. docs/getting-started.md goes through it step by step.

  1. On Windows, run setup.ps1. It installs the build tools and fetches the pinned dependencies into extern/.
  2. Put your ROM set at roms/hotd.zip or roms/hotd.7z, then run python scripts/recompile.py --game houseofthedead. This generates the recompiled code and the desktop tools under build_houseofthedead/. Everything there is derived from your ROM set and ignored by git.
  3. Build the platform you want:
PlatformCommandNeeds
Questpython scripts/build_quest.py (builds, installs and starts it over USB; --apk-only only builds)The Android SDK with an NDK, build-tools, a platform and platform-tools; Java 17 or later. The script fetches the OpenXR loader, SDL2's headers and the voice libraries into third_party/quest
Steam Frame, Android phonespython scripts/build_quest.py --flavor frame or --flavor phoneAs the Quest
Windows (flat and PC VR)python scripts/build_windows.py [--run] [--zip] (build_windows/HOTDVR.exe)Visual Studio with the C++ tools (MSVC); the script uses its CMake and Ninja, and fetches the OpenXR loader
iPhone, iPad, Macpython scripts/apple_sync.py on the PC, then python3 scripts/build_apple.py simulator, device or mac on the Mac (--app, --ipa)Xcode, xcodegen, and ANGLE built in ~/angle
Apple TV, Vision ProAs above, then python3 scripts/build_tvos.py or python3 scripts/build_visionos.py, simulator or device (--app)As above, with ANGLE's tvOS and visionOS slices

python scripts/release.py builds every platform's download from one commit for a release (--testflight: the iPhone, Apple TV and Vision Pro apps to TestFlight too, through the Mac's scripts/apple/), and refuses to publish or upload anything in which python scripts/check_paths.py finds a build machine's folder or user name (the builds map them out: docs/platforms.md, "Releases"), and python scripts/crossplay_check.py checks that the PC and the Quest compute the same game, bit for bit (run it after any compiler, flag or runtime change).

src/runtime, src/gamesThe Model 2 runtime, and The House of the Dead's game definition and hooks
src/coreWhat every app shares: the bridge to the game (arcade.cpp), online play's lockstep, the 3D renderer (m2_gl.c), the menu, voice chat
src/xrThe VR app every headset shares: the guns and hands, the views, the cabinet room, the VR menu; OpenXR, and its Windows binding
src/questThe Quest and Steam Frame host: Android, EGL, the activities, the updater
src/visionosThe Vision Pro host: Compositor Services, ARKit, hands and Sense controllers
src/flatThe flat app for screens, with a front end per OS: win, mac, ios, tvos, android
src/platformThe OS seam (platform.h): files, threads, sound, the microphone, GL; its Android, Windows and Apple bodies
src/netOnline play: the lobby and relay client, the local-network host, rooms
toolsThe recompilers, desktop test tools (m2gpushot, m2probe, m2nettest, m2netguest, m2statetest), the cabinet and gun model pipelines, the crash-report relay
docsvr.md (the VR version), platforms.md (the other platforms and crossplay), the release notes, the recompiler's design notes, the cabinet art sources

Credits and licences

The project's code is BSD-3-Clause (LICENSE). The components it uses keep their own licences, listed in THIRD_PARTY.md:

  • the Model 2 recompiler and runtime (BSD-3-Clause);
  • code transplanted from MAME (BSD-3-Clause);
  • the online lobby client from namco22-decompile (MIT);
  • the Khronos OpenXR loader (Apache-2.0);
  • SDL2's headers (zlib);
  • Opus, SpeexDSP and RNNoise (BSD);
  • the menu font (SIL OFL);
  • the arcade cabinet model by Seraphim Sarov (CC BY 4.0);
  • the hands by Askasknot (CC BY 4.0);
  • the pistol (CC0).

The House of the Dead, its artwork and SEGA are trademarks or copyrights of SEGA. This is an independent fan project,