msxbuild/README.md

139 lines
4.2 KiB
Markdown
Raw Normal View History

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
* Allows parallel headless openMSX build pipeline
2024-06-28 23:25:39 +00:00
* openMSX safe exit failure guards
* Automatic disk image import + export per build step
2021-07-04 00:12:48 +00:00
* Downloads and caches resources from msxhub.com
* 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
* 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-06-25 13:57:13 +00:00
* make + wget + tar + 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
2020-12-23 17:14:13 +00:00
2024-06-23 20:52:31 +00:00
For debian use;
apt-get install make wget tar dos2unix sdcc openmsx ffmpeg
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;
* PATH_SDCC=/usr/bin
* PATH_OPENMSX=/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`
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'
...
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;
time make bin/@assert-all
real 0m3.223s
2024-06-24 18:55:12 +00:00
2024-06-26 01:48:06 +00:00
debug run at 11 Mhz;
2024-07-02 14:31:42 +00:00
time MB_OPENMSX_HEADLESS=off MB_OPENMSX_THROTTLE=on make bin/@assert-all
2024-06-29 03:07:15 +00:00
real 1m4.856s
2024-06-24 18:41:06 +00:00
2024-06-24 18:55:12 +00:00
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
2024-07-01 20:51:26 +00:00
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
2024-06-26 01:48:06 +00:00
build parallel;
time make -s -j4 bin/@assert-all
real 0m1.817s
2024-06-30 03:51:26 +00:00
manual test msxhub on machine;
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
2021-07-04 00:12:48 +00:00
* Doesn't work on windows
* 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-01 01:15:31 +00:00
## OpenMSX backlog issues
2024-07-01 20:51:26 +00:00
* (FIXED:SDL is removed) Bug: screenshots sometimes segfaults when using SDL renderer
2024-07-01 01:15:31 +00:00
* 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
2024-07-01 01:15:31 +00:00
* 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
2024-07-01 01:15:31 +00:00
* 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
2024-07-01 01:15:31 +00:00
* 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