silence some excessive logging

This commit is contained in:
David Haywood 2013-05-02 19:39:03 +00:00
parent 0fc1821990
commit a663637e9c
7 changed files with 2258 additions and 84 deletions

1
.gitattributes vendored
View File

@ -4580,6 +4580,7 @@ src/mame/layout/barricad.lay svneol=native#text/plain
src/mame/layout/barrier.lay svneol=native#text/plain
src/mame/layout/beaminv.lay svneol=native#text/plain
src/mame/layout/bfm_sc4.lay svneol=native#text/native
src/mame/layout/bfm_sc5.lay svneol=native#text/plain
src/mame/layout/bfmsys85.lay svneol=native#text/plain
src/mame/layout/bingowng.lay svneol=native#text/plain
src/mame/layout/blckjack.lay svneol=native#text/plain

View File

@ -5,7 +5,8 @@
#include "emu.h"
#include "mcf5206e.h"
//#define debuglog printf
#define debuglog logerror
static ADDRESS_MAP_START( coldfire_regs_map, AS_0, 32, mcf5206e_peripheral_device )
@ -48,12 +49,14 @@ static ADDRESS_MAP_START( coldfire_regs_map, AS_0, 32, mcf5206e_peripheral_devic
AM_RANGE(0x100, 0x103) AM_READWRITE16(TMR1_r, TMR1_w, 0xffffffff)
AM_RANGE(0x104, 0x107) AM_READWRITE16(TRR1_r, TRR1_w, 0xffffffff)
AM_RANGE(0x10c, 0x10f) AM_READWRITE16(TCN1_r, TCN1_w, 0xffffffff)
AM_RANGE(0x110, 0x113) AM_READWRITE8(TER1_r, TER1_w, 0xffffffff)
AM_RANGE(0x1c4, 0x1c7) AM_READWRITE8(PPDDR_r, PPDDR_w, 0xffffffff)
AM_RANGE(0x1c8, 0x1cb) AM_READWRITE8(PPDAT_r, PPDAT_w, 0xffffffff)
AM_RANGE(0x1e4, 0x1e7) AM_READWRITE8(MFDR_r, MFDR_w, 0xffffffff)
AM_RANGE(0x1e8, 0x1eb) AM_READWRITE8(MBCR_r, MBCR_w, 0xffffffff)
AM_RANGE(0x1ec, 0x1ef) AM_READWRITE8(MBSR_r, MBSR_w, 0xffffffff)
ADDRESS_MAP_END
@ -65,16 +68,16 @@ READ8_MEMBER( mcf5206e_peripheral_device::ICR1_ICR2_ICR3_ICR4_r )
switch (offset)
{
case 0: // 0x014
printf("(External IRQ1/IPL1 Interrupt Vector) ICR1_r\n");
debuglog("%s: (External IRQ1/IPL1 Interrupt Vector) ICR1_r\n", this->machine().describe_context());
return m_ICR[ICR1];
case 1: // 0x015
printf("(External IPL2 Interrupt Vector) ICR2_r\n");
debuglog("%s: (External IPL2 Interrupt Vector) ICR2_r\n", this->machine().describe_context());
return m_ICR[ICR2];
case 2: // 0x016
printf("(External IPL3 Interrupt Vector) ICR3_r\n");
debuglog("%s: (External IPL3 Interrupt Vector) ICR3_r\n", this->machine().describe_context());
return m_ICR[ICR3];
case 3: // 0x017
printf("(External IRQ4/IPL4 Interrupt Vector) ICR4_r\n");
debuglog("%s: (External IRQ4/IPL4 Interrupt Vector) ICR4_r\n", this->machine().describe_context());
return m_ICR[ICR4];
}
@ -87,22 +90,22 @@ WRITE8_MEMBER( mcf5206e_peripheral_device::ICR1_ICR2_ICR3_ICR4_w )
{
case 0: // 0x014
m_ICR[ICR1] = data;
printf("(External IRQ1/IPL1 Interrupt Vector) ICR1_w %02x\n",data);
debuglog("%s: (External IRQ1/IPL1 Interrupt Vector) ICR1_w %02x\n", this->machine().describe_context(), data);
ICR_info(m_ICR[ICR1]);
break;
case 1: // 0x015
m_ICR[ICR2] = data;
printf("(External IPL2 Interrupt Vector) ICR2_w %02x\n",data);
debuglog("%s: (External IPL2 Interrupt Vector) ICR2_w %02x\n", this->machine().describe_context(), data);
ICR_info(m_ICR[ICR2]);
break;
case 2: // 0x016
m_ICR[ICR3] = data;
printf("(External IPL3 Interrupt Vector) ICR3_w %02x\n",data);
debuglog("%s: (External IPL3 Interrupt Vector) ICR3_w %02x\n", this->machine().describe_context(), data);
ICR_info(m_ICR[ICR3]);
break;
case 3: // 0x017
m_ICR[ICR4] = data;
printf("(External IRQ4/IPL4 Interrupt Vector) ICR4_w %02x\n",data);
debuglog("%s: (External IRQ4/IPL4 Interrupt Vector) ICR4_w %02x\n", this->machine().describe_context(), data);
ICR_info(m_ICR[ICR4]);
break;
}
@ -113,16 +116,16 @@ READ8_MEMBER( mcf5206e_peripheral_device::ICR9_ICR10_ICR11_ICR12_r )
switch (offset)
{
case 0: // 0x01c
printf("(Timer 1 Interrupt Vector) ICR9_r\n");
debuglog("%s: (Timer 1 Interrupt Vector) ICR9_r\n", this->machine().describe_context());
return m_ICR[ICR9];
case 1: // 0x01d
printf("(Timer 2 Interrupt Vector) ICR10_r\n");
debuglog("%s: (Timer 2 Interrupt Vector) ICR10_r\n", this->machine().describe_context());
return m_ICR[ICR10];
case 2: // 0x01e
printf("(MBUS Interrupt Vector) ICR11_r\n");
debuglog("%s: (MBUS Interrupt Vector) ICR11_r\n", this->machine().describe_context());
return m_ICR[ICR11];
case 3: // 0x01f
printf("(UART1 Interrupt Vector) ICR12_r\n");
debuglog("%s: (UART1 Interrupt Vector) ICR12_r\n", this->machine().describe_context());
return m_ICR[ICR12];
}
@ -135,22 +138,22 @@ WRITE8_MEMBER( mcf5206e_peripheral_device::ICR9_ICR10_ICR11_ICR12_w )
{
case 0: // 0x01c
m_ICR[ICR9] = data;
printf("(Timer 1 Interrupt Vector) ICR9_w %02x\n",data);
debuglog("%s: (Timer 1 Interrupt Vector) ICR9_w %02x\n", this->machine().describe_context(), data);
ICR_info(m_ICR[ICR9]);
break;
case 1: // 0x01d
m_ICR[ICR10] = data;
printf("(Timer 2 Interrupt Vector) ICR10_w %02x\n",data);
debuglog("%s: (Timer 2 Interrupt Vector) ICR10_w %02x\n", this->machine().describe_context(), data);
ICR_info(m_ICR[ICR10]);
break;
case 2: // 0x01e
m_ICR[ICR11] = data;
printf("(MBUS Interrupt Vector) ICR11_w %02x\n",data);
debuglog("%s: (MBUS Interrupt Vector) ICR11_w %02x\n", this->machine().describe_context(), data);
ICR_info(m_ICR[ICR11]);
break;
case 3: // 0x01f
m_ICR[ICR12] = data;
printf("(UART1 Interrupt Vector) ICR12_w %02x\n",data);
debuglog("%s: (UART1 Interrupt Vector) ICR12_w %02x\n", this->machine().describe_context(), data);
ICR_info(m_ICR[ICR12]);
break;
}
@ -161,12 +164,12 @@ READ8_MEMBER( mcf5206e_peripheral_device::ICR13_r )
switch (offset)
{
case 0: // 0x020
printf("(UART2 Interrupt Vector) ICR13_r\n");
debuglog("%s: (UART2 Interrupt Vector) ICR13_r\n", this->machine().describe_context());
return m_ICR[ICR13];
case 1:
case 2:
case 3:
printf("invalid ICR13_r %d\n", offset);
debuglog("%s: invalid ICR13_r %d\n", this->machine().describe_context(), offset);
return 0;
}
@ -179,13 +182,13 @@ WRITE8_MEMBER( mcf5206e_peripheral_device::ICR13_w )
{
case 0: // 0x020
m_ICR[ICR13] = data;
printf("(UART2 Interrupt Vector) ICR13_w %02x\n",data);
debuglog("%s: (UART2 Interrupt Vector) ICR13_w %02x\n", this->machine().describe_context(), data);
ICR_info(m_ICR[ICR13]);
break;
case 1:
case 2:
case 3:
printf("invalid ICR13_w %d, %02x\n", offset, data);
debuglog("%s: invalid ICR13_w %d, %02x\n", this->machine().describe_context(), offset, data);
break;
}
}
@ -195,12 +198,12 @@ inline UINT16 mcf5206e_peripheral_device::CSAR_r(int which, int offset, UINT16 m
{
if (offset==0)
{
printf("CSAR%d_r\n", which);
debuglog("%s: CSAR%d_r\n", this->machine().describe_context(), which);
return m_CSAR[which];
}
else
{
logerror("invalid CSAR%d_r with offset %d\n", which, offset);
debuglog("%s: invalid CSAR%d_r with offset %d\n", this->machine().describe_context(), which, offset);
return 0;
}
}
@ -210,36 +213,36 @@ inline void mcf5206e_peripheral_device::CSAR_w(int which, int offset, UINT16 dat
if (offset==0)
{
COMBINE_DATA( &m_CSAR[which] );
printf("CSAR%d_w %04x\n", which, data);
debuglog("%s: CSAR%d_w %04x\n", this->machine().describe_context(), which, data);
}
else
{
logerror("invalid CSAR%d_w with offset %d %04x\n", which, offset, data);
debuglog("%s: invalid CSAR%d_w with offset %d %04x\n", this->machine().describe_context(), which, offset, data);
}
}
inline UINT32 mcf5206e_peripheral_device::CSMR_r(int which, UINT32 mem_mask)
{
printf("CSMR%d_r\n", which);
debuglog("%s: CSMR%d_r\n", this->machine().describe_context(), which);
return m_CSMR[0];
}
inline void mcf5206e_peripheral_device::CSMR_w(int which, UINT32 data, UINT32 mem_mask)
{
COMBINE_DATA( &m_CSMR[0] );
printf("CSMR%d_w %08x\n", which, data);
debuglog("%s: CSMR%d_w %08x\n", this->machine().describe_context(), which, data);
}
inline UINT16 mcf5206e_peripheral_device::CSCR_r(int which, int offset, UINT16 mem_mask)
{
if (offset==1)
{
printf("CSCR%d_r\n", which);
debuglog("%s: CSCR%d_r\n", this->machine().describe_context(), which);
return m_CSCR[which];
}
else
{
logerror("invalid CSCR%d_r with offset %d\n", which, offset);
debuglog("%s: invalid CSCR%d_r with offset %d\n", this->machine().describe_context(), which, offset);
return 0;
}
}
@ -249,11 +252,11 @@ inline void mcf5206e_peripheral_device::CSCR_w(int which, int offset, UINT16 dat
if (offset==1)
{
COMBINE_DATA( &m_CSCR[which] );
printf("CSCR%d_w %04x\n", which, data);
debuglog("%s: CSCR%d_w %04x\n", this->machine().describe_context(), which, data);
}
else
{
logerror("invalid CSCR%d_r with offset %d %04x\n", which, offset, data);
debuglog("%s: invalid CSCR%d_r with offset %d %04x\n", this->machine().describe_context(), which, offset, data);
}
}
@ -324,10 +327,10 @@ READ16_MEMBER( mcf5206e_peripheral_device::DMCR_r)
switch (offset)
{
case 1:
printf("DMCR_r %04x\n", mem_mask);
debuglog("%s: DMCR_r %04x\n", this->machine().describe_context(), mem_mask);
return m_DMCR;
case 0:
printf("invalid DMCR_r %d %04x\n", offset, mem_mask);
debuglog("%s: invalid DMCR_r %d %04x\n", this->machine().describe_context(), offset, mem_mask);
return 0;
}
@ -340,10 +343,10 @@ WRITE16_MEMBER( mcf5206e_peripheral_device::DMCR_w)
{
case 1:
COMBINE_DATA(&m_DMCR);
printf("DMCR_w %04x %04x\n",data, mem_mask);
debuglog("%s: DMCR_w %04x %04x\n", this->machine().describe_context(), data, mem_mask);
break;
case 0:
printf("invalid DMCR_w %d, %04x %04x\n", offset, data, mem_mask);
debuglog("%s: invalid DMCR_w %d, %04x %04x\n", this->machine().describe_context(), offset, data, mem_mask);
break;
}
@ -355,10 +358,10 @@ READ16_MEMBER( mcf5206e_peripheral_device::PAR_r)
switch (offset)
{
case 1:
printf("PAR_r %04x\n", mem_mask);
debuglog("%s: PAR_r %04x\n", this->machine().describe_context(), mem_mask);
return m_PAR;
case 0:
printf("invalid PAR_r %d %04x\n", offset, mem_mask);
debuglog("%s: invalid PAR_r %d %04x\n", this->machine().describe_context(), offset, mem_mask);
return 0;
}
@ -371,10 +374,10 @@ WRITE16_MEMBER( mcf5206e_peripheral_device::PAR_w)
{
case 1:
COMBINE_DATA(&m_PAR);
printf("PAR_w %04x %04x\n",data, mem_mask);
debuglog("%s: PAR_w %04x %04x\n", this->machine().describe_context(), data, mem_mask);
break;
case 0:
printf("invalid PAR_w %d, %04x %04x\n", offset, data, mem_mask);
debuglog("%s: invalid PAR_w %d, %04x %04x\n", this->machine().describe_context(), offset, data, mem_mask);
break;
}
@ -389,10 +392,10 @@ READ8_MEMBER( mcf5206e_peripheral_device::PPDDR_r)
case 0:
case 2:
case 3:
printf("invalid PPDDR_r %d\n", offset);
debuglog("%s: invalid PPDDR_r %d\n", this->machine().describe_context(), offset);
return 0;
case 1: // '$1C5'
printf("PPDDR_r\n");
debuglog("%s: PPDDR_r\n", this->machine().describe_context());
return m_PPDDR;
}
@ -406,11 +409,11 @@ WRITE8_MEMBER( mcf5206e_peripheral_device::PPDDR_w)
case 0:
case 2:
case 3:
printf("invalid PPDDR_w %d %02x\n", offset, data);
debuglog("%s: invalid PPDDR_w %d %02x\n", this->machine().describe_context(), offset, data);
break;
case 1: // '$1C5'
m_PPDDR = data;
printf("PPDDR_w %02x\n", data);
debuglog("%s: PPDDR_w %02x\n", this->machine().describe_context(), data);
break;
}
}
@ -422,10 +425,10 @@ READ8_MEMBER( mcf5206e_peripheral_device::PPDAT_r)
case 0:
case 2:
case 3:
printf("invalid PPDAT_r %d\n", offset);
debuglog("%s: invalid PPDAT_r %d\n", this->machine().describe_context(), offset);
return 0;
case 1: // '$1C9'
printf("PPDAT_r\n");
debuglog("%s: PPDAT_r\n", this->machine().describe_context());
return m_PPDAT; // should use a callback.
}
@ -439,11 +442,11 @@ WRITE8_MEMBER( mcf5206e_peripheral_device::PPDAT_w)
case 0:
case 2:
case 3:
printf("invalid PPDAT_w %d, %02x\n", offset, data);
debuglog("%s: invalid PPDAT_w %d, %02x\n", this->machine().describe_context(), offset, data);
break;
case 1: // '$1C9'
m_PPDAT = data; // should use a callback.
printf("PPDAT_w %02x\n", data);
debuglog("%s: PPDAT_w %02x\n", this->machine().describe_context(), data);
break;
}
@ -455,12 +458,12 @@ READ8_MEMBER( mcf5206e_peripheral_device::MBCR_r)
switch (offset)
{
case 0:
printf("MBCR_r\n");
debuglog("%s: MBCR_r\n", this->machine().describe_context());
return m_MBCR;
case 1:
case 2:
case 3:
printf("invalid MBCR_r %d\n", offset);
debuglog("%s: invalid MBCR_r %d\n", this->machine().describe_context(), offset);
return 0;
}
@ -473,29 +476,72 @@ WRITE8_MEMBER( mcf5206e_peripheral_device::MBCR_w)
{
case 0:
m_MBCR = data;
printf("MBCR_w %02x\n",data);
debuglog("%s: MBCR_w %02x\n", this->machine().describe_context(), data);
break;
case 1:
case 2:
case 3:
printf("invalid MBCR_w %d, %02x\n", offset, data);
debuglog("%s: invalid MBCR_w %d, %02x\n", this->machine().describe_context(), offset, data);
break;
}
}
READ8_MEMBER( mcf5206e_peripheral_device::MFDR_r)
{
switch (offset)
{
case 0:
debuglog("%s: MFDR_r\n", this->machine().describe_context());
return m_MFDR;
case 1:
case 2:
case 3:
debuglog("%s: invalid MFDR_r %d\n", this->machine().describe_context(), offset);
return 0;
}
return 0;
}
WRITE8_MEMBER( mcf5206e_peripheral_device::MFDR_w)
{
switch (offset)
{
case 0:
m_MFDR = data;
debuglog("%s: MFDR_w %02x\n", this->machine().describe_context(), data);
break;
case 1:
case 2:
case 3:
debuglog("%s: invalid MFDR_w %d, %02x\n", this->machine().describe_context(), offset, data);
break;
}
}
READ8_MEMBER( mcf5206e_peripheral_device::MBSR_r)
{
static int hack = 0x00;
switch (offset)
{
case 0:
printf("MBSR_r\n");
return m_MBSR;
{
hack ^= (machine().rand()&0xff);
debuglog("%s: MBSR_r\n", this->machine().describe_context());
return m_MBSR | hack; // will loop on this after a while
}
case 1:
case 2:
case 3:
printf("invalid MBSR_r %d\n", offset);
debuglog("%s: invalid MBSR_r %d\n", this->machine().describe_context(), offset);
return 0;
}
@ -508,12 +554,12 @@ WRITE8_MEMBER( mcf5206e_peripheral_device::MBSR_w)
{
case 0:
m_MBSR = data;
printf("MBSR_w %02x\n",data);
debuglog("%s: MBSR_w %02x\n", this->machine().describe_context(), data);
break;
case 1:
case 2:
case 3:
printf("invalid MBSR_w %d, %02x\n", offset, data);
debuglog("%s: invalid MBSR_w %d, %02x\n", this->machine().describe_context(), offset, data);
break;
}
@ -526,10 +572,10 @@ READ16_MEMBER( mcf5206e_peripheral_device::IMR_r)
switch (offset)
{
case 1:
printf("IMR_r %04x\n", mem_mask);
debuglog("%s: IMR_r %04x\n", this->machine().describe_context(), mem_mask);
return m_IMR;
case 0:
printf("invalid IMR_r %d %04x\n", offset, mem_mask);
debuglog("%s: invalid IMR_r %d %04x\n", this->machine().describe_context(), offset, mem_mask);
return 0;
}
@ -542,10 +588,10 @@ WRITE16_MEMBER( mcf5206e_peripheral_device::IMR_w)
{
case 1:
COMBINE_DATA(&m_IMR);
printf("IMR_w %04x %04x\n",data, mem_mask);
debuglog("%s: IMR_w %04x %04x\n", this->machine().describe_context(), data, mem_mask);
break;
case 0:
printf("invalid IMR_w %d, %04x %04x\n", offset, data, mem_mask);
debuglog("%s: invalid IMR_w %d, %04x %04x\n", this->machine().describe_context(), offset, data, mem_mask);
break;
}
@ -553,10 +599,10 @@ WRITE16_MEMBER( mcf5206e_peripheral_device::IMR_w)
void mcf5206e_peripheral_device::ICR_info(UINT8 ICR)
{
printf(" (AutoVector) AVEC : %01x | ", (ICR&0x80)>>7);
printf("(Interrupt Level) IL : %01x | ", (ICR&0x1c)>>2); // if autovector (AVEC) is used then the vectors referenced are at +24 (+0x18) + IL, ie the standard 68k autovectors, otherwise vector must be provided by device
printf("(Interrupt Priority) IP : %01x |", (ICR&0x03)>>0);
printf("(Unused bits) : %01x\n", (ICR&0x60)>>5);
debuglog(" (AutoVector) AVEC : %01x | ", (ICR&0x80)>>7);
debuglog("(Interrupt Level) IL : %01x | ", (ICR&0x1c)>>2); // if autovector (AVEC) is used then the vectors referenced are at +24 (+0x18) + IL, ie the standard 68k autovectors, otherwise vector must be provided by device
debuglog("(Interrupt Priority) IP : %01x |", (ICR&0x03)>>0);
debuglog("(Unused bits) : %01x\n", (ICR&0x60)>>5);
}
/* The timer module seems practically the same as the 68307 one, possibly make into a common device once the code isn't a hardcoded piece of junk ;-) */
@ -571,9 +617,9 @@ TIMER_CALLBACK_MEMBER(mcf5206e_peripheral_device::timer1_callback)
m_cpu->set_input_line((ICR&0x1c)>>2, HOLD_LINE);
}
printf("timer1_callback\n");
debuglog("timer1_callback\n");
timer1->adjust(attotime::from_seconds(1)); // completely made up value just to fire our timers for now
timer1->adjust(attotime::from_msec(100)); // completely made up value just to fire our timers for now
}
@ -582,10 +628,10 @@ READ16_MEMBER( mcf5206e_peripheral_device::TMR1_r)
switch (offset)
{
case 0:
printf("TMR1_r %04x\n", mem_mask);
debuglog("%s: TMR1_r %04x\n", this->machine().describe_context(), mem_mask);
return m_TMR1;
case 1:
printf("invalid TMR1_r %d %04x\n", offset, mem_mask);
debuglog("%s: invalid TMR1_r %d %04x\n", this->machine().describe_context(), offset, mem_mask);
return 0;
}
@ -598,9 +644,9 @@ WRITE16_MEMBER( mcf5206e_peripheral_device::TMR1_w)
{
case 0:
COMBINE_DATA(&m_TMR1);
printf("TMR1_w %04x %04x\n",data, mem_mask);
debuglog("%s: TMR1_w %04x %04x\n", this->machine().describe_context(), data, mem_mask);
printf(" (Prescale) PS : %02x (Capture Edge/Interrupt) CE : %01x (Output Mode) OM : %01x (Output Reference Interrupt En) ORI : %01x Free Run (FRR) : %01x Input Clock Source (ICLK) : %01x (Reset Timer) RST : %01x \n",
debuglog(" (Prescale) PS : %02x (Capture Edge/Interrupt) CE : %01x (Output Mode) OM : %01x (Output Reference Interrupt En) ORI : %01x Free Run (FRR) : %01x Input Clock Source (ICLK) : %01x (Reset Timer) RST : %01x \n",
(m_TMR1 & 0xff00)>>8, (m_TMR1 & 0x00c0)>>6, (m_TMR1 & 0x0020)>>5, (m_TMR1 & 0x0010)>>4, (m_TMR1 & 0x0008)>>3, (m_TMR1 & 0x0006)>>1, (m_TMR1 & 0x0001)>>0);
if (m_TMR1 & 0x0001)
@ -615,7 +661,7 @@ WRITE16_MEMBER( mcf5206e_peripheral_device::TMR1_w)
break;
case 1:
printf("invalid TMR1_w %d, %04x %04x\n", offset, data, mem_mask);
debuglog("%s: invalid TMR1_w %d, %04x %04x\n", this->machine().describe_context(), offset, data, mem_mask);
break;
}
@ -626,10 +672,10 @@ READ16_MEMBER( mcf5206e_peripheral_device::TRR1_r)
switch (offset)
{
case 0:
printf("TRR1_r %04x\n", mem_mask);
debuglog("%s: TRR1_r %04x\n", this->machine().describe_context(), mem_mask);
return m_TRR1;
case 1:
printf("invalid TRR1_r %d %04x\n", offset, mem_mask);
debuglog("%s: invalid TRR1_r %d %04x\n", this->machine().describe_context(), offset, mem_mask);
return 0;
}
@ -642,10 +688,10 @@ WRITE16_MEMBER( mcf5206e_peripheral_device::TRR1_w)
{
case 0:
COMBINE_DATA(&m_TRR1);
printf("TRR1_w %04x %04x\n",data, mem_mask);
debuglog("%s: TRR1_w %04x %04x\n", this->machine().describe_context(), data, mem_mask);
break;
case 1:
printf("invalid TRR1_w %d, %04x %04x\n", offset, data, mem_mask);
debuglog("%s: invalid TRR1_w %d, %04x %04x\n", this->machine().describe_context(), offset, data, mem_mask);
break;
}
@ -658,12 +704,12 @@ READ8_MEMBER( mcf5206e_peripheral_device::TER1_r)
switch (offset)
{
case 1:
printf("TER1_r\n");
debuglog("%s: TER1_r\n", this->machine().describe_context());
return 2; // hack, timer events should set bits, this just stops the code going crazy for now
case 0:
case 2:
case 3:
printf("invalid TER1_r %d\n", offset);
debuglog("%s: invalid TER1_r %d\n", this->machine().describe_context(), offset);
return 0;
}
@ -676,12 +722,42 @@ WRITE8_MEMBER( mcf5206e_peripheral_device::TER1_w)
{
case 1:
m_TER1 = data; // writes should clear the bits..
printf("TER1_w %02x\n",data);
debuglog("%s: TER1_w %02x\n", this->machine().describe_context(), data);
break;
case 0:
case 2:
case 3:
printf("invalid TER1_w %d, %02x\n", offset, data);
debuglog("%s: invalid TER1_w %d, %02x\n", this->machine().describe_context(), offset, data);
break;
}
}
READ16_MEMBER( mcf5206e_peripheral_device::TCN1_r)
{
switch (offset)
{
case 0:
debuglog("%s: TCN1_r %04x\n", this->machine().describe_context(), mem_mask);
return 0x8ca0 -1;// m_TCN1; // this should be the counter, code has a hardcoded >= check against 8ca0.
case 1:
debuglog("%s: invalid TCN1_r %d %04x\n", this->machine().describe_context(), offset, mem_mask);
return 0;
}
return 0;
}
WRITE16_MEMBER( mcf5206e_peripheral_device::TCN1_w)
{
switch (offset)
{
case 0:
COMBINE_DATA(&m_TCN1);
debuglog("%s: TCN1_w %04x %04x\n", this->machine().describe_context(), data, mem_mask);
break;
case 1:
debuglog("%s: invalid TCN1_w %d, %04x %04x\n", this->machine().describe_context(), offset, data, mem_mask);
break;
}
@ -819,6 +895,8 @@ void mcf5206e_peripheral_device::init_regs(bool first_init)
m_TMR1 = 0x0000;
m_TRR1 = 0xffff;
m_TER1 = 0x00;
m_TCN1 = 0x0000;
m_PPDDR = 0x00;
m_PPDAT = 0x00;
@ -898,8 +976,8 @@ $0CA*- PAR 16 Pin Assignment Register
$100*- TMR1 16 Timer 1 Mode Register 0000 R/W
$104*- TRR1 16 Timer 1 Reference Register FFFF R/W
$108 TCR1 16 Timer 1 Capture Register 0000 R
$10C TCN1 16 Timer 1 Counter 0000 R/W
$111 TER1 8 Timer 1 Event Register 00 R/W
$10C*- TCN1 16 Timer 1 Counter 0000 R/W
$111*- TER1 8 Timer 1 Event Register 00 R/W
$120 TMR2 16 Timer 2 Mode Register 0000 R/W
$124 TRR2 16 Timer 2 Reference Register FFFF R/W
$128 TCR2 16 Timer 2 Capture Register 0000 R
@ -944,7 +1022,7 @@ $1C5*- PPDDR 8 Port A Data Direction Register
$1C9*- PPDAT 8 Port A Data Register 00 R/W
------------ MBUS -----------
$1E0 MADR 8 M-Bus Address Register 00 R/W
$1E4 MFDR 8 M-Bus Frequency Divider Register 00 R/W
$1E4*- MFDR 8 M-Bus Frequency Divider Register 00 R/W
$1E8*- MBCR 8 M-Bus Control Register 00 R/W
$1EC*- MBSR 8 M-Bus Status Register 00 R/W
$1F0 MBDR 8 M-Bus Data I/O Register 00 R/W

View File

@ -133,6 +133,8 @@ public:
DECLARE_WRITE16_MEMBER( TRR1_w );
DECLARE_READ8_MEMBER( TER1_r );
DECLARE_WRITE8_MEMBER(TER1_w );
DECLARE_READ16_MEMBER( TCN1_r );
DECLARE_WRITE16_MEMBER( TCN1_w );
DECLARE_READ8_MEMBER( PPDDR_r );
DECLARE_WRITE8_MEMBER( PPDDR_w );
@ -147,7 +149,12 @@ public:
DECLARE_WRITE8_MEMBER( MBCR_w );
DECLARE_READ8_MEMBER( MBSR_r );
DECLARE_WRITE8_MEMBER( MBSR_w );
DECLARE_READ8_MEMBER( MFDR_r );
DECLARE_WRITE8_MEMBER( MFDR_w );
cpu_device* m_cpu;
protected:
@ -178,6 +185,7 @@ private:
UINT16 m_TMR1;
UINT16 m_TRR1;
UINT8 m_TER1;
UINT16 m_TCN1;
TIMER_CALLBACK_MEMBER(timer1_callback);
@ -188,7 +196,7 @@ private:
UINT8 m_MBCR;
UINT8 m_MBSR;
UINT8 m_MFDR;
UINT32 m_coldfire_regs[0x400/4];

View File

@ -12,19 +12,161 @@
#include "emu.h"
#include "includes/bfm_sc5.h"
#include "machine/mcf5206e.h"
#include "bfm_sc5.lh"
#include "video/awpvid.h"
static ADDRESS_MAP_START( sc5_map, AS_PROGRAM, 32, bfm_sc5_state )
// ROM (max size?)
AM_RANGE(0x00000000, 0x002fffff) AM_ROM
// ?
AM_RANGE(0x01000000, 0x0100ffff) AM_RAM
// dev1
AM_RANGE(0x01010000, 0x01010003) AM_NOP
AM_RANGE(0x01010010, 0x01010013) AM_NOP
AM_RANGE(0x01010020, 0x01010023) AM_NOP
AM_RANGE(0x01010030, 0x01010033) AM_NOP
AM_RANGE(0x01010040, 0x01010043) AM_NOP
AM_RANGE(0x01010050, 0x01010053) AM_NOP
AM_RANGE(0x01010060, 0x01010063) AM_NOP
AM_RANGE(0x01010070, 0x01010073) AM_NOP
AM_RANGE(0x01010080, 0x01010083) AM_NOP
AM_RANGE(0x01010090, 0x01010093) AM_NOP
AM_RANGE(0x010100a0, 0x010100a3) AM_NOP
AM_RANGE(0x010100b0, 0x010100b3) AM_NOP
AM_RANGE(0x010100c0, 0x010100c3) AM_NOP
AM_RANGE(0x010100d0, 0x010100d3) AM_NOP
AM_RANGE(0x010100e0, 0x010100e3) AM_NOP
AM_RANGE(0x010100f0, 0x010100f3) AM_NOP
AM_RANGE(0x01010100, 0x01010103) AM_NOP
AM_RANGE(0x01010110, 0x01010113) AM_NOP
AM_RANGE(0x01010120, 0x01010123) AM_NOP
AM_RANGE(0x01010130, 0x01010133) AM_NOP
AM_RANGE(0x01010140, 0x01010143) AM_NOP
AM_RANGE(0x01010150, 0x01010153) AM_NOP
AM_RANGE(0x01010160, 0x01010163) AM_NOP
AM_RANGE(0x01010170, 0x01010173) AM_NOP
AM_RANGE(0x01010180, 0x01010183) AM_NOP
AM_RANGE(0x01010190, 0x01010193) AM_NOP
AM_RANGE(0x010101a0, 0x010101a3) AM_NOP
AM_RANGE(0x010101b0, 0x010101b3) AM_NOP
AM_RANGE(0x010101c0, 0x010101c3) AM_NOP
AM_RANGE(0x010101d0, 0x010101d3) AM_NOP
AM_RANGE(0x010101e0, 0x010101e3) AM_NOP
AM_RANGE(0x010101f0, 0x010101f3) AM_NOP
AM_RANGE(0x01010200, 0x01010203) AM_NOP
AM_RANGE(0x01010210, 0x01010213) AM_NOP
AM_RANGE(0x01010220, 0x01010223) AM_NOP
AM_RANGE(0x01010230, 0x01010233) AM_NOP
AM_RANGE(0x01010280, 0x01010283) AM_NOP
AM_RANGE(0x010102a0, 0x010102a3) AM_NOP
AM_RANGE(0x010102c0, 0x010102c3) AM_NOP
AM_RANGE(0x010102f0, 0x010102f3) AM_NOP
AM_RANGE(0x01010300, 0x01010303) AM_NOP
AM_RANGE(0x01010330, 0x01010333) AM_NOP
AM_RANGE(0x01010360, 0x01010363) AM_NOP
AM_RANGE(0x01010380, 0x01010383) AM_NOP
AM_RANGE(0x01010390, 0x01010393) AM_NOP
// dev2
AM_RANGE(0x01020000, 0x01020003) AM_NOP
AM_RANGE(0x01020010, 0x01020013) AM_NOP
AM_RANGE(0x01020020, 0x01020023) AM_NOP
AM_RANGE(0x01020030, 0x01020033) AM_NOP
AM_RANGE(0x01020040, 0x01020043) AM_NOP
AM_RANGE(0x01020050, 0x01020053) AM_NOP
AM_RANGE(0x01020060, 0x01020063) AM_NOP
AM_RANGE(0x01020070, 0x01020073) AM_NOP
AM_RANGE(0x01020080, 0x01020083) AM_NOP
AM_RANGE(0x01020090, 0x01020093) AM_NOP
AM_RANGE(0x010200a0, 0x010200a3) AM_NOP
AM_RANGE(0x010200b0, 0x010200b3) AM_NOP
AM_RANGE(0x010200c0, 0x010200c3) AM_NOP
AM_RANGE(0x010200d0, 0x010200d3) AM_NOP
AM_RANGE(0x010200e0, 0x010200e3) AM_NOP
AM_RANGE(0x010200f0, 0x010200f3) AM_NOP
AM_RANGE(0x01020100, 0x01020103) AM_NOP
AM_RANGE(0x01020110, 0x01020113) AM_NOP
AM_RANGE(0x01020120, 0x01020123) AM_NOP
AM_RANGE(0x01020130, 0x01020133) AM_NOP
AM_RANGE(0x01020140, 0x01020143) AM_NOP
AM_RANGE(0x01020150, 0x01020153) AM_NOP
AM_RANGE(0x01020160, 0x01020163) AM_NOP
AM_RANGE(0x01020170, 0x01020173) AM_NOP
AM_RANGE(0x01020180, 0x01020183) AM_NOP
AM_RANGE(0x01020190, 0x01020193) AM_NOP
AM_RANGE(0x010201a0, 0x010201a3) AM_NOP
AM_RANGE(0x010201b0, 0x010201b3) AM_NOP
AM_RANGE(0x010201c0, 0x010201c3) AM_NOP
AM_RANGE(0x010201d0, 0x010201d3) AM_NOP
AM_RANGE(0x010201e0, 0x010201e3) AM_NOP
AM_RANGE(0x010201f0, 0x010201f3) AM_NOP
AM_RANGE(0x01020200, 0x01020203) AM_NOP
AM_RANGE(0x01020210, 0x01020213) AM_NOP
AM_RANGE(0x01020220, 0x01020223) AM_NOP
AM_RANGE(0x01020230, 0x01020233) AM_NOP
AM_RANGE(0x01020280, 0x01020283) AM_NOP
AM_RANGE(0x010202a0, 0x010202a3) AM_NOP
AM_RANGE(0x010202b0, 0x010202b3) AM_NOP
AM_RANGE(0x010202c0, 0x010202c3) AM_NOP
AM_RANGE(0x010202F0, 0x010202F3) AM_READWRITE8(sc5_10202F0_r, sc5_10202F0_w, 0xffffffff)
AM_RANGE(0x01020330, 0x01020333) AM_NOP
AM_RANGE(0x01020350, 0x01020353) AM_NOP
AM_RANGE(0x01020360, 0x01020363) AM_NOP
AM_RANGE(0x01020370, 0x01020373) AM_NOP
AM_RANGE(0x01020390, 0x01020393) AM_NOP
// ram
AM_RANGE(0x40000000, 0x4000ffff) AM_RAM
// peripherals
AM_RANGE(0xffff0000, 0xffff03ff) AM_DEVREADWRITE("maincpu_onboard", mcf5206e_peripheral_device, dev_r, dev_w) // technically this can be moved with MBAR
ADDRESS_MAP_END
INPUT_PORTS_START( bfm_sc5 )
INPUT_PORTS_END
READ8_MEMBER( bfm_sc5_state::sc5_10202F0_r )
{
switch (offset)
{
case 0x0:
case 0x1:
case 0x2:
case 0x3:
printf("%s: sc5_10202F0_r %d\n", machine().describe_context(), offset);
return 0x00;
}
return 0;
}
WRITE8_MEMBER( bfm_sc5_state::sc5_10202F0_w )
{
switch (offset)
{
case 0x0:
case 0x1:
case 0x2:
case 0x3:
printf("%s: sc5_10202F0_w %d - %02x\n", machine().describe_context(), offset, data);
break;
}
}
WRITE_LINE_MEMBER(bfm_sc5_state::bfm_sc5_ym_irqhandler)
@ -46,6 +188,10 @@ MACHINE_CONFIG_START( bfm_sc5, bfm_sc5_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_BFMBDA_ADD("vfd0",0)
MCFG_DEFAULT_LAYOUT(layout_bfm_sc5)
MCFG_SOUND_ADD("ymz", YMZ280B, 16000000) // ?? Mhz
MCFG_SOUND_CONFIG(ymz280b_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)

View File

@ -16,5 +16,7 @@ protected:
public:
DECLARE_DRIVER_INIT(sc5);
DECLARE_WRITE_LINE_MEMBER(bfm_sc5_ym_irqhandler);
DECLARE_READ8_MEMBER( sc5_10202F0_r );
DECLARE_WRITE8_MEMBER( sc5_10202F0_w );
};

1937
src/mame/layout/bfm_sc5.lay Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2061,6 +2061,8 @@ $(DRIVERS)/bfm_sc4.o: $(LAYOUT)/bfm_sc4.lh \
$(DRIVERS)/bfm_sc4h.o: $(LAYOUT)/bfm_sc4.lh \
$(LAYOUT)/sc4_dmd.lh
$(DRIVERS)/bfm_sc5.o: $(LAYOUT)/bfm_sc5.lh
$(DRIVERS)/bfmsys85.o: $(LAYOUT)/bfmsys85.lh
$(DRIVERS)/blockade.o: $(LAYOUT)/blockade.lh