2020-12-23 17:14:13 +00:00
|
|
|
# MSXBUILD
|
|
|
|
|
|
|
|
Utils to use openMSX in build pipelines.
|
|
|
|
|
2024-07-01 01:15:31 +00:00
|
|
|
You can use these scripts as-is. the files in the `lib` are all you need.
|
|
|
|
But as always, feel free to extend it for your specific needs or contribute a fix or feature.
|
2024-06-20 22:06:30 +00:00
|
|
|
|
2021-07-04 00:12:48 +00:00
|
|
|
## Features
|
2020-12-23 17:14:13 +00:00
|
|
|
|
2024-06-28 12:45:43 +00:00
|
|
|
* Allows parallel headless openMSX build pipeline
|
2024-06-28 23:25:39 +00:00
|
|
|
* openMSX safe exit failure guards
|
2024-06-28 12:45:43 +00:00
|
|
|
* Automatic disk image import + export per build step
|
2021-07-04 00:12:48 +00:00
|
|
|
* Downloads and caches resources from msxhub.com
|
2024-06-28 12:45:43 +00:00
|
|
|
* Auto magic openMSX extensions and machine rom's setup
|
|
|
|
* SDCC msx build steps
|
2024-07-01 01:15:31 +00:00
|
|
|
* Screenshot and/or video output of full build
|
2024-07-02 01:27:14 +00:00
|
|
|
* Embedded documentation of make options
|
2020-12-23 17:14:13 +00:00
|
|
|
|
2021-07-04 00:12:48 +00:00
|
|
|
## Dependencies
|
2020-12-23 17:14:13 +00:00
|
|
|
|
2024-07-02 14:56:21 +00:00
|
|
|
* make + wget + tar + awk + grep + dos2unix
|
2021-07-04 00:12:48 +00:00
|
|
|
* sdcc
|
2024-06-25 13:57:13 +00:00
|
|
|
* openmsx
|
2024-07-01 01:15:31 +00:00
|
|
|
* ffmpeg
|
2024-07-05 18:43:18 +00:00
|
|
|
* rsync
|
2020-12-23 17:14:13 +00:00
|
|
|
|
2024-06-23 20:52:31 +00:00
|
|
|
For debian use;
|
|
|
|
|
2024-07-05 18:43:18 +00:00
|
|
|
apt-get install make wget tar gawk grep dos2unix sdcc openmsx ffmpeg rsync
|
2024-06-23 20:52:31 +00:00
|
|
|
|
2024-07-01 01:15:31 +00:00
|
|
|
## Usage Classic
|
|
|
|
|
|
|
|
Have access or copy the `lib` folder in your project and start writing make files.
|
2020-12-23 17:14:13 +00:00
|
|
|
|
2024-07-01 01:15:31 +00:00
|
|
|
Include the `lib/make/msxbuild.mk` and override the paths if needed;
|
2024-07-10 15:03:28 +00:00
|
|
|
* MB_SDCC_PATH=/usr/bin
|
|
|
|
* MB_OPENMSX_PATH=/usr/bin
|
2020-12-23 17:14:13 +00:00
|
|
|
|
2024-07-01 01:15:31 +00:00
|
|
|
## Usage Docker
|
|
|
|
|
|
|
|
TODO
|
|
|
|
|
2024-07-02 14:31:42 +00:00
|
|
|
## Usage Help
|
|
|
|
|
|
|
|
Running: `make`
|
|
|
|
|
|
|
|
Welcome to the MSXBUILD help system.
|
|
|
|
|
2024-07-05 19:20:14 +00:00
|
|
|
For detailed fire help use one of the following targets;
|
2024-07-02 14:31:42 +00:00
|
|
|
|
2024-07-05 19:20:14 +00:00
|
|
|
* @help-variable
|
|
|
|
Lists build variables.
|
2024-07-02 14:31:42 +00:00
|
|
|
|
2024-07-05 19:20:14 +00:00
|
|
|
* @help-variable-deep
|
|
|
|
Lists deep variables.
|
2024-07-02 14:31:42 +00:00
|
|
|
|
2024-07-05 19:20:14 +00:00
|
|
|
* @help-variable-rock
|
|
|
|
Lists rock variables.
|
2024-07-02 14:31:42 +00:00
|
|
|
|
2024-07-05 19:20:14 +00:00
|
|
|
* @help-variable-flow
|
|
|
|
Lists flow variables.
|
2024-07-02 14:31:42 +00:00
|
|
|
|
2024-07-05 19:20:14 +00:00
|
|
|
* @help-function
|
|
|
|
Lists build functions.
|
2024-07-02 14:31:42 +00:00
|
|
|
|
2024-07-05 19:20:14 +00:00
|
|
|
* @help-function-deep
|
|
|
|
Lists deep functions.
|
2024-07-02 14:31:42 +00:00
|
|
|
|
2024-07-05 19:20:14 +00:00
|
|
|
* @help-function-flow
|
|
|
|
Lists flow functions.
|
|
|
|
|
|
|
|
* @help-target
|
|
|
|
Lists build targets.
|
|
|
|
|
|
|
|
* @help-target-deep
|
|
|
|
Lists deep targets.
|
|
|
|
|
|
|
|
* @help-all
|
|
|
|
Lists all documented information.
|
|
|
|
|
2024-07-02 14:31:42 +00:00
|
|
|
|
2024-07-01 01:15:31 +00:00
|
|
|
## Example Project
|
2024-06-25 13:57:13 +00:00
|
|
|
|
2024-06-24 18:41:06 +00:00
|
|
|
When you want to see whats happening do a debug run;
|
|
|
|
|
|
|
|
normal run;
|
2024-07-07 02:33:03 +00:00
|
|
|
time make @package-qa
|
2024-07-10 15:03:28 +00:00
|
|
|
real 0m8.058s
|
2024-06-24 18:55:12 +00:00
|
|
|
|
2024-06-26 01:48:06 +00:00
|
|
|
debug run at 11 Mhz;
|
2024-07-10 15:03:28 +00:00
|
|
|
time VERBOSE=on DEBUG=on MB_OPENMSX_HEADLESS=off MB_OPENMSX_THROTTLE=on make @package-qa
|
|
|
|
real 2m34.071s
|
2024-06-24 18:41:06 +00:00
|
|
|
|
2024-06-24 18:55:12 +00:00
|
|
|
debug run real msx speed;
|
2024-07-10 15:03:28 +00:00
|
|
|
time VERBOSE=on DEBUG=on MB_OPENMSX_HEADLESS=off MB_OPENMSX_THROTTLE=on MB_OPENMSX_SPEED=100 make @package-qa
|
2024-06-28 12:20:42 +00:00
|
|
|
real 2m37.379s
|
2024-06-28 20:29:37 +00:00
|
|
|
|
2024-07-05 19:20:14 +00:00
|
|
|
record run with screenshot on exit; (black screens without throttle)
|
2024-07-07 02:33:03 +00:00
|
|
|
time MB_OPENMSX_HEADLESS=off MB_OPENMSX_THROTTLE=on MB_FLIGHT_SCREEN=on make @package-qa
|
2024-07-10 15:03:28 +00:00
|
|
|
real 2m40.784s
|
2024-06-29 23:20:22 +00:00
|
|
|
|
2024-07-05 19:20:14 +00:00
|
|
|
record run with video per session and merge to one video file;
|
2024-07-07 16:16:00 +00:00
|
|
|
time make @flight-video-package-qa
|
2024-07-10 15:03:28 +00:00
|
|
|
real 0m18.184s
|
2024-06-26 01:48:06 +00:00
|
|
|
|
|
|
|
build parallel;
|
2024-07-07 02:33:03 +00:00
|
|
|
time make -j4 @package-qa
|
2024-07-10 15:03:28 +00:00
|
|
|
real 0m4.226s
|
2024-06-30 03:51:26 +00:00
|
|
|
|
2024-07-07 16:16:00 +00:00
|
|
|
manual test all packages on other MSX1 machine;
|
2024-06-30 03:51:26 +00:00
|
|
|
make DIST_QA_MSXHUB_MACHINE=Philips_VG_8000 bin/dist-qa-msxhub/@run
|
2021-07-04 00:12:48 +00:00
|
|
|
|
2021-07-03 02:15:15 +00:00
|
|
|
## Errata
|
|
|
|
|
2024-07-06 10:15:28 +00:00
|
|
|
* boot_exec_setcolor: does not work on MSX1 vdp TMS9918
|
2021-07-04 00:12:48 +00:00
|
|
|
* Doesn't work on windows
|
2024-07-02 13:34:26 +00:00
|
|
|
* TODO: mbboot80+add arg prefix and move to other repro + msxhub package
|
2024-07-01 01:15:31 +00:00
|
|
|
* TODO: Missing C and mixed support
|
|
|
|
* TODO: Use TCL for BASIC/ASM/C lcov (Cobertura) code coverage
|
2024-06-20 22:06:30 +00:00
|
|
|
|
2024-07-06 10:15:28 +00:00
|
|
|
|
2024-07-01 01:15:31 +00:00
|
|
|
## OpenMSX backlog issues
|
|
|
|
|
2024-07-06 10:15:28 +00:00
|
|
|
* (FIXED:rm-SDL) Bug: screenshots sometimes segfaults when using SDL renderer
|
|
|
|
* Screenshots don't work without throttle
|
|
|
|
* (FIXED++) Audio device init option + warning messages on computer without sound card
|
2024-07-01 20:40:06 +00:00
|
|
|
* MIDI device init option + warning messages on computer without sound card
|
2024-07-01 01:15:31 +00:00
|
|
|
* Enhancing the IDE CD-ROM support
|
2024-07-06 10:15:28 +00:00
|
|
|
* Allow `<type>IDEHD</type><DeviceName>OPENMSX IDEHD</DeviceName>` now hardcoded in IDEHD.CC:37 + update default for mode 40
|
2024-07-01 20:40:06 +00:00
|
|
|
* Diskmanipulator export (sync) fully non-cased filename compare (duplicates)
|
|
|
|
* Diskmanipulator export (sync) don't touch/overwrite unmodified files
|
2024-07-01 01:15:31 +00:00
|
|
|
* Diskmanipulator reuse the device defined filename
|
2024-07-06 10:15:28 +00:00
|
|
|
* Diskmanipulator Imported folders in openMSX; `cd utils;cd ..;dir` breaks, use `cd utils:cd a:\;dir` as workaround
|
2024-07-01 01:15:31 +00:00
|
|
|
* run instance-id or run/process-label to replace hardcoded "untitled1" path
|
|
|
|
* Remove msg or add ignore sram-fully or blank setting: SRAM file nms8250.cmos not found, assuming blank SRAM content.
|
|
|
|
* Video record append mode + optional multiple previds to glue videos as one
|
|
|
|
* SDL-NULL as window less renderer so that screenshot and/or video works headless
|
2024-07-10 19:17:24 +00:00
|
|
|
* Video record remove blue start frame on start of recording
|
2024-07-06 10:15:28 +00:00
|
|
|
* (FIXED++) Allow for `set renderer none` in TCL or command argument for headless mode
|
|
|
|
* (DONE) DocUpdate: Added optional exit code of exit command
|
2024-07-01 01:15:31 +00:00
|
|
|
* DocUpdate: Add speed note because it is slow + add example "after quit {export hdd}"
|
|
|
|
* DocUpdate: Wrap all TCL commands in catch+stderr+exit1
|
|
|
|
* DocUpdate: Add 'headless' example via stdio+new + link to control omsxctl
|
2024-07-06 10:15:28 +00:00
|
|
|
|
|
|
|
## Make4++ backlog issues
|
|
|
|
|
|
|
|
* Add a few new define's to have official make documentation
|
2024-07-10 17:17:40 +00:00
|
|
|
* BUG: Unicode read+parse ok but function call fails on `include $(MB__BASEPATH)/lib/make/प्रणालीᐥᔆʸᔆᐪᓫᔿ/mb_doc.mk`.
|
2024-07-06 10:15:28 +00:00
|
|
|
* Add function `call_real` which exits on undefined call argument
|
|
|
|
* Add -e option to make internal echo command for escaped sequences
|
|
|
|
* Add native OS functions for `os_copy,os_rmfile,rmdir,mkdir,touch,delfile,deldir`
|
2024-07-07 21:26:47 +00:00
|
|
|
* Add string letters function
|
|
|
|
* Add string isascii function (death with unicode)
|
|
|
|
* Add lowercase and uppercase functions (full 21bit unicode support)
|
2024-07-06 10:15:28 +00:00
|
|
|
* Add XML output for help system for integration with IDE's
|
|
|
|
* Add rwildcard for deeper searches
|
2024-07-06 10:29:38 +00:00
|
|
|
* Add namespace support for variables/functions/targets like: moduleX::bin/prog.o: moduleX::src/prog.c
|
2024-07-06 10:15:28 +00:00
|
|
|
* Add checksum function to calc checksum for file
|
|
|
|
* Add `os_copy_diff` function to use checksums to copy only changed files
|
|
|
|
* Allow make to use checksums not timestamps to detect file updates
|
|
|
|
* Define (binary) namespaced XML to replace ascii Makefile syntax
|
2024-07-06 10:29:38 +00:00
|
|
|
* Make5: Remove guile support fully (maybe replace with embedded MSX BASIC)
|
2024-07-06 10:15:28 +00:00
|
|
|
* Make5: Add converter command for upgrade make4 syntax and option to run make4 file.
|
|
|
|
* Make5: move all internal's to namespace's
|
2024-07-06 10:34:48 +00:00
|
|
|
* Make5: Replace all ultra short 1980's magic templates variables with ultra long human readable name
|
2024-07-06 10:15:28 +00:00
|
|
|
* Make5: upgrade to new BDOS split file and folder API in OS kernel VFS layer
|
|
|
|
* Make5: Delete all Old-Fashioned Suffix Rules code
|
|
|
|
* Make5: Delete .EXPORT_ALL_VARIABLES and `export` without variable
|
|
|
|
* Make5: Delete VPATH search variable (replace with namespace vpath ??)
|
|
|
|
* Make5: Delete/refactor all (old) code that make the make code ugly
|
|
|
|
* Make5: Adds zillala (emacs like) bug reporting output for when make fails script or internally
|
|
|
|
* Make6: Only support 18bit four corner method, fixed i18n words, no letters, no ascii, no unicode
|
|
|
|
|