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
|
|
|
|
2024-06-28 12:45:43 +00:00
|
|
|
* Allows parallel headless openMSX build pipeline
|
2024-06-28 23:25:39 +00:00
|
|
|
* openMSX safe exit failure guards
|
2024-06-28 12:45:43 +00:00
|
|
|
* Automatic disk image import + export per build step
|
2021-07-04 00:12:48 +00:00
|
|
|
* Downloads and caches resources from msxhub.com
|
2024-06-28 12:45:43 +00:00
|
|
|
* 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
|
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;
|
|
|
|
|
2024-06-28 20:29:37 +00:00
|
|
|
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;
|
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-07-01 01:15:31 +00:00
|
|
|
## Usage Docker
|
|
|
|
|
|
|
|
TODO
|
|
|
|
|
|
|
|
## 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;
|
2024-06-26 01:48:06 +00:00
|
|
|
time make assert-all
|
2024-06-29 00:49:16 +00:00
|
|
|
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-06-29 03:07:15 +00:00
|
|
|
time MB_OPENMSX_HEADLESS=off MB_OPENMSX_THROTTLE=on make assert-all
|
|
|
|
real 1m4.856s
|
2024-06-24 18:41:06 +00:00
|
|
|
|
2024-06-24 18:55:12 +00:00
|
|
|
debug run real msx speed;
|
2024-06-29 03:07:15 +00:00
|
|
|
time MB_OPENMSX_HEADLESS=off MB_OPENMSX_THROTTLE=on MB_OPENMSX_SPEED=100 make assert-all
|
2024-06-28 12:20:42 +00:00
|
|
|
real 2m37.379s
|
2024-06-28 20:29:37 +00:00
|
|
|
|
2024-06-29 23:20:22 +00:00
|
|
|
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
|
|
|
|
|
2024-06-28 20:29:37 +00:00
|
|
|
debug run with video recorder and merge to one video file;
|
2024-06-30 02:34:07 +00:00
|
|
|
time MB_OPENMSX_HEADLESS=off MB_FLIGHT_VIDEO=on make -s assert-all
|
2024-06-28 20:29:37 +00:00
|
|
|
real 0m7.136s
|
2024-06-26 01:48:06 +00:00
|
|
|
|
|
|
|
build parallel;
|
2024-06-28 12:20:42 +00:00
|
|
|
time make -s -j4 assert-all
|
2024-06-29 00:49:16 +00:00
|
|
|
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
|
|
|
|
|
|
|
## Functions
|
|
|
|
|
|
|
|
Current set is WIP.
|
|
|
|
|
2024-06-30 12:55:48 +00:00
|
|
|
* 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]`
|
2024-07-01 01:15:31 +00:00
|
|
|
* 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>`
|
2024-06-30 12:55:48 +00:00
|
|
|
* mb_openmsx_setup `<dir> <machine>`
|
|
|
|
* mb_openmsx_dosctl `<dir> [machine] [mem-argu]`
|
2024-07-01 01:15:31 +00:00
|
|
|
* 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>`
|
2024-07-01 01:16:43 +00:00
|
|
|
* mb_sdcc_link_asm_bdos `<in> <out>`
|
2024-06-30 12:55:48 +00:00
|
|
|
* mb_sdcc_hex2bin `<in> <out>`
|
|
|
|
* mb_clean `<dir>`
|
|
|
|
* mb_mkdir `<dir>`
|
2024-07-01 01:15:31 +00:00
|
|
|
* 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>`
|
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-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
|
|
|
|
|
|
|
|
* 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
|
2024-07-01 20:40:06 +00:00
|
|
|
* (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
|
2024-07-01 20:40:06 +00:00
|
|
|
* 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
|
2024-07-01 20:40:06 +00:00
|
|
|
* (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
|