mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-06-11 03:29:28 +00:00
git-svn-id: http://svn.code.sf.net/p/netboot65/code@29 93682198-c243-4bdb-bd91-e943c89aac3b
This commit is contained in:
parent
56621dd6c2
commit
ab145f1949
|
@ -1,5 +0,0 @@
|
|||
.export get_key
|
||||
|
||||
.code
|
||||
get_key:
|
||||
jmp $fd1b
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
OPTIONS_PER_PAGE = 7
|
||||
OPTIONS_PER_PAGE = 18
|
||||
.bss
|
||||
|
||||
number_of_options: .res 1
|
||||
|
|
32
server/bin/import_ags_games.rb
Normal file
32
server/bin/import_ags_games.rb
Normal file
|
@ -0,0 +1,32 @@
|
|||
#
|
||||
# Jonno Downes (jonno@jamtronix.com) - January, 2009
|
||||
#
|
||||
#
|
||||
|
||||
require 'scanf'
|
||||
ags_games_dir=ARGV[0]
|
||||
|
||||
if ags_games_dir.nil? or !(File.directory?(ags_games_dir)) then
|
||||
scriptname=File.basename(__FILE__)
|
||||
puts "usage: #{scriptname} <path to ags games directory>"
|
||||
exit
|
||||
end
|
||||
|
||||
output_dir=File.expand_path(File.dirname(__FILE__)+"/../boot")
|
||||
puts "importing games from #{ags_games_dir} to #{output_dir}"
|
||||
Dir.chdir(ags_games_dir) do
|
||||
Dir.glob("*#06*").each do |input_filename|
|
||||
if (input_filename=~/(.+)#06(\w\w\w\w)/) then
|
||||
base_filename=$1
|
||||
load_address=$2.scanf("%4x")[0]
|
||||
file_data=File.new(input_filename,"rb").read
|
||||
file_length=file_data.length
|
||||
# puts "#{input_filename} : #{base_filename},A$#{"%04X" % load_address},L$#{"%04X" % file_length}"
|
||||
header=[load_address,file_length].pack("vv")
|
||||
out_file=File.new("#{output_dir}/#{base_filename}.PG2","wb")
|
||||
out_file<<header
|
||||
out_file<<file_data
|
||||
out_file.close
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user