summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/powerpc/ppccom.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/cpu/powerpc/ppccom.c')
-rw-r--r--src/emu/cpu/powerpc/ppccom.c226
1 files changed, 113 insertions, 113 deletions
diff --git a/src/emu/cpu/powerpc/ppccom.c b/src/emu/cpu/powerpc/ppccom.c
index 1b41c2c0c22..384c039b9bd 100644
--- a/src/emu/cpu/powerpc/ppccom.c
+++ b/src/emu/cpu/powerpc/ppccom.c
@@ -214,19 +214,19 @@ ppc_device::ppc_device(const machine_config &mconfig, device_type type, const ch
, m_core(NULL)
, m_bus_freq_multiplier(1)
, m_vtlb(NULL)
- , m_flavor(flavor)
- , m_cap(cap)
- , m_tb_divisor(tb_divisor)
- , m_cache(CACHE_SIZE + sizeof(internal_ppc_state))
- , m_drcuml(NULL)
- , m_drcfe(NULL)
+ , m_flavor(flavor)
+ , m_cap(cap)
+ , m_tb_divisor(tb_divisor)
+ , m_cache(CACHE_SIZE + sizeof(internal_ppc_state))
+ , m_drcuml(NULL)
+ , m_drcfe(NULL)
, m_drcoptions(0)
-{
- m_program_config.m_logaddr_width = 32;
- m_program_config.m_page_shift = POWERPC_MIN_PAGE_SHIFT;
-}
-
-//ppc403_device::ppc403_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+{
+ m_program_config.m_logaddr_width = 32;
+ m_program_config.m_page_shift = POWERPC_MIN_PAGE_SHIFT;
+}
+
+//ppc403_device::ppc403_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
// : ppc_device(mconfig, PPC403, "PPC403", tag, owner, clock, "ppc403", 32?, 64?)
//{
//}
@@ -1238,15 +1238,15 @@ offs_t ppc_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *opro
ppccom_dcstore_callback - call the dcstore
callback if installed
-------------------------------------------------*/
-
-void ppc_device::ppccom_dcstore_callback()
-{
- if (!m_dcstore_cb.isnull())
- {
- m_dcstore_cb(*m_program, m_core->param0, 0, 0xffffffff);
- }
-}
-
+
+void ppc_device::ppccom_dcstore_callback()
+{
+ if (!m_dcstore_cb.isnull())
+ {
+ m_dcstore_cb(*m_program, m_core->param0, 0, 0xffffffff);
+ }
+}
+
/***************************************************************************
TLB HANDLING
@@ -2058,15 +2058,15 @@ TIMER_CALLBACK_MEMBER( ppc_device::decrementer_int_callback )
/*-------------------------------------------------
ppc_set_dcstore_callback - installs a callback
- for detecting datacache stores with dcbst
--------------------------------------------------*/
-
-void ppc_device::ppc_set_dcstore_callback(write32_delegate callback)
-{
- m_dcstore_cb = callback;
-}
-
-
+ for detecting datacache stores with dcbst
+-------------------------------------------------*/
+
+void ppc_device::ppc_set_dcstore_callback(write32_delegate callback)
+{
+ m_dcstore_cb = callback;
+}
+
+
void ppc_device::execute_set_input(int inputnum, int state)
{
switch (inputnum)
@@ -2285,38 +2285,38 @@ TIMER_CALLBACK_MEMBER( ppc_device::ppc4xx_buffered_dma_callback )
{
/* byte transfer */
case 1:
- do
- {
- UINT8 data = 0;
- if (!m_ext_dma_read_cb[dmachan].isnull())
- data = (m_ext_dma_read_cb[dmachan])(*m_program, 1, 0xffffffff);
- m_program->write_byte(dmaregs[DCR4XX_DMADA0], data);
- dmaregs[DCR4XX_DMADA0] += destinc;
- } while (!ppc4xx_dma_decrement_count(dmachan));
+ do
+ {
+ UINT8 data = 0;
+ if (!m_ext_dma_read_cb[dmachan].isnull())
+ data = (m_ext_dma_read_cb[dmachan])(*m_program, 1, 0xffffffff);
+ m_program->write_byte(dmaregs[DCR4XX_DMADA0], data);
+ dmaregs[DCR4XX_DMADA0] += destinc;
+ } while (!ppc4xx_dma_decrement_count(dmachan));
break;
/* word transfer */
case 2:
- do
- {
- UINT16 data = 0;
- if (!m_ext_dma_read_cb[dmachan].isnull())
- data = (m_ext_dma_read_cb[dmachan])(*m_program, 2, 0xffffffff);
- m_program->write_word(dmaregs[DCR4XX_DMADA0], data);
- dmaregs[DCR4XX_DMADA0] += destinc;
- } while (!ppc4xx_dma_decrement_count(dmachan));
+ do
+ {
+ UINT16 data = 0;
+ if (!m_ext_dma_read_cb[dmachan].isnull())
+ data = (m_ext_dma_read_cb[dmachan])(*m_program, 2, 0xffffffff);
+ m_program->write_word(dmaregs[DCR4XX_DMADA0], data);
+ dmaregs[DCR4XX_DMADA0] += destinc;
+ } while (!ppc4xx_dma_decrement_count(dmachan));
break;
/* dword transfer */
case 4:
- do
- {
- UINT32 data = 0;
- if (!m_ext_dma_read_cb[dmachan].isnull())
- data = (m_ext_dma_read_cb[dmachan])(*m_program, 4, 0xffffffff);
- m_program->write_dword(dmaregs[DCR4XX_DMADA0], data);
- dmaregs[DCR4XX_DMADA0] += destinc;
- } while (!ppc4xx_dma_decrement_count(dmachan));
+ do
+ {
+ UINT32 data = 0;
+ if (!m_ext_dma_read_cb[dmachan].isnull())
+ data = (m_ext_dma_read_cb[dmachan])(*m_program, 4, 0xffffffff);
+ m_program->write_dword(dmaregs[DCR4XX_DMADA0], data);
+ dmaregs[DCR4XX_DMADA0] += destinc;
+ } while (!ppc4xx_dma_decrement_count(dmachan));
break;
}
}
@@ -2329,36 +2329,36 @@ TIMER_CALLBACK_MEMBER( ppc_device::ppc4xx_buffered_dma_callback )
{
/* byte transfer */
case 1:
- do
- {
- UINT8 data = m_program->read_byte(dmaregs[DCR4XX_DMADA0]);
- if (!m_ext_dma_write_cb[dmachan].isnull())
- (m_ext_dma_write_cb[dmachan])(*m_program, 1, data, 0xffffffff);
- dmaregs[DCR4XX_DMADA0] += destinc;
- } while (!ppc4xx_dma_decrement_count(dmachan));
- break;
+ do
+ {
+ UINT8 data = m_program->read_byte(dmaregs[DCR4XX_DMADA0]);
+ if (!m_ext_dma_write_cb[dmachan].isnull())
+ (m_ext_dma_write_cb[dmachan])(*m_program, 1, data, 0xffffffff);
+ dmaregs[DCR4XX_DMADA0] += destinc;
+ } while (!ppc4xx_dma_decrement_count(dmachan));
+ break;
/* word transfer */
case 2:
- do
- {
- UINT16 data = m_program->read_word(dmaregs[DCR4XX_DMADA0]);
- if (!m_ext_dma_write_cb[dmachan].isnull())
- (m_ext_dma_write_cb[dmachan])(*m_program, 2, data, 0xffffffff);
- dmaregs[DCR4XX_DMADA0] += destinc;
- } while (!ppc4xx_dma_decrement_count(dmachan));
- break;
+ do
+ {
+ UINT16 data = m_program->read_word(dmaregs[DCR4XX_DMADA0]);
+ if (!m_ext_dma_write_cb[dmachan].isnull())
+ (m_ext_dma_write_cb[dmachan])(*m_program, 2, data, 0xffffffff);
+ dmaregs[DCR4XX_DMADA0] += destinc;
+ } while (!ppc4xx_dma_decrement_count(dmachan));
+ break;
/* dword transfer */
case 4:
- do
- {
- UINT32 data = m_program->read_dword(dmaregs[DCR4XX_DMADA0]);
- if (!m_ext_dma_write_cb[dmachan].isnull())
- (m_ext_dma_write_cb[dmachan])(*m_program, 4, data, 0xffffffff);
- dmaregs[DCR4XX_DMADA0] += destinc;
- } while (!ppc4xx_dma_decrement_count(dmachan));
- break;
+ do
+ {
+ UINT32 data = m_program->read_dword(dmaregs[DCR4XX_DMADA0]);
+ if (!m_ext_dma_write_cb[dmachan].isnull())
+ (m_ext_dma_write_cb[dmachan])(*m_program, 4, data, 0xffffffff);
+ dmaregs[DCR4XX_DMADA0] += destinc;
+ } while (!ppc4xx_dma_decrement_count(dmachan));
+ break;
}
}
}
@@ -2674,14 +2674,14 @@ TIMER_CALLBACK_MEMBER( ppc_device::ppc4xx_spu_callback )
int operation = (m_spu.regs[SPU4XX_TX_COMMAND] >> 5) & 3;
/* if we have data to transmit, do it now */
- if (!(m_spu.regs[SPU4XX_LINE_STATUS] & 0x04))
- {
- /* if we have a transmit handler, send it that way */
- if (!m_spu.tx_cb.isnull())
- (m_spu.tx_cb)(*m_program, 0, m_spu.txbuf, 0xff);
-
- /* indicate that we have moved it to the shift register */
- m_spu.regs[SPU4XX_LINE_STATUS] |= 0x04;
+ if (!(m_spu.regs[SPU4XX_LINE_STATUS] & 0x04))
+ {
+ /* if we have a transmit handler, send it that way */
+ if (!m_spu.tx_cb.isnull())
+ (m_spu.tx_cb)(*m_program, 0, m_spu.txbuf, 0xff);
+
+ /* indicate that we have moved it to the shift register */
+ m_spu.regs[SPU4XX_LINE_STATUS] |= 0x04;
m_spu.regs[SPU4XX_LINE_STATUS] &= ~0x02;
}
@@ -2820,15 +2820,15 @@ WRITE8_MEMBER( ppc4xx_device::ppc4xx_spu_w )
/*-------------------------------------------------
ppc4xx_spu_set_tx_handler - PowerPC 4XX-
- specific TX handler configuration
--------------------------------------------------*/
-
-void ppc4xx_device::ppc4xx_spu_set_tx_handler(write8_delegate callback)
-{
- m_spu.tx_cb = callback;
-}
-
-
+ specific TX handler configuration
+-------------------------------------------------*/
+
+void ppc4xx_device::ppc4xx_spu_set_tx_handler(write8_delegate callback)
+{
+ m_spu.tx_cb = callback;
+}
+
+
/*-------------------------------------------------
ppc4xx_spu_receive_byte - PowerPC 4XX-
specific serial byte receive
@@ -2841,26 +2841,26 @@ void ppc4xx_device::ppc4xx_spu_receive_byte(UINT8 byteval)
/*-------------------------------------------------
ppc4xx_set_dma_read_handler - PowerPC 4XX-
- specific external DMA read handler configuration
--------------------------------------------------*/
-
-void ppc4xx_device::ppc4xx_set_dma_read_handler(int channel, read32_delegate callback, int rate)
-{
- m_ext_dma_read_cb[channel] = callback;
- m_buffered_dma_rate[channel] = rate;
-}
-
+ specific external DMA read handler configuration
+-------------------------------------------------*/
+
+void ppc4xx_device::ppc4xx_set_dma_read_handler(int channel, read32_delegate callback, int rate)
+{
+ m_ext_dma_read_cb[channel] = callback;
+ m_buffered_dma_rate[channel] = rate;
+}
+
/*-------------------------------------------------
ppc4xx_set_dma_write_handler - PowerPC 4XX-
- specific external DMA write handler configuration
--------------------------------------------------*/
-
-void ppc4xx_device::ppc4xx_set_dma_write_handler(int channel, write32_delegate callback, int rate)
-{
- m_ext_dma_write_cb[channel] = callback;
- m_buffered_dma_rate[channel] = rate;
-}
-
+ specific external DMA write handler configuration
+-------------------------------------------------*/
+
+void ppc4xx_device::ppc4xx_set_dma_write_handler(int channel, write32_delegate callback, int rate)
+{
+ m_ext_dma_write_cb[channel] = callback;
+ m_buffered_dma_rate[channel] = rate;
+}
+
/*-------------------------------------------------
ppc4xx_set_dcr_read_handler
-------------------------------------------------*/