diff -Naur z80pack-1.17/altairsim/srcsim/simctl.c z80pack-1.18/altairsim/srcsim/simctl.c --- z80pack-1.17/altairsim/srcsim/simctl.c 2008-10-20 22:09:44.000000000 +0200 +++ z80pack-1.18/altairsim/srcsim/simctl.c 2008-10-26 11:27:40.000000000 +0100 @@ -7,6 +7,7 @@ * * History: * 20-OCT-08 first version finished + * 26-OCT-08 corrected LED status while RESET is hold in upper position */ #include @@ -30,6 +31,7 @@ static int cpu_switch; static BYTE power_switch = 1; static int power; +static int reset; static int load(void); static void run_cpu(void), step_cpu(void); @@ -90,6 +92,8 @@ /* operate machine from frontpanel */ while (cpu_error == NONE) { + if (reset) + cpu_bus = 0xff; fp_sampleData(); switch (cpu_switch) { @@ -299,14 +303,26 @@ switch (state) { case FP_SW_UP: + reset = 1; cpu_state = STOPPED; - PC = ram; - STACK = ram + 0xffff; + cpu_switch = 0; IFF = 0; - int_mode = 0; - fp_led_wait = 1; - fp_led_address = 0; - fp_led_data = *ram; + fp_led_address = 0xffff; + fp_led_data = 0xff; + fp_led_wait = 0; + cpu_bus = 0xff; + break; + case FP_SW_CENTER: + if (reset) { + reset = 0; + PC = ram; + STACK = ram + 0xffff; + int_mode = 0; + fp_led_wait = 1; + fp_led_address = 0; + fp_led_data = *ram; + cpu_bus = CPU_WO | CPU_M1 | CPU_MEMR; + } break; case FP_SW_DOWN: break; diff -Naur z80pack-1.17/imsaisim/srcsim/simctl.c z80pack-1.18/imsaisim/srcsim/simctl.c --- z80pack-1.17/imsaisim/srcsim/simctl.c 2008-10-20 22:11:49.000000000 +0200 +++ z80pack-1.18/imsaisim/srcsim/simctl.c 2008-10-26 11:28:03.000000000 +0100 @@ -7,6 +7,7 @@ * * History: * 20-OCT-08 first version finished + * 26-OCT-08 corrected LED status while RESET is hold in upper position */ #include @@ -30,6 +31,7 @@ static BYTE fp_led_wait; static int cpu_switch; static int power; +static int reset; static int load(void); static void run_cpu(void), step_cpu(void); @@ -87,6 +89,8 @@ /* operate machine from frontpanel */ while (cpu_error == NONE) { + if (reset) + cpu_bus = 0xff; fp_sampleData(); switch (cpu_switch) { @@ -296,15 +300,27 @@ switch (state) { case FP_SW_UP: + reset = 1; cpu_state = STOPPED; - PC = ram; - STACK = ram + 0xffff; + cpu_switch = 0; IFF = 0; - int_mode = 0; - fp_led_wait = 1; - fp_led_address = 0; - fp_led_data = *ram; fp_led_output = 0; + fp_led_address = 0xffff; + fp_led_data = 0xff; + fp_led_wait = 0; + cpu_bus = 0xff; + break; + case FP_SW_CENTER: + if (reset) { + reset = 0; + PC = ram; + STACK = ram + 0xffff; + int_mode = 0; + fp_led_wait = 1; + fp_led_address = 0; + fp_led_data = *ram; + cpu_bus = CPU_WO | CPU_M1 | CPU_MEMR; + } break; case FP_SW_DOWN: break;