You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tk_messageBox -icon info -title "About BrickEMU" -message "BrickEmu (C) 2003-2004 Jochen Hoenicke\n\nThis program is free software; you can redistribute it and/or modify it under the terms of the GPL.\n\nYou can find the latest version at:\nhttp://hoenicke.ath.cx/rcx/"
@@ -677,46 +681,102 @@ proc startit { } {
677
681
# HAUPTPROGRAMM
678
682
#---------------------------------
679
683
680
-
set portnr 0
684
+
set guiserverport 0
685
+
set irserverport 0
681
686
for { set i 0 } { $i < $argc } {incr i 1} {
682
-
if { [lindex $argv$i] == "-firm" } {
683
-
incr i 1
684
-
set firmware [lindex $argv$i]
685
-
} else {
686
-
set portnr [lindex $argv$i]
687
+
switch [lindex $argv$i] {
688
+
"-rom" {
689
+
incr i 1
690
+
set rom [lindex $argv$i]
691
+
puts "Requested ROM: $rom"
692
+
}
693
+
"-firm" {
694
+
incr i 1
695
+
set firmware [lindex $argv$i]
696
+
puts "Requested Firmware: $firmware"
697
+
}
698
+
"-prog1" -
699
+
"-prog2" -
700
+
"-prog3" -
701
+
"-prog4" -
702
+
"-prog5" -
703
+
"-prog6" -
704
+
"-prog7" {
705
+
set prognum [string index [lindex $argv$i] end]
706
+
incr i 1
707
+
set initialprogs($prognum) [lindex $argv$i]
708
+
puts "Requested Program $prognum: $initialprogs($prognum)"
709
+
}
710
+
"-guiserverport" {
711
+
incr i 1
712
+
set guiserverport [lindex $argv$i]
713
+
}
714
+
"-irserverport" {
715
+
incr i 1
716
+
set irserverport [lindex $argv$i]
717
+
}
718
+
default {
719
+
# Unrecognized command-line argument
720
+
}
687
721
}
688
722
}
689
723
690
-
if { $portnr == 0 } {
691
-
692
-
if { [llength [array get env BRICKEMU_DIR]] != 0 } {
693
-
set brickemu_dir $env(BRICKEMU_DIR)
694
-
} else {
695
-
set brickemu_dir "."
724
+
proc load_initial_firmware_and_programs { } {
725
+
if {$firmware != ""} { beam_firmware $firmware }
726
+
727
+
foreach {slotnr program} [array get initialprogs] {
728
+
beam_program $slotnr$program
696
729
}
730
+
}
697
731
698
-
proc start_server { fd addr port } {
699
-
global emufd firmware;
700
-
set emufd $fd
732
+
proc start_gui { } {
733
+
# TCL currently does not support passing arrays, so we read the global.
0 commit comments