Utils to use openMSX in build pipelines.
Go to file
Willem Cazander 4e62282839
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 4s
Startup note test 6.
2024-07-03 13:51:28 +02:00
.forgejo/workflows Startup note test 6. 2024-07-03 13:51:28 +02:00
lib Allow multiple vars to be embedded. 2024-07-03 13:30:35 +02:00
src Moved to dynamic default in variable doc function. 2024-07-02 23:10:13 +02:00
.gitignore Updated project ignores. 2024-06-25 16:02:38 +02:00
.project Unignored eclipse project file. 2021-07-02 18:58:34 +02:00
Makefile Renamed dos packages and new help system. 2024-07-02 03:27:14 +02:00
README.md Added missing deps. 2024-07-02 16:56:21 +02:00

MSXBUILD

Utils to use openMSX in build pipelines.

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.

Features

  • Allows parallel headless openMSX build pipeline
  • openMSX safe exit failure guards
  • Automatic disk image import + export per build step
  • Downloads and caches resources from msxhub.com
  • Auto magic openMSX extensions and machine rom's setup
  • SDCC msx build steps
  • Screenshot and/or video output of full build
  • Embedded documentation of make options

Dependencies

  • make + wget + tar + awk + grep + dos2unix
  • sdcc
  • openmsx
  • ffmpeg

For debian use;

apt-get install make wget tar gawk grep dos2unix sdcc openmsx ffmpeg

Usage Classic

Have access or copy the lib folder in your project and start writing make files.

Include the lib/make/msxbuild.mk and override the paths if needed;

  • PATH_SDCC=/usr/bin
  • PATH_OPENMSX=/usr/bin

Usage Docker

TODO

Usage Help

Running: make

Use 'make help' for possible targets and documention.

Running: make help

Welcome to the MSXBUILD help system.

For detailed help use one of the following targets;

 * help@target
 * help@function
 * help@variable

Running: make help@function

Documention of the make functions;

 * mb_doc_function <name> [desc] [args]
        Prints formatted documention of an function.

 * mb_doc_variable <name> [desc] [value]
        Prints formatted documention of an variable.

 * mb_doc_target <name> [desc]
        Prints formatted documention of an target.

 * mb_doc_project <name>
        Prints formatted documention of an project (help).

 * mb_doc_show_help@all
        Displays text for 'make'

...

Example Project

When you want to see whats happening do a debug run;

normal run;
	time make bin/@assert-all
	real    0m3.223s

debug run at 11 Mhz;
	time MB_OPENMSX_HEADLESS=off MB_OPENMSX_THROTTLE=on make bin/@assert-all
	real    1m4.856s

debug run real msx speed;
	time MB_OPENMSX_HEADLESS=off MB_OPENMSX_THROTTLE=on MB_OPENMSX_SPEED=100 make bin/@assert-all
	real    2m37.379s

debug run with screenshot on exit; (black screens without throttle)
	time MB_OPENMSX_HEADLESS=off MB_OPENMSX_THROTTLE=on MB_FLIGHT_SCREEN=on make -s bin/@assert-all
	real    1m14.043s

debug run with video recorder and merge to one video file;
	time MB_OPENMSX_HEADLESS=off MB_FLIGHT_VIDEO=on make -s bin/@assert-all
	real    0m7.136s

build parallel;
	time make -s -j4 bin/@assert-all
	real    0m1.817s

manual test msxhub on machine;
	make DIST_QA_MSXHUB_MACHINE=Philips_VG_8000 bin/dist-qa-msxhub/@run

Errata

  • Doesn't work on windows
  • TODO: mbboot80+add arg prefix and move to other repro + msxhub package
  • TODO: Missing C and mixed support
  • TODO: Use TCL for BASIC/ASM/C lcov (Cobertura) code coverage

OpenMSX backlog issues

  • (FIXED:SDL is removed) Bug: screenshots sometimes segfaults when using SDL renderer
  • Bug: screenshots don't work without throttle
  • Bug: Imported folders in openMSX; cd utils;cd ..;dir breaks, use cd utils:cd a:\;dir as workaround
  • (FIXED) Audio device init option + warning messages on computer without sound card
  • MIDI device init option + warning messages on computer without sound card
  • Enhancing the IDE CD-ROM support
  • Command setcolor does not work on MSX1 vdp TMS9918
  • Diskmanipulator export (sync) fully non-cased filename compare (duplicates)
  • Diskmanipulator export (sync) don't touch/overwrite unmodified files
  • Diskmanipulator reuse the device defined filename
  • 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
  • Video record remove blue start frame on start of recording
  • (FIXED) Allow for set renderer none in TCL or command argument for headless mode
  • SDL-NULL as window less renderer so that screenshot and/or video works headless
  • 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