(nw) a5105 : added cassette read per schematic, but not working

This commit is contained in:
Robbbert 2019-05-24 10:33:06 +10:00
parent d110ecf603
commit 52c159d916
2 changed files with 36 additions and 7 deletions

View File

@ -2,18 +2,20 @@
// copyright-holders:Angelo Salese, Robbbert
/***************************************************************************
A5105
A5105
12/05/2009 Skeleton driver.
2009-05-12 Skeleton driver.
http://www.robotrontechnik.de/index.htm?/html/computer/a5105.htm
http://www.sax.de/~zander/bic/bic_bw.html
http://www.robotrontechnik.de/index.htm?/html/computer/a5105.htm
http://www.sax.de/~zander/bic/bic_bw.html
- this looks like "somehow" inspired by the MSX1 machine?
- this looks like "somehow" inspired by the MSX1 machine?
Cassette commands: CSAVE "name" ; CLOAD
ToDo:
- Cassette Load (bit 7 of port 91)
- Cassette (coded per schematic, but doesn't work)
****************************************************************************/
@ -69,6 +71,7 @@ private:
DECLARE_READ8_MEMBER(a5105_memsel_r);
DECLARE_READ8_MEMBER(key_r);
DECLARE_READ8_MEMBER(key_mux_r);
DECLARE_READ8_MEMBER(pio_pb_r);
DECLARE_WRITE8_MEMBER(key_mux_w);
DECLARE_WRITE8_MEMBER(a5105_ab_w);
DECLARE_WRITE8_MEMBER(a5105_memsel_w);
@ -164,6 +167,31 @@ void a5105_state::a5105_mem(address_map &map)
map(0xc000, 0xffff).bankrw("bank4");
}
READ8_MEMBER( a5105_state::pio_pb_r )
{
/*
PIO Channel B
0 W PAR12
1 ? SER1
2 ? SER2
3 ? SER3
4 ? SER4
5 W JOY2
6 W /JOYEN
7 R Cassette Data
*/
uint8_t data = 0x7f;
// cassette data
data |= (m_cass->input() > 0) ? 0x80 : 0;
return data;
}
WRITE8_MEMBER( a5105_state::pcg_addr_w )
{
m_pcg_addr = data << 3;
@ -595,6 +623,7 @@ void a5105_state::a5105(machine_config &config)
ctc.zc_callback<2>().set("z80ctc", FUNC(z80ctc_device::trg3));
z80pio_device& pio(Z80PIO(config, "z80pio", XTAL(15'000'000) / 4));
pio.in_pb_callback().set(FUNC(a5105_state::pio_pb_r));
pio.out_int_callback().set_inputline(m_maincpu, 0);
CASSETTE(config, m_cass);

View File

@ -70,7 +70,7 @@ private:
TIMER_DEVICE_CALLBACK_MEMBER( pro80_state::kansas_r )
{
m_cass_data[1]++;
uint8_t cass_ws = ((m_cass)->input() > +0.03) ? 1 : 0;
uint8_t cass_ws = (m_cass->input() > +0.03) ? 1 : 0;
if (cass_ws != m_cass_data[0])
{