Utils to use openMSX in build pipelines.
Go to file
Willem Cazander 9d6049c6ba
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 0s
Trigger fix3
2024-06-25 13:48:27 +02:00
.forgejo/workflows Trigger fix3 2024-06-25 13:48:27 +02:00
lib Added override for save settings on exit. 2024-06-25 13:12:25 +02:00
test Removed hex2bin dep 2024-06-24 13:36:26 +02:00
.gitignore Updated to new fetch api 2024-06-21 00:06:06 +02:00
.project Unignored eclipse project file. 2021-07-02 18:58:34 +02:00
Makefile Fixed hardcoded bin path and allow for partial parallel build. 2024-06-25 13:05:20 +02:00
Makelocal.mk.tpl Cleaned left over of hex2bin. 2024-06-24 13:54:45 +02:00
README.md Added normal speed example. 2024-06-24 20:55:12 +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

  • SDCC msx build steps.
  • Allows headless openMSX buildpipe.
  • openMSX safe exit failure guards.
  • Automatic disk image import + export per build step.
  • Downloads and caches resources from msxhub.com

Dependencies

  • make
  • openmsx
  • sdcc
  • wget
  • unix2dos

For debian use;

apt-get install make openmsx wget dos2unix sdcc

Usage

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

  • PATH_SDCC ?= /usr/bin
  • PATH_UNIX2DOS ?= /usr/bin
  • PATH_OPENMSX ?= /usr/bin
  • PATH_MSXBUILD ?= /opt/msxbuild

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 clean assert-all
	real    0m1.938s

debug run;
	time MB_OPENMSX_RENDERER=SDL MB_OPENMSX_THROTTLE=ON make clean assert-all
	real    0m32.977s

debug run real msx speed;
	time MB_OPENMSX_RENDERER=SDL MB_OPENMSX_THROTTLE=ON MB_OPENMSX_SPEED=100 make clean assert-all
	real    1m44.184s

Functions

Current set is WIP.

  • mb_compile_asm
  • mb_link_asm_lib
  • mb_link_asm
  • mb_link_asm_0000 = call mb_link_asm,$(1),$(2),0x0000
  • mb_link_asm_0100
  • mb_link_asm_1000
  • mb_link_asm_4000
  • mb_link_asm_8000
  • mb_link_asm_C000
  • mb_link_asm_dos = alias for mb_link_asm_0100
  • mb_hex2bin
  • mb_openmsx_dosctl
  • mb_msxhub_file
  • mb_package_emuctl
  • mb_package_dos1
  • mb_package_dos2
  • mb_package_nextor
  • mb_package_macro80
  • mb_package_z80asmuk
  • mb_package_popcom
  • mb_package_dmphex
  • mb_package_baskom
  • mb_package_pmarc
  • mb_package_lhpack
  • mb_package_lhext
  • mb_package_gunzip
  • mb_package_tunzip
  • mb_package_turbo
  • mb_package_binldr
  • mb_package_gfxage
  • 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_write_default
  • mb_autoexec_open_gui
  • mb_autoexec_open_gui_cmd
  • mb_autoexec_cmd
  • mb_autoexec_cmd_test
  • mb_clean
  • mb_mkdir
  • mb_delete
  • mb_copy
  • 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