diff options
author | 2019-09-10 13:18:17 +0200 | |
---|---|---|
committer | 2019-09-10 13:18:28 +0200 | |
commit | 0e4d54c5087f1e2b4e8bf98bc181e22597a9d99b (patch) | |
tree | 44f61033fb496d18f2975833a2cef7494ae72403 /src | |
parent | d5b3dca0ad0b849cf6170700bd979792ff6a8e87 (diff) |
archimds.cpp: preliminary serial joystick interface [Angelo Salese]
- also adds compatibility tests for AA (nw)
Diffstat (limited to 'src')
-rw-r--r-- | src/mame/drivers/ertictac.cpp | 2 | ||||
-rw-r--r-- | src/mame/drivers/riscpc.cpp | 2 | ||||
-rw-r--r-- | src/mame/includes/archimds.h | 1 | ||||
-rw-r--r-- | src/mame/machine/archimds.cpp | 38 |
4 files changed, 39 insertions, 4 deletions
diff --git a/src/mame/drivers/ertictac.cpp b/src/mame/drivers/ertictac.cpp index 2686577a556..475ba24611e 100644 --- a/src/mame/drivers/ertictac.cpp +++ b/src/mame/drivers/ertictac.cpp @@ -9,7 +9,7 @@ original driver by Tomasz Slanina, Steve Ellenoff, Nicola Salmoria rewrite to use AA functions by R. Belmont & Angelo Salese - special thanks to Tom Walker (author of the Acorn Archimedes Arculator emulator) + special thanks to Sarah Walker (author of the Acorn Archimedes Arculator emulator) TODO (specific issues only): - Sound is currently ugly in both games, recognizable but still nowhere near perfection diff --git a/src/mame/drivers/riscpc.cpp b/src/mame/drivers/riscpc.cpp index 9bece06ee4d..a1b1d7e0c99 100644 --- a/src/mame/drivers/riscpc.cpp +++ b/src/mame/drivers/riscpc.cpp @@ -5,7 +5,7 @@ Acorn Archimedes 7000/7000+ very preliminary driver by Angelo Salese, - based on work by Tomasz Slanina and Tom Walker + based on work by Tomasz Slanina and Sarah Walker TODO: - Move device implementations into specific files; diff --git a/src/mame/includes/archimds.h b/src/mame/includes/archimds.h index ea3ecb87623..2e13bb33219 100644 --- a/src/mame/includes/archimds.h +++ b/src/mame/includes/archimds.h @@ -146,6 +146,7 @@ private: emu_timer *m_vbl_timer; uint8_t m_floppy_select; bool check_floppy_ready(); + uint8_t m_joy_serial_data; }; /* IOC registers */ diff --git a/src/mame/machine/archimds.cpp b/src/mame/machine/archimds.cpp index f79739dd7f7..319c963afa5 100644 --- a/src/mame/machine/archimds.cpp +++ b/src/mame/machine/archimds.cpp @@ -612,6 +612,8 @@ WRITE32_MEMBER( archimedes_state::ioc_ctrl_w ) ---- --x- I2C clock ---- ---x I2C data */ + + //m_ioc_regs[CONTROL] = data & 0x38; //if(data & 0x40) // popmessage("Muting sound, contact MAME/MESSdev"); break; @@ -839,6 +841,38 @@ WRITE32_MEMBER(archimedes_state::archimedes_ioc_w) { switch(ioc_addr & 0xfffc) { + // serial joy port (!JS application) + case 0x10: + { + // compared to RTFM they reversed bits 0-3 (or viceversa, dunno what came out first) + // for pragmatic convenience we bitswap here, but this should really be a slot option at some point. + // TODO: understand how player 2 inputs routes, related somehow to CONTROL bit 6 (cfr. blitz in SW list) + // TODO: paradr2k polls here with bit 7 and fails detection (Vertical Twist) + uint8_t cur_joy_in = bitswap<8>(m_joy[0].read_safe(0xff),7,6,5,4,0,1,2,3); + + m_joy_serial_data = (data & 0xff) ^ 0xff; + bool serial_on = false; + + if (m_joy_serial_data == 0x20) + serial_on = true; + else if (m_joy_serial_data & cur_joy_in) + serial_on = true; + + + // wants printer irq for some reason (connected on parallel?) + if (serial_on == true) + { + archimedes_request_irq_a(ARCHIMEDES_IRQA_PRINTER_BUSY); + //m_ioc_regs[CONTROL] |= 0x40; + } + else + { + archimedes_clear_irq_a(ARCHIMEDES_IRQA_PRINTER_BUSY); + //m_ioc_regs[CONTROL] &= ~0x40; + } + + return; + } case 0x18: // latch B /* ---- x--- floppy controller reset @@ -962,8 +996,8 @@ WRITE32_MEMBER(archimedes_state::archimedes_vidc_w) g = (val & 0x00f0) >> 4; r = (val & 0x000f) >> 0; - if(reg == 0x40 && val & 0xfff) - logerror("WARNING: border color write here (PC=%08x)!\n",m_maincpu->pc()); + //if(reg == 0x40 && val & 0xfff) + // logerror("WARNING: border color write here (PC=%08x)!\n",m_maincpu->pc()); m_palette->set_pen_color(reg >> 2, pal4bit(r), pal4bit(g), pal4bit(b) ); |