高速エミュレータでのロード用テキストファイル生成ツールを追加。

git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_firmware@246 b871894f-2f95-9b40-918c-086798483c85
This commit is contained in:
(no author) 2009-02-02 11:10:19 +00:00
parent a447e861fb
commit a458e5996d
2 changed files with 29 additions and 0 deletions

View File

@ -98,6 +98,10 @@ $(BINDIR)/$(TARGET_BIN_BASENAME).dasm: $(BINDIR)/$(TARGET_BIN_BASENAME).axf
$(BINDIR)/$(TARGET_BIN_BASENAME).exo: $(BINDIR)/$(TARGET_BIN_BASENAME).sbin
objcopy -I binary -O srec $< $@
# .ptxt
$(BINDIR)/$(TARGET_BIN_BASENAME).ptxt: $(BINDIR)/$(TARGET_BIN_BASENAME).sbin
$(BROM_TOOLSDIR)/bin/bin2palladium.pl $< > $(BINDIR)/$(TARGET_BIN_BASENAME).ptxt
#----------------------------------------------------------------------------
BROM_MODULERULES_ = TRUE
endif # BROM_MODULERULES_

View File

@ -0,0 +1,25 @@
#!/usr/bin/perl
use POSIX stdio_h;
die "Error: Need input file.\n" unless @ARGV;
for $ARGV ( @ARGV ){
@c;
open (IN, $ARGV) || die "$ARGV : $!";
binmode(IN);
while ( read(IN, $_, 1) ){
$c[0] = uc( unpack("H2", $_) );
for ($i=1; $i<8; $i++){
unless ( read(IN, $_, 1) ){
$_ = 0;
}
$c[$i] = uc( unpack("H2", $_) );
}
print STDOUT $c[3],$c[2],$c[1],$c[0],$c[7],$c[6],$c[5],$c[4], "\n";
}
close(IN);
}