#!/bin/sh

# Build a version of GA4 on drumdisk. Use buffer.
# Enable debug output in Pass 3

flx2a <"T1, L1 (26) 20.07.70.flx" | tac | sed '0,/_s/{//d;}' | tac | sed -e '/_i redefine/{ N; s/_s/e14=133,e27=1/g }' >BUILDga4diskdebug.asc
flx2a <"T2 (22) 13.01.69.flx" | tac | sed '0,/_s/{//d;}' | tac >>BUILDga4diskdebug.asc
flx2a <"T3 (18) 3.10.68.flx" | tac | sed '0,/_s/{//d;}' | tac >>BUILDga4diskdebug.asc
flx2a <"T4 (24) 14.04.70.flx" | tac | sed '0,/_s/{//d;}' | tac >>BUILDga4diskdebug.asc
flx2a <"T5 (25) 14.04.70.flx" | tac | sed '0,/_s/{//d;}' | tac >>BUILDga4diskdebug.asc
flx2a <"T6, L2 (20) 26.07.68.flx" | tac | sed '0,/_s/{//d;}' | tac >>BUILDga4diskdebug.asc
flx2a <"T7, L3 (23) 20.01.69.flx" | tac | sed '0,/_s/{//d;}' | tac >>BUILDga4diskdebug.asc
flx2a <"T8, L4 (19) 17.07.68.flx" >>BUILDga4diskdebug.asc
flx2a <"T9, L5, M1 () 12.08.67.flx" | tac | sed '0,/_s/{//d;}' | tac >>BUILDga4diskdebug.asc
flx2a <"P1 (1) 16.08.67.flx" | sed -e '/_itype: actual/{ N; s/_s/133/g }' \
	| sed -e '/_itype: d35/{ N; s/_s/d35=0/g }' \
	| sed -e '/_iif reserved/{ N; s/_s/d36=0/g }' \
	| sed -e '/_itype: final first track/{ N; s/_s/133/g }' \
	| sed -e '/_itype: _tname/{ N; s/_s/_tga4d;/g }' >>BUILDga4diskdebug.asc
sed 's/#061#...//g' BUILDga4diskdebug.asc |sed 's/#061.//g'|sed 's/_dd40=1/_dd40=0/g'|a2flx > BUILDga4diskdebug.flx
#rm -f BUILDga4diskdebug.asc

