Skip to content

Commit

Permalink
scptchess:correct dac polarity
Browse files Browse the repository at this point in the history
  • Loading branch information
happppp committed Sep 12, 2024
1 parent 5ba1819 commit fbe7a1d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/mame/cxg/computachess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void computachess_state::mux_w(u8 data)
void computachess_state::control_w(u16 data)
{
// D0: speaker out
m_dac->write(data & 1);
m_dac->write(~data & 1);

// D2,D3: led select
m_display->write_my(~data >> 2 & 3);
Expand Down Expand Up @@ -208,6 +208,8 @@ void computachess_state::scptchess(machine_config &config)
void computachess_state::scptchessa(machine_config &config)
{
scptchess(config);

m_maincpu->write_d().set(FUNC(computachess_state::control_w)).exor(1);
config.set_default_layout(layout_cxg_scptchessa);
}

Expand Down
4 changes: 2 additions & 2 deletions src/mame/saitek/tschess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
SciSys Travel Sensor Chess (aka Travel Sensor)
The chess engine was written by Mark Taylor, employee at Intelligent Software
The chess engine was written by Mark Taylor, employee of Intelligent Software
(formerly known as Philidor Software). The I/O is very similar to CXG Sensor
Computachess (see cxg/computachess.cpp).
Expand Down Expand Up @@ -100,7 +100,7 @@ void tschess_state::control_w(u16 data)
m_display->write_my(~data >> 1 & 7);

// D4: speaker out
m_dac->write(data >> 4 & 1);
m_dac->write(BIT(data, 4));
}

u16 tschess_state::input_r()
Expand Down

0 comments on commit fbe7a1d

Please sign in to comment.