Last active
December 10, 2022 06:10
-
-
Save GOROman/9e658367fa2e149a2ba807eec3e95536 to your computer and use it in GitHub Desktop.
すーぱー手抜き X68000 .DIM format to .XDF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!ruby | |
def usage | |
puts "dim2xdf.rb [.DIM files...]" | |
exit 0 | |
end | |
def dim2xdf(filename) | |
File.open( filename, "rb" ) do |f| | |
f.read 0x100 | |
File.open( filename.gsub(/\.dim/i,".xdf"), "wb" ).write f.read | |
end | |
end | |
usage if ARGV.size == 0 | |
ARGV.each do |n| | |
dim2xdf(n) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment