msxbuild/lib/make/mb_msxrom.mk

188 lines
9.7 KiB
Makefile
Raw Normal View History

2024-06-27 17:09:38 +00:00
# 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
MB_DOC_FIRE_VARIABLE_DEEP += $(call mb_make_call,mb_doc_variable_deep,MB_MSXROM_API,"Resource identifier for msxrom pi pie named slices data.")
2024-07-05 22:11:54 +00:00
MB_MSXROM_CACHE ?= $(MB_OS_CACHE)/msxbuild/msxrom
MB_DOC_FIRE_VARIABLE_DEEP += $(call mb_make_call,mb_doc_variable_deep,MB_MSXROM_CACHE,"Cache storage location.")
define _mb_msxrom_file_fetch
@echo === Fetch msxrom file
$(if $(wildcard $(dir $(MB_MSXROM_CACHE)/$(subst $(MB_MSXROM_API)/,,$(1)))),,$(call mb_mkdir,$(dir $(MB_MSXROM_CACHE)/$(subst $(MB_MSXROM_API)/,,$(1)))))
$(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
$(if $(wildcard $(MB_MSXROM_CACHE)/$(2)),,$(call _mb_msxrom_file_fetch,$(MB_MSXROM_API)/$(2)))
$(if $(wildcard $(1)/$(notdir $(2))),,$(call mb_copy,$(MB_MSXROM_CACHE)/$(2),$(1)/$(notdir $(2))))
endef
MB_DOC_FIRE_FUNCTION_DEEP += $(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
$(if $(wildcard $(1)-omsx),,$(call mb_mkdir,$(1)-omsx))
$(if $(wildcard $(1)-omsx/share),,$(call mb_mkdir,$(1)-omsx/share))
$(if $(wildcard $(1)-omsx/share/systemroms),,$(call mb_mkdir,$(1)-omsx/share/systemroms))
$(if $(wildcard $(1)-omsx/share/systemroms/machines),,$(call mb_mkdir,$(1)-omsx/share/systemroms/machines))
$(if $(wildcard $(1)-omsx/share/systemroms/extensions),,$(call mb_mkdir,$(1)-omsx/share/systemroms/extensions))
endef
MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_msxrom_setup,"Creates needed systemrom folders.","<dir>")
2024-06-27 23:51:59 +00:00
define mb_msxrom_extension_ide
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/extensions,extensions/ide240.dat)
endef
MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_msxrom_extension_ide,"Installs sunrise IDE classic rom.","<dir>")
2024-06-27 23:51:59 +00:00
define mb_msxrom_extension_ide_nextor
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/extensions,extensions/Nextor-2.1.1.SunriseIDE.ROM)
endef
MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_msxrom_extension_ide_nextor,"Installs sunrise IDE nextor rom.","<dir>")
2024-06-27 23:51:59 +00:00
define mb_msxrom_extension_scsi_novaxis
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/extensions,extensions/novaxis.rom)
endef
MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_msxrom_extension_scsi_novaxis,"Installs Gouda SCSI novaxis rom.","<dir>")
2024-06-27 23:51:59 +00:00
2024-06-27 23:51:59 +00:00
define mb_msxrom_extension_msxdos22
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/extensions,extensions/msxdos22.rom)
endef
MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_msxrom_extension_msxdos22,"Installs msxdos 2.20 rom.","<dir>")
2024-06-27 23:51:59 +00:00
define mb_msxrom_extension_rs232
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/extensions,extensions/rs232.rom)
endef
MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_msxrom_extension_rs232,"Installs rs232 rom.","<dir>")
define mb_msxrom_extension_fmpac
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/extensions,extensions/fmpac.rom)
endef
MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_msxrom_extension_fmpac,"Installs fmpac rom.","<dir>")
2024-06-27 23:51:59 +00:00
define mb_msxrom_extension_fmpac_en
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/extensions,extensions/fmpac_en.rom)
endef
MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_msxrom_extension_fmpac_en,"Installs fmpac english rom.","<dir>")
2024-06-27 23:51:59 +00:00
define mb_msxrom_extension_moonsound
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/extensions,extensions/yrw801.rom)
endef
MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_msxrom_extension_moonsound,"Installs moonsound rom.","<dir>")
define mb_msxrom_extension_basickun
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/extensions,machines/sanyo/phc-70fd2_basickun.rom)
endef
MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_msxrom_extension_basickun,"Installs basickun compiler rom.","<dir>")
define mb_msxrom_machine_Canon_V-20
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/canon/v-20_basic-bios1.rom)
endef
MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_msxrom_machine_Canon_V-20,"Installs machine roms.","<dir>")
2024-06-27 23:51:59 +00:00
define mb_msxrom_machine_Mitsubishi_ML-F80
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/mitsubishi/ml-f80_basic-bios1.rom)
endef
MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_msxrom_machine_Mitsubishi_ML-F80,"Installs machine roms.","<dir>")
2024-06-27 23:51:59 +00:00
2024-06-27 23:51:59 +00:00
define mb_msxrom_machine_Mitsubishi_ML-FX1
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/mitsubishi/ml-fx1_basic-bios1.rom)
endef
MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_msxrom_machine_Mitsubishi_ML-FX1,"Installs machine roms.","<dir>")
2024-06-27 23:51:59 +00:00
2024-06-27 23:51:59 +00:00
define mb_msxrom_machine_Mitsubishi_ML-G3_ES
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/mitsubishi/ml-g3_es_basic-bios2.rom)
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/mitsubishi/ml-g3_es_disk.rom)
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/mitsubishi/ml-g3_es_msx2sub.rom)
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/mitsubishi/ml-g3_es_rs232.rom)
endef
MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_msxrom_machine_Mitsubishi_ML-G3_ES,"Installs machine roms.","<dir>")
2024-06-27 23:51:59 +00:00
2024-06-27 23:51:59 +00:00
define mb_msxrom_machine_Philips_VG_8000
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/philips/vg8000_basic-bios1.rom)
endef
MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_msxrom_machine_Philips_VG_8000,"Installs machine roms.","<dir>")
2024-06-27 23:51:59 +00:00
2024-06-27 23:51:59 +00:00
define mb_msxrom_machine_Philips_VG_8230
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/philips/vg8230_basic-bios2.rom)
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/philips/vg8230_disk.rom)
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/philips/vg8230_msx2sub.rom)
endef
MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_msxrom_machine_Philips_VG_8230,"Installs machine roms.","<dir>")
2024-06-27 23:51:59 +00:00
define mb_msxrom_machine_Philips_NMS_8250
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/philips/nms8250_basic-bios2.rom)
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/philips/nms8250_msx2sub.rom)
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/philips/nms8250_disk.rom)
endef
MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_msxrom_machine_Philips_NMS_8250,"Installs machine roms.","<dir>")
2024-06-30 10:50:51 +00:00
define mb_msxrom_machine_Toshiba_HX-21
2024-06-27 23:51:59 +00:00
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/toshiba/HX21-IC2.BIN)
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/toshiba/HX21-IC3.BIN)
endef
MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_msxrom_machine_Toshiba_HX-21,"Installs machine roms.","<dir>")
2024-06-27 23:51:59 +00:00
2024-06-27 23:51:59 +00:00
define mb_msxrom_machine_Yamaha_AX200
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/yamaha/ax200_basic-bios1.rom)
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/yamaha/ax200_arabic.rom)
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/yamaha/ax200_music.rom)
endef
MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_msxrom_machine_Yamaha_AX200,"Installs machine roms.","<dir>")
2024-06-27 23:51:59 +00:00
2024-06-27 23:51:59 +00:00
define mb_msxrom_machine_Yamaha_YIS-503IIIR
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/yamaha/yis503iii_basic-bios2.rom)
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/yamaha/yis503iii_msx2sub.rom)
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/yamaha/yis503iii_cpm.rom)
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/yamaha/yis503iii_net_2.rom)
endef
MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_msxrom_machine_Yamaha_YIS-503IIIR,"Installs machine roms.","<dir>")
2024-06-27 23:51:59 +00:00
2024-06-28 00:12:44 +00:00
define mb_msxrom_machine_Panasonic_FS-A1WSX
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/panasonic/fs-a1wsx_basic-bios2p.rom)
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/panasonic/fs-a1wsx_disk.rom)
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/panasonic/fs-a1wsx_firmware.rom)
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/panasonic/fs-a1wsx_fmbasic.rom)
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/panasonic/fs-a1wsx_kanjibasic.rom)
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/panasonic/fs-a1wsx_kanjifont.rom)
$(call mb_msxrom_file,$(1)-omsx/share/systemroms/machines,machines/panasonic/fs-a1wsx_msx2psub.rom)
endef
MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_msxrom_machine_Panasonic_FS-A1WSX,"Installs machine roms.","<dir>")
2024-06-28 00:12:44 +00:00
define mb_msxrom_machine_Boosted_MSX2_EN
$(call mb_msxrom_machine_Philips_NMS_8250,$(1))
$(call mb_msxrom_extension_fmpac,$(1))
$(call mb_msxrom_extension_moonsound,$(1))
$(call mb_msxrom_extension_basickun,$(1))
endef
MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_msxrom_machine_Boosted_MSX2_EN,"Installs machine and extensions roms.","<dir>")
2024-06-28 00:12:44 +00:00
2024-06-28 00:12:44 +00:00
define mb_msxrom_machine_Boosted_MSX2+_JP
$(call mb_msxrom_machine_Panasonic_FS-A1WSX,$(1))
$(call mb_msxrom_extension_moonsound,$(1))
$(call mb_msxrom_extension_basickun,$(1))
endef
MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_msxrom_machine_Boosted_MSX2+_JP,"Installs machine and extensions roms.","<dir>")