Utils to use openMSX in build pipelines.
Go to file
Willem Cazander a443040dff
All checks were successful
Run test asserts / Test-Asserts (push) Successful in -7s
Make ffmpeg silent and overwriting.
2024-06-28 23:17:18 +02:00
.forgejo/workflows Fixed dos1 and msx1 runs. 2024-06-27 19:09:38 +02:00
lib Moved all openMSX data to local bin to enable video recorder. 2024-06-28 22:29:37 +02:00
test Make ffmpeg silent and overwriting. 2024-06-28 23:17:18 +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 Cleanup of path variables. 2024-06-25 15:57:13 +02:00
README.md Moved all openMSX data to local bin to enable video recorder. 2024-06-28 22:29:37 +02:00

MSXBUILD

Utils to use openMSX in build pipelines.

You can use these scripts as-is. But as always, feel free to extend it for your specific needs or contribute a fix or feature.

OpenMSX missing automation documentation

  • Don't use DirAsDisk, it is slow
  • Wrap all TCL commands in catch+stderr+exit1
  • Use TCL script for auto HD import/export
  • Use stdio mode for headless and/or fast boot
  • Disable throttling for automation steps
  • Use fail_after TCL script to run openMSX safely
  • Control openMSX from inside with TCL+command
  • Enable SDL just before command is addictive fast
  • TODO: Use TCL for BASIC/ASM/C lcov (Cobertura) code coverage

The files in this repro try to handle these steps for you.

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

Dependencies

  • make + wget + tar + dos2unix
  • sdcc
  • openmsx
  • ffmpeg (optional, see test/0module.mk howto merge videos)

For debian use;

apt-get install make wget tar dos2unix sdcc openmsx ffmpeg

Usage

Include the lib/make/msxbuild.mk file from your Makefile.
And override the paths if needed;

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

Then build result based compile rules see an example in; test/ahello-m80/0module.mk

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

normal run;
	time make assert-all
	real    0m2.400s

debug run at 11 Mhz;
	time MB_OPENMSX_RENDERER=on MB_OPENMSX_THROTTLE=on make assert-all
	real    0m49.609s

debug run real msx speed;
	time MB_OPENMSX_RENDERER=on MB_OPENMSX_THROTTLE=on MB_OPENMSX_SPEED=100 make assert-all
	real    2m37.379s

debug run with video recorder and merge to one video file;
	time MB_OPENMSX_RENDERER=on MB_OPENMSX_RECORDER=on make -s assert-all-video
	real    0m7.136s

build parallel;
	time make -s -j4 assert-all
	real    0m1.162s

Functions

Current set is WIP.

  • mb_autoexec_append_cmd
  • mb_autoexec_append_echo
  • mb_autoexec_append_rem
  • mb_autoexec_append_gui_mode
  • mb_autoexec_append_stop_fail
  • mb_autoexec_append_exit
  • mb_autoexec_append_safe_test
  • mb_autoexec_append_safe_cmd
  • mb_autoexec_write_default
  • mb_autoexec_open_gui40
  • mb_autoexec_open_gui40_cmd
  • mb_autoexec_open_gui80
  • mb_autoexec_open_gui80_cmd
  • mb_autoexec_safe_cmd
  • mb_autoexec_safe_test
  • mb_msxhub_file
  • mb_msxhub_get_dos1
  • mb_msxhub_get_dos2
  • mb_msxhub_get_nextor
  • mb_msxhub_get_macro80
  • mb_msxhub_get_z80asmuk
  • mb_msxhub_get_popcom
  • mb_msxhub_get_dmphex
  • mb_msxhub_get_baskom
  • mb_msxhub_get_pmarc
  • mb_msxhub_get_lhpack
  • mb_msxhub_get_lhext
  • mb_msxhub_get_gunzip
  • mb_msxhub_get_tunzip
  • mb_msxhub_get_turbo
  • mb_msxhub_get_binldr
  • mb_msxhub_get_gfxage
  • mb_msxrom_file
  • mb_msxrom_setup
  • mb_msxrom_extension_ide
  • mb_msxrom_extension_ide_nextor
  • mb_msxrom_extension_scsi_novaxis
  • mb_msxrom_extension_msxdos22
  • mb_msxrom_extension_rs232
  • mb_msxrom_extension_fmpac
  • mb_msxrom_extension_fmpac_en
  • mb_msxrom_extension_moonsound
  • mb_msxrom_extension_basickun
  • mb_msxrom_machine_Canon_V-20
  • mb_msxrom_machine_Mitsubishi_ML-F80
  • mb_msxrom_machine_Mitsubishi_ML-FX1
  • mb_msxrom_machine_Mitsubishi_ML-G3_ES
  • mb_msxrom_machine_Philips_VG_8000
  • mb_msxrom_machine_Philips_VG_8230
  • mb_msxrom_machine_Philips_NMS_8250
  • mb_msxrom_machine_Toshiba_HX-21.xml
  • mb_msxrom_machine_Yamaha_AX200
  • mb_msxrom_machine_Yamaha_YIS-503IIIR
  • mb_msxrom_machine_Panasonic_FS-A1WSX
  • mb_msxrom_machine_Boosted_MSX2_EN
  • mb_msxrom_machine_Boosted_MSX2+_JP
  • mb_openmsx_setup
  • mb_openmsx_dosctl
  • mb_sdcc_compile_asm
  • mb_sdcc_link_asm_lib
  • mb_sdcc_link_asm
  • mb_sdcc_link_asm_0000 = calls mb_sdcc_link_asm,$(1),$(2),0x0000
  • mb_sdcc_link_asm_0100
  • mb_sdcc_link_asm_1000
  • mb_sdcc_link_asm_4000
  • mb_sdcc_link_asm_8000
  • mb_sdcc_link_asm_C000
  • mb_sdcc_link_asm_dos = calls mb_sdcc_link_asm_0100
  • mb_sdcc_hex2bin
  • mb_clean
  • mb_mkdir
  • mb_delete
  • mb_copy
  • mb_unix2dos
  • mb_dos2unix
  • mb_create_dist

Errata

  • Doesn't work on windows
  • Missing C and mixed support
  • If no SDL than screenshot in fail_after doesn't work
  • Video recorder does not append if used in multiple build steps