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 and not a mirror
The MAME tree is not pushed as a repository. Its remote rejects shallow
updates (receive.shallowUpdate is off), and this is a --depth 1 clone
pinned at a tag, so no push from it is accepted:
! [remote rejected] vt1200-local -> vt1200-local (shallow update not allowed)
Making it pushable means git fetch --unshallow, which downloads MAME's full
history — several GB and tens of minutes — to transmit a 50-line difference.
This patch carries the same information in 155 lines and is reviewable in a diff.
If a real fork is wanted anyway, unshallow first:
git -C /home/arti/code/k-space/mame0289 fetch --unshallow upstream
git -C /home/arti/code/k-space/mame0289 push -u origin vt1200-local