Skip to content

Commit 5c7b36d

Browse files
committed
Merge upstream Fuse master (fuse-1.7.0 + 70 commits) into FuseX
Atomic merge of upstream Fuse at 07d6bba (= fuse-1.7.0 + 70 commits) into the FuseX fork as a single commit. Verified to build cleanly from a fresh checkout via the BUILDING.md procedure. Tree contents = auto-merge result + conflict resolutions + atomic-commit fix-ups for the merged tree to be a working state. == Conflict resolutions (six text conflicts, resolved 3-way) == memory_pages.c, peripherals/spectranet.{c,h} Both sides added independent paged-memory regions to the Spectranet handler -- fork added xfs and spectranext_config; upstream added flash_rom. All three preserved. spectranet.c additionally has a region inside `#ifdef BUILD_SPECTRANET` where upstream added stubs for spectranet_flash_rom_read / spectranet_flash_rom_write inside the `#else` branch (= when BUILD_SPECTRANET is OFF). Fork removed that entire `#else` stub branch in fork master, so upstream's stub additions are dead code in the fork's structure. Took HEAD's `spectranet_config_get_total_size` only; discarded upstream's stub additions to the removed branch. settings.dat start_scaler_mode: fork added an empty 'string-option processing function' column, upstream changed the default value from "normal" to "2x". Both kept (= "2x" with the empty extra column). settings.pl Fork removed the libxml2/ini config-file readers and the CONFIG_FILE_NAME defines (Cocoa builds use NSUserDefaults). Upstream added FALLBACK_CONFIG_FILE_NAME inside that same removed block -- irrelevant in the fork's structure. Fork side kept. ui/sdl/sdlui.c Copyright year conflict only; took upstream's wider range (2000-2021). == Atomic-commit fix-ups (changes the merge tree requires to be buildable) == Background: bumping `3rdparty/libspectrum` is not a backward-compatible operation here -- new libspectrum (1) renames `libspectrum_creator_*` signatures, (2) adds new symbols upstream Fuse 07d6bba uses (`libspectrum_snap_uspeech_*`, `LIBSPECTRUM_ID_SNAPSHOT_DSNAP`), and (3) splits wav.c into a frontend + backend pair (wav_audiofile.c or wav_macos.c). A standalone bump commit on fork master therefore would not build, so the bump must live inside this merge commit, paired with all the changes the new libspectrum requires. 3rdparty/libspectrum: 8ba1310 -> e4a2d6e1 The speccytools/libspectrum master tip, itself a real 2-parent merge of fork-side and upstream-side libspectrum (audit recorded in specs/008-validate-pr35-fuse-1.7.0-merge.md). 3rdparty/FuseGenerator and 3rdparty/FuseImporter: bumped to local branches Each subproject commits its own copy of `libspectrum.h` (an artifact of the fork's earlier choice to switch these from libspectrum-as-subtree to libspectrum-as-submodule without keeping the header auto-regenerated). The committed headers had to be regenerated against the bumped libspectrum, and each subproject also needed Xcode wiring for new libspectrum source files (dsnap.c, wav_macos.c) plus AudioToolbox.framework linkage for the wav backend. Each subproject's branch is `merge/fuse-1.7.0` (LOCAL -- not pushed). See subproject commits for details. FuseImporter additionally has a fix to `generate.pl` (missing `#define WIN32_DLL`) latent until libspectrum.h.in started using LIBSPECTRUM_DEFINE_TYPES marker. fusepb/libspectrum.h Regenerated from the bumped 3rdparty/libspectrum/libspectrum.h.in via the Xcode build phase script. Adds the new symbols and updates libspectrum_creator_* signatures. Committed in-tree to keep the merge tree self-consistent. fusepb/FuseX.xcodeproj/project.pbxproj Three categories of changes: 1. Sound peripherals upstream moved from peripherals/ into peripherals/sound/ (5 files: ay, covox, fuller, melodik, specdrum) get 'sound/' path prefixes. 2. New sound peripherals upstream added (sp0256, uspeech): four file references and two build entries. 3. New libspectrum source files (dsnap.c, wav_macos.c, wav_internals.h) referenced and compiled into FuseX, plus AudioToolbox.framework linkage for the wav_macos backend (matches upstream macOS CI's `--without-libaudiofile` choice). == Build verification == Builds cleanly from a fresh checkout per BUILDING.md: git submodule foreach git reset --hard HEAD git submodule foreach git clean -fdx make clean && make clean-3rdparty make cd fusepb && make cd .. && make fusex XCODEBUILD_SIGN_ARGS='DEVELOPMENT_TEAM="" CODE_SIGN_STYLE=Manual CODE_SIGN_IDENTITY="-"' # then the codesign sequence per BUILDING.md Produces fusepb/build/Deployment/FuseX.app. For comparison: fork master also builds; PR speccytools#35 (which omits the FuseGenerator/ FuseImporter and fusepb pbxproj/AudioToolbox fix-ups) does not build. Upstream Fuse 07d6bba builds cleanly against upstream libspectrum master via its own autotools build (verified separately). == Plan and findings == specs/008-validate-pr35-fuse-1.7.0-merge.md reference plan scratch/PR-35-REVIEW.md full findings
2 parents 021fa0a + 07d6bba commit 5c7b36d

314 files changed

Lines changed: 11553 additions & 2116 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.beads/issues.jsonl

Lines changed: 39 additions & 0 deletions
Large diffs are not rendered by default.

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/settings.dat text
2+
/menu_data.dat text
3+
/keysyms.dat text
4+
/ui/options.dat text
5+
/z80/*.dat text

.github/scripts/in_config.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
echo -n "Verify configure line '$1' .. "
3+
lines1=(`cat "./configure.out" | grep -c "$1"`)
4+
if [[ "$lines1" -lt "1" ]]; then
5+
echo "NOT FOUND"
6+
exit 1
7+
fi
8+
echo "OK"
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
name: Libspectrum for Linux
2+
run-name: Build and test Libspectrum for Linux / ${{ github.actor }} /
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
key:
8+
type: string
9+
required: true
10+
libspectrum_ref:
11+
type: string
12+
required: false
13+
default: master
14+
use_zlib:
15+
type: boolean
16+
required: false
17+
default: true
18+
use_bzip2:
19+
type: boolean
20+
required: false
21+
default: true
22+
use_libgcrypt:
23+
type: boolean
24+
required: false
25+
default: true
26+
use_libaudiofile:
27+
type: boolean
28+
required: false
29+
default: true
30+
use_fake_glib:
31+
type: boolean
32+
required: false
33+
default: false
34+
35+
jobs:
36+
build:
37+
name: Build & Test
38+
runs-on: ubuntu-latest
39+
timeout-minutes: 15
40+
defaults:
41+
run:
42+
shell: bash
43+
env:
44+
LIBSPECTRUM_DIR: libspectrum
45+
LIBSPECTRUM_GIT_URL: https://git.code.sf.net/p/fuse-emulator/libspectrum
46+
47+
steps:
48+
- name: (1) Prepare environment
49+
run: |
50+
echo -n "Current directory: "
51+
pwd
52+
ls -la
53+
54+
echo "Libspectrum URL: $LIBSPECTRUM_GIT_URL"
55+
echo "Libspectrum ref: ${{ inputs.libspectrum_ref }}"
56+
57+
echo "Use lib zlib: ${{ inputs.use_zlib && 'yes' || 'no' }}"
58+
echo "Use lib bzip2: ${{ inputs.use_bzip2 && 'yes' || 'no' }}"
59+
echo "Use lib libgcrypt: ${{ inputs.use_libgcrypt && 'yes' || 'no' }}"
60+
echo "Use lib libaudiofile: ${{ inputs.use_libaudiofile && 'yes' || 'no' }}"
61+
echo "Use fake glib: ${{ inputs.use_fake_glib && 'yes' || 'no' }}"
62+
63+
- name: (2) Clone libspectrum source
64+
run: |
65+
git init "$LIBSPECTRUM_DIR"
66+
git -C "$LIBSPECTRUM_DIR" remote add origin "$LIBSPECTRUM_GIT_URL"
67+
git -C "$LIBSPECTRUM_DIR" fetch --depth 1 origin "${{ inputs.libspectrum_ref }}"
68+
git -C "$LIBSPECTRUM_DIR" checkout FETCH_HEAD
69+
70+
- name: (3) Install dependencies
71+
run: |
72+
sudo apt-get update
73+
sudo apt-get -y install --no-install-recommends \
74+
libaudiofile-dev \
75+
libbz2-dev \
76+
libgcrypt-dev \
77+
libglib2.0-dev
78+
79+
- name: (4) Autogen.sh
80+
working-directory: ${{ env.LIBSPECTRUM_DIR }}
81+
run: |
82+
echo "Running autogen.sh .."
83+
./autogen.sh
84+
85+
- name: (5) Configure for Linux
86+
working-directory: ${{ env.LIBSPECTRUM_DIR }}
87+
run: |
88+
echo "Running configure .."
89+
./configure \
90+
${{ inputs.use_zlib == false && '--without-zlib' || '' }} \
91+
${{ inputs.use_bzip2 == false && '--without-bzip2' || '' }} \
92+
${{ inputs.use_libgcrypt == false && '--without-libgcrypt' || '' }} \
93+
${{ inputs.use_libaudiofile == false && '--without-libaudiofile' || '' }} \
94+
${{ inputs.use_fake_glib == true && '--with-fake-glib' || '' }} \
95+
| tee ./configure.out
96+
97+
- name: (6) Verify output from configure
98+
working-directory: ${{ env.LIBSPECTRUM_DIR }}
99+
run: |
100+
.github/scripts/in_config.sh "libspectrum is ready to be compiled"
101+
.github/scripts/in_config.sh "zlib support: ${{ inputs.use_zlib && 'yes' || 'no' }}"
102+
.github/scripts/in_config.sh "bzip2 support: ${{ inputs.use_bzip2 && 'yes' || 'no' }}"
103+
.github/scripts/in_config.sh "libgcrypt support: ${{ inputs.use_libgcrypt && 'yes' || 'no' }}"
104+
.github/scripts/in_config.sh "libaudiofile support: ${{ inputs.use_libaudiofile && 'yes' || 'no' }}"
105+
.github/scripts/in_config.sh "Internal GLib replacement: ${{ inputs.use_fake_glib && 'yes' || 'no' }}"
106+
107+
- name: (7) Make
108+
working-directory: ${{ env.LIBSPECTRUM_DIR }}
109+
run: |
110+
echo "Running make .."
111+
make
112+
113+
- name: (8) Install
114+
working-directory: ${{ env.LIBSPECTRUM_DIR }}
115+
run: |
116+
echo "Running make install .."
117+
sudo make install
118+
119+
- name: (9) Run tests
120+
id: run-tests
121+
working-directory: ${{ env.LIBSPECTRUM_DIR }}
122+
run: |
123+
echo "Building and running tests .."
124+
make check
125+
126+
- name: (10) Verbose check tests (on failure)
127+
if: failure() && steps.run-tests.outcome != 'success'
128+
working-directory: ${{ env.LIBSPECTRUM_DIR }}
129+
run: |
130+
echo "Listing all tests individually .."
131+
test/test
132+
133+
- name: (11) Pack installed library files
134+
working-directory: ${{ env.LIBSPECTRUM_DIR }}
135+
run: |
136+
find /usr/local | grep libspectrum > .tar_files
137+
sudo tar -cvf \
138+
libspectrum-installed-linux.tar \
139+
-C /usr/local/ -T.tar_files
140+
141+
- name: (12) Upload generated tar file
142+
uses: actions/upload-artifact@v8
143+
with:
144+
name: libspectrum-installed-linux-${{ inputs.key }}
145+
path: |
146+
${{ env.LIBSPECTRUM_DIR }}/libspectrum-installed-linux.tar
147+
148+
- name: (13) Finish
149+
run: |
150+
echo "Finishing with status ${{ job.status }}."
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
name: Libspectrum for MacOS
2+
run-name: Build and test Libspectrum for MacOS / ${{ github.actor }} /
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
key:
8+
type: string
9+
required: true
10+
libspectrum_ref:
11+
type: string
12+
required: false
13+
default: master
14+
use_zlib:
15+
type: boolean
16+
required: false
17+
default: true
18+
use_bzip2:
19+
type: boolean
20+
required: false
21+
default: true
22+
use_libgcrypt:
23+
type: boolean
24+
required: false
25+
default: true
26+
use_fake_glib:
27+
type: boolean
28+
required: false
29+
default: false
30+
31+
jobs:
32+
build:
33+
name: Build & Test
34+
runs-on: macos-26
35+
timeout-minutes: 15
36+
defaults:
37+
run:
38+
shell: bash
39+
env:
40+
LIBSPECTRUM_DIR: libspectrum
41+
LIBSPECTRUM_GIT_URL: https://git.code.sf.net/p/fuse-emulator/libspectrum
42+
43+
steps:
44+
- name: (1) Prepare environment
45+
run: |
46+
echo -n "Current directory: "
47+
pwd
48+
ls -la
49+
50+
echo "Libspectrum URL: $LIBSPECTRUM_GIT_URL"
51+
echo "Libspectrum ref: ${{ inputs.libspectrum_ref }}"
52+
53+
echo "Use lib zlib: ${{ inputs.use_zlib && 'yes' || 'no' }}"
54+
echo "Use lib bzip2: ${{ inputs.use_bzip2 && 'yes' || 'no' }}"
55+
echo "Use lib libgcrypt: ${{ inputs.use_libgcrypt && 'yes' || 'no' }}"
56+
echo "Use lib libaudiofile: no"
57+
echo "Use fake glib: ${{ inputs.use_fake_glib && 'yes' || 'no' }}"
58+
59+
- name: (2) Clone libspectrum source
60+
run: |
61+
git init "$LIBSPECTRUM_DIR"
62+
git -C "$LIBSPECTRUM_DIR" remote add origin "$LIBSPECTRUM_GIT_URL"
63+
git -C "$LIBSPECTRUM_DIR" fetch --depth 1 origin "${{ inputs.libspectrum_ref }}"
64+
git -C "$LIBSPECTRUM_DIR" checkout FETCH_HEAD
65+
66+
- name: (3) Install dependencies
67+
run: |
68+
echo "Inspect if brew installed .."
69+
brew doctor || true
70+
71+
echo "Installing dependencies .."
72+
brew install \
73+
automake \
74+
bzip2 \
75+
libgcrypt \
76+
libtool \
77+
glib
78+
79+
echo "Configuring Homebrew search paths .."
80+
echo "CPPFLAGS=-I$(brew --prefix)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix libgcrypt)/include -I$(brew --prefix glib)/include" >> "$GITHUB_ENV"
81+
echo "LDFLAGS=-L$(brew --prefix)/lib -L$(brew --prefix bzip2)/lib -L$(brew --prefix libgcrypt)/lib -L$(brew --prefix glib)/lib" >> "$GITHUB_ENV"
82+
echo "PKG_CONFIG_PATH=$(brew --prefix)/lib/pkgconfig:$(brew --prefix bzip2)/lib/pkgconfig:$(brew --prefix libgcrypt)/lib/pkgconfig:$(brew --prefix glib)/lib/pkgconfig" >> "$GITHUB_ENV"
83+
84+
- name: (4) Autogen.sh
85+
working-directory: ${{ env.LIBSPECTRUM_DIR }}
86+
run: |
87+
echo "Running autogen.sh .."
88+
./autogen.sh
89+
90+
- name: (5) Configure for MacOS
91+
working-directory: ${{ env.LIBSPECTRUM_DIR }}
92+
run: |
93+
echo "Running configure .."
94+
./configure \
95+
${{ inputs.use_zlib == false && '--without-zlib' || '' }} \
96+
${{ inputs.use_bzip2 == false && '--without-bzip2' || '' }} \
97+
${{ inputs.use_libgcrypt == false && '--without-libgcrypt' || '' }} \
98+
--without-libaudiofile \
99+
${{ inputs.use_fake_glib == true && '--with-fake-glib' || '' }} \
100+
| tee ./configure.out
101+
102+
- name: (6) Verify output from configure
103+
working-directory: ${{ env.LIBSPECTRUM_DIR }}
104+
run: |
105+
.github/scripts/in_config.sh "libspectrum is ready to be compiled"
106+
.github/scripts/in_config.sh "zlib support: ${{ inputs.use_zlib && 'yes' || 'no' }}"
107+
.github/scripts/in_config.sh "bzip2 support: ${{ inputs.use_bzip2 && 'yes' || 'no' }}"
108+
.github/scripts/in_config.sh "libgcrypt support: ${{ inputs.use_libgcrypt && 'yes' || 'no' }}"
109+
.github/scripts/in_config.sh "libaudiofile support: no"
110+
.github/scripts/in_config.sh "Internal GLib replacement: ${{ inputs.use_fake_glib && 'yes' || 'no' }}"
111+
112+
- name: (7) Make
113+
working-directory: ${{ env.LIBSPECTRUM_DIR }}
114+
run: |
115+
echo "Running make .."
116+
make
117+
118+
- name: (8) Install
119+
working-directory: ${{ env.LIBSPECTRUM_DIR }}
120+
run: |
121+
echo "Running make install .."
122+
sudo make install
123+
124+
- name: (9) Run tests
125+
id: run-tests
126+
working-directory: ${{ env.LIBSPECTRUM_DIR }}
127+
run: |
128+
echo "Building and running tests .."
129+
make check
130+
131+
- name: (10) Verbose check tests (on failure)
132+
if: failure() && steps.run-tests.outcome != 'success'
133+
working-directory: ${{ env.LIBSPECTRUM_DIR }}
134+
run: |
135+
echo "Listing all tests individually .."
136+
test/test
137+
138+
- name: (11) Pack installed library files
139+
working-directory: ${{ env.LIBSPECTRUM_DIR }}
140+
run: |
141+
find /usr/local | grep libspectrum > .tar_files
142+
sudo tar -cvf \
143+
libspectrum-installed-macos.tar \
144+
-C /usr/local/ -T.tar_files
145+
146+
- name: (12) Upload generated tar file
147+
uses: actions/upload-artifact@v8
148+
with:
149+
name: libspectrum-installed-macos-${{ inputs.key }}
150+
path: |
151+
${{ env.LIBSPECTRUM_DIR }}/libspectrum-installed-macos.tar
152+
153+
- name: (13) Finish
154+
run: |
155+
echo "Finishing with status ${{ job.status }}."

0 commit comments

Comments
 (0)