mirror of https://github.com/n64decomp/007.git
build system for rewrite now compresses and injects 21990 where it belongs, also truncates excess data from end.
Former-commit-id: 3df7367eb6f310bac326ce67c5657f03fbdda7f8 [formerly 95d68e2662bf0a3267d2ca8b992712b55ea02261] [formerly eb138d8c0781e77698dd2ef29286784f509458db [formerly b05a8ab25095a6d62c077b3c241feb6ea2a23c65]] Former-commit-id: 8a2c911608a089174a583da865d08421a7837bf5 [formerly 04ebdfba66887ae65e9aae1d523d55430427de9a] Former-commit-id: e568640ea39ae1d6717ee9f7ac8dadd49f88aed4
This commit is contained in:
parent
e69314e7b4
commit
227e99bf39
|
@ -1 +1 @@
|
|||
3b31bfab114c15ed2152ed5e5f1f1b8329d946e0
|
||||
90130221f1b73c56e574fe8a0bed6eaae42a07dd
|
|
@ -1 +1 @@
|
|||
b12ee3776aa4cc7b3962e88a48028d1d54484bed
|
||||
57a5b3ba07177ebe70deafaa12acfa690884d8ed
|
|
@ -1 +1 @@
|
|||
1f481050dc19d4ea2308e0700120f621cdfdc1ee
|
||||
19605ed45f40a6da4566e91fe3c8e24e7c70021d
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
echo -n -e \\x11\\x72 > header.tmp
|
||||
cat $1| gzip --no-name --best | tail --bytes=+11 | head --bytes=-8 > $1.tmp
|
||||
cat header.tmp $1.tmp > $1.rz
|
||||
rm header.tmp $1.tmp
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
echo "patching $1"
|
||||
echo "extract data segment"
|
||||
echo "one byte at a time is slow, sorry"
|
||||
echo "if you changed size of data segment, change count here"
|
||||
dd skip=12582912 count=247120 if=$1 of=data_seg bs=1
|
||||
|
||||
echo "truncate $1 to 0xC00000"
|
||||
cat $1 | head --bytes=12582912 > $1.tmp
|
||||
|
||||
echo "compress data segment"
|
||||
tools/1172compress.sh data_seg
|
||||
|
||||
|
||||
echo "inject data segment"
|
||||
RZSIZE=$(stat -c%s "data_seg.rz")
|
||||
echo "size=$RZSIZE"
|
||||
|
||||
echo "one byte at a time is slow, sorry"
|
||||
dd if=data_seg.rz of=$1.tmp obs=1 seek=137616 conv=notrunc
|
||||
rm data_seg data_seg.rz
|
||||
mv $1.tmp $1
|
||||
FILESIZE=$(stat -c%s $1)
|
||||
echo "romsize=$FILESIZE"
|
Loading…
Reference in New Issue