Build tool

From MSX Game Library

Revision as of 01:42, 23 December 2022 by Aoineko (talk | contribs)

Configuration

The Build tool configuration's parameters are defined in the engine (engine/script/js/setup_global.js) and can be modified by the user using at two levels:

  • The default configuration (projects/default_config.js), commun for all the projects.
  • The project configuration (projects/myProject/project_config.js), specific for a given project.

The value of the parameters redefined in a higher level replaces that of a lower level. The order of priority is: Project > Default > Engine.

Parameters

Build Tool

Verbose: Activate verbose mode and get more build information (boolean) [type: false | default: {{{4}}}]

LogStdout: Output build information to the standard console (boolean) [type: true | default: {{{4}}}]

LogFile: Output build information to a log file (boolean) [type: false | default: {{{4}}}]

LogFileName: Name of the log file (string) [type: "log_YYYYMMDD_HHMMSS.txt" | default: {{{4}}}]

Path

ProjDir: Project directory (string) [type: | default: {{{4}}}]

OutDir: Intermediate files directory (string) [type: `${ProjDir}out/` | default: {{{4}}}]

RootDir: MSXgl root directory (string) [type: | default: {{{4}}}]

LibDir: Library directory (string) [type: `${RootDir}engine/` | default: {{{4}}}]

ToolsDir: Tools directory (string) [type: `${RootDir}tools/` | default: {{{4}}}]

Tools

Compiler: Path to the C compile program (string) [type: `${ToolsDir}sdcc\bin\sdcc` | default: {{{4}}}]

Assembler: Path to the assembler program (string) [type: `${ToolsDir}sdcc\bin\sdasz80` | default: {{{4}}}]

Linker: Path to the linker program (string) [type: `${ToolsDir}sdcc\bin\sdcc` | default: {{{4}}}]

MakeLib: Path to the program to generate lib file (string) [type: `${ToolsDir}sdcc\bin\sdar`; | default: {{{4}}}]

Hex2Bin: Path to IHX to binary convertor (string) [type: `${ToolsDir}MSXtk\bin\MSXhex` | default: {{{4}}}]

MSXDOS: Path to the MSX-DOS files (string) [type: `${ToolsDir}build\MSXDOS` | default: {{{4}}}]

DskTool: Path to the tool to generate DSK file (string) [type: `${ToolsDir}build\DskTool\dsktool` | default: {{{4}}}]

Emulator: Path to the emulator to launch the project (string) [type: | default: {{{4}}}]

Debugger: Path to the debugger to test the project (string) [type: | default: {{{4}}}]

Project

ProjName: Project name (string). Will be use for output filename [type: "" | default: {{{4}}}]

ProjModules: List of project modules to build (array). If empty, ProjName will be added [type: [] | default: {{{4}}}]

ProjSegments: Project segments base name (string). ProjName will be used if not defined [type: "" | default: {{{4}}}]

LibModules: List of library modules to build (array) [type: [] | default: {{{4}}}]

AddSources: Additional sources to be compiled and linked with the project (array) [type: [] | default: {{{4}}}]

Machine: Target MSX machine version (string) [type: "1" | default: {{{4}}}]

1        MSX 1
2        MSX 2
12       MSX 1&2 (dual support)
2K       Korean MSX 2 (SC9 support)
2P       MSX 2+
TR       MSX turbo R
3        MSX 3 (reserved)

Target: Target program format (string) [type: "ROM_32K" | default: {{{4}}}]

BIN              .bin    BASIC binary program (8000h~)
BIN_USR          .bin    BASIC USR binary driver (C000h~)
ROM_8K           .rom    8KB ROM in page 1 (4000h ~ 5FFFh)
ROM_8K_P2        .rom    8KB ROM in page 2 (8000h ~ 9FFFh)
ROM_16K          .rom    16KB ROM in page 1 (4000h ~ 7FFFh)
ROM_16K_P2       .rom    16KB ROM in page 2 (8000h ~ BFFFh)
ROM_32K          .rom    32KB ROM in page 1-2 (4000h ~ BFFFh)
ROM_48K          .rom    48KB ROM in page 0-2 (0000h ~ BFFFh). Pages 1-2 visible at start
ROM_48K_ISR      .rom    48KB ROM in page 0-2 (0000h ~ BFFFh). Pages 0-2 visible at start
ROM_64K          .rom    64KB ROM in page 0-3 (0000h ~ FFFFh). Pages 1-2 visible at start
ROM_64K_ISR      .rom    64KB ROM in page 0-3 (0000h ~ FFFFh). Pages 0-2 visible at start
ROM_ASCII8       .rom    128KB ROM using ASCII-8 mapper
ROM_ASCII16      .rom    128KB ROM using ASCII-16 mapper
ROM_KONAMI       .rom    128KB ROM using Konami mapper (8KB segments)
ROM_KONAMI_SCC   .rom    128KB ROM using Konami SCC mapper (8KB segments)
DOS1             .com    MSX-DOS 1 program (0100h~) No direct acces to Main-ROM
DOS2             .com    MSX-DOS 2 program (0100h~) No direct acces to Main-ROM
DOS2_ARG         .com    [WIP] MSX-DOS 2 program (using command line arguments ; 0100h~) No direct acces to Main-ROM.

More detail: Targets

ROMSize: ROM mapper total size in KB (number). Must be a multiple of 8 or 16 depending on the mapper type (from 64 to 4096) [type: 128 | default: {{{4}}}]

ROMDelayBoot: Postpone the ROM startup to let the other ROMs initialize like Disk controller or Network cartridge (boolean) [type: false | default: {{{4}}}]

InstallRAMISR: Select RAM in slot 0 and install ISR there (boolean). For MSX with at least 64 KB of RAM [type: false | default: {{{4}}}]

CustomISR: Type of custom ISR to install (string). ISR is install in RAM or ROM depending on Target and InstallRAMISR parameters [type: VBLANK | default: {{{4}}}]

VBLANK     V-blank handler
VHBLANK    V-blank and h-blank handler (V9938 or V9958)
V9990      v-blank, h-blank and command end handler (V9990)

BankedCall: Use automatic banked call and trampoline functions (boolean). For mapped ROM [type: false | default: {{{4}}}]

ForceRamAddr: Overwrite RAM starting address (number). For example. 0xE0000 for 8K RAM machine [type: 0 | default: {{{4}}}]

DiskFiles: List of data files to copy to disk (array) [type: [] | default: {{{4}}}]

USRAddr: BASIC USR driver default address (number) [type: 0xC000 | default: {{{4}}}]

AppSignature: Add application signature to binary data (boolean) [type: false | default: {{{4}}}]

AppCompany: Application company (*). Can be 2 character string or 16-bits integer [type: "GL" | default: {{{4}}}]

AppID: Application ID. Can be 2 character string or 16-bits integer (0~65535) [type: 0 | default: {{{4}}}]

AppExtra: Application extra data (array). Comma-separated bytes starting with data size [type: [] | default: {{{4}}}]

Misc