mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
hd6301x: add irq pins to p5 read,
acesp: hook up irq2
This commit is contained in:
parent
1903828812
commit
6cc988f9ec
@ -1942,8 +1942,15 @@ void hd6301y_cpu_device::p5_ddr_w(uint8_t data)
|
||||
|
||||
uint8_t hd6301x_cpu_device::p5_data_r()
|
||||
{
|
||||
// read-only
|
||||
return m_in_portx_func[0]();
|
||||
uint8_t data = m_in_portx_func[0]();
|
||||
|
||||
if (m_irq_state[HD6301_IRQ1_LINE])
|
||||
data &= 0xfe;
|
||||
if (m_irq_state[HD6301_IRQ2_LINE])
|
||||
data &= 0xfd;
|
||||
|
||||
// no DDR, read-only
|
||||
return data;
|
||||
}
|
||||
|
||||
uint8_t hd6301y_cpu_device::p5_data_r()
|
||||
@ -1951,7 +1958,14 @@ uint8_t hd6301y_cpu_device::p5_data_r()
|
||||
if (m_portx_ddr[0] == 0xff)
|
||||
return m_portx_data[0];
|
||||
else
|
||||
return ((m_in_portx_func[0]() | ((m_irq_state[M6801_IS3_LINE]) ? 0x10 : 0)) & (m_portx_ddr[0] ^ 0xff)) | (m_portx_data[0] & m_portx_ddr[0]);
|
||||
{
|
||||
uint8_t data = hd6301x_cpu_device::p5_data_r();
|
||||
|
||||
if (m_irq_state[M6801_IS3_LINE])
|
||||
data |= 0x10;
|
||||
|
||||
return (data & (m_portx_ddr[0] ^ 0xff)) | (m_portx_data[0] & m_portx_ddr[0]);
|
||||
}
|
||||
}
|
||||
|
||||
void hd6301y_cpu_device::p5_data_w(uint8_t data)
|
||||
|
@ -155,11 +155,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(ace_sp_state::gen_fixfreq)
|
||||
// 6303Y must take vector 0xffea periodically, as amongst other things it clears a counter
|
||||
// in RAM which is increased in one of the other interrupts, with a time-out check which
|
||||
// will cause the game to jump back to the reset vector if it fails
|
||||
//
|
||||
// adding code to the core to generate it at the moment then causes a stack overflow issue
|
||||
// instead, which again the code checks for, and resets if the stack grows too large
|
||||
|
||||
//m_maincpu->force_irq2();
|
||||
m_maincpu->set_input_line(HD6301_IRQ2_LINE, HOLD_LINE);
|
||||
}
|
||||
|
||||
void ace_sp_state::ace_sp(machine_config &config)
|
||||
@ -170,7 +166,7 @@ void ace_sp_state::ace_sp(machine_config &config)
|
||||
PIA6821(config, "pia0");
|
||||
|
||||
// unknown frequency
|
||||
TIMER(config, "fixedfreq").configure_periodic(FUNC(ace_sp_state::gen_fixfreq), attotime::from_hz(50));
|
||||
TIMER(config, "fixedfreq").configure_periodic(FUNC(ace_sp_state::gen_fixfreq), attotime::from_hz(10));
|
||||
|
||||
ACE_SP_REELCTRL(config, m_reelctrl, 2000000); // unknown clock
|
||||
|
||||
|
@ -12,9 +12,9 @@ This program got 3rd place in the first Computer Olympiad in 1989 (backgammon
|
||||
category). It also includes several game variations like Jacquet or Trictrac.
|
||||
|
||||
MAME's sensorboard interface is a bit different compared to chess. Pieces can be
|
||||
stacked up to 3. Pressing the Bear Off key (Del / Backspace) will also remove the
|
||||
currently held piece. Capturing pieces is disabled, except when hitting a blot,
|
||||
in which case the captured piece is held.
|
||||
stacked up to 3. Pressing the Bear Off button (Del / Backspace) will also remove
|
||||
the currently held piece. Capturing pieces is disabled, except when hitting a
|
||||
blot, in which case the captured piece is held.
|
||||
|
||||
Hardware notes:
|
||||
- PCB label: GT4-PE-009
|
||||
@ -203,20 +203,21 @@ void ecbackg_state::board_init_cb(int state)
|
||||
init_backgammon();
|
||||
}
|
||||
|
||||
u8 ecbackg_state::board_spawn_cb(offs_t offset)
|
||||
{
|
||||
return (offset == 1) ? 1 : 4;
|
||||
}
|
||||
|
||||
INPUT_CHANGED_MEMBER(ecbackg_state::bear_off)
|
||||
{
|
||||
if (newval)
|
||||
{
|
||||
// remove piece when Bear Off button is pressed
|
||||
board_remove_cb();
|
||||
m_board->refresh();
|
||||
}
|
||||
}
|
||||
|
||||
u8 ecbackg_state::board_spawn_cb(offs_t offset)
|
||||
{
|
||||
return (offset == 1) ? 1 : 4;
|
||||
}
|
||||
|
||||
u8 ecbackg_state::board_remove_cb()
|
||||
{
|
||||
int handpos = m_board->get_handpos();
|
||||
|
Loading…
Reference in New Issue
Block a user