Merge pull request #1395 from ajrhacker/m68340_get_cs

Memberize public non-member function of m68340cpu_device (nw)
This commit is contained in:
Miodrag Milanović 2016-09-13 09:13:11 +02:00 committed by GitHub
commit 0a5078ac07
7 changed files with 17 additions and 17 deletions

View File

@ -32,11 +32,11 @@ int m68340_calc_cs(m68340cpu_device *m68k, offs_t address)
UINT16 m68340_get_cs(m68340cpu_device *device, offs_t address)
UINT16 m68340cpu_device::get_cs(offs_t address)
{
device->m68340_currentcs = m68340_calc_cs(device, address);
m68340_currentcs = m68340_calc_cs(this, address);
return device->m68340_currentcs;
return m68340_currentcs;
}

View File

@ -38,6 +38,8 @@ public:
UINT16 m_picr;
UINT16 m_pitr;
UINT16 get_cs(offs_t address);
READ32_MEMBER( m68340_internal_base_r );
WRITE32_MEMBER( m68340_internal_base_w );
READ32_MEMBER( m68340_internal_dma_r );
@ -66,8 +68,6 @@ protected:
static const device_type M68340 = &device_creator<m68340cpu_device>;
extern UINT16 m68340_get_cs(m68340cpu_device *device, offs_t address);

View File

@ -133,7 +133,7 @@ public:
READ32_MEMBER(astrafr_state::astrafr_mem_r)
{
int pc = space.device().safe_pc();
int cs = m68340_get_cs(m_maincpu, offset * 4);
int cs = m_maincpu->get_cs(offset * 4);
switch ( cs )
{
@ -161,7 +161,7 @@ WRITE32_MEMBER(astrafr_state::astrafr_mem_w)
{
int pc = space.device().safe_pc();
int address = offset * 4;
int cs = m68340_get_cs(m_maincpu, address);
int cs = m_maincpu->get_cs(address);
switch ( cs )
@ -190,7 +190,7 @@ WRITE32_MEMBER(astrafr_state::astrafr_mem_w)
READ32_MEMBER(astrafr_state::astrafr_slave_mem_r)
{
int pc = space.device().safe_pc();
int cs = m68340_get_cs(m_slavecpu, offset * 4);
int cs = m_slavecpu->get_cs(offset * 4);
switch ( cs )
{
@ -216,7 +216,7 @@ WRITE32_MEMBER(astrafr_state::astrafr_slave_mem_w)
{
int pc = space.device().safe_pc();
int address = offset * 4;
int cs = m68340_get_cs(m_slavecpu, address);
int cs = m_slavecpu->get_cs(address);
switch ( cs )

View File

@ -624,7 +624,7 @@ ADDRESS_MAP_END
READ32_MEMBER(sc4_adder4_state::adder4_mem_r)
{
int pc = space.device().safe_pc();
int cs = m68340_get_cs(m_adder4cpu, offset * 4);
int cs = m_adder4cpu->get_cs(offset * 4);
switch ( cs )
{
@ -646,7 +646,7 @@ READ32_MEMBER(sc4_adder4_state::adder4_mem_r)
WRITE32_MEMBER(sc4_adder4_state::adder4_mem_w)
{
int pc = space.device().safe_pc();
int cs = m68340_get_cs(m_adder4cpu, offset * 4);
int cs = m_adder4cpu->get_cs(offset * 4);
switch ( cs )
{

View File

@ -136,7 +136,7 @@ protected:
READ32_MEMBER(bfm_swp_state::bfm_swp_mem_r)
{
int pc = space.device().safe_pc();
int cs = m68340_get_cs(m_maincpu, offset * 4);
int cs = m_maincpu->get_cs(offset * 4);
switch ( cs )
{
@ -158,7 +158,7 @@ READ32_MEMBER(bfm_swp_state::bfm_swp_mem_r)
WRITE32_MEMBER(bfm_swp_state::bfm_swp_mem_w)
{
int pc = space.device().safe_pc();
int cs = m68340_get_cs(m_maincpu, offset * 4);
int cs = m_maincpu->get_cs(offset * 4);
switch ( cs )
{

View File

@ -281,7 +281,7 @@ READ32_MEMBER(mpu5_state::mpu5_mem_r)
{
int pc = space.device().safe_pc();
int addr = offset *4;
int cs = m68340_get_cs(m_maincpu, addr);
int cs = m_maincpu->get_cs(addr);
switch ( cs )
{
@ -477,7 +477,7 @@ WRITE32_MEMBER(mpu5_state::mpu5_mem_w)
{
int pc = space.device().safe_pc();
int addr = offset *4;
int cs = m68340_get_cs(m_maincpu, addr);
int cs = m_maincpu->get_cs(addr);
switch ( cs )
{

View File

@ -206,7 +206,7 @@ public:
READ32_MEMBER(pluto5_state::pluto5_mem_r)
{
int pc = space.device().safe_pc();
int cs = m68340_get_cs(m_maincpu, offset * 4);
int cs = m_maincpu->get_cs(offset * 4);
switch ( cs )
{
@ -224,7 +224,7 @@ READ32_MEMBER(pluto5_state::pluto5_mem_r)
WRITE32_MEMBER(pluto5_state::pluto5_mem_w)
{
int pc = space.device().safe_pc();
int cs = m68340_get_cs(m_maincpu, offset * 4);
int cs = m_maincpu->get_cs(offset * 4);
switch ( cs )
{