Utils to use openMSX in build pipelines.
Find a file
Willem Cazander a6d8d1170b
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 4s
Added backlog sync flag for export to not overwrite equal files.
2024-07-01 22:40:06 +02:00
.forgejo/workflows Fixed dos1 and msx1 runs. 2024-06-27 19:09:38 +02:00
lib Doc typo fix. 2024-07-01 11:58:36 +02:00
src Rename to bdos compiler step. 2024-07-01 03:16:43 +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 Removed one empty line. 2024-06-30 04:14:46 +02:00
README.md Added backlog sync flag for export to not overwrite equal files. 2024-07-01 22:40:06 +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

Dependencies

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

For debian use;

apt-get install make wget tar 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

Example Project

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

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

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

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

debug run with screenshot on exit; (Segfaults if using (old) SDL, or/and black screens without throttle)
	time MB_OPENMSX_HEADLESS=off MB_OPENMSX_THROTTLE=on MB_FLIGHT_SCREEN=on make -s 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 assert-all
	real    0m7.136s

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

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

Functions

Current set is WIP.

  • mb_autoexec_append_cmd <dir>
  • mb_autoexec_append_echo <dir> <message>
  • mb_autoexec_append_rem <dir> <remark>
  • mb_autoexec_append_show_gui <dir>
  • mb_autoexec_append_stop_fail <dir>
  • mb_autoexec_append_exit <dir>
  • mb_autoexec_append_joyporta_mouse <dir>
  • mb_autoexec_append_save_screenshot <dir> [prefix]
  • mb_autoexec_append_save_video <dir> [prefix]
  • mb_autoexec_append_safe_test <dir> <cmd> [timeout] [exit-code]
  • mb_autoexec_append_safe_cmd <dir> <cmd> [timeout] [exit-code]
  • mb_autoexec_write_default <dir> [text-mode]
  • mb_autoexec_show_gui40 <dir> [cmd]
  • mb_autoexec_show_gui40_mouse <dir> [cmd]
  • mb_autoexec_show_gui80 <dir> [cmd]
  • mb_autoexec_show_gui80_mouse <dir> [cmd]
  • mb_autoexec_safe_cmd <dir> <cmd> [text-mode]
  • mb_autoexec_safe_test <dir> <cmd> [text-mode]
  • mb_msxhub_file <dir> <msxhub-slug>
  • mb_msxhub_get_dos1_boot <dir>
  • mb_msxhub_get_dos2_boot <dir>
  • mb_msxhub_get_dos2_utils <dir>
  • mb_msxhub_get_nextor_boot <dir>
  • mb_msxhub_get_nextor_utils <dir>
  • mb_msxhub_get_macro80 <dir>
  • mb_msxhub_get_z80asmuk <dir>
  • mb_msxhub_get_wbass2 <dir>
  • mb_msxhub_get_konpass <dir>
  • mb_msxhub_get_pmarc <dir>
  • mb_msxhub_get_lhpack <dir>
  • mb_msxhub_get_lhext <dir>
  • mb_msxhub_get_gunzip <dir>
  • mb_msxhub_get_tunzip <dir>
  • mb_msxhub_get_popcom <dir>
  • mb_msxhub_get_make <dir>
  • mb_msxhub_get_adir <dir>
  • mb_msxhub_get_turbo <dir>
  • mb_msxhub_get_baskom <dir>
  • mb_msxhub_get_binldr <dir>
  • mb_msxhub_get_dmphex <dir>
  • mb_msxhub_get_zd <dir>
  • mb_msxhub_get_msxdos2t <dir>
  • mb_msxhub_get_gfxage <dir>
  • mb_msxrom_file <dir> <msxrom-slug>
  • mb_msxrom_setup <dir>
  • mb_msxrom_extension_ide <dir>
  • mb_msxrom_extension_ide_nextor <dir>
  • mb_msxrom_extension_scsi_novaxis <dir>
  • mb_msxrom_extension_msxdos22 <dir>
  • mb_msxrom_extension_rs232 <dir>
  • mb_msxrom_extension_fmpac <dir>
  • mb_msxrom_extension_fmpac_en <dir>
  • mb_msxrom_extension_moonsound <dir>
  • mb_msxrom_extension_basickun <dir>
  • mb_msxrom_machine_Canon_V-20 <dir>
  • mb_msxrom_machine_Mitsubishi_ML-F80 <dir>
  • mb_msxrom_machine_Mitsubishi_ML-FX1 <dir>
  • mb_msxrom_machine_Mitsubishi_ML-G3_ES <dir>
  • mb_msxrom_machine_Philips_VG_8000 <dir>
  • mb_msxrom_machine_Philips_VG_8230 <dir>
  • mb_msxrom_machine_Philips_NMS_8250 <dir>
  • mb_msxrom_machine_Toshiba_HX-21 <dir>
  • mb_msxrom_machine_Yamaha_AX200 <dir>
  • mb_msxrom_machine_Yamaha_YIS-503IIIR <dir>
  • mb_msxrom_machine_Panasonic_FS-A1WSX <dir>
  • mb_msxrom_machine_Boosted_MSX2_EN <dir>
  • mb_msxrom_machine_Boosted_MSX2+_JP <dir>
  • mb_openmsx_setup <dir> <machine>
  • mb_openmsx_dosctl <dir> [machine] [mem-argu]
  • mb_sdcc_compile_asm <in> <out>
  • mb_sdcc_link_asm_lib <in> <out>
  • mb_sdcc_link_asm <in> <out> <addr>
  • mb_sdcc_link_asm_0000 <in> <out>
  • mb_sdcc_link_asm_0100 <in> <out>
  • mb_sdcc_link_asm_1000 <in> <out>
  • mb_sdcc_link_asm_4000 <in> <out>
  • mb_sdcc_link_asm_8000 <in> <out>
  • mb_sdcc_link_asm_C000 <in> <out>
  • mb_sdcc_link_asm_bdos <in> <out>
  • mb_sdcc_hex2bin <in> <out>
  • mb_clean <dir>
  • mb_mkdir <dir>
  • mb_delete <file>
  • mb_copy <in> <out>
  • mb_unix2dos <in> <out>
  • mb_dos2unix <in> <out>
  • mb_create_dist <dir> <archive>
  • mb_create_flight_video <dir>

Errata

  • Doesn't work on windows
  • TODO: Missing C and mixed support
  • TODO: Use TCL for BASIC/ASM/C lcov (Cobertura) code coverage

OpenMSX backlog issues

  • 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
  • (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