Files

MAME local edits

mame-local-edits.patch is the complete set of changes this project makes to upstream MAME. It is 50 lines across four files, and it is the whole reason a MAME tree is needed at all:

file change
src/devices/cpu/tms34010/tms34010.cpp REG_REFCNT advances per cycle — required for the level-1 VIDEO MEMORY test
src/devices/machine/mc68681.cpp / .h the overrun error is latched on the start bit of the overrunning character, per the SCN2681 datasheet
src/mame/mame.lst adds the vt1200 driver entry

Each change carries an inline revert note at the site, and the rationale for each is in harness/mame/DUART_REPORT.md. One further proposed edit (TxRDY assertion timing) was refuted by the fitted part's datasheet and is not here.

Applying it

git clone --depth 1 --branch mame0289 \
    https://github.com/mamedev/mame.git /home/arti/code/k-space/mame0289
git -C /home/arti/code/k-space/mame0289 am \
    /home/arti/code/k-space/vt1200/patches/mame-local-edits.patch
harness/mame/build.sh          # symlinks the driver in and builds

git am preserves the commit message and author. If it does not apply cleanly because upstream moved, git apply -3 will fall back to a three-way merge.

Note the clone is at a tag, not a branch. --branch mame0289 where mame0289 is a tag leaves a detached HEAD, so commit before you check anything else out — otherwise edits are discarded.

Why a patch as well as a repo

The MAME tree is now pushed as a full repository — origin is git@git.k-space.ee:arti/mame0289.git, and our commit sits on branch vt1200-local there. Getting there needed git fetch --unshallow first (99,645 commits, .git 1.9 GB, ~3 minutes) because the server rejects shallow updates:

! [remote rejected] vt1200-local -> vt1200-local (shallow update not allowed)

receive.shallowUpdate is off on that server, and the clone was --depth 1 pinned at a tag, so no push from it was accepted until it was unshallowed. git config receive.shallowUpdate true on the server would avoid the unshallow for anyone repeating this.

This patch is kept anyway, for three reasons:

  • it is the complete change in 50 lines — reviewable in a diff, where a 1.9 GB repository is not;
  • it reproduces the tree without a full clone, which matters on a fresh machine or a slow link;
  • it is the record of what this project changes about upstream MAME, and every claim about those changes lives beside the driver rather than in a repository's history.

Note the branch name is vt1200-local, not master. If the forge's default branch is still master and therefore empty, set vt1200-local as the default so the repository opens on something.