segas24.cpp: Add uPD4701A devices; update documentation (nw)

This commit is contained in:
AJR 2017-09-06 16:32:56 -04:00
parent 8b7d5df242
commit 7f35d736ad
2 changed files with 63 additions and 50 deletions

View File

@ -174,18 +174,19 @@ I/O Controller PCB Layout
|----------------------| IDC 34 |---|
| |
| |
| D4701 %2 |
| D4701 |
| MSM6253RS |
| |
| %3 |
| %1 74LS139 |
| CN1 |
| --------------------------| |
| |-------------------------- |
| D4701 MSM6253RS 74LS139 |
| |
| CN1 |
| --------------------------| |
| |-------------------------- |
|--------------------------------------|
Notes:
- %1 - Unpopulated position for D4701 IC
%2 - Unpopulated position for MSM6253RS IC
%3 - Unpopulated position for MSM6253RS IC
- For games other than Hot Rod, ICs other than LS139 and one uPD4701A are not
populated. Hot Rod doesn't seem to use the second MSM6253 (whose four inputs
are labeled "BLAKE" on the schematics), but has it populated anyway.
- CN1 is shown for completeness, it's actually underneath the I/O PCB.
@ -343,6 +344,7 @@ Notes:
#include "machine/fd1094.h"
#include "machine/msm6253.h"
#include "machine/nvram.h"
#include "machine/upd4701.h"
#include "machine/315_5296.h"
#include "sound/volt_reg.h"
#include "sound/ym2151.h"
@ -554,32 +556,6 @@ WRITE8_MEMBER(segas24_state::hotrod_lamps_w)
// Lamps
}
READ8_MEMBER(segas24_state::dials_r)
{
switch(offset)
{
// Steering dials
case 0:
return m_dials[0].read_safe(0) & 0xff;
case 1:
return m_dials[0].read_safe(0) >> 8;
case 2:
return m_dials[1].read_safe(0) & 0xff;
case 3:
return m_dials[1].read_safe(0) >> 8;
case 4:
return m_dials[2].read_safe(0) & 0xff;
case 5:
return m_dials[2].read_safe(0) >> 8;
case 6:
return m_dials[3].read_safe(0) & 0xff;
case 7:
return m_dials[3].read_safe(0) >> 8;
}
return 0;
}
READ16_MEMBER( segas24_state::iod_r )
{
logerror("IO daughterboard read %02x (%x)\n", offset, space.device().safe_pc());
@ -1112,7 +1088,6 @@ static ADDRESS_MAP_START( system24_cpu1_map, AS_PROGRAM, 16, segas24_state )
AM_RANGE(0xbc0002, 0xbc0003) AM_MIRROR(0x03fff8) AM_READWRITE8(frc_mode_r, frc_mode_w,0x00ff)
AM_RANGE(0xbc0004, 0xbc0005) AM_MIRROR(0x03fff8) AM_READWRITE8(frc_r, frc_w,0x00ff)
AM_RANGE(0xbc0006, 0xbc0007) AM_MIRROR(0x03fff8) AM_READWRITE(mlatch_r, mlatch_w)
AM_RANGE(0xc00000, 0xc0000f) AM_MIRROR(0x07ffe0) AM_READ8(dials_r, 0x00ff)
AM_RANGE(0xc80000, 0xcbffff) AM_ROMBANK("bank2")
AM_RANGE(0xcc0000, 0xcc0001) AM_MIRROR(0x03fff8) AM_READWRITE(curbank_r, curbank_w)
AM_RANGE(0xcc0002, 0xcc0003) AM_MIRROR(0x03fff8) AM_READWRITE8(frc_mode_r, frc_mode_w,0x00ff)
@ -1122,9 +1097,17 @@ static ADDRESS_MAP_START( system24_cpu1_map, AS_PROGRAM, 16, segas24_state )
AM_RANGE(0xf80000, 0xfbffff) AM_MIRROR(0x040000) AM_RAM AM_SHARE("share1")
ADDRESS_MAP_END
static ADDRESS_MAP_START( roughrac_cpu1_map, AS_PROGRAM, 16, segas24_state )
AM_IMPORT_FROM(system24_cpu1_map)
AM_RANGE(0xc00000, 0xc00007) AM_MIRROR(0x07ffe0) AM_DEVREAD8("upd4701", upd4701_device, read_xy, 0x00ff)
ADDRESS_MAP_END
static ADDRESS_MAP_START( hotrod_cpu1_map, AS_PROGRAM, 16, segas24_state )
AM_IMPORT_FROM(system24_cpu1_map)
AM_RANGE(0xc00010, 0xc00011) AM_MIRROR(0x07ffe0) AM_DEVREADWRITE8("pedaladc", msm6253_device, d7_r, select_w, 0x00ff)
AM_RANGE(0xc00000, 0xc00007) AM_MIRROR(0x07ffe0) AM_DEVREAD8("upd1", upd4701_device, read_xy, 0x00ff)
AM_RANGE(0xc00008, 0xc0000f) AM_MIRROR(0x07ffe0) AM_DEVREAD8("upd2", upd4701_device, read_xy, 0x00ff)
AM_RANGE(0xc00010, 0xc00011) AM_MIRROR(0x07ffec) AM_DEVREADWRITE8("adc1", msm6253_device, d7_r, select_w, 0x00ff)
AM_RANGE(0xc00012, 0xc00013) AM_MIRROR(0x07ffec) AM_DEVREADWRITE8("adc2", msm6253_device, d7_r, select_w, 0x00ff)
ADDRESS_MAP_END
@ -1159,7 +1142,6 @@ static ADDRESS_MAP_START( system24_cpu2_map, AS_PROGRAM, 16, segas24_state )
AM_RANGE(0xbc0002, 0xbc0003) AM_MIRROR(0x03fff8) AM_READWRITE8(frc_mode_r, frc_mode_w,0x00ff)
AM_RANGE(0xbc0004, 0xbc0005) AM_MIRROR(0x03fff8) AM_READWRITE8(frc_r, frc_w,0x00ff)
AM_RANGE(0xbc0006, 0xbc0007) AM_MIRROR(0x03fff8) AM_READWRITE(mlatch_r, mlatch_w)
AM_RANGE(0xc00000, 0xc0000f) AM_MIRROR(0x07ffe0) AM_READ8(dials_r, 0x00ff)
AM_RANGE(0xc80000, 0xcbffff) AM_ROMBANK("bank2")
AM_RANGE(0xcc0000, 0xcc0001) AM_MIRROR(0x03fff8) AM_READWRITE(curbank_r, curbank_w)
AM_RANGE(0xcc0002, 0xcc0003) AM_MIRROR(0x03fff8) AM_READWRITE8(frc_mode_r, frc_mode_w,0x00ff)
@ -1169,9 +1151,17 @@ static ADDRESS_MAP_START( system24_cpu2_map, AS_PROGRAM, 16, segas24_state )
AM_RANGE(0xf80000, 0xfbffff) AM_MIRROR(0x040000) AM_RAM AM_SHARE("share1")
ADDRESS_MAP_END
static ADDRESS_MAP_START( roughrac_cpu2_map, AS_PROGRAM, 16, segas24_state )
AM_IMPORT_FROM(system24_cpu2_map)
AM_RANGE(0xc00000, 0xc00007) AM_MIRROR(0x07ffe0) AM_DEVREAD8("upd4701", upd4701_device, read_xy, 0x00ff)
ADDRESS_MAP_END
static ADDRESS_MAP_START( hotrod_cpu2_map, AS_PROGRAM, 16, segas24_state )
AM_IMPORT_FROM(system24_cpu2_map)
AM_RANGE(0xc00010, 0xc00011) AM_MIRROR(0x07ffe0) AM_DEVREADWRITE8("pedaladc", msm6253_device, d7_r, select_w, 0x00ff)
AM_RANGE(0xc00000, 0xc00007) AM_MIRROR(0x07ffe0) AM_DEVREAD8("upd1", upd4701_device, read_xy, 0x00ff)
AM_RANGE(0xc00008, 0xc0000f) AM_MIRROR(0x07ffe0) AM_DEVREAD8("upd2", upd4701_device, read_xy, 0x00ff)
AM_RANGE(0xc00010, 0xc00011) AM_MIRROR(0x07ffec) AM_DEVREADWRITE8("adc1", msm6253_device, d7_r, select_w, 0x00ff)
AM_RANGE(0xc00012, 0xc00013) AM_MIRROR(0x07ffec) AM_DEVREADWRITE8("adc2", msm6253_device, d7_r, select_w, 0x00ff)
ADDRESS_MAP_END
static ADDRESS_MAP_START( decrypted_opcodes_map, AS_OPCODES, 16, segas24_state )
@ -1316,16 +1306,16 @@ static INPUT_PORTS_START( hotrod )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DIAL1")
PORT_BIT( 0xfff, 0x000, IPT_DIAL ) PORT_MINMAX(0x000,0xfff) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1)
PORT_BIT( 0xfff, 0x000, IPT_DIAL ) PORT_MINMAX(0x000,0xfff) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_RESET PORT_PLAYER(1)
PORT_START("DIAL2")
PORT_BIT( 0xfff, 0x000, IPT_DIAL ) PORT_MINMAX(0x000,0xfff) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2)
PORT_BIT( 0xfff, 0x000, IPT_DIAL ) PORT_MINMAX(0x000,0xfff) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_RESET PORT_PLAYER(2)
PORT_START("DIAL3")
PORT_BIT( 0xfff, 0x000, IPT_DIAL ) PORT_MINMAX(0x000,0xfff) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(3)
PORT_BIT( 0xfff, 0x000, IPT_DIAL ) PORT_MINMAX(0x000,0xfff) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_RESET PORT_PLAYER(3)
PORT_START("DIAL4")
PORT_BIT( 0xfff, 0x000, IPT_DIAL ) PORT_MINMAX(0x000,0xfff) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(4)
PORT_BIT( 0xfff, 0x000, IPT_DIAL ) PORT_MINMAX(0x000,0xfff) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_RESET PORT_PLAYER(4)
PORT_START("PEDAL1")
PORT_BIT( 0xff, 0x01, IPT_PEDAL ) PORT_MINMAX(0x01,0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1)
@ -1437,10 +1427,10 @@ static INPUT_PORTS_START( roughrac )
PORT_DIPSETTING( 0x00, "15" )
PORT_START("DIAL1")
PORT_BIT( 0xfff, 0x000, IPT_DIAL ) PORT_MINMAX(0x000,0xfff) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1)
PORT_BIT( 0xfff, 0x000, IPT_DIAL ) PORT_MINMAX(0x000,0xfff) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_RESET PORT_PLAYER(1)
PORT_START("DIAL2")
PORT_BIT( 0xfff, 0x000, IPT_DIAL ) PORT_MINMAX(0x000,0xfff) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2)
PORT_BIT( 0xfff, 0x000, IPT_DIAL ) PORT_MINMAX(0x000,0xfff) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_RESET PORT_PLAYER(2)
INPUT_PORTS_END
static INPUT_PORTS_START( sspirits )
@ -1635,7 +1625,10 @@ static INPUT_PORTS_START( sgmastj )
//"SW2:8" not divert from "sgmast"
PORT_START("DIAL1")
PORT_BIT( 0xfff, 0x000, IPT_DIAL ) PORT_MINMAX(0x000,0xfff) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2)
PORT_BIT( 0xfff, 0x000, IPT_DIAL ) PORT_MINMAX(0x000,0xfff) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_RESET PORT_PLAYER(2)
PORT_START("DIAL2")
PORT_BIT( 0xfff, 0x000, IPT_UNUSED )
INPUT_PORTS_END
static INPUT_PORTS_START( quizmeku )
@ -1938,11 +1931,21 @@ static MACHINE_CONFIG_DERIVED( system24_floppy_hotrod, system24_floppy )
MCFG_CPU_MODIFY("subcpu")
MCFG_CPU_PROGRAM_MAP(hotrod_cpu2_map)
MCFG_DEVICE_ADD("pedaladc", MSM6253, 0)
MCFG_DEVICE_ADD("upd1", UPD4701A, 0) // IC4 on 834-6510 I/O board
MCFG_UPD4701_PORTX("DIAL1")
MCFG_UPD4701_PORTY("DIAL2")
MCFG_DEVICE_ADD("upd2", UPD4701A, 0) // IC1
MCFG_UPD4701_PORTX("DIAL3")
MCFG_UPD4701_PORTY("DIAL4")
MCFG_DEVICE_ADD("adc1", MSM6253, 0) // IC5 - 33k/33p R/C clock
MCFG_MSM6253_IN0_ANALOG_PORT("PEDAL1")
MCFG_MSM6253_IN1_ANALOG_PORT("PEDAL2")
MCFG_MSM6253_IN2_ANALOG_PORT("PEDAL3")
MCFG_MSM6253_IN3_ANALOG_PORT("PEDAL4")
MCFG_DEVICE_ADD("adc2", MSM6253, 0) // IC2 - 33k/33p R/C clock
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( system24_floppy_fd1094, system24_floppy )
@ -1951,6 +1954,17 @@ static MACHINE_CONFIG_DERIVED( system24_floppy_fd1094, system24_floppy )
MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( system24_floppy_fd_upd, system24_floppy_fd1094 )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(roughrac_cpu1_map)
MCFG_CPU_MODIFY("subcpu")
MCFG_CPU_PROGRAM_MAP(roughrac_cpu2_map)
MCFG_DEVICE_ADD("upd4701", UPD4701A, 0) // IC4 on 834-6510-01 I/O board
MCFG_UPD4701_PORTX("DIAL1")
MCFG_UPD4701_PORTY("DIAL2")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( dcclub, system24 )
MCFG_DEVICE_MODIFY("io")
MCFG_315_5296_IN_PORTA_CB(READ8(segas24_state, dcclub_p1_r))
@ -2455,8 +2469,8 @@ DRIVER_INIT_MEMBER(segas24_state,roughrac)
/* 04 */GAME( 1989, crkdownj, crkdown, system24_floppy_fd1094, crkdown, segas24_state, crkdown, ROT0, "Sega", "Crack Down (Japan, Floppy Based, FD1094 317-0058-04b Rev A)", MACHINE_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display)
/* 05 */GAME( 1989, sgmast, 0, system24_floppy_fd1094, sgmast, segas24_state, sgmast, ROT0, "Sega", "Super Masters Golf (World?, Floppy Based, FD1094 317-0058-05d?)", 0 )
/* 05 */GAME( 1989, sgmastc, sgmast, system24_floppy_fd1094, sgmast, segas24_state, sgmast, ROT0, "Sega", "Jumbo Ozaki Super Masters Golf (World, Floppy Based, FD1094 317-0058-05c)", MACHINE_IMPERFECT_GRAPHICS ) // some gfx offset / colour probs?
/* 05 */GAME( 1989, sgmastj, sgmast, system24_floppy_fd1094, sgmastj, segas24_state, sgmast, ROT0, "Sega", "Jumbo Ozaki Super Masters Golf (Japan, Floppy Based, FD1094 317-0058-05b)", MACHINE_IMPERFECT_GRAPHICS ) // some gfx offset / colour probs?
/* 06 */GAME( 1990, roughrac, 0, system24_floppy_fd1094, roughrac, segas24_state, roughrac, ROT0, "Sega", "Rough Racer (Japan, Floppy Based, FD1094 317-0058-06b)", 0 )
/* 05 */GAME( 1989, sgmastj, sgmast, system24_floppy_fd_upd, sgmastj, segas24_state, sgmast, ROT0, "Sega", "Jumbo Ozaki Super Masters Golf (Japan, Floppy Based, FD1094 317-0058-05b)", MACHINE_IMPERFECT_GRAPHICS ) // some gfx offset / colour probs?
/* 06 */GAME( 1990, roughrac, 0, system24_floppy_fd_upd, roughrac, segas24_state, roughrac, ROT0, "Sega", "Rough Racer (Japan, Floppy Based, FD1094 317-0058-06b)", 0 )
/* 07 */GAME( 1990, bnzabros, 0, system24_floppy, bnzabros, segas24_state, bnzabros, ROT0, "Sega", "Bonanza Bros (US, Floppy DS3-5000-07d? Based)", 0 )
/* 07 */GAME( 1990, bnzabrosj, bnzabros, system24_floppy, bnzabros, segas24_state, bnzabros, ROT0, "Sega", "Bonanza Bros (Japan, Floppy DS3-5000-07b Based)", 0 )
/* 08 */GAME( 1991, qsww, 0, system24_floppy_fd1094, qsww, segas24_state, qsww, ROT0, "Sega", "Quiz Syukudai wo Wasuremashita (Japan, Floppy Based, FD1094 317-0058-08b)", MACHINE_IMPERFECT_GRAPHICS ) // wrong bg colour on title

View File

@ -102,7 +102,6 @@ public:
DECLARE_WRITE8_MEMBER( frc_w );
DECLARE_READ16_MEMBER( mlatch_r );
DECLARE_WRITE16_MEMBER( mlatch_w );
DECLARE_READ8_MEMBER( dials_r );
DECLARE_READ16_MEMBER( iod_r );
DECLARE_WRITE16_MEMBER( iod_w );