I am resuming work on Salmon Run, I had to calculate 255 possible random combinations for playfield state, I did it all inside a text file, separated into columns in which I first drew the binary patterns, and then calculated the PF1, PF2, PF3, and PF4 data accordingly....
A snippet of the graphic notepad file:
I have attached the code here:
I also developed a quick tool to output the necessary .byte statements using Ruby:
and it works just fine. :-)
Now, I am going to hammer out the asym kernel, will keep you guys posted :-)
A snippet of the graphic notepad file:
RIVER1 RIVER2 RIVER3 RIVER4 PF1 PF2 PF2 PF1 Normal Reversed Normal Reversed --------------------------------------------- 00 11000000 00000000 00000000 00000011 192 0 0 192 01 11110000 00000000 00000000 00001111 240 0 0 240 02 11111100 00000000 00000000 00111111 252 0 0 252 03 11111111 00000000 00000000 11111111 255 0 0 255 04 11111111 11000000 00000011 11111111 255 3 3 255 05 11111111 11110000 00001111 11111111 255 15 15 255 06 11111111 11111100 00111111 11111111 255 63 63 255 07 11000000 00000000 00000011 11111111 192 0 3 255 08 11110000 00000000 00001111 11111111 240 0 15 255
I have attached the code here:
I also developed a quick tool to output the necessary .byte statements using Ruby:
# salmon run graphic dump dev tool
# t.cherryhomes 2007-04-05
pf1data = Array.new
pf2data = Array.new
pf3data = Array.new
pf4data = Array.new
pf1binary = Array.new
pf2binary = Array.new
pf3binary = Array.new
pf4binary = Array.new
l = 0
File.open("riverdata.txt") do |f|
while line = f.gets
if (l < 4) then
# do nothing.
else
currentLine = line.split(/\t/);
currentBinary = currentLine[1].split
pf1data.push(currentLine[2]);
pf2data.push(currentLine[3]);
pf3data.push(currentLine[4]);
pf4data.push(currentLine[5]);
pf1binary.push(currentBinary[0]);
pf2binary.push(currentBinary[1]);
pf3binary.push(currentBinary[2]);
pf4binary.push(currentBinary[3]);
end
l+=1;
end
end
File.open("riverdata.asm","w") do |f|
f.puts "PF1Data"
pf1data.each do |i|
f.puts "\t.byte " << i
end
f.puts "PF2Data"
pf2data.each do |i|
f.puts "\t.byte " << i
end
f.puts "PF3Data"
pf3data.each do |i|
f.puts "\t.byte " << i
end
f.puts "PF4Data"
pf3data.each do |i|
f.puts "\t.byte " << i
end
end
puts "Done.\n"
and it works just fine. :-)
Now, I am going to hammer out the asym kernel, will keep you guys posted :-)
Attached Files
-
riverdata.zip (3.5K)
downloads: 54



Create a custom theme








