Skip to content

Instantly share code, notes, and snippets.

@GOROman
Last active December 10, 2022 06:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GOROman/9e658367fa2e149a2ba807eec3e95536 to your computer and use it in GitHub Desktop.
Save GOROman/9e658367fa2e149a2ba807eec3e95536 to your computer and use it in GitHub Desktop.
すーぱー手抜き X68000 .DIM format to .XDF
#!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