sbackgc: invert buttons_r,

hmcs40d: set page start to 0x3f
This commit is contained in:
hap 2024-09-24 01:08:42 +02:00
parent 5ade77ff64
commit 0e8939bafe
3 changed files with 15 additions and 12 deletions

View file

@ -16,7 +16,7 @@
hmcs40_disassembler::hmcs40_disassembler() hmcs40_disassembler::hmcs40_disassembler()
{ {
// init lfsr pc lut // init lfsr pc lut
for (u32 i = 0, pc = 0; i < 0x40; i++) for (u32 i = 0, pc = 0x3f; i < 0x40; i++)
{ {
m_l2r[i] = pc; m_l2r[i] = pc;
m_r2l[pc] = i; m_r2l[pc] = i;

View file

@ -8,8 +8,8 @@ Excalibur Ivan The Terrible (model 701E, H8/3256 version)
This is the first version, see ivant.cpp for the newer version. It was produced This is the first version, see ivant.cpp for the newer version. It was produced
in a factory owned by Eric White's company (ex-CXG), hence it's not that strange in a factory owned by Eric White's company (ex-CXG), hence it's not that strange
that the LCD is the same as the one in CXG Sphinx Legend and Krypton Challenge. that the LCD is the same as the one in CXG Sphinx Legend and Krypton Challenge.
Ron Nelson was reluctant about it, since it was the same person that bootlegged Ron Nelson was reluctant about it, since Eric White was the same person that
his Chess Challenger 10. bootlegged his Fidelity Chess Challenger 10.
Hardware notes: Hardware notes:
- PCB label: EXCALIBUR ELECTRONICS, INC. 6/28/96, IVANT - PCB label: EXCALIBUR ELECTRONICS, INC. 6/28/96, IVANT

View file

@ -6,7 +6,8 @@
Saitek Sensory Backgammon Computer / Electronic Champion Backgammon Saitek Sensory Backgammon Computer / Electronic Champion Backgammon
NOTE: Before exiting MAME, change the power switch from GO to STOP. Otherwise, NOTE: Before exiting MAME, change the power switch from GO to STOP. Otherwise,
NVRAM won't save properly. NVRAM won't save properly. For sbackgc, only turn it off when it's the user's
turn to move.
These were supposedly programmed by Eric van Riet Paap (not sure about Sensory, These were supposedly programmed by Eric van Riet Paap (not sure about Sensory,
but pretty certain about Champion). The Champion program got 3rd place in the but pretty certain about Champion). The Champion program got 3rd place in the
@ -457,11 +458,11 @@ void sbackgc_state::leds_w(u8 data)
u8 sbackgc_state::buttons_r() u8 sbackgc_state::buttons_r()
{ {
u8 data = 0; u8 data = 0xf;
for (int i = 0; i < 4; i++) for (int i = 0; i < 4; i++)
if (m_inp_mux & m_inputs[i]->read()) if (m_inp_mux & m_inputs[i]->read())
data |= 1 << i; data ^= 1 << i;
return data; return data;
} }
@ -469,25 +470,27 @@ u8 sbackgc_state::buttons_r()
u8 sbackgc_state::input1_r() u8 sbackgc_state::input1_r()
{ {
// R90-R93: multiplexed inputs // R90-R93: multiplexed inputs
// read buttons (high) u8 data = 0xf;
u8 data = buttons_r() & 0xc;
// read board // read board
for (int i = 0; i < 4; i++) for (int i = 0; i < 4; i++)
if (m_inp_mux & board_r(i)) if (m_inp_mux & board_r(i))
data |= 1 << i; data ^= 1 << i;
return ~data; // read buttons (high)
return data & (buttons_r() | 3);
} }
u16 sbackgc_state::input2_r() u16 sbackgc_state::input2_r()
{ {
// D11,D12: read buttons (low) // D11,D12: read buttons (low)
u16 data = ~buttons_r() << 11 & 0x1800; u16 data = buttons_r() << 11 & 0x1800;
// D13: power switch state // D13: power switch state
data |= m_power ? 0x2000 : 0;
// D15: freq sel (3MHz or 5MHz) // D15: freq sel (3MHz or 5MHz)
return data | (m_power ? 0x2000 : 0) | 0x800f; return data | 0x800f;
} }
void sbackgc_state::control_w(u16 data) void sbackgc_state::control_w(u16 data)