Grand Theft Auto 2 (N64)
Grand Theft Auto 2
OrigenNintendo 64
TecnologíaRecompilación Estática (C/C++ nativo)
Disponible paraWindows
Ver proyecto oficialSobre el proyecto
Grand Theft Auto 2 es un videojuego de acción y aventura de mundo abierto desarrollado por DMA Design y distribuido por Rockstar Games. Es la secuela de Grand Theft Auto de 1997 y la tercera entrega de la serie Grand Theft Auto luego de Grand Theft Auto: London, ambientado en una metrópolis retrofuturista conocida como "Anywhere City", el juego se centra en que los jugadores asumen el papel de un criminal mientras de ambular por un mundo abierto, realizan trabajos para varios sindicatos del crimen y tienen rienda suelta para hacer lo que deseen para lograr su objetivo.
2 versiones de Grand Theft Auto 2
Estás viendo: Grand Theft Auto 2 (N64)
Información oficial del proyecto
GTA 2 — Nintendo 64
Complete PC-to-N64 port · Port completo da versão PC para N64
🇺🇸 English · 🇧🇷 Português Brasileiro
Expansion Pak required / Expansion Pak obrigatório · ~58 MB ROM
</div><a id="english"></a>
GTA 2 for Nintendo 64 — PC Port
A finished port of the PC game Grand Theft Auto 2 to the Nintendo 64, built on the
gta2_re decompilation and libdragon.
The original game logic runs on the console (Expansion Pak / 8 MB RAM required) on top of a custom
RDP renderer, audio, input and file layer. Tested on a real Nintendo 64 with the Expansion Pak and in the ares emulator.
This repository contains only the port's source code. It contains no part of GTA 2: no game data, no ROM, no binaries. It does not redistribute the
gta2_resources either:setup_engine.shdownloads them from upstream at a pinned commit and applies our changes as a patch. You must supply your own copy of the game data.
Personal / educational project. Not affiliated with or endorsed by Rockstar Games or Take-Two Interactive.
Project status and features
This project is finished: it is a playable port of GTA 2 for Nintendo 64, not a tech demo. The completed build preserves the PC version's game content, including the Mad Island bonus map absent from the PlayStation release, and has been tested on real N64 hardware using the Expansion Pak, as well as in ares. The full ROM is approximately 58 MB.
The game includes English, Spanish and Brazilian Portuguese, with PT-BR integrated into the game's native GXT text system rather than drawn as a translation overlay. It also includes two selectable presentation modes:
- PC mode: extended camera distance and the coloured lighting system inspired by the original PC version.
- PSX mode: reduced visual settings inspired by the PlayStation version, targeting a stable 30 FPS on real N64 hardware in the developer's tests. This is a performance-oriented option, not a claim that the original PlayStation game ran at a locked 30 FPS.
No further development, new features or support are currently planned. The repository remains available for reference and learning; forks are welcome.
Important: the game is NOT included
This project is only the port code. We do not provide, host, link or distribute GTA 2 in any form: no game data, no ROM, no ISO, no binaries. To build the ROM you need your own legally obtained copy of the PC version of GTA 2 (Rockstar released the PC game as freeware in the past; getting and keeping a copy is your responsibility). The ROM you build contains the game's data, so do not share it: it is for your personal use only. Issues or pull requests asking for game files or ROMs will be closed.
Step-by-step tutorial
- Install the tools (see Requirements): libdragon with its MIPS toolchain, plus
git,patch,makeandpython3. On Windows, do everything inside WSL (Ubuntu is fine). - Get the game data. Install or extract your own copy of GTA 2 for PC and find its
datafolder (it contains files such ase.gxt,fstyle.sty,bil.gmp,audio/andgtaudio/). Copy that folder togta2_data/data, next to (not inside) this repository:
Any other location works too: passsome-folder/ ├── GTA-2-N64-Recomp/ <- this repository └── gta2_data/ └── data/ <- the GTA 2 "data" folder goes hereGAME_DATA=/path/to/datato the build. - Clone the repository on a case-insensitive file system (on WSL: a Windows drive path such as
/mnt/c/...):git clone https://github.com/Sunshinin11/GTA-2-N64-Recomp.git cd GTA-2-N64-Recomp - Download and patch the engine (once). This fetches
gta2_refrom upstream at a pinned commit and applies our patch:bash setup_engine.sh - Build the ROM. This converts the game data (endianness, audio) and produces
gta2_recomp.z64:
(Using a different libdragon location?bash build.shN64_INST=/path/to/libdragon bash build.sh) - Run it on a real Nintendo 64 with an Expansion Pak (8 MB RAM) using compatible flashcart hardware, or in ares (or another accurate emulator) with the Expansion Pak enabled. Hold Z while the ROM boots to skip the menu and go straight into a map.
If the build says a data file is missing, check that GAME_DATA points at the real GTA 2 data folder.
The first build takes several minutes.
Requirements
- Linux, macOS, or Windows through WSL. The checkout must be on a case-insensitive file system, because the
original sources use mixed-case
#includes. On WSL that means building from a Windows drive path (/mnt/c/...); default macOS volumes are fine. - libdragon (preview branch) with its MIPS toolchain, installed at
/opt/libdragon(or setN64_INST=/path). The build usesaudioconv64andmkdfsfrom it. git,patch,make,python3(standard library only).- The GTA 2 game data (GTA 2 was released as freeware by Rockstar): the game's
datafolder, placed at../gta2_data/data(next to this repository) or passed asGAME_DATA=/path/to/data.
Game data used by the build
fstyle.sty, e.gxt, s.gxt, the city maps (bil, ste, wil: .gmp, .sty, .scr and the mission folders), the bonus
levels, nyc.gci, test1.seq, attract/, keyboard/, frontend/ (menu screens), audio/ (sound banks) and gtaudio/ (radio WAVs).
A missing file only prints a warning during the data step. p.gxt (Brazilian Portuguese text) is not part of the original game: if it is
missing from the data folder, the data step generates it from e.gxt + tools/pt_br.tsv (tools/make_pt_gxt.py), so the language option
(Options page) can switch between English, Spanish and Portuguese. The game font has no tilde glyphs, so ã/õ are drawn as â/ô.
Building on Windows (WSL) in one command
From PowerShell, with the repository at C:\path\to\GTA-2-N64-Recomp:
wsl --cd "C:\path\to\GTA-2-N64-Recomp" bash -lc "bash setup_engine.sh && bash build.sh"
or open a WSL terminal and run the Quick start commands from /mnt/c/path/to/GTA-2-N64-Recomp.
Build options
Pass them to build.sh or make -f Makefile.recomp:
| Option | Meaning |
|---|---|
GAME_DATA=/path/to/data | Where the GTA 2 data folder is (default ../gta2_data/data) |
MAPS="bil ste wil" | Cities to include (fewer = smaller ROM) |
INCLUDE_FRONTEND=0 | Leave out the menu screens (smaller ROM; hold Z at boot to jump straight into the map) |
RADIO_RATE=12000 | Radio sample rate in Hz (8000 = smaller) |
N64_INST=/path | libdragon install location |
OVERSCAN_X=36 OVERSCAN_Y=28 | Safe-area borders in VI dots (640x480 base) so TVs/upscalers do not crop the picture edges. 0 = full image (emulator) |
Rendering/tuning knobs (pass as EXTRA_CFLAGS="-DNAME=value ..."):
| Define | Meaning |
|---|---|
N64_CAM_ZOOM_PCT=126 | Camera height. Higher = closer to the ground (sees less map, runs faster). 130 was the previous default; every 1% costs about 1.5% frame time |
N64_LUZES=0 | Initial lighting (the Options menu MODE row sets it: PSX = off, PC = on). 0 = off (fastest), 1 = flat light per quad (~5% frame time, blocky), 2 = smooth per-corner light (~9%) |
N64_LIGHT_GAIN=0.6 | Strength of coloured lights (1.0 = PC). Lower avoids blown-out red/neon tints |
N64_AMBIENT_FLOOR=100 | Minimum ambient light (0-255) when lighting is on. 0 = as dark as the PC version |
N64_CACHE_N=192 | Converted-texture cache slots (4 KB each). The measured peak is about 135 |
N64_HEAP_RESERVE_KB=320 | RAM the renderer's speed caches must leave free for the engine (prevents "Out of memory" crashes) |
bash build.sh clean removes the build output; bash setup_engine.sh --force redoes the engine checkout.
Repository layout
| Path | What it is |
|---|---|
port/n64/ | Console platform layer: renderer (render_n64.c), audio, input (DirectInput stand-in), Win32/CRT stubs, RAM file system, entry points |
port/compat/ | Small Win32 / DirectX / MSVC compatibility headers used to compile the decompiled engine with GCC |
port/game_srcs.txt | Engine source files compiled into the ROM |
patches/gta2_re_n64.patch | Our changes on top of gta2_re (pinned commit 02de8be) |
tools/ | Build-time data converters (little- to big-endian for maps/styles/text, audio, shared SFX bank) |
Makefile.recomp, build.sh, setup_engine.sh | Build system |
port/gta2_re/ and port/compat_ci/ are generated by setup_engine.sh and are git-ignored.
Credits
- DMA Design / Rockstar Games: the original GTA 2.
- CriminalRETeam /
gta2_re: the decompilation this port runs on. - M1sterMo /
gta2-browser: the browser port whose platform-abstraction approach and compatibility headers this work started from (MIT, seeTHIRD_PARTY_NOTICES.md). - libdragon: N64 SDK, RDP/RSP/audio libraries.
<a id="português-brasileiro"></a>
GTA 2 para Nintendo 64 — Port da versão PC
Port completo e jogável de Grand Theft Auto 2 para PC no Nintendo 64, baseado na reconstrução de código gta2_re e na libdragon. Não é um port da versão de PlayStation: o modo PSX é uma configuração visual e de desempenho do próprio port de PC.
A lógica do jogo é executada no console com um renderizador próprio para o RDP e camadas adaptadas de áudio, controles e arquivos. Expansion Pak (8 MB de RAM) obrigatório. Testado em Nintendo 64 real e no emulador ares.
Estado do projeto: finalizado
Este é um port finalizado, não uma demonstração técnica. A ROM completa tem aproximadamente 58 MB e preserva o conteúdo da versão PC, incluindo as cidades e o mapa bônus Mad Island, ausente na versão PlayStation.
Recursos e diferenças
| Recurso | Descrição |
|---|---|
| Origem do port | Versão PC, utilizando a lógica reconstruída pelo gta2_re |
| Modo PSX | Configuração visual inspirada nas limitações do PlayStation, voltada ao desempenho; 30 FPS nos testes do desenvolvedor em N64 real |
| Modo PC | Distância ampliada da câmera e iluminação colorida/dinâmica inspirada no PC; cerca de 23–25 FPS nos testes do desenvolvedor |
| Conteúdo | Conteúdo da versão PC preservado, incluindo Mad Island |
| Idiomas | Inglês, espanhol e português brasileiro selecionáveis no menu |
| PT-BR nativo | Tradução integrada ao sistema de textos GXT do jogo, não uma camada gráfica sobreposta |
| Hardware | N64 real com Expansion Pak; também testado no ares |
As taxas de quadros são resultados relatados dos testes do desenvolvedor, não uma garantia de desempenho constante em todas as situações. O modo PSX não utiliza código da versão PlayStation. O projeto está concluído; não há previsão atual de novos recursos ou suporte. Contribuições por forks são bem-vindas.
Importante: o jogo não está incluído
O repositório disponibiliza somente o código do port. Não contém nem distribui dados comerciais do GTA 2, ROMs, ISOs ou binários do jogo. O script setup_engine.sh baixa o gta2_re original em uma revisão fixa e aplica as alterações necessárias. Você precisa fornecer sua própria cópia legalmente obtida dos dados da versão PC. Não compartilhe a ROM gerada, pois ela contém dados do jogo. O projeto é pessoal e educacional, sem afiliação ou endosso da Rockstar Games ou da Take-Two Interactive.
Como compilar e executar
- Instale a libdragon (branch preview) com a toolchain MIPS, além de
git,patch,makeepython3. No Windows, utilize WSL. - Localize a pasta
datada sua instalação do GTA 2 para PC, contendo arquivos comoe.gxt,fstyle.sty,bil.gmp,audio/egtaudio/. - Coloque essa pasta em
../gta2_data/data, ao lado do repositório, ou informeGAME_DATA=/caminho/para/data. - Clone o repositório e execute os comandos:
git clone https://github.com/Sunshinin11/GTA-2-N64-Recomp.git
cd GTA-2-N64-Recomp
bash setup_engine.sh
bash build.sh
- O resultado é
gta2_recomp.z64. Execute no N64 real com Expansion Pak e flashcart compatível, ou no ares com Expansion Pak habilitado. Segure Z na inicialização para pular o menu e entrar diretamente no mapa.
Windows / PowerShell com WSL:
wsl --cd "C:\\path\\to\\GTA-2-N64-Recomp" bash -lc "bash setup_engine.sh && bash build.sh"
O código-fonte original utiliza #include com diferenças de maiúsculas e minúsculas. Por isso, o checkout precisa estar em um sistema de arquivos sem diferenciação de caixa; no WSL, utilize um caminho em /mnt/c/.... A libdragon deve estar em /opt/libdragon ou ser informada por N64_INST=/caminho.
Dados usados na compilação
O processo utiliza fstyle.sty, e.gxt, s.gxt, mapas das cidades (bil, ste, wil, incluindo .gmp, .sty, .scr e pastas de missões), níveis bônus, nyc.gci, test1.seq, attract/, keyboard/, frontend/, audio/ e gtaudio/.
Se p.gxt não existir nos dados originais, o processo de compilação o gera a partir de e.gxt e tools/pt_br.tsv, usando tools/make_pt_gxt.py. A seleção de idiomas fica no menu de opções. Como a fonte original não contém alguns caracteres, ã e õ são exibidos como â e ô.
Opções de compilação
| Opção | Função |
|---|---|
GAME_DATA=/caminho/data | Pasta dos dados originais |
MAPS="bil ste wil" | Cidades incluídas |
INCLUDE_FRONTEND=0 | Remove telas do menu para reduzir a ROM |
RADIO_RATE=12000 | Taxa de amostragem das rádios (Hz) |
N64_INST=/caminho | Instalação da libdragon |
OVERSCAN_X=36 OVERSCAN_Y=28 | Margens seguras para TVs e upscalers |
Ajustes do renderizador podem ser informados por EXTRA_CFLAGS="-DNOME=valor ...":
| Definição | Função |
|---|---|
N64_CAM_ZOOM_PCT=126 | Altura/distância da câmera; valores maiores mostram menos mapa |
N64_LUZES=0 | Iluminação inicial; menu MODE alterna PSX/PC |
N64_LIGHT_GAIN=0.6 | Intensidade das luzes coloridas |
N64_AMBIENT_FLOOR=100 | Iluminação ambiente mínima |
N64_CACHE_N=192 | Slots do cache de texturas convertidas |
N64_HEAP_RESERVE_KB=320 | Memória reservada para o motor |
Use bash build.sh clean para limpar a compilação e bash setup_engine.sh --force para refazer o checkout do motor.
Estrutura do repositório
| Caminho | Conteúdo |
|---|---|
port/n64/ | Renderizador RDP, áudio, controles, compatibilidade Win32/CRT, sistema de arquivos em RAM e inicialização |
port/compat/ | Cabeçalhos de compatibilidade Win32, DirectX e MSVC |
port/game_srcs.txt | Fontes do motor incluídas na ROM |
patches/gta2_re_n64.patch | Alterações sobre o gta2_re, revisão 02de8be |
tools/ | Conversores de dados, textos e áudio |
Makefile.recomp, build.sh, setup_engine.sh | Ferramentas de compilação |
port/gta2_re/ e port/compat_ci/ são gerados pelo script de preparação e ignorados pelo Git.
Créditos
- DMA Design / Rockstar Games: GTA 2 original.
- CriminalRETeam / gta2_re: reconstrução do código usada no port.
- M1sterMo / gta2-browser: referência inicial de abstração de plataforma e cabeçalhos de compatibilidade (MIT; consulte
THIRD_PARTY_NOTICES.md). - libdragon: SDK e bibliotecas de RDP, RSP e áudio para N64.
