ree-1.3/0040755000000000000000000000000007423601012010625 5ustar rootrootree-1.3/makefile0100644000000000000000000000006307423600766012340 0ustar rootrootall: gcc ree.c -o ree gcc fontdump.c -o fontdump ree-1.3/readme0100644000000000000000000000253507423600714012017 0ustar rootroot rom extension extractor with fontdump (to extract the fonts from your video bios roms) (yes yes it's gpl, find your copy of the license somewhere on www.gnu.org) you might ask yourself why i collect x86 rom extensions.. well i got the answer from #sparc on opn 00:19 Ah, I understand now. It's like collecting butterflies. make sure you can read /dev/mem (be root) chmod +x ree ./ree or use the c version (much faster, and does checksum on the rom extension) make #or gcc ree -o ree.bin ./ree.bin will scan your system memory, address c0000 - f0000 in 512 steps for identification of rom extensions (55,aa), if found it will calculate its size (byte after id, multiplied by 512) and save that to a .rom file. ported to shell from the pascal version of 1997 original (dos/win9x) version is ree.exe and ree.pas in ree.zip see http://www.firmware.com/support/bios/romext.htm for more info extracts system, scsi, video bios note as most system bios are bigger than 64k nowadays (128k or 256k) and them are only 64k memory window reserved, they are not dumped completely, if anyone knows how to dump the completely, please contact me also if you happen to know how to dump the openbootprom from sparc machines, contact me as well maybe you want to do your own rom extension? http://www.firmware.com/oem/rom_card.htm gurkan@linuks.mine.nu, www.linuks.mine.nu ree-1.3/ree.c0100644000000000000000000000355307417361727011572 0ustar rootroot /* gcc ree.c -o ree.bin rom extension extractor (ported to shell from the pascal version of 1997) (and now it is .c, and like 69 times faster or so) see http://www.firmware.com/support/bios/romext.htm for more info extracts system, scsi, video bios gurkan@linuks.mine.nu, www.linuks.mine.nu a checksum of 0 is ok! any other number indicates it is either not a rom extension or the rom is defective scan from c0000 - f0000 in 512 byte blocks U{l}{code} l*512=length of the code including headers */ #include char* ID_ROMEXT="U"; /* 0x55aa */ FILE* f; unsigned char buffer[256*1024]; char filename[32]; void dd(long skip, long count) { fseek(f,skip,SEEK_SET); fread(buffer,count,1,f); } void save(char* filename,long size) { FILE* out; out=fopen(filename,"w"); fwrite(buffer,size,1,out); fclose(out); } unsigned char checksum(long size) { unsigned sum=0; int c; for (c=0; c/dev/null |head -c2` case "$@" in -nbc|--i-dont-have-no-bc) location=$[a*512] ;; *) location=`echo "obase=16; $a*512"|bc` ;; esac echo -ne "Please wait, scanning... $location" if [ "$b" = "U" ]; then size=`dd if=/dev/mem skip=$a count=1 2>/dev/null |tail -c+3` s=`echo $size |perl -e 'print ord(<>);'` case "$@" in -nbc|--i-dont-have-no-bc) file=$[a*512] size=$[s*512] ;; *) file=`echo "obase=16; $a*512"|bc` size=`echo $s*512 |bc` ;; esac echo -e "\nFound something at $file ($size)" dd if=/dev/mem of=${file}.rom skip=$a count=$s 2>/dev/null strings ${file}.rom |awk '{if (length($0)>40)print $0}' |grep "[A-Z]" fi done #save bios rom case "$@" in -nbc|--i-dont-have-no-bc) start=1920 count=128 ;; *) start=`echo "ibase=16;F0000/200"|bc` count=`echo 1*65536/512|bc` ;; esac echo -e "\nFound system bios at F0000 (65536)" dd if=/dev/mem of=F0000.rom skip=$start count=$count 2>/dev/null ree-1.3/ree_bsdpatch.diff0100644000175000017500000000525607414653550013565 0ustar tartar 1. #!/bin/bash -> #! /bin/sh the bash shell is not found on all unixes; on my OpenBSD box it's in /usr/local/bin/bash. /bin/sh is found everywhere and is the de-facto standard it works just as well with this script as GNU bash. The space after #! makes the script also work on some very old BSD systems. #i updated this one 2. GNU head (from textutils) has additional features that are not defined in POSIX, so most ordinary unix head utilities don't understand the -c option. seq (from GNU sh-utils) is mostly found on Linux. i've included installation instructions for the open-source BSD's. 3. md5sum is known on BSD as md5 #this is not used anymore unfortunately, there is no easy way to test for the existence of the different programs. I tried head_prog=`whereis ghead || whereis head` # ghead = GNU head but whereis isn't standardized either. which also doesn't work, since it includes errors (foo: Command not found) in stdout, and i was too lazy to find a work-around. the way configure scripts search for programs is excessive and would make this script much longer. So people will have to set the {head,seq,md4}_prog variables by hand if something doesn't work :( -- chris / memeater / xwrits / memwrits --- ree.orig Sun Dec 30 07:44:25 2001 +++ ree Sun Dec 30 07:49:22 2001 @@ -1,9 +1,24 @@ -#!/bin/bash +#! /bin/sh #rom extension extractor (ported to shell from the pascal version of 1997) #extracts system, scsi, video bios #gurkan@linuks.mine.nu, www.linuks.mine.nu +# You need the GNU sh-utils and textutils for this to work. +# They come with most (all?) Linux distros; BSD users will have to install +# from the ports/pkgsrc system. +# +# FreeBSD, OpenBSD: /usr/ports/misc/sh-utils , /usr/ports/textproc/textutils +# NetBSD: /usr/pkgsrc/sysutils/sh-utils , /usr/pkgsrc/textproc/textutils +# +# Also, you may need to run this script as root, depending on /dev/mem's +# file permissions. + +# choose the utilities which work best for you +md5_prog=md5sum # or: md5 (BSD) +seq_prog=seq # or: gseq (BSD, others) +head_prog=head # or: ghead (BSD, others) + #scan from c0000 - f0000 in 512 byte blocks #U4{l}{code} #l*512=length of the code including headers @@ -12,9 +27,9 @@ start=`echo $start/512|bc` last=`echo "ibase=16;F0000"|bc` last=`echo $last/512|bc` -for a in `seq $start 1 $last`; do - b=`dd if=/dev/mem skip=$a count=1 2>/dev/null |head -c2` - md5=`echo $b |md5sum` +for a in `$seq_prog $start 1 $last`; do + b=`dd if=/dev/mem skip=$a count=1 2>/dev/null |$head_prog -c2` + md5=`echo $b |$md5_prog` if [ "$md5" = "7c77a5106b9621d1e49f8f9542d7ef80" ]; then file=`echo "obase=16; $a*512"|bc |tr [A-Z] [a-z]` size=`dd if=/dev/mem skip=$a count=1 2>/dev/null |tail -c+3` ree-1.3/ree_dos_win9x.zip0100644000000000000000000002013307414611054014132 0ustar rootrootPK:%mK0"ree.exeUT / 6#3՘z՛mWmQ!b$5)!f̪dgM(X ց_߁?C|n< E`+7]  `<A:?gvA-8; 0BX0 `-X$P |hEB 1!`4X ^ր_7[`NsTq)2?e~NmZtx5KĘJTj> :ut-.apzeSznsdpb,g'M9sZ+MxWO"W\bѳj;+ <be"T8RP"͏aGيmCx[B]r[O5'5{?_6٫Kv%~Ydg2m˞3B,0jUSp_08_ϴҟ`v(^hwi {2t̜Yj@~fݙ,LMcycaڂ:^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ree.pasUTJ. #define CHARA 65 char* ID_FONT8="\0\0\0\0\0\0\0\0"; char* ID_FONT14="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; char* ID_FONT16="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; FILE* f; unsigned char buffer[256*1024]; char filename[32]; long filesize(FILE* stream) { long ret; long savedpos=ftell(stream); fseek(stream,0L,SEEK_END); ret = ftell(stream); fseek(stream,savedpos,SEEK_SET); return ret; } long dd(long skip, long count) { fseek(f,skip,SEEK_SET); return (fread(buffer,count,1,f)); } void save(char* filename, long size, long offset) { FILE* out; out=fopen(filename,"w"); fwrite(buffer+offset,size,1,out); fclose(out); } void show(long offset, int character, int fontsize) { int x,y; int bittab[8]={1,2,4,8,16,32,64,128}; for(x=0; x