Revert "Merge satcdb skeleton device with stvcd"

This reverts commit 431de71d20.
This commit is contained in:
AJR 2018-02-15 08:26:30 -05:00
parent dfe4205d4b
commit 7d201e2e08
8 changed files with 98 additions and 36 deletions

View File

@ -3311,6 +3311,8 @@ files {
MAME_DIR .. "src/mame/includes/saturn.h", MAME_DIR .. "src/mame/includes/saturn.h",
MAME_DIR .. "src/mame/drivers/saturn.cpp", MAME_DIR .. "src/mame/drivers/saturn.cpp",
MAME_DIR .. "src/mame/machine/saturn.cpp", MAME_DIR .. "src/mame/machine/saturn.cpp",
MAME_DIR .. "src/mame/machine/saturn_cdb.cpp",
MAME_DIR .. "src/mame/machine/saturn_cdb.h",
MAME_DIR .. "src/mame/includes/stv.h", MAME_DIR .. "src/mame/includes/stv.h",
MAME_DIR .. "src/mame/machine/stvprot.cpp", MAME_DIR .. "src/mame/machine/stvprot.cpp",
MAME_DIR .. "src/mame/machine/stvprot.h", MAME_DIR .. "src/mame/machine/stvprot.h",

View File

@ -1318,6 +1318,8 @@ files {
MAME_DIR .. "src/mame/includes/saturn.h", MAME_DIR .. "src/mame/includes/saturn.h",
MAME_DIR .. "src/mame/drivers/saturn.cpp", MAME_DIR .. "src/mame/drivers/saturn.cpp",
MAME_DIR .. "src/mame/machine/saturn.cpp", MAME_DIR .. "src/mame/machine/saturn.cpp",
MAME_DIR .. "src/mame/machine/saturn_cdb.cpp",
MAME_DIR .. "src/mame/machine/saturn_cdb.h",
} }
end end
-------------------------------------------------- --------------------------------------------------

View File

@ -26,7 +26,6 @@
#include "emu.h" #include "emu.h"
#include "machine/stvcd.h" #include "machine/stvcd.h"
#include "cpu/sh/sh2.h"
#include "coreutil.h" #include "coreutil.h"
// super-verbose // super-verbose
@ -78,21 +77,7 @@ stvcd_device::stvcd_device(const machine_config &mconfig, const char *tag, devic
{ {
} }
ADDRESS_MAP_START(stvcd_device::saturn_cdb_map)
AM_RANGE(0x00000000, 0x0000ffff) AM_ROM
AM_RANGE(0x01000000, 0x010fffff) AM_RAM // RAM buffer area?
AM_RANGE(0x02000000, 0x0200003f) AM_RAM // i/f with SH-2s
AM_RANGE(0x02100000, 0x0210003f) AM_RAM // i/f with SH-2s
AM_RANGE(0x02180000, 0x0218003f) AM_RAM // i/f with SH-2s
AM_RANGE(0x07000000, 0x07000fff) AM_RAM // unknown, internal RAM?
ADDRESS_MAP_END
MACHINE_CONFIG_START(stvcd_device::device_add_mconfig) MACHINE_CONFIG_START(stvcd_device::device_add_mconfig)
MCFG_CPU_ADD("cdbcpu", SH1, DERIVED_CLOCK(1, 1))
MCFG_CPU_PROGRAM_MAP(saturn_cdb_map)
MCFG_DEVICE_DISABLE() // we're not actually using the CD Block ROM for now
// Attempts to use SCI, tight loops checking bit 2 of 0x5ffffc2 (TEIE)
MCFG_CDROM_ADD("cdrom") MCFG_CDROM_ADD("cdrom")
MCFG_CDROM_INTERFACE("sat_cdrom") MCFG_CDROM_INTERFACE("sat_cdrom")
@ -2754,19 +2739,3 @@ void stvcd_device::set_tray_close()
popmessage("Tray Close"); popmessage("Tray Close");
} }
ROM_START( stvcd )
ROM_REGION( 0x10000, "cdbcpu", 0 )
ROM_DEFAULT_BIOS("cdb106")
ROM_SYSTEM_BIOS( 0, "cdb106", "Saturn CD Block 1.06" )
ROMX_LOAD( "cdb106.bin", 0x00000, 0x10000, CRC(3681d3b0) SHA1(b3c20fbe57cd2eb595e9edac86817e5948dccae4), ROM_BIOS(1) ) // for YGR019B?
ROM_SYSTEM_BIOS( 1, "cdb105", "Saturn CD Block 1.05" )
ROMX_LOAD( "cdb105.bin", 0x00000, 0x10000, CRC(2a2ced5c) SHA1(eb8393058f324e922c11b43709b64fc6ca94ab86), ROM_BIOS(2) ) // for YGR019A?
ROM_SYSTEM_BIOS( 2, "ygr022", "Saturn CD Block (YGR022 315-5962)" )
ROMX_LOAD( "ygr022.bin", 0x00000, 0x10000, CRC(1c8b9f38) SHA1(f4f6c2aac68c352814d396ae41f81f54ad228e68), ROM_BIOS(3) ) // combined package?
ROM_END
const tiny_rom_entry *stvcd_device::device_rom_region() const
{
return ROM_NAME(stvcd);
}

View File

@ -31,11 +31,8 @@ protected:
virtual void device_start() override; virtual void device_start() override;
virtual void device_reset() override; virtual void device_reset() override;
virtual void device_stop() override; virtual void device_stop() override;
virtual const tiny_rom_entry *device_rom_region() const override;
private: private:
void saturn_cdb_map(address_map &map);
TIMER_DEVICE_CALLBACK_MEMBER( stv_sector_cb ); TIMER_DEVICE_CALLBACK_MEMBER( stv_sector_cb );
TIMER_DEVICE_CALLBACK_MEMBER( stv_sh1_sim ); TIMER_DEVICE_CALLBACK_MEMBER( stv_sh1_sim );

View File

@ -431,6 +431,7 @@ test1f diagnostic hacks:
#include "machine/nvram.h" #include "machine/nvram.h"
#include "machine/smpc.h" #include "machine/smpc.h"
#include "machine/stvcd.h" #include "machine/stvcd.h"
#include "machine/saturn_cdb.h"
#include "sound/scsp.h" #include "sound/scsp.h"
#include "video/stvvdp1.h" #include "video/stvvdp1.h"
#include "video/stvvdp2.h" #include "video/stvvdp2.h"
@ -841,7 +842,7 @@ MACHINE_CONFIG_START(sat_console_state::saturn)
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0) MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0) MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
MCFG_DEVICE_ADD("stvcd", STVCD, 16000000) MCFG_DEVICE_ADD("stvcd", STVCD, 0)
//MCFG_SOUND_ROUTE(0, "lspeaker", 1.0) //MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
//MCFG_SOUND_ROUTE(1, "rspeaker", 1.0) //MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
@ -862,6 +863,7 @@ SLOT_INTERFACE_END
MACHINE_CONFIG_START(sat_console_state::saturnus) MACHINE_CONFIG_START(sat_console_state::saturnus)
saturn(config); saturn(config);
MCFG_DEVICE_ADD("saturn_cdb", SATURN_CDB, 16000000)
MCFG_SOFTWARE_LIST_ADD("cd_list","saturn") MCFG_SOFTWARE_LIST_ADD("cd_list","saturn")
MCFG_SOFTWARE_LIST_FILTER("cd_list","NTSC-U") MCFG_SOFTWARE_LIST_FILTER("cd_list","NTSC-U")
@ -876,6 +878,7 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(sat_console_state::saturneu) MACHINE_CONFIG_START(sat_console_state::saturneu)
saturn(config); saturn(config);
MCFG_DEVICE_ADD("saturn_cdb", SATURN_CDB, 16000000)
MCFG_SOFTWARE_LIST_ADD("cd_list","saturn") MCFG_SOFTWARE_LIST_ADD("cd_list","saturn")
MCFG_SOFTWARE_LIST_FILTER("cd_list","PAL") MCFG_SOFTWARE_LIST_FILTER("cd_list","PAL")
@ -889,6 +892,7 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(sat_console_state::saturnjp) MACHINE_CONFIG_START(sat_console_state::saturnjp)
saturn(config); saturn(config);
MCFG_DEVICE_ADD("saturn_cdb", SATURN_CDB, 16000000)
MCFG_SOFTWARE_LIST_ADD("cd_list","saturn") MCFG_SOFTWARE_LIST_ADD("cd_list","saturn")
MCFG_SOFTWARE_LIST_FILTER("cd_list","NTSC-J") MCFG_SOFTWARE_LIST_FILTER("cd_list","NTSC-J")

View File

@ -41,9 +41,11 @@
#include "cpu/m68000/m68000.h" #include "cpu/m68000/m68000.h"
#include "cpu/scudsp/scudsp.h" #include "cpu/scudsp/scudsp.h"
#include "cpu/sh/sh2.h" #include "cpu/sh/sh2.h"
#include "imagedev/chd_cd.h"
#include "machine/smpc.h" #include "machine/smpc.h"
#include "machine/stvcd.h" #include "machine/stvcd.h"
#include "machine/stvprot.h" #include "machine/stvprot.h"
#include "sound/cdda.h"
#include "sound/scsp.h" #include "sound/scsp.h"
#include "screen.h" #include "screen.h"
@ -1131,7 +1133,7 @@ MACHINE_CONFIG_START(stv_state::stvcd)
MCFG_CPU_PROGRAM_MAP(stvcd_mem) MCFG_CPU_PROGRAM_MAP(stvcd_mem)
MCFG_DEVICE_MODIFY("slave") MCFG_DEVICE_MODIFY("slave")
MCFG_CPU_PROGRAM_MAP(stvcd_mem) MCFG_CPU_PROGRAM_MAP(stvcd_mem)
MCFG_DEVICE_ADD("stvcd", STVCD, 16000000) MCFG_DEVICE_ADD("stvcd", STVCD, 0)
//MCFG_SOUND_ROUTE(0, "lspeaker", 1.0) //MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
//MCFG_SOUND_ROUTE(1, "rspeaker", 1.0) //MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
MACHINE_CONFIG_END MACHINE_CONFIG_END

View File

@ -0,0 +1,57 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood
/* Notes
YGR019B - Hitachi YGR019B CD-Subsystem LSI. Earlier revision is YGR019A. Later revision combines this IC and the SH1 together
into one IC (YGR022 315-5962). The SH1 and the YGR019B make up the 'CD Block' CD Authentication and CD I/O data controller.
Another of it's functions is to prevent copied CDs from being played
Attempts to use SCI, tight loops checking bit 2 of 0x5ffffc2 (TEIE)
*/
#include "emu.h"
#include "machine/saturn_cdb.h"
DEFINE_DEVICE_TYPE(SATURN_CDB, saturn_cdb_device, "satcdb", "Saturn CDB (CD Block)")
saturn_cdb_device::saturn_cdb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, SATURN_CDB, tag, owner, clock)
{
}
void saturn_cdb_device::device_start()
{
}
ADDRESS_MAP_START(saturn_cdb_device::saturn_cdb_map)
AM_RANGE(0x00000000, 0x0000ffff) AM_ROM
AM_RANGE(0x01000000, 0x010fffff) AM_RAM // RAM buffer area?
AM_RANGE(0x02000000, 0x0200003f) AM_RAM // i/f with SH-2s
AM_RANGE(0x02100000, 0x0210003f) AM_RAM // i/f with SH-2s
AM_RANGE(0x02180000, 0x0218003f) AM_RAM // i/f with SH-2s
AM_RANGE(0x07000000, 0x07000fff) AM_RAM // unknown, internal RAM?
ADDRESS_MAP_END
MACHINE_CONFIG_START(saturn_cdb_device::device_add_mconfig)
MCFG_CPU_ADD("cdbcpu", SH1, DERIVED_CLOCK(1, 1))
MCFG_CPU_PROGRAM_MAP(saturn_cdb_map)
MCFG_DEVICE_DISABLE() // we're not actually using the CD Block ROM for now
MACHINE_CONFIG_END
ROM_START( satcdb )
ROM_REGION( 0x10000, "cdbcpu", 0 )
ROM_DEFAULT_BIOS("cdb106")
ROM_SYSTEM_BIOS( 0, "cdb106", "Saturn CD Block 1.06" )
ROMX_LOAD( "cdb106.bin", 0x00000, 0x10000, CRC(3681d3b0) SHA1(b3c20fbe57cd2eb595e9edac86817e5948dccae4), ROM_BIOS(1) ) // for YGR019B?
ROM_SYSTEM_BIOS( 1, "cdb105", "Saturn CD Block 1.05" )
ROMX_LOAD( "cdb105.bin", 0x00000, 0x10000, CRC(2a2ced5c) SHA1(eb8393058f324e922c11b43709b64fc6ca94ab86), ROM_BIOS(2) ) // for YGR019A?
ROM_SYSTEM_BIOS( 2, "ygr022", "Saturn CD Block (YGR022 315-5962)" )
ROMX_LOAD( "ygr022.bin", 0x00000, 0x10000, CRC(1c8b9f38) SHA1(f4f6c2aac68c352814d396ae41f81f54ad228e68), ROM_BIOS(3) ) // combined package?
ROM_END
const tiny_rom_entry *saturn_cdb_device::device_rom_region() const
{
return ROM_NAME(satcdb);
}

View File

@ -0,0 +1,29 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood
#ifndef MAME_MACHINE_SATURN_CDB_H
#define MAME_MACHINE_SATURN_CDB_H
#pragma once
#include "cpu/sh/sh2.h"
DECLARE_DEVICE_TYPE(SATURN_CDB, saturn_cdb_device)
class saturn_cdb_device : public device_t
{
public:
// construction/destruction
saturn_cdb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
void saturn_cdb_map(address_map &map);
protected:
virtual void device_start() override;
virtual const tiny_rom_entry *device_rom_region() const override;
virtual void device_add_mconfig(machine_config &config) override;
private:
};
#endif // MAME_MACHINE_SATURN_CDB_H