Lamborghini - Xbox static recompilation for Linux                  v0.2.0
==========================================================================

A native Linux port of Rage Software's unreleased original-Xbox racing game
Lamborghini (December 2002 pre-release build), made by static recompilation
with xboxrecomp.

  Full guide, updates, bug reports:
  https://github.com/trev82usa/Lamborghini-static-recomp

  NO GAME FILES ARE INCLUDED. You need your own copy of the game.


1. INSTALL
----------
  a) Extract this zip anywhere.
  b) Extract your whole game ISO into the "Lamborghini" folder (section 2):

       Lamborghini-recomp/
           Lamborghini.x86_64        <- run this
           Lamborghini/              <- extract your ISO in here

  c) Run Lamborghini.x86_64 (double-click, or ./Lamborghini.x86_64 in a
     terminal). If nothing happens, make it executable first:
         chmod +x Lamborghini.x86_64


2. GETTING THE GAME FILES
-------------------------
Extract your WHOLE Lamborghini ISO into the "Lamborghini" folder. That's all.

Easiest: XBLA Installer, our own extraction tool. Despite the name it opens
original Xbox ISOs too, no command line needed:
    https://github.com/trev82usa/XBLA-Installer/releases/latest
  1. Linux: extract XBLA-Installer-linux-x64.tar.gz, run ./XBLA-Installer
     (Windows: XBLA-Installer.exe)
  2. "Game package": pick your Lamborghini .iso
  3. Tick "Just extract"
  4. "Install into": pick the "Lamborghini" folder from this zip
  5. Press Install

Or on the command line with extract-xiso:
    extract-xiso -d /path/to/Lamborghini-recomp/Lamborghini Lamborghini.iso

Already extracted? Copy all the disc's files into the "Lamborghini" folder.

CHECK: Lamborghini/default.xbe must exist. If it ended up a folder deeper
(Lamborghini/Lamborghini/default.xbe), move everything up one level.


3. REQUIREMENTS
---------------
- 64-bit Linux with glibc 2.34 or newer: Ubuntu 22.04+, Debian 12+,
  Fedora 35+, Linux Mint 21+, Pop!_OS 22.04+, current Arch/Manjaro,
  Steam Deck desktop mode.
- A GPU with OpenGL 4.3 (recent AMD/Intel with Mesa, or NVIDIA).
- SDL2 and libepoxy (most desktops have them). If missing:
    Ubuntu/Debian/Mint:  sudo apt install libsdl2-2.0-0 libepoxy0
    Fedora:              sudo dnf install SDL2 libepoxy
    Arch/Manjaro:        sudo pacman -S sdl2 libepoxy


4. CONTROLS
-----------
CONTROLLERS: any pad SDL recognises (Xbox 360/One/Series, PlayStation,
8BitDo, Steam Deck...). Plug in or unplug at any time. Each controller is a
player: connect 2-4 for split screen. Sticks and triggers are analog.

    Your controller            Original Xbox pad
    A / B / X / Y              A / B / X / Y   (PlayStation: X O [] /\)
    Left bumper  (L1)          Black
    Right bumper (R1)          White
    Left / right trigger       Left / right trigger (analog)
    Sticks, stick clicks       Thumbsticks, clicks
    D-pad                      D-pad
    Start / Menu               Start
    Back / View / Select       Back

KEYBOARD (player 1):
    Enter = Start              Backspace = Back
    Z X C V = A B X Y          Q / E = White / Black
    1 / 3 = Left / right trigger
    Arrow keys = D-pad
    W A S D (or keypad 8 4 2 6) = Left stick
    I J K L = Right stick

  Racing on the keyboard: W accelerate, S brake, A/D steer, V look back.
  Steering eases in over ~0.3 s: tap for small corrections, hold for full lock.

HOTKEYS:
    F1  = settings menu
    F3  = frame-rate counter
    F11 = fullscreen


5. SETTINGS MENU (F1)
---------------------
Press F1 at any time (even mid-race). Use the keyboard:
    Up/Down = choose     Left/Right (or Enter) = change     F1/Esc = close
The game gets no input while the menu is open. Changes apply at once
(no restart) and are saved to ~/.config/xboxrecomp/settings.ini.

  RENDER SCALE (ANTI-ALIASING)   AUTO / 1X (OFF) / 2X / 3X / 4X
      Draws the game at a multiple of 640x480 for a sharper picture.
      AUTO (default) matches your window/screen height (2.25x at 1080p,
      3x at 1440p). Higher needs more GPU; 1X is the original resolution.

  WIDESCREEN                     OFF (4:3) / FIT SCREEN
      FIT SCREEN fills 16:9 / 16:10 / 21:9 screens with a genuinely wider
      view (not a stretch). HUD and menus keep their shape in the centre;
      videos and loading screens stay 4:3 with black bars.

  WIDESCREEN RACE HUD            CENTRE / EDGES
      With widescreen on: EDGES moves the race HUD's left and right parts to
      the screen edges. The mirror and all menus stay centred.

  SMOOTH UPSCALING               ON / OFF
      ON = smooth scaling to your window; OFF = sharp pixels (retro look).

  FULLSCREEN                     ON / OFF
      Borderless fullscreen at desktop resolution (same as F11).

  FPS COUNTER (F3)               ON / OFF
      Frames in the last second and LOW (slowest frame).
      Green = 60, yellow = 30-57, red = below 30.

  UNLOCK ALL CARS                ON / OFF
      Every car available in every mode.

  UNLOCK ALL TRACKS              ON / OFF
      All ten tracks, via the game's own unlock (saved in your profile).
      Night racing is offered in Free Run only, as in the original game.

  CLOSE                          closes the menu


6. SAVES, SETTINGS AND LOGS
---------------------------
  Save game:   ~/.local/share/xboxrecomp/
  Settings:    ~/.config/xboxrecomp/settings.ini
  Logs:        lamborghini_log.txt and xbox_kernel.log, next to the program
               (rewritten every time the game starts)

Saves live in your home folder, so you can move or update this folder freely.


7. PROBLEMS? POST YOUR LOG!
---------------------------
Open an issue at:
    https://github.com/trev82usa/Lamborghini-static-recomp/issues

and ATTACH lamborghini_log.txt from this folder. Copy it straight after
the problem happens, BEFORE running the game again (it's rewritten every
start). Without the log we can only guess. Please also include:
  - what happened and what you were doing (track, car, time, weather...)
  - a screenshot or short video (a clip for sound problems)
  - your distro, GPU and driver (glxinfo -B), and your F1 settings
  - for crashes or if it won't start: run ./Lamborghini.x86_64 from a
    terminal and paste what it prints

Common fixes:
  - "Game files not found" box: the ISO isn't extracted into Lamborghini/
    (Lamborghini/default.xbe must exist, sec. 2)
  - "error while loading shared libraries": install SDL2/libepoxy (sec. 3)
  - "GLIBC_2.34 not found": distro too old (Ubuntu 22.04+ needed)
  - single-digit fps: no OpenGL 4.3, so it fell back to the CPU renderer
  - controller not working: check the log for "[INPUT] controller ...
    connected"; try another USB port or re-pair Bluetooth


8. KNOWN ISSUES
---------------
- Night races: thin light streaks on screen; headlight pools on the road
  may not match the Xbox.
- Some dotted/patchy road textures at certain times of day.
- The tyre-skid sound can stutter.
- Occasional long frames, mostly at race start with the whole field in view.
- A Windows build is available too (experimental), on the same page.


CREDITS AND LICENSE
-------------------
Built on xboxrecomp by sp00nz (https://github.com/sp00nznet/xboxrecomp, MIT).
xemu was studied as a reference for how the hardware behaves.
This port's code is MIT licensed (LICENSE.txt). Lamborghini and its code,
data, artwork and audio belong to their rights holders. This project isn't
affiliated with or endorsed by them.
