Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

"Frontier: Elite 2" renderer & audio reverse engineered. Runs on Amigas with RTG. Also comes with SDL bindings so it can be run on PC.

NotificationsYou must be signed in to change notification settings

watsonmw/fe2-intro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alt text

This is a reverse engineered player for the 'Frontier: Elite II' game intro.

It implements the full 3d renderer and music playback code from the originalin C.

Also includes:

  • Compiler & decompiler for the game's 3d model format
  • Updated 3d models (e.g. added planet sky to intro)
  • Engine / sound effects playback
  • SDL support (for non-Amiga platforms)
  • Support for 2x and 4x times the original display resolution

Running

The Web version can be run directly from here:

https://watsonmw.com/fintro/fe2-intro.html

Amiga & PC releases are available here:

https://github.com/watsonmw/fe2-intro/releases

The 3d models and music are read directly from official Frontier exe. Youmust already own Frontier or alternatively send 5 pounds to FrontierDevelopments to purchase the shareware version.

Frontier Elite II exe must exist in same directory as 'fintro'. Use the exefrom the CD32 version or the final Elite Club shareware version. This can bedownloaded from here:

https://www.sharoma.com/frontierverse/files/game/fe2_amiga_cd32.rar

To run on an Amiga you'll need RTG and a (very) fast Amiga.

It runs great on a Vampire and UAE. Have had reports of it running well on68060 accelerated Amigas. There's even a fork with raster optimizations forthe ZZ9000 accelerator card.

Will run on any platform that supports SDL as well.

Building

Amiga:

Built for Amiga using Bebbo's GCC compiler, once installed the bash script'scripts/build-amiga-gcc.sh' can be used to cross compile from Linux.

SDL:

An SDL version is available to build on Linux, Windows (MinGW), and OSX:

cmake .  -B cmake-build-release -DCMAKE_BUILD_TYPE=Releasemake -C cmake-build-release fintro

Dear ImGui + SDL:

This version allows you to debug the intro and other Frontier models, usefulfor reverse engineering efforts.

cmake .  -B cmake-build-release -DCMAKE_BUILD_TYPE=Releasemake -C cmake-build-release fintro-imgui

WASM:

To build WASM install a version of clang with WASM support, then run thefollowing script:

scripts/build-wasm.sh

The Clang path may need to be changed to match yours.

CLANG=clang-15

A Python3 script is provided for serving up the WASM code locally:

python3 scripts/wasmserver.py

You can then open in your favourite WASM supporting browser (basically anyChromium or WebKit based browser since 2018):

http://localhost:8000/build-wasm/fe2-intro.html

Why?

DooM is ported to pretty much every platform due to be having a referenceimplementation in C. I wanted something similar for FE2 and have always beencurious about how the renderer worked.

The whole game is not ported because, well... that would require a ton more work,and maybe Frontier will want to re-release it at some point.

BTW: If you are checking this out you probably already know aboutElite: Dangerous, but in case you don't, it's great and you can check it out at:

https://www.elitedangerous.com/

Might be a while before that is ported to the Amiga though :P

Implementation

Frontier renders the 3d world using its own byte code (well 16-bit code, becauseit was written with 16 bit buses in mind). This code specifies the primitives todisplay, level of detail calculations, animations, and more. Much of this isdescribed in entertaining detail here (for FFE):

https://web.archive.org/web/20220117065108/http://www.jongware.com/galaxy7.html

This project implements much more than is described there though, I'd say 95%of the original Frontier's graphics code is implemented here, mostly just some2d and navigation / galaxy rendering is missing. Every 3d model including allships and planets can be rendered.

A music and sound fx player is included in 'audio.c'. It shows how to emulateAmiga sounds in SDL, and how the original mod format is laid out. The originalsamples are cleaned up a bit to reduce clicking / popping. (If anyone wants tocontribute 16-bit samples for each of the 12 or so instruments, and can keepthe same overall sound, let me know, and I'll add them as overrides.)

assets.[ch]      - Helpers for loading the Amiga assetsaudio.[ch]       - Music and sfx playback (music only used in intro)amigahw.h        - Helpers for writing directly to Amiga hardware registersbuilddata.[ch]   - Helpers for generating compiled in assets (e.g. larger                   highlight images)fintro.[ch]      - Setup and control for each scene in the introfmath.h          - Frontier math functions both fixed point and soft                   floating pointmain-amiga.c     - The Amiga entry point & platform specific codemain-sdl.c       - The SDL entry point & platform specific codemlib.[ch]        - My own C array and memory management helpersmodelcode.[ch]   - Compiler + decompiler for Frontier 3d objects (& vector                   fonts)render.[ch]      - Contains the renderer and rasterrenderinternal.h - Code shared between compiler & renderer

The renderer is pretty close to the original, but allows for higher resolutionsand uses divides a bit more frequently. The original had to run on 68000 whichonly did slow 16-bit divides, but that's not an issue for us.

For details about the original renderer see my: 'Frontier: Elite 2 engine study':

https://watsonmw.com/fintro

About

"Frontier: Elite 2" renderer & audio reverse engineered. Runs on Amigas with RTG. Also comes with SDL bindings so it can be run on PC.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp