Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ docs/superpowers/
build/
drivers/ahi/package/
drivers/ahi/package-v2/
drivers/mhi/build/
drivers/mhi/package/
dist/
release/
tmp/
Expand Down
25 changes: 21 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ TOOLS = host-run host-multiview host-shell host-path host-reveal host-notify ho
TEST_BINS = tests/test_host_common.out tests/test_host_command_builders.out tests/test_host_edit_command.out tests/test_host_download_command.out
TEST_SCRIPTS = tests/test_package_layout.sh tests/test_ahi_driver_source.sh
TESTS = $(TEST_BINS) $(TEST_SCRIPTS)
COMMON_HEADERS = src/host_common.h src/host_path.h src/host_capture.h src/host_base64.h src/host_clip_command.h src/host_download_command.h src/host_edit_command.h src/host_env_command.h src/host_info_command.h src/host_notify_command.h src/host_powershell.h src/host_reveal_command.h src/uae_pragmas.h
COMMON_HEADERS = src/host_common.h src/host_path.h src/host_capture.h src/host_base64.h src/host_clip_command.h src/host_download_command.h src/host_edit_command.h src/host_env_command.h src/host_info_command.h src/host_notify_command.h src/host_powershell.h src/host_reveal_command.h src/host_shell_command.h src/uae_pragmas.h
PACKAGE = Host-Tools-$(VERSION).lha
PACKAGE_ROOT = Host-Tools
PACKAGE_DIR ?= build/package
Expand All @@ -16,6 +16,8 @@ AHI_FILES = $(AHI_AUDIO) $(AHI_MODE)
AHI_V2_AUDIO = drivers/ahi/package-v2/Devs/AHI/uaesnd.audio
AHI_V2_MODE = drivers/ahi/package-v2/Devs/AudioModes/UAESND
AHI_V2_FILES = $(AHI_V2_AUDIO) $(AHI_V2_MODE)
MHI_LIBRARY = drivers/mhi/package/Libs/MHI/mhiuae.library
MHI_FILES = $(MHI_LIBRARY)
AHI_SOURCES = drivers/ahi/Makefile \
drivers/ahi/src/v1/uae.audio.asm \
drivers/ahi/src/v1/UAE.asm \
Expand All @@ -29,6 +31,11 @@ AHI_SOURCES = drivers/ahi/Makefile \
AHI_V2_SOURCES = drivers/ahi/Makefile \
drivers/ahi/src/v2/uaesnd.audio.asm \
drivers/ahi/src/v2/UAESND.asm
MHI_SOURCES = drivers/mhi/Makefile \
drivers/mhi/src/mhiuae.h \
drivers/mhi/src/mhiuae_startup.c \
drivers/mhi/src/mhiuae.c \
src/uae_pragmas.h
HELP_GUIDE = package/Help/Host-Tools.guide
DRAWER_ICON = package/icons/drawer.info
HELP_ICON = package/icons/Help.info
Expand All @@ -37,9 +44,9 @@ README_ICON = package/icons/readme.info
GUIDE_ICON = package/icons/guide.info

.SUFFIXES:
.PHONY: all test debug package package-dir ahi ahi-v2 clean
.PHONY: all test debug package package-dir ahi ahi-v2 mhi clean

all: $(TOOLS) $(AHI_FILES) $(AHI_V2_FILES)
all: $(TOOLS) $(AHI_FILES) $(AHI_V2_FILES) $(MHI_FILES)
test: $(TESTS)
@for test in $(TESTS); do \
case "$$test" in \
Expand Down Expand Up @@ -97,7 +104,7 @@ host-env: src/host-env.c $(COMMON_HEADERS)
tests/test_host_common.out: tests/test_host_common.c src/host_common.h
$(HOST_CC) $(HOST_NATIVE_FLAGS) $(HOST_CFLAGS) tests/test_host_common.c -o $@

tests/test_host_command_builders.out: tests/test_host_command_builders.c src/host_base64.h src/host_clip_command.h src/host_common.h src/host_env_command.h src/host_info_command.h src/host_notify_command.h src/host_powershell.h src/host_reveal_command.h
tests/test_host_command_builders.out: tests/test_host_command_builders.c src/host_base64.h src/host_clip_command.h src/host_common.h src/host_env_command.h src/host_info_command.h src/host_notify_command.h src/host_powershell.h src/host_reveal_command.h src/host_shell_command.h
$(HOST_CC) $(HOST_NATIVE_FLAGS) $(HOST_CFLAGS) tests/test_host_command_builders.c -o $@

tests/test_host_edit_command.out: tests/test_host_edit_command.c src/host_edit_command.h src/host_common.h
Expand All @@ -113,12 +120,17 @@ ahi: $(AHI_FILES)

ahi-v2: $(AHI_V2_FILES)

mhi: $(MHI_FILES)

$(AHI_FILES): $(AHI_SOURCES)
$(MAKE) -C drivers/ahi VERSION=$(VERSION) DATE=$(DATE)

$(AHI_V2_FILES): $(AHI_V2_SOURCES)
$(MAKE) -C drivers/ahi VERSION=$(VERSION) DATE=$(DATE) ahi-v2

$(MHI_FILES): $(MHI_SOURCES)
$(MAKE) -C drivers/mhi VERSION=$(VERSION) DATE=$(DATE)

package-dir: all package/Install $(HELP_GUIDE) $(DRAWER_ICON) $(HELP_ICON) $(INSTALL_ICON) $(README_ICON) $(GUIDE_ICON)
rm -rf $(PACKAGE_STAGE) $(PACKAGE_DIR)/$(PACKAGE_ROOT).info
mkdir -p $(PACKAGE_STAGE)/C
Expand All @@ -142,6 +154,10 @@ package-dir: all package/Install $(HELP_GUIDE) $(DRAWER_ICON) $(HELP_ICON) $(INS
cp $(AHI_V2_AUDIO) $(PACKAGE_STAGE)/Devs/AHI/uaesnd.audio; \
cp $(AHI_V2_MODE) $(PACKAGE_STAGE)/Devs/AudioModes/UAESND; \
fi
if [ -f $(MHI_LIBRARY) ]; then \
mkdir -p $(PACKAGE_STAGE)/Libs/MHI; \
cp $(MHI_LIBRARY) $(PACKAGE_STAGE)/Libs/MHI/mhiuae.library; \
fi

package: package-dir
rm -f $(PACKAGE)
Expand All @@ -150,3 +166,4 @@ package: package-dir
clean:
rm -f $(TOOLS) $(TEST_BINS)
$(MAKE) -C drivers/ahi clean
$(MAKE) -C drivers/mhi clean
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ host-multiview <filename|URL> [filename2|URL2 ...]
**Interactive Host Terminal.**
Opens a fully interactive terminal session on the host system, right inside your Amiga CLI.
- **Interactive**: Supports `vi`, `htop`, and other interactive TUI applications.
- **Shell Support**: Respects your host's default shell (Bash, Zsh, Fish, etc.).
- **Shell Support**: Starts your host user's login shell (Bash, Zsh, Fish, etc.) so profile files can set paths and environment variables.
- **Raw Mode**: Provides a true terminal experience.
- **Terminal Size**: The host terminal is sized to match the Amiga console window, so full-screen programs render correctly.

Expand Down Expand Up @@ -150,9 +150,9 @@ All tools follow AmigaDOS conventions: `0` on success, `10` (`RETURN_ERROR`) whe
2. Extract the `Host-Tools-<version>.lha` archive.
3. Open the `Host-Tools` drawer and run `Install`.

The installer shows a component checklist for the command tools, AmigaGuide documentation, and the UAE and UAESND AHI audio drivers. Before replacing an existing versioned file, it shows the installed and package versions and asks whether to replace or skip it. Files without version strings are still checked for existence and ask before overwrite. It does not edit startup files, system settings, AHI preferences, or existing driver configuration.
The installer shows a component checklist for the command tools, AmigaGuide documentation, the UAE and UAESND AHI audio drivers, and the UAE MHI MP3 decoder library. Before replacing an existing versioned file, it shows the installed and package versions and asks whether to replace or skip it. Files without version strings are still checked for existence and ask before overwrite. It does not edit startup files, system settings, AHI preferences, or existing driver configuration.

For manual installation, copy the binaries (`host-run`, `host-multiview`, `host-shell`, `host-path`, `host-reveal`, `host-notify`, `host-edit`, `host-clip`, `host-info`, `host-download`, `host-env`) from the package `C` drawer to `C:` or anywhere in your system path. To install the UAE AHI driver manually, copy `Devs/AHI/uae.audio` to `DEVS:AHI/` and `Devs/AudioModes/UAE` to `DEVS:AudioModes/`. To install the UAESND AHI driver manually, copy `Devs/AHI/uaesnd.audio` to `DEVS:AHI/` and `Devs/AudioModes/UAESND` to `DEVS:AudioModes/`. The UAESND driver plays each AHI channel through a hardware audio stream and requires the UAESND sound board to be enabled in the Amiberry configuration.
For manual installation, copy the binaries (`host-run`, `host-multiview`, `host-shell`, `host-path`, `host-reveal`, `host-notify`, `host-edit`, `host-clip`, `host-info`, `host-download`, `host-env`) from the package `C` drawer to `C:` or anywhere in your system path. To install the UAE AHI driver manually, copy `Devs/AHI/uae.audio` to `DEVS:AHI/` and `Devs/AudioModes/UAE` to `DEVS:AudioModes/`. To install the UAESND AHI driver manually, copy `Devs/AHI/uaesnd.audio` to `DEVS:AHI/` and `Devs/AudioModes/UAESND` to `DEVS:AudioModes/`. To install the UAE MHI MP3 decoder manually, copy `Libs/MHI/mhiuae.library` to `LIBS:MHI/`. The UAESND driver plays each AHI channel through a hardware audio stream and requires the UAESND sound board to be enabled in the Amiberry configuration. The MHI library is independent of the selected AHI output mode and forwards MP3 decoding to Amiberry through `uae.resource`.

## Examples

Expand Down Expand Up @@ -213,7 +213,7 @@ To build a release archive:
make package
```

The package target creates `Host-Tools-<version>.lha`, containing a structured `Host-Tools` drawer with the Installer script, command tools, README, AmigaGuide documentation, and the UAE and UAESND AHI driver files.
The package target creates `Host-Tools-<version>.lha`, containing a structured `Host-Tools` drawer with the Installer script, command tools, README, AmigaGuide documentation, the UAE and UAESND AHI driver files, and the UAE MHI MP3 decoder library.

Native package builds also require `lha`. The Docker build image contains this tool.

Expand Down
7 changes: 4 additions & 3 deletions drivers/ahi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
VERSION ?= 2.4
DATE ?= 2026-06-10

ifeq ($(origin VASMM68K),default)
VASMM68K = vasmm68k_mot
VASMM68K_FALLBACK := $(shell command -v vasmm68k_mot 2>/dev/null || { test -x /opt/m68k-amigaos/bin/vasmm68k_mot && printf /opt/m68k-amigaos/bin/vasmm68k_mot; } || printf vasmm68k_mot)
ifeq ($(origin VASMM68K),undefined)
VASMM68K := $(VASMM68K_FALLBACK)
endif
VASMM68K_CMD = $(if $(VASMM68K),$(VASMM68K),vasmm68k_mot)
VASMM68K_CMD = $(if $(strip $(VASMM68K)),$(VASMM68K),$(VASMM68K_FALLBACK))

BUILD_DIR = build
AHI_PACKAGE_DIR = package
Expand Down
Loading