File:  [Generator SEGA Genesis emulator] / generator / extra / bdftoraw
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed Mar 4 04:46:43 2020 UTC (6 years, 4 months ago) by root
Branches: MAIN, JamesPonder
CVS tags: v0_32, HEAD
0.32

#!/usr/bin/perl -w

use Fcntl;

if ($#ARGV != 0) {
    die("Syntax: $0 <output>\n");
}
$infile = $ARGV[0];

sysopen(FILE, $infile, O_CREAT | O_WRONLY)
    or die "failed to open $infile: $!\n";

while(<STDIN>) {
    chomp;
    # quick hack
    if (/^([0-9a-fA-F]+)$/) {
	$bits = $1;
	while($bits) {
	    $data = hex(substr($bits, 0, 2));
	    $bits = substr($bits, 2);
	}
	print FILE pack('C', $data);
    }
}

close(FILE) or die "failed to close $infile: $!\n";

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.