add fast unsafe sendinput for roms
This commit is contained in:
		@@ -157,5 +157,5 @@ function lualogic_rom_updatedata_final(%brick) {
 | 
				
			|||||||
	
 | 
						
 | 
				
			||||||
	// send output
 | 
						// send output
 | 
				
			||||||
	//talk("rom" SPC %brick SPC %data_str);
 | 
						//talk("rom" SPC %brick SPC %data_str);
 | 
				
			||||||
	lualogic_sendinput(%brick, 1, %data_str);
 | 
						lualogic_sendinput_raw(%brick, 1, %data_str);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -131,16 +131,14 @@ function lualogic_savedata(){
 | 
				
			|||||||
	lualogic_send("SAVE");
 | 
						lualogic_send("SAVE");
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function lualogic_sendinput(%gate, %argc, %arg0, %arg1, %arg2, %arg3, %arg4, %arg5, %arg6, %arg7, %arg8, %arg9, %arg10, %arg11, %arg12, %arg13, %arg14, %arg15)
 | 
					function lualogic_sendinput(%gate, %argc, %arg0, %arg1, %arg2, %arg3, %arg4, %arg5, %arg6, %arg7, %arg8, %arg9, %arg10, %arg11, %arg12, %arg13, %arg14, %arg15) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	%args = lualogic_expandescape(%arg0);
 | 
						%args = lualogic_expandescape(%arg0);
 | 
				
			||||||
	for(%i = 1; %i < %argc; %i++)
 | 
						for(%i = 1; %i < %argc; %i++) { %args = %args @ ";" @ lualogic_expandescape(%arg[%i]); }
 | 
				
			||||||
		%args = %args @ ";" @ lualogic_expandescape(%arg[%i]);
 | 
						lualogic_sendinput_raw(%gate, %argc, %args);
 | 
				
			||||||
	
 | 
					}
 | 
				
			||||||
	if(%argc > 0)
 | 
					function lualogic_sendinput_raw(%gate, %argc, %args) {
 | 
				
			||||||
		lualogic_send("IN;" @ %gate.getID() @ ";" @ %argc @ ";" @ %args);
 | 
						if(%argc > 0) { lualogic_send("IN;" @ %gate.getID() @ ";" @ %argc @ ";" @ %args); }
 | 
				
			||||||
	else
 | 
						else          { lualogic_send("IN;" @ %gate.getID() @ ";0"); }
 | 
				
			||||||
		lualogic_send("IN;" @ %gate.getID() @ ";" @ %argc);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function lualogic_ss(%obj, %state)
 | 
					function lualogic_ss(%obj, %state)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user