2020-12-23 17:14:13 +00: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.
|
|
|
|
|
2024-06-20 22:06:30 +00:00
|
|
|
## 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.
|
|
|
|
|
2021-07-04 00:12:48 +00:00
|
|
|
## Features
|
2020-12-23 17:14:13 +00:00
|
|
|
|
2021-07-04 00:12:48 +00:00
|
|
|
* SDCC msx build steps.
|
|
|
|
* Allows headless openMSX buildpipe.
|
2020-12-23 17:14:13 +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
|
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
|
2020-12-23 17:14:13 +00:00
|
|
|
|
2024-06-23 20:52:31 +00:00
|
|
|
For debian use;
|
|
|
|
|
2024-06-25 13:57:13 +00:00
|
|
|
apt-get install make wget tar dos2unix sdcc openmsx
|
2024-06-23 20:52:31 +00:00
|
|
|
|
2021-07-04 00:12:48 +00:00
|
|
|
## Usage
|
2020-12-23 17:14:13 +00:00
|
|
|
|
2024-06-25 14:04:17 +00:00
|
|
|
Include the `lib/make/msxbuild.mk` file from your Makefile.
|
2024-06-25 13:57:13 +00:00
|
|
|
And override the paths if needed;
|
2024-06-25 14:04:17 +00:00
|
|
|
* PATH_SDCC=/usr/bin
|
|
|
|
* PATH_OPENMSX=/usr/bin
|
2020-12-23 17:14:13 +00:00
|
|
|
|
2024-06-25 13:57:13 +00:00
|
|
|
Then build result based compile rules see an example in; `test/ahello-m80/0module.mk`
|
|
|
|
|
2024-06-24 18:41:06 +00:00
|
|
|
When you want to see whats happening do a debug run;
|
|
|
|
|
|
|
|
normal run;
|
2024-06-26 01:48:06 +00:00
|
|
|
time make assert-all
|
|
|
|
real 0m2.323s
|
2024-06-24 18:55:12 +00:00
|
|
|
|
2024-06-26 01:48:06 +00:00
|
|
|
debug run at 11 Mhz;
|
|
|
|
time MB_OPENMSX_RENDERER=SDL MB_OPENMSX_THROTTLE=ON make assert-all
|
|
|
|
real 0m40.930s
|
2024-06-24 18:41:06 +00:00
|
|
|
|
2024-06-24 18:55:12 +00:00
|
|
|
debug run real msx speed;
|
2024-06-26 01:48:06 +00:00
|
|
|
time MB_OPENMSX_RENDERER=SDL MB_OPENMSX_THROTTLE=ON MB_OPENMSX_SPEED=100 make assert-all
|
|
|
|
real 2m8.761s
|
|
|
|
|
|
|
|
build parallel;
|
|
|
|
time make -j4 assert-all
|
|
|
|
real 0m1.346s
|
2021-07-04 00:12:48 +00:00
|
|
|
|
|
|
|
## 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
|
2024-06-24 11:36:26 +00:00
|
|
|
* mb_hex2bin
|
2024-06-21 18:59:04 +00:00
|
|
|
* mb_openmsx_dosctl
|
2021-07-04 00:12:48 +00:00
|
|
|
* mb_msxhub_file
|
2024-06-24 12:26:18 +00:00
|
|
|
* mb_package_emuctl
|
2024-06-21 18:59:04 +00:00
|
|
|
* 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
|
2021-07-04 00:12:48 +00:00
|
|
|
* 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
|
2020-12-23 17:07:27 +00:00
|
|
|
|
2021-07-03 02:15:15 +00:00
|
|
|
## Errata
|
|
|
|
|
2021-07-04 00:12:48 +00:00
|
|
|
* Doesn't work on windows
|
2024-06-21 20:52:06 +00:00
|
|
|
* Missing C and mixed support
|
2024-06-20 22:06:30 +00:00
|
|
|
* If no SDL than screenshot in fail_after doesn't work
|
|
|
|
|