VOGONS


First post, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie

Hi there!

In short: The refactored and expanded source code of Planet X3 is now available under GPL!
See https://github.com/planet-x3/px3_ose

Changelog since the last update release:

Changes under the hood

  • Port of the entire code base from A86 to YASM syntax
  • New build system mostly based on GNU tools
  • Introduction of a "logical screen coordinate" concept and conversion functions
  • Replacement of all hard-coded on-screen addresses with either logical coordinates or variables for pre-converted coordinates
  • Introduction of mode-specific function pointer and data variable blocks
  • Reintegration of the various engine forks, resulting in only one engine: px3_ose.com
  • Full rewrite of most text plotting routines and addition of new ones (lower overhead: string-based rather than character-based)
  • Full rewrite of most low-level tile plotting routines and addition of new ones
  • Full rewrite of rectangle clearing and scrolling routines as somewhat generic functions
  • Partial rewrite of most cursor plotting routines, addition of new ones
  • Partial rewrite of the radar code: Single LUT-based radar screen function, routines that plot horizontal groups of pixels
  • Partial rewrite of the menu code: Now based on data structures for menus and menu entries
  • Refactoring of the AI dispatcher: Now based on jump tables
  • Refactoring of the screen redraw routine and addition of a "lazy update" mechanism
  • More graceful handling of missing files: First search elsewhere, then ask for disk
  • Re-formatting of the entire code base
  • Additional documentation for certain parts of the code base (calling conventions etc.)

New features & Bugfixes

  • Various new video modes
  • Hardware sanity checks that usually catch incompatible video mode choices
  • New audio device: MPU-401 (two modes: MT-32 and General MIDI)
  • New audio device: CMS/GameBlaster (also CMSLPT)
  • Map flipping and multi-climate maps (via 2nd menu level)
  • Enhanced jukebox: Additional tracks for MT-32 (via shift key), in-game tracks keep playing when a game is started
  • Command line options (documented in new "Engine Manual")
  • Map lists stored in a user-editable maplist.bin rather than the engine itself
  • Transparent and/or smooth multi-disk support
  • Masking of transparent areas in modes without transparency support
  • Scout cars (included as useless preview because the artwork is there)
  • Check the actual `+`-key and not just `=` (Software assuming an American kezboard lazout is annozing!)
  • Better bridge construction
  • Further minor improvements and fixes

Reply 1 of 7, by darry

User metadata
Rank l33t++
Rank
l33t++
Benedikt wrote on 2023-01-31, 19:17:
Hi there! […]
Show full quote

Hi there!

In short: The refactored and expanded source code of Planet X3 is now available under GPL!
See https://github.com/planet-x3/px3_ose

Changelog since the last update release:

Changes under the hood

  • Port of the entire code base from A86 to YASM syntax
  • New build system mostly based on GNU tools
  • Introduction of a "logical screen coordinate" concept and conversion functions
  • Replacement of all hard-coded on-screen addresses with either logical coordinates or variables for pre-converted coordinates
  • Introduction of mode-specific function pointer and data variable blocks
  • Reintegration of the various engine forks, resulting in only one engine: px3_ose.com
  • Full rewrite of most text plotting routines and addition of new ones (lower overhead: string-based rather than character-based)
  • Full rewrite of most low-level tile plotting routines and addition of new ones
  • Full rewrite of rectangle clearing and scrolling routines as somewhat generic functions
  • Partial rewrite of most cursor plotting routines, addition of new ones
  • Partial rewrite of the radar code: Single LUT-based radar screen function, routines that plot horizontal groups of pixels
  • Partial rewrite of the menu code: Now based on data structures for menus and menu entries
  • Refactoring of the AI dispatcher: Now based on jump tables
  • Refactoring of the screen redraw routine and addition of a "lazy update" mechanism
  • More graceful handling of missing files: First search elsewhere, then ask for disk
  • Re-formatting of the entire code base
  • Additional documentation for certain parts of the code base (calling conventions etc.)

New features & Bugfixes

  • Various new video modes
  • Hardware sanity checks that usually catch incompatible video mode choices
  • New audio device: MPU-401 (two modes: MT-32 and General MIDI)
  • New audio device: CMS/GameBlaster (also CMSLPT)
  • Map flipping and multi-climate maps (via 2nd menu level)
  • Enhanced jukebox: Additional tracks for MT-32 (via shift key), in-game tracks keep playing when a game is started
  • Command line options (documented in new "Engine Manual")
  • Map lists stored in a user-editable maplist.bin rather than the engine itself
  • Transparent and/or smooth multi-disk support
  • Masking of transparent areas in modes without transparency support
  • Scout cars (included as useless preview because the artwork is there)
  • Check the actual `+`-key and not just `=` (Software assuming an American kezboard lazout is annozing!)
  • Better bridge construction
  • Further minor improvements and fixes

Nice!

Is there a bit of a back story that you could share as to why this has happened now and not earlier or later (or never) ?

Reply 2 of 7, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie

The back story is that all previous releases relied on a fork of the engine for every video memory model.
Within every single one of them, all positions on screen were hard-coded as magic numbers.
With the growing number of engine forks this created an absolute maintenance hell and the archaic assembler (A86) did not help, either.
The YASM port that eventually combined everything in one binary then had to become reasonably stable again and the code base had to be tidied up a bit.

Reply 3 of 7, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie

Addendum:

This is a minimal update package containing just the engine binary, engine manual and a few support files: http://usermo.de/files/planet_x3/updates/PX3JAN23.ZIP.
Copy the content to an older Planet X3 disk and you get most new features, but no MIDI, no modified text mode and no "six islands" map.

Reply 4 of 7, by vetz

User metadata
Rank l33t
Rank
l33t
Benedikt wrote on 2023-01-31, 19:17:

[*] New audio device: MPU-401 (two modes: MT-32 and General MIDI)

As far as I remember, the music in Planet X3 was composed on/for MT-32. Are the "original" tracks now available?

3D Accelerated Games List (Proprietary APIs - No 3DFX/Direct3D)
3D Acceleration Comparison Episodes

Reply 5 of 7, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie

The original tracks (for MT-32 and SC-55) have always been available as part of the commercial digital download package, namely as ordinary MIDI files as well as MP3s.
The build system of the Planet X3 Open Source Edition, which obviously comes without artwork, pulls everything from the folder of such a download package and converts the MIDI files to a more compact format suitable for the game engine.
Both, the MPU-401 code in the engine and the converter are contributions by Michal Procházka.

Reply 6 of 7, by vetz

User metadata
Rank l33t
Rank
l33t
Benedikt wrote on 2023-02-04, 10:56:

The original tracks (for MT-32 and SC-55) have always been available as part of the commercial digital download package, namely as ordinary MIDI files as well as MP3s.
The build system of the Planet X3 Open Source Edition, which obviously comes without artwork, pulls everything from the folder of such a download package and converts the MIDI files to a more compact format suitable for the game engine.
Both, the MPU-401 code in the engine and the converter are contributions by Michal Procházka.

Thanks, that is great information!

3D Accelerated Games List (Proprietary APIs - No 3DFX/Direct3D)
3D Acceleration Comparison Episodes

Reply 7 of 7, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie

As of yesterday, you can download and build version 1.1.0, which incorporates the following changes:

  • Implementation of the two previously reserved EGA modes (i.e. 640x350 3-color and 320x200 16-color)
  • Fix bug in LUT patching for tile set overrides
  • Fix bug in radar LUT (existed since PX3 OSE 1.0.0)
  • Let the (improved) MIDI converter translate missing General MIDI tracks from MT-32 during the artwork import step

Tagged source release: https://github.com/planet-x3/px3_ose/releases/tag/1.1.0
Build instructions: https://github.com/planet-x3/px3_ose/wiki/Build-process