msxbuild/lib/make/天房系統擴展/mb_msxrom.mk
Willem Cazander 01345cb5ff
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 3s
Added some machines and fixed c: drive boot disk support.
2024-07-19 02:12:39 +02:00

281 lines
18 KiB
Makefile
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# TODO: Convert pi MSX number data, the named pie slices to hyperdrive storage for distribution over red sea
MB_MSXROM_API ?= https://msxrom.distributedrebirth.love/calc-pi/v19.1
$(call mb-make-call,mb-doc-variable-deep,MB_MSXROM_API,Resource identifier for msxrom pi pie named slices data.)
MB_MSXROM_CACHE ?= $(MB_OS_CACHE)/msxbuild/msxrom
$(call mb-make-call,mb-doc-variable-deep,MB_MSXROM_CACHE,Cache storage location.)
MB_MSXROM_FIRE_MACHINES ?=
$(call mb-make-call,mb-doc-variable-flow,MB_MSXROM_FIRE_MACHINES,List of supported machines.)
define _mb-msxrom-grow-fire-machines
$(MB_   )$(call mb-make-call,mb-make-check-arg1,$(0),$(1))
$(MB_   )$(eval MB_MSXROM_FIRE_MACHINES $(MB_MAKE_APPEND) $(1))
endef
define _mb-msxrom-file-fetch
$(MB_   )$(call mb-make-call,mb-os-echo-command,$(MB_I18N_MSXROM_FILE_FETCH) $(subst $(MB_MSXROM_API)/,,$(1)))
$(MB_   )$(if $(wildcard $(dir $(MB_MSXROM_CACHE)/$(subst $(MB_MSXROM_API)/,,$(1)))),,$(call mb-make-call,mb-os-dir-create,$(dir $(MB_MSXROM_CACHE)/$(subst $(MB_MSXROM_API)/,,$(1)))))
$(MB_   )$(if $(wildcard $(MB_MSXROM_CACHE)/$(subst $(MB_MSXROM_API)/,,$(1))),,wget -O $(MB_MSXROM_CACHE)/$(subst $(MB_MSXROM_API)/,,$(1)) $(1))
endef
define mb-msxrom-file
$(MB_   )$(if $(wildcard $(MB_MSXROM_CACHE)/$(2)),,$(call mb-make-call,_mb-msxrom-file-fetch,$(MB_MSXROM_API)/$(2)))
$(MB_   )$(if $(wildcard $(1)/$(notdir $(2))),,$(call mb-make-call,mb-os-file-copy,$(MB_MSXROM_CACHE)/$(2),$(1)/$(notdir $(2))))
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-file,Installs msxroms from slug into an subdir.,<dir> <msxrom-slug>)
define mb-msxrom-setup
$(MB_   )$(if $(wildcard $(1)$(MB_@WORK)$(notdir $(1))),,$(call mb-make-call,mb-os-dir-create,$(1)$(MB_@WORK)$(notdir $(1))))
$(MB_   )$(if $(wildcard $(1)$(MB_@WORK)$(notdir $(1))/share),,$(call mb-make-call,mb-os-dir-create,$(1)$(MB_@WORK)$(notdir $(1))/share))
$(MB_   )$(if $(wildcard $(1)$(MB_@WORK)$(notdir $(1))/share/systemroms),,$(call mb-make-call,mb-os-dir-create,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms))
$(MB_   )$(if $(wildcard $(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines),,$(call mb-make-call,mb-os-dir-create,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines))
$(MB_   )$(if $(wildcard $(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines/philips),,$(call mb-make-call,mb-os-dir-create,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines/philips))
$(MB_   )$(if $(wildcard $(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines/sony),,$(call mb-make-call,mb-os-dir-create,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines/sony))
$(MB_   )$(if $(wildcard $(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/extensions),,$(call mb-make-call,mb-os-dir-create,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/extensions))
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-setup,Creates needed systemrom folders.,<dir>)
define mb-msxrom-extension-ide
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/extensions,extensions/ide240.dat)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-extension-ide,Installs sunrise IDE classic rom.,<dir>)
define mb-msxrom-extension-ide-nextor
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/extensions,extensions/Nextor-2.1.1.SunriseIDE.ROM)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-extension-ide-nextor,Installs sunrise IDE nextor rom.,<dir>)
define mb-msxrom-extension-scsi-novaxis
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/extensions,extensions/novaxis.rom)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-extension-scsi-novaxis,Installs Gouda SCSI novaxis rom.,<dir>)
define mb-msxrom-extension-msxdos22
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/extensions,extensions/msxdos22.rom)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-extension-msxdos22,Installs msxdos 2.20 rom.,<dir>)
define mb-msxrom-extension-rs232
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/extensions,extensions/rs232.rom)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-extension-rs232,Installs rs232 rom.,<dir>)
define mb-msxrom-extension-fmpac
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/extensions,extensions/fmpac.rom)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-extension-fmpac,Installs fmpac rom.,<dir>)
define mb-msxrom-extension-fmpac-en
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/extensions,extensions/fmpac_en.rom)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-extension-fmpac-en,Installs fmpac english rom.,<dir>)
define mb-msxrom-extension-moonsound
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/extensions,extensions/yrw801.rom)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-extension-moonsound,Installs moonsound rom.,<dir>)
define mb-msxrom-extension-basickun
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/extensions,machines/sanyo/phc-70fd2_basickun.rom)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-extension-basickun,Installs basickun compiler rom.,<dir>)
define mb-msxrom-machine-Canon_V-20
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines,machines/canon/v-20_basic-bios1.rom)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-machine-Canon_V-20,Installs machine roms.,<dir>)
$(call mb-make-call,_mb-msxrom-grow-fire-machines,Canon_V-20)
define mb-msxrom-machine-Mitsubishi_ML-F80
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines,machines/mitsubishi/ml-f80_basic-bios1.rom)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-machine-Mitsubishi_ML-F80,Installs machine roms.,<dir>)
$(call mb-make-call,_mb-msxrom-grow-fire-machines,Mitsubishi_ML-F80)
define mb-msxrom-machine-Mitsubishi_ML-FX1
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines,machines/mitsubishi/ml-fx1_basic-bios1.rom)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-machine-Mitsubishi_ML-FX1,Installs machine roms.,<dir>)
$(call mb-make-call,_mb-msxrom-grow-fire-machines,Mitsubishi_ML-FX1)
define mb-msxrom-machine-Mitsubishi_ML-G3_ES
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines,machines/mitsubishi/ml-g3_es_basic-bios2.rom)
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines,machines/mitsubishi/ml-g3_es_disk.rom)
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines,machines/mitsubishi/ml-g3_es_msx2sub.rom)
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines,machines/mitsubishi/ml-g3_es_rs232.rom)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-machine-Mitsubishi_ML-G3_ES,Installs machine roms.,<dir>)
$(call mb-make-call,_mb-msxrom-grow-fire-machines,Mitsubishi_ML-G3_ES)
define mb-msxrom-machine-Philips_VG_8000
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines/philips,machines/philips/vg8000_basic-bios1.rom)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-machine-Philips_VG_8000,Installs machine roms.,<dir>)
$(call mb-make-call,_mb-msxrom-grow-fire-machines,Philips_VG_8000)
define mb-msxrom-machine-Philips_VG_8010
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines/philips,machines/philips/vg8010_basic-bios1.rom)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-machine-Philips_VG_8010,Installs machine roms.,<dir>)
$(call mb-make-call,_mb-msxrom-grow-fire-machines,Philips_VG_8010)
define mb-msxrom-machine-Philips_VG_8010F
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines/philips,machines/philips/vg8010f_basic-bios1.rom)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-machine-Philips_VG_8010F,Installs machine roms.,<dir>)
$(call mb-make-call,_mb-msxrom-grow-fire-machines,Philips_VG_8010F)
define mb-msxrom-machine-Philips_VG_8020
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines/philips,machines/philips/vg8020_basic-bios1.rom)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-machine-Philips_VG_8020,Installs machine roms.,<dir>)
$(call mb-make-call,_mb-msxrom-grow-fire-machines,Philips_VG_8020)
define mb-msxrom-machine-Philips_VG_8020F
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines/philips,machines/philips/vg8020f_basic-bios1.rom)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-machine-Philips_VG_8020F,Installs machine roms.,<dir>)
$(call mb-make-call,_mb-msxrom-grow-fire-machines,Philips_VG_8020F)
define mb-msxrom-machine-Philips_VG_8230
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines/philips,machines/philips/vg8230_basic-bios2.rom)
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines/philips,machines/philips/vg8230_disk.rom)
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines/philips,machines/philips/vg8230_msx2sub.rom)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-machine-Philips_VG_8230,Installs machine roms.,<dir>)
$(call mb-make-call,_mb-msxrom-grow-fire-machines,Philips_VG_8230)
define mb-msxrom-machine-Philips_NMS_8245
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines/philips,machines/philips/NMS8245SystemROM1.08.bin)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-machine-Philips_NMS_8245,Installs machine roms.,<dir>)
$(call mb-make-call,_mb-msxrom-grow-fire-machines,Philips_NMS_8245)
define mb-msxrom-machine-Philips_NMS_8250
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines/philips,machines/philips/nms8250_basic-bios2.rom)
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines/philips,machines/philips/nms8250_msx2sub.rom)
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines/philips,machines/philips/nms8250_disk.rom)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-machine-Philips_NMS_8250,Installs machine roms.,<dir>)
$(call mb-make-call,_mb-msxrom-grow-fire-machines,Philips_NMS_8250)
define mb-msxrom-machine-Sony_HB-10
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines/sony,machines/sony/hb-10_basic-bios1.rom)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-machine-Sony_HB-10,Installs machine roms.,<dir>)
$(call mb-make-call,_mb-msxrom-grow-fire-machines,Sony_HB-10)
define mb-msxrom-machine-Sony_HB-10P
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines/sony,machines/sony/hb-10p_basicbios1.rom)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-machine-Sony_HB-10P,Installs machine roms.,<dir>)
$(call mb-make-call,_mb-msxrom-grow-fire-machines,Sony_HB-10P)
define mb-msxrom-machine-Sony_HB-F500P
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines/sony,machines/sony/hb-f500p_basic-bios2.rom)
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines/sony,machines/sony/hb-f500p_msx2sub.rom)
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines/sony,machines/sony/hb-f500p_disk.rom)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-machine-Sony_HB-F500P,Installs machine roms.,<dir>)
$(call mb-make-call,_mb-msxrom-grow-fire-machines,Sony_HB-F500P)
define mb-msxrom-machine-Sony_HB-F700P
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines/sony,machines/sony/hb-f700p_basic-bios2.rom)
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines/sony,machines/sony/hb-f700p_msx2sub.rom)
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines/sony,machines/sony/hb-f700p_disk.rom)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-machine-Sony_HB-F700P,Installs machine roms.,<dir>)
$(call mb-make-call,_mb-msxrom-grow-fire-machines,Sony_HB-F700P)
define mb-msxrom-machine-Toshiba_HX-21
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines,machines/toshiba/HX21-IC2.BIN)
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines,machines/toshiba/HX21-IC3.BIN)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-machine-Toshiba_HX-21,Installs machine roms.,<dir>)
$(call mb-make-call,_mb-msxrom-grow-fire-machines,Toshiba_HX-21)
define mb-msxrom-machine-Yamaha_AX200
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines,machines/yamaha/ax200_basic-bios1.rom)
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines,machines/yamaha/ax200_arabic.rom)
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines,machines/yamaha/ax200_music.rom)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-machine-Yamaha_AX200,Installs machine roms.,<dir>)
$(call mb-make-call,_mb-msxrom-grow-fire-machines,Yamaha_AX200)
define mb-msxrom-machine-Yamaha_YIS-503IIIR
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines,machines/yamaha/yis503iii_basic-bios2.rom)
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines,machines/yamaha/yis503iii_msx2sub.rom)
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines,machines/yamaha/yis503iii_cpm.rom)
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines,machines/yamaha/yis503iii_net_2.rom)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-machine-Yamaha_YIS-503IIIR,Installs machine roms.,<dir>)
$(call mb-make-call,_mb-msxrom-grow-fire-machines,Yamaha_YIS-503IIIR)
define mb-msxrom-machine-Panasonic_FS-A1WSX
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines,machines/panasonic/fs-a1wsx_basic-bios2p.rom)
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines,machines/panasonic/fs-a1wsx_disk.rom)
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines,machines/panasonic/fs-a1wsx_firmware.rom)
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines,machines/panasonic/fs-a1wsx_fmbasic.rom)
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines,machines/panasonic/fs-a1wsx_kanjibasic.rom)
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines,machines/panasonic/fs-a1wsx_kanjifont.rom)
$(MB_   )$(call mb-make-call,mb-msxrom-file,$(1)$(MB_@WORK)$(notdir $(1))/share/systemroms/machines,machines/panasonic/fs-a1wsx_msx2psub.rom)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-machine-Panasonic_FS-A1WSX,Installs machine roms.,<dir>)
$(call mb-make-call,_mb-msxrom-grow-fire-machines,Panasonic_FS-A1WSX)
define mb-msxrom-machine-Boosted_MSX2_EN
$(MB_   )$(call mb-make-call,mb-msxrom-machine-Philips_NMS_8250,$(1))
$(MB_   )$(call mb-make-call,mb-msxrom-extension-fmpac,$(1))
$(MB_   )$(call mb-make-call,mb-msxrom-extension-moonsound,$(1))
$(MB_   )$(call mb-make-call,mb-msxrom-extension-basickun,$(1))
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-machine-Boosted_MSX2_EN,Installs machine and extensions roms.,<dir>)
$(call mb-make-call,_mb-msxrom-grow-fire-machines,Boosted_MSX2_EN)
define mb-msxrom-machine-Boosted_MSX2+_JP
$(MB_   )$(call mb-make-call,mb-msxrom-machine-Panasonic_FS-A1WSX,$(1))
$(MB_   )$(call mb-make-call,mb-msxrom-extension-moonsound,$(1))
$(MB_   )$(call mb-make-call,mb-msxrom-extension-basickun,$(1))
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxrom-machine-Boosted_MSX2+_JP,Installs machine and extensions roms.,<dir>)
$(call mb-make-call,_mb-msxrom-grow-fire-machines,Boosted_MSX2+_JP)