13
13
#include " machine/gen_latch.h"
14
14
#include " machine/upd765.h"
15
15
#include " screen.h"
16
- #include " sound/beep.h"
17
- #include " speaker.h"
18
16
#include " video/pc_vga.h"
19
17
#include " kn5000.lh"
20
18
@@ -103,11 +101,12 @@ class kn5000_state : public driver_device
103
101
, m_maincpu_latch(*this , " maincpu_latch" )
104
102
, m_subcpu_latch(*this , " subcpu_latch" )
105
103
, m_fdc(*this , " fdc" )
106
- , m_checking_device_led_cn11(*this , " checking_device_led_cn11" )
107
104
, m_extension(*this , " extension" )
108
105
, m_extension_view(*this , " extension_view" )
109
106
, m_CPL_SEG(*this , " CPL_SEG%u" , 0U )
110
107
, m_CPR_SEG(*this , " CPR_SEG%u" , 0U )
108
+ , m_checking_device_led_cn11(*this , " checking_device_led_cn11" , 0U )
109
+ , m_checking_device_led_cn12(*this , " checking_device_led_cn12" , 0U )
111
110
, m_CPL_LED(*this , " CPL_%u" , 0U )
112
111
, m_CPR_LED(*this , " CPR_%u" , 0U )
113
112
, m_led_row(0 )
@@ -123,12 +122,13 @@ class kn5000_state : public driver_device
123
122
required_device<generic_latch_8_device> m_maincpu_latch;
124
123
required_device<generic_latch_8_device> m_subcpu_latch;
125
124
required_device<upd72067_device> m_fdc;
126
- required_device<beep_device> m_checking_device_led_cn11;
127
125
required_device<kn5000_extension_device> m_extension;
128
126
memory_view m_extension_view;
129
127
130
128
required_ioport_array<11 > m_CPL_SEG; // buttons on "Control Panel Left" PCB
131
129
required_ioport_array<11 > m_CPR_SEG; // buttons on "Control Panel Right" PCB
130
+ output_finder<1 > m_checking_device_led_cn11;
131
+ output_finder<1 > m_checking_device_led_cn12;
132
132
output_finder<50 > m_CPL_LED;
133
133
output_finder<69 > m_CPR_LED;
134
134
uint8_t m_led_row;
@@ -667,14 +667,16 @@ void kn5000_state::machine_start()
667
667
}
668
668
#endif // EXTENSION_VIEW
669
669
670
+ m_checking_device_led_cn11.resolve ();
671
+ m_checking_device_led_cn12.resolve ();
670
672
m_CPL_LED.resolve ();
671
673
m_CPR_LED.resolve ();
672
674
}
673
675
674
676
void kn5000_state::machine_reset ()
675
677
{
676
- /* Setup beep */
677
- m_checking_device_led_cn11-> set_state ( 0 ) ;
678
+ m_checking_device_led_cn11[ 0 ] = 0 ;
679
+ m_checking_device_led_cn12[ 0 ] = 0 ;
678
680
}
679
681
680
682
void kn5000_state::kn5000 (machine_config &config)
@@ -713,7 +715,7 @@ void kn5000_state::kn5000(machine_config &config)
713
715
// bit 0 (input) = "check terminal" switch
714
716
// bit 1 (output) = "check terminal" LED
715
717
m_maincpu->portc_read ().set ([this ] { return ioport (" CN11" )->read (); });
716
- m_maincpu->portc_write ().set ([this ] (u8 data) { m_checking_device_led_cn11-> set_state (BIT (data, 1 ) == 0 ); });
718
+ m_maincpu->portc_write ().set ([this ] (u8 data) { m_checking_device_led_cn11[ 0 ] = (BIT (data, 1 ) == 0 ); });
717
719
718
720
719
721
// MAINCPU PORT D:
@@ -781,6 +783,11 @@ void kn5000_state::kn5000(machine_config &config)
781
783
// Address bus is set to 8 bits by the pins AM1=GND and AM0=GND
782
784
m_subcpu->set_addrmap (AS_PROGRAM, &kn5000_state::subcpu_mem);
783
785
786
+ // SUBCPU PORT C:
787
+ // bit 0 (input) = "check terminal" switch
788
+ // bit 1 (output) = "check terminal" LED
789
+ m_maincpu->portc_read ().set ([this ] { return ioport (" CN12" )->read (); });
790
+ m_maincpu->portc_write ().set ([this ] (u8 data) { m_checking_device_led_cn12[0 ] = (BIT (data, 1 ) == 0 ); });
784
791
785
792
// SUBCPU PORT D:
786
793
// bit 0 = (output) SSTAT0
@@ -836,11 +843,6 @@ void kn5000_state::kn5000(machine_config &config)
836
843
vga.set_vram_size (0x100000 );
837
844
838
845
config.set_default_layout (layout_kn5000);
839
-
840
- // This is a quick hack to beep whenever the checking device LED is on
841
- // (just because I find it more convenient to listen to the beeps while debugging the driver)
842
- SPEAKER (config, " mono" ).front_center ();
843
- BEEP (config, " checking_device_led_cn11" , 12_MHz_XTAL / 3200 ).add_route (ALL_OUTPUTS, " mono" , 0.05 );
844
846
}
845
847
846
848
ROM_START (kn5000)
0 commit comments