Documenting the build process for Wild Commander

Сабжи короче

Postby zboszor » Sun, 07.09.2014 18:24:39

Procedure to build Wild Commander and its plugins on the ZX Evo

Prerequisites

Install Total Commander from http://www.ghisler.com/download.htm The 32-bit version works perfectly under Linux and Wine.

Install inTRD v6.11 and inSCL v6.11 from http://vtrdos.ru/pcutilz.php These are plugins for Total Commander to treat TRD and SCL disk images as compressed archives. Installation is as follows for inTRD, procedure is identical (except the ZIP, the plugin names and the file extension) for inSCL.

  1. Extract INTRD611.zip, it contains plugin.rar
  2. Extract plugin.rar
  3. Copy inTRD.wcx (32-bit) or inTRD.wcx64 (64-bit renamed to inTRD.wcx if you installed the 64-bit version of Total Commander) into the Total Commander installation directory, most likely C:\totalcmd\
  4. Add the TRD handler by opening Configuration -> Options, selecting "Plugins" on the right side and choosing "Packer plugins (.WCX)". In the packer plugin dialog, specify "TRD" for the file extension and select C:\totalcmd\inTRD.wcx for the handler using the "New type" button. Press OK to add the new plugin to the list, then press Cancel to close the dialog.
Please, note that copying files *to* SCL or TRD images keep only 1 character from the extension unless changed in the plugin settings. Copying files *from* SCL or TRD images to PC will prefix files with their position on the disk. E.g. "001!" and so on.

Check out zx-evo-fpga from https://github.com/tslabs/zx-evo/ , for example from the command line in Linux:
Code: Select all
$ git clone https://github.com/tslabs/zx-evo.git
or using some GUI for GIT.

Install SCL2TRD (it's in the fuse-emulator-utils package under Linux) or the DOS binary from http://www.worldofspectrum.org/trdos.html

Optionally install EMPTYTRD from http://www.worldofspectrum.org/trdos.html which works in DOSBox (http://www.dosbox.com) in any recent OS.

Build main Wild Commander binary

The Storm 1.3 assembler was used to write and build Wild Commander. The assembler is provided in the zx-evo-fpga repository in SCL image format as
zx-evo-fpga/pentevo/soft/WC/tools/Storm/STORM13.SCL

Either use the STORM13.SCL as is and use another TRD disk image created by EMPTYTRD, or convert STORM13.SCL to TRD image format by using SCL2TRD and
use this single disk image for building the Wild Commander binaries.

This is because although SCL images can be used by ZX Evo, its contents are extracted into RAM disk which is lost when the computer is turned off. On the other hand, a TRD image is mounted from the media (SD card or HDD) it resides on and its contents are direcly manipulated. So, if you want to distribute the binaries after building them, you need the TRD format.

Source files of Wild Commander are in the zx-evo-fpga/pentevo/soft/WC/source directory and many files in there will need to be renamed. It's because of the behavior of the inSCL and inTRD plugins and the difference between the interpretation of file extensions under modern OSs and file modes(?) in the Betadisk format.

The Wild Commander source files will need to be renamed, so they will be without the prefix ("NNN!") created by inSCL/inTRD as distributed in the zx-evo-fpga repository and the file extension must be a single "C" character. The files needed and the renames are in the table below. All files are relative to the zx-evo/pentevo/soft/WC/source directory.

File name in host OS|Renamed for copying to TRD
"001! MD20.ASM"|"MD20.C"
"002! WCVLS.ASM"|"WCVLS.C"
"003! PS2P.ASM"|"PS2P.C"
"004! WCVW.ASM"|"WCVW.C"
"005! ENCODET.ASM"|"ENCODET.C"
"006! WCFX.ASM"|"WCFX.C"
"007! WCINI.ASM"|"WCINI.C"
"200! DIDENEMO.ASM"|"DIDENEMO.C"
"201! DSDZC.ASM"|"DSDZC.C"
"202! DSDNGS.ASM"|"DSDNGS.C"
"300! CORE32.ASM"|"CORE32.C"
"400! FONT32L.CDB"|"FONT32L.C"
"401! GIG_PAL.CDB"|"GIG_PAL.C"
"402! KOI_WIN.CDB"|"KOI_WIN.C"
"plugins/gsplayer/PRTGS.ASM"|"PRTGS.C"


After copying these files to the TRD image, all the ASM files (which are plain text files) will need to be converted to the internal format of Storm. If a separate disk image is used (e.g. on drive B:) along with the Storm assembler disk on drive A:, the drive should be switched first by pressing the buttons EXT, I, EDIT (this loops through drives A to D), EXT. The file conversion is done by the Storm commands repeatedly for every file:

  1. Import file (BREAK, T)
  2. Save file (BREAK, S)
  3. Zap file (BREAK, Z) to empty the edit buffer before the next file

The file names for import and save should be entered without the file extensions, i.e. "MD20", "WVVLS", etc.

Most likely because of memory constraints in the Storm assembler, four files must be loaded (BREAK, L), compiled (BREAK, A) and the object files must be saved (BREAK, O) in advance.
Source file|Object file
DIDENEMO|DOS_IDEN
DSDZC|DOS_SDZC
DSDNGS|DOS_SDGS
CORE32|WDOSFC29


Two more binary files are included by MD20:
Code: Select all
DEHR1   INCB "DEHR1M"
MLZ4    INCB "MLZ40"

Unfortunately, both are missing. Neither these binaries, nor their sources are distributed.

The final build step for the Wild Command binary would be to load (BREAK, L) MD20, build it (BREAK, A) and save the object file (BREAK, O). This binary can then be extracted from the TRD file using the inTRD plugin from Total Commander on your PC. This binary should be renamed to "boot.$C" and copied to the root directory of the SD card. TSconf can boot directly into Wild Commander.

Building Wild Commander plugins

The procedure to build Wild Commander plugins is very similar. Use the sources from zx-evo-fpga/pentevo/soft/WC/source/plugins/, the plugins are separated into their own subdirectories. These source files (*.ASM) must be
  1. renamed to .C files,
  2. copied to the TRD image on the SD card
  3. imported (BREAK, T) into Storm as text
  4. optionally saved (BREAK, S) as Storm internal format in case they are included by other sources
  5. compiled (BREAK, A), and finally
  6. the object must be saved (BREAK, O)
zboszor
 
Posts: 60
Joined: Mon, 07.04.2014 15:35:03

Return to Utilities

Who is online

Users browsing this forum: No registered users and 1 guest

x