m ="OK.;Permission Required.;Out of memory.;Invalid operation.;Invalid memory access.;Invalid access alignment.;Unknown error.;Host environment exception.;Halted.;Operation not supported.".split(";"),
s =void0;
this.LSB= s;
var D =0,
w =[],
C =[];
this.explain= a;
this.cycle=function(a, b){
try{
return w[a].brain.cycle(b |0)
}catch(d){
return l(d)
}
};
this.init=function(a, b, d, c, e, f, g){
try{
w[a].brain.init(w[a].size-1, b, d, c, e, f, g)
}catch(h){
return l(h)
}
};
this.load=function(b, d, c){
try{
if("string"==typeof d)throw a(9);
var e = w[b].bind(c, d.length<<2);
for(b =0; b < d.length&& b < e.length;++b) e[b]= d[b];
F &&(k < w && n < C)&&(x = B[v], k &1&&(x >>>=16), O = x >>8&15,9> H &&(0< J &&0< I)&&(9< H + I &&(I =9- H),16< L + J &&(J =16- L), s.fillStyle= D[O], s.fillRect(9* k + H,(n <<4)+ L, I, J)));
1< b &&(h.scaleSmoothing(m,!1), m.globalAlpha=1, m.globalCompositeOperation="source-over", m.drawImage(u,0,0, e, c,0,0, p, r), l &&null!= X &&(m.fillStyle= X, m.fillRect(0,0, p, r), m.globalCompositeOperation="lighter", h.scaleSmoothing(m,!0), m.globalAlpha=0.5, m.drawImage(a,0,0, p, r,1.5,0, p, r), m.drawImage(a,0,0, p, r,-0.25,1, p, r)));
B[0]= q
}
}
};
var K =[],
N =null,
X =null,
Y =new h.ImageLoader("img/",function(a, b, c, d){
if(b){
if(h.log("Loaded texture #"+ d +" from: "+ c), K[d]= a, Y.count== Y.loaded){
b = document.createElement("canvas");
K[0]= b;
b.width=64;
b.height=64;
c = b.getContext("2d");
c.fillStyle="#000";
c.globalAlpha=1;
h.scaleSmoothing(c,!1);
for(d =1;64> d; d +=2) c.fillRect(0, d,64,1);
X = c.createPattern(b,"repeat");
n(a, l ? k : g);
h.log("Display ready.");
U =!0
}
}else h.log("Could not load texture #"+ d +" from: "+ c)
});
Y.queue("sc-font-9x16.png",1);
viewport.parentElement.style.backgroundColor= l &&1< b ? f[E]: g[E];
d.toString=function(){
return"TextDisplay"
}
}
};
newfunction(){
var h = System;
h.onInit(function(){
try{
h.log=function(a){
console.log(a)
};
var g =new h.Environment,
k = g.build(2097152),
f =new h.Protocol;
f.pos=0;
f.size=64;
f.direct=!0;
g.support(f);
var a =new h.Protocol;
a.pos= f.size;
a.size=16384;
a.direct=!0;
g.support(a);
var e = document.getElementById("viewport"),
c =!0,
b =new h.InputDevice(function(a){
c ||(0<= a &&(cycleDelay =-g.cycle(k,32768), l.render()),0> cycleDelay &&(c =!0))
f =[231945,80,83919369,33293,12288,395785,33293,24576,133641,33587721,33293,65536,264713,33293,65536,68105,33291,72,16809992,33291,4360,33289,2147483648,33311,204,16809986,33311,140,33297,2147483648,33290,0,295435,100,32,33289,64,29193,33297,4278190080,32,524809,557585,4278190080,295433,64,134511122,67138057,33297,4278190080,32,295433,64,524815,134511121,67138057,32,33289,536870912,33311,164,32,33311,140,33297,536870912,33290,0,295435,292,16809986,33291,248,32,33289,72,29193,32,295433,64,67400201,67108873,67141653,67174409,251756561,84017161,67272725,84082697,251887633,32,67371536,262153,67403795,17039378,33882121,67469331,50659346,557577,64,588305,4294901760,67664402,32,295433,68,293385,32,295433,68,67138057,32,262665,393481,164383,296,168558857,688393,0,201851162,17334803,202113552,67910153,819725,4,135004682,1868299,484,32,786953,17596947,68157961,1081882,160,269222413,135018761,32,786953,17596947,68157961,1081882,160,269222413,201863433,32,786953,17596947,68157961,1081882,160,269222413,135018505,32,786953,17596947,68157961,1081882,160,269222413,819725,1,151795721,32,528,31241,32,528,29193,33290,0,1606155,696,16809986,33291,664,67371536,67402249,32,528,29193,32,33289,24,291337,67141646,29193,32,33289,28,29193,32,33289,32,29193,32,33289,16,291337,134250510,553481,67141645,29193,32,786953,68157961,336855568,135528457,135593993,253067281,68452372,253001745,152338442,2392587,864,806649869,33291,868,1460961293,229919,576,819725,1,353632265,152338442,2392587,912,806649869,33291,916,1460961293,229919,576,32,135018505,32,295455,296,303169808,17859091,268698138,16810515,67109389,269484560,135294985,269746185,68190228,252739601,806387725,957382666,2130443,1004,655392781,268449801,33293,2,253001745,806649869,957644810,2130443,1040,655654925,335558665,33293,4,557581,1,819726,1,819722,0,2392587,964,32,33289,20,528905,67141646,266761,67141646,4617,33311,512,32,33311,720,33290,0,1344011,1160,33289,0,295434,0,1344011,1184,295433,0,33307,18,84181524,33290,79,819723,1220,33289,79,295434,24,819723,1244,295433,24,33311,544,1081865,20,135272969,68190222,68164105,68190222,1055241,557329,255,1946779657,33311,512,32,33289,8,266761,67141646,4617,557577,12,786953,819729,15,819738,3,201851405,786953,67928597,65545,16875537,16908297,16941072,436305946,436371482,536969229,537034765,537952265,1114121,68255761,68255760,34701333,134447113,285409294,51445769,164383,608,557581,1,164383,608,557582,2,1081609,1056,17825801,164383,512,34603017,557581,3,164383,512,524809,557585,15,557581,62,51445769,164383,608,32,33289,8,266761,67141646,4617,557577,12,786953,819729,15,819738,3,201851405,786953,67928597,1081609,20445,4278485002,1606155,1620,1192329225,164383,608,557581,1,164383,608,557582,2,1074888713,164383,512,3725623305,557581,3,164383,512,4026826762,2392587,1740,295435,1712,557581,1,557582,2,201982217,164383,412,786953,67928597,524809,557585,15,557581,62,1192329225,4278485002,1606155,1780,1326546953,164383,608,4278485002,1606155,1812,201982217,164383,412,32,134742544,262665,295441,1,295434,0,295435,1848,262665,295441,2,295434,0,295435,1888,229919,3276,17334281,262665,295441,4,295434,0,295435,1916,262665,295441,8,295434,0,295435,1956,229919,3120,17334281,262665,295441,16,295434,0,295435,1996,229919,2072,17334281,262665,295441,32,295434,0,295435,2024,262665,295441,64,295434,0,295435,2064,229919,2840,17334281,134218249,32,33311,776,151027722,1606155,2144,819721,8,202379785,4279271434,295435,2136,1081865,255,269228553,33291,2144,4027613193,269228553,637566986,1606155,2240,360991,1304,819721,4,202379785,1081866,16,2654731,2228,1081869,16,336855568,1350154,16,1868299,2228,1350158,16,1081870,16,269228553,671121418,1606155,2336,360991,1304,819721,4,202379785,1081866,384,1868299,2324,1081870,16,336855568,1350154,4294966896,2654731,2324,1350157,16,1081869,16,269228553,134250506,295435,2360,620789770,1606155,2488,360991,1304,819721,8,825866,240,2392587,2404,4279015440,1606155,2488,819721,4,202379785,1081866,1,1868299,2448,1081870,1,33291,2484,336855568,1350154,16,1868299,2488,1350158,16,1081869,15,269228553,134250506,1606155,2568,202113552,202379785,67928077,202379789,67928077,202117641,819722,255,295435,2560,268988425,4279009296,201850897,33291,2564,537427977,135297033,654344202,1606155,2708,360991,1304,819721,8,825866,240,2392587,2624,4279015440,295435,2708,819721,4,202379785,1081866,399,2654731,2668,1081869,1,33291,2704,336855568,1350154,4294966896,2654731,2704,1081870,15,1350157,16,269228553,553680906,1606155,2772,360991,1304,202113552,825866,384,1868299,2764,825870,384,33291,2772,825865,0,570458122,1606155,2836,360991,1304,202113552,825866,4294966512,2654731,2828,825869,384,33291,2836,825865,4294966896,32,33311,776,295434,0,295435,3116,819721,8,4279015434,1606155,2984,360991,1304,360991,228,202113552,202379785,67928077,202379789,68188169,1081866,4294967295,295435,2980,825869,1,825866,400,1868299,2980,825870,16,202113552,825869,16,32,269484560,269750793,68190217,269750797,336621577,805601290,1868299,3116,956596234,2392587,3040,805601294,33291,3072,537165842,1627684874,1868299,3116,1711570954,2392587,3116,1459912718,67436553,67469331,84148242,201658377,84148241,84213775,84934673,68157458,269776905,33291,2580,32,33311,760,33290,0,1344011,3200,360991,1304,202113552,825866,192,1868299,3188,825870,192,33291,3200,825865,0,32,33290,0,819723,3272,360991,1304,202113552,825866,4294966704,2654731,3260,825869,192,33291,3272,825865,4294966896,32,32,33311,744,262153,17072145,294922,295435,3612,295433,12,557577,16,819721,8,301578,59,1081867,3516,295455,1304,301578,11,2654731,3404,295433,4,134746633,557594,16,301585,15,134486546,32,825865,15,67899913,819726,12,819739,3,134746633,557594,16,201851410,295433,4,134486537,295433,12,67899913,819740,3,819722,0,1606155,3512,819721,8,825872,255,32,825865,255,819721,4,134746633,557594,16,135010825,67637769,557578,62,1868299,3608,557582,62,557578,15,2130443,3600,557577,15,135010834,32,32,32,33289,1824,33311,444,2654729,0,33289,10,671351305,557321,1203,33311,512,33289,60,33311,512,33289,66,557321,2049,33311,512,33293,1,33290,69,2130443,3692,33289,74,557321,2049,33311,512,33293,1,33290,77,2130443,3740,33289,24,557321,2080,33311,512,33293,1,33290,34,2130443,3788,33289,48,557321,2080,33311,512,33293,1,33290,58,2130443,3836,33289,14,557321,1082,33311,512,33293,6,33290,61,1868299,3884,33289,1,557321,1840,33311,512,33293,1,33290,2,2130443,3932,33289,3,557321,3888,33311,512,33293,1,33290,4,2130443,3980,33289,5,557321,3104,33311,512,33293,1,33290,6,2130443,4028,33289,7,557321,1056,33311,512,33293,1,33290,8,2130443,4076,2654733,1,2654730,25,1868299,3640,32,33289,1824,33311,444,33033,0,164105,1,33311,412,528,47625,74123091,67141645,47625,74187893,67141645,47625,73598060,67141645,47625,73663599,67141645,47625,69207141,67141645,47625,74385228,67141645,47625,73663585,67141645,47625,74318953,67141645,47625,67109991,67141645,47625,69207072,33311,228,554,295433,0,33026,512,554,262669,295434,512,1868299,4324,32,33311,5288,33311,84,33311,648,33289,218169864,33311,360,33311,4144,528,262665,39433,1536,67141645,39433,102,67141645,4026570761,67141645,67115529,67141645,67115529,67141645,33311,3616,33311,5604,33311,6120,673710608,673972745,741085705,33289,1,671351305,738722313,403210773,33311,808,738722313,268993045,33293,2,33311,808,738722313,134775317,33293,2,33311,808,738722313,33293,2,33311,808,33289,12,671351305,738722313,819721,16,33311,936,33289,62,671351305,738722313,738984457,3965449,66,738750985,33311,576,33293,1,134775317,1006633482,1868299,4660,2916877,4,3965453,4,738750985,33290,75,1868299,4660,2654733,1,2654730,25,1868299,4500,33311,1536,33311,1128,33311,228,295433,28,301578,0,295435,4832,67113503,32770,98847,1304,98847,1088,33291,4488,33311,660,98847,1304,98847,1088,33311,1816,33290,0,1606155,4472,33291,4752,33289,24,266761,295434,4294967295,295435,5044,295441,2147483647,295434,0,295435,5044,819721,0,33289,24,39437,4,39434,4016,2392587,5268,4617,33293,64,291337,295441,16711935,295442,67109888,67140105,819725,1,819722,20,2130443,4948,32,39433,12,1081865,7408,1081869,17408,268698121,295441,15,819721,16,67895822,819729,15,202375693,295433,0,1081869,16,268704265,2130953,296629226,3781926562,370832541,4100533819,1113097,1640715937,2282019202,907678707,3561557531,537951248,1081869,16,1113097,3897955274,3242966668,909792445,3561557531,537951248,1081869,112,1113097,538976288,538976288,538976288,538976288,33289,4,39433,128,67141645,4278229001,469794825,39433,4888,32,33289,28,39433,0,32,33289,26112,4,2130947,986125130,2117622666,1773876455,1345566354,1082377,3835485448,626029974,848202269,2539554945,537920528,268467209,1342210061,268467209,536903693,268467209,1610645518,270533635,1082377,4184631899,2489423265,2902401863,554152117,537920528,268467209,268468237,270533635,1082377,1386827165,344341847,2769698716,1750545076,537920528,268467209,268468237,270533635,1082377,1904909879,1657915225,531540249,2314484855,537920528,268467209,268468237,270533635,1082377,3077683328,2873561090,2834377921,91958683,537920528,268467209,536903693,270533635,1082377,201823064,4047731608,1944857960,3928019016,537920528,268467209,33289,26188,64009,5668,64013,17408,33289,24,39433,0,33289,28,39433,0,32,33289,26214,290825,3741614097,294922,1606155,5664,553711625,33289,26188,29193,33294,17408,68255762,543,32,33289,24,39434,0,1606155,5944,295433,25,33289,66,557321,1793,33311,608,33293,1,33290,69,2130443,5708,33289,62,557321,2049,33311,608,33293,1,33290,64,2130443,5756,295438,1,295434,0,1344011,5700,1081865,7408,1081869,17408,268698121,295441,15,819721,16,67895822,819729,15,202375693,1081869,48,528,268442121,33293,4,39433,96,33293,4,39433,255,33311,228,33289,28,39433,6812,32,33289,24,266761,295441,2147483648,295434,0,295435,6100,1081865,7408,1081869,17408,268698121,295441,15,819721,16,67895822,819729,15,202375693,1081869,144,2130441,32,540021763,806386704,807410697,33289,24,39437,1,39434,2147483904,2392587,6100,32,33289,28,39433,0,32,33289,24,266761,295441,2147483648,295434,0,295435,6572,1081865,7408,1081869,17408,268698121,295441,15,819721,16,67895822,819729,15,202375693,268435977,33293,144,270562313,536902666,1606155,6288,33294,12,64009,1068879309,33293,4,64009,3402485190,33289,24,39433,4294967295,32,3179017,24,3185162,4294967295,1606155,6356,3185161,2147483648,33294,12,64009,559664589,33293,4,64009,3402485085,32,268435977,33293,135,815113,3742138385,819210,1606155,6572,553711625,268435977,33293,144,2126857,4,1081865,32,537926665,33289,24,39433,2147483648,33289,28,39433,6576,33289,4,39433,144,1081865,7408,1081869,17408,268698121,295441,15,819721,16,67895822,819729,15,202375693,268435977,2130441,538976288,539230729,539493129,536902665,33293,16,536902665,33293,16,536902665,32,1081865,7408,1081869,17408,268698121,295441,15,819721,16,67895822,819729,15,202375693,268435977,33293,144,2130441,32,540021763,807410697,33289,24,39437,4,4617,33297,2147483647,33290,1012,2392587,6756,33294,4,268435981,295433,0,268809,301585,4294967280,301581,48,33293,192,805338128,32,33289,28,39433,0,33289,24,39433,2147483648,33289,0,268442121,39437,48,32,33289,24,39434,0,1606155,6880,4,2130947,609603697,3827201277,2017767172,305025323,1081865,32,537926665,39433,1,1081865,32,270537737,1081865,7408,1081869,17408,268698121,295441,15,819721,16,67895822,819729,15,202375693,791049,39437,1,819740,13,819722,12,1606155,6984,32,67928595,202375693,266761,295441,1,295434,0,295435,7048,2130961,4278255360,4278255360,4278255360,4278255360,33291,7068,2130961,16711935,16711935,16711935,16711935,537951248,39434,120,1868299,7120,33289,28,39433,0,67141646,39433,4294967295,32,538969091,1081865,32,537926665,32,33289,24,266761,295441,2147483648,295434,0,295435,7404,1081865,7408,1081869,17408,268698121,295441,15,819721,16,67895822,819729,15,202375693,1081869,16,2130953,296629226,3781926562,370832541,4100533819,537951241,1113104,815731403,3494559619,909792445,3561557531,1081869,16,537951241,1113104,3897955274,3242966668,909792445,3561557531,1081869,112,1113097,2103055042,3455133029,2567071376,2541834704,33289,0,1081870,96,268442121,67141645,39433,87,33289,28,39433,5948,4,33289,32,536878089,32,1463939758,3326931380,3056969150,96598792,1093237284,3193090925,1190316837,2327456273,3722913432,656716174,3986763130,2805873590,655296613,4220167014,412422730,2896959909,1240801077,2289915026,3091872572,3004862258,3774637222,3029171748,113609937,342160229,2169358072,1857196085,3035887015,1991096755,999209482,62679574,1621157293,3415654802,2679544969,2589032546,3091691,2709876190,3078451754,1862372174,1876609296,2980959652,767828645,3056538818,4199657431,2224850305,648831876,762226756,4125654416,3281065681,1824431908,2972358790,1154494572,1004089482,3964982144,2333228622,1937675833,2027273804,3023948975,2061557655,188418291,2533739843,3007707444,2159632807,1136306181,580665584,2822457629,4264452840,58240373,2376750997,3750055457,2556437494,1628000574,579906905,4235429432,4127085373,913888998,2932837449,423358060,252269192,2865927480,3689710646,3989525251,1637073132,800275110,2048522342,2413859470,1537648706,2124341735,266630385,4185899390,455048676,2424671937,3462756120,289337448,304095005,870003032,3126552634,839488576,3184793007,3216239573,2639881168,1477709771,4267881742,2057616676,4208343878,1889734753,827265580,527604906,1250623640,779874098,4116551120,174617448,3811109075,1811690580,316416889,3860212922,2730276359,1102894332,559650798,1369524717,450582892,1824573393,2875254829,992362217,3164592277,1296457222,4034595309,128042560,579116589,3312835567,3795356162,1657749439,978098637,1630663885,3035715313,1544040467,630482770,2371306047,1158087676,3621929687,1937961774,3443513511,2112579222,2959655290,3924269802,3276072179,3489515428,1711381242,297442464,2271032040,1666967181,2721614932,3491540574,1301902465,188935495,171527446,1485392717,4206122755,1613435277,490272048,631303548,4285628210,2289052987,968759551,3919716872,4004474864,1168790043,339990338,3540096090,1498078014,2867058481,3436039788,2015604696,1253651714,680292690,882954220,3956364869,77502352,1372778815,374944816,3643810855,2041911997,2070458491,1238485275,3372360956,1427420770,3543888402,2912813487,3455043861,231281468,3945315909,862585016,3935976823,3151638003,609769078,2776387579,319276646,3945177622,659266984,3190306416,2157344998,1762397601,1298417490,3778002297,2552069204,163327691,3435023424,4119692560,3512525776,1197504079,3887470592,546347638,1634415293,2616806129,2872900568,1694199789,5354042,943120895,2918167529,103197460,3149448997,4048513369,4012034013,3689522896,2868704720,4324678,1350125003,323601324,1000335329,982868308,4190641745,3140213306,1658072050,143663500,1141107051,2695732704,1304434742,1835788832,1129160006,1053347312,2326664085,645850608,2873011723,2280265901,1194850556,858199173,2889050345,863553215,3832171240,3781720744,3935368700,2636202445,3688914773,2353269162,3083470373,927006586,3087795051,2277131589,3411396375,3277466918,99297387,3173141367,3239510693,536246121,3383174193,1677353172,1783939601,2981787914,3619728433,4110947920,378108449,2142644709,1023959057,720689136,3304224958,1915539692,4162424131,509622741,731010050,46826685,217763498,3982195385,2853965943,3376142862,912267809,2164645939,1839274395,957473694,4116405984,73902773,3098905606,173200160,1977079677,3412710853,2513325798,2500917750,4190678970,4284857351,2877499588,3609618488,2693480212,3987726937,541157625,716718698,1261846761];
g.load(k, f, p);
g.init(k, p, p +(f.length<<2),0,0,0,0);
c =!1
}catch(r){
if("number"==typeof r)throw g.explain(r);
throw"boot: "+ r.toString()+": line "+ r.lineNumber+": "+ r.fileName;