diff options
author | 2010-09-19 05:09:00 +0000 | |
---|---|---|
committer | 2010-09-19 05:09:00 +0000 | |
commit | 7a4744d31da401404f7e67de707021fa5cc12711 (patch) | |
tree | e32c4f80a2a61643c42350b07437b33b63086f55 /src/emu/cpu/adsp2100 | |
parent | cbffdbb1d7111774a87284797bc2f753706f43ec (diff) |
Cleanups and version bump.mame0139u3
Diffstat (limited to 'src/emu/cpu/adsp2100')
-rw-r--r-- | src/emu/cpu/adsp2100/2100ops.c | 30 | ||||
-rw-r--r-- | src/emu/cpu/adsp2100/adsp2100.c | 28 | ||||
-rw-r--r-- | src/emu/cpu/adsp2100/adsp2100.h | 20 |
3 files changed, 39 insertions, 39 deletions
diff --git a/src/emu/cpu/adsp2100/2100ops.c b/src/emu/cpu/adsp2100/2100ops.c index ffd666ca512..a9a613c2921 100644 --- a/src/emu/cpu/adsp2100/2100ops.c +++ b/src/emu/cpu/adsp2100/2100ops.c @@ -300,10 +300,10 @@ inline void adsp21xx_device::stat_stack_pop() /* inline int adsp21xx_device::condition(int c) { - if (c != 14) - return m_condition_table[((c) << 8) | m_astat]; - else - return slow_condition(c); + if (c != 14) + return m_condition_table[((c) << 8) | m_astat]; + else + return slow_condition(c); } */ @@ -367,22 +367,22 @@ void adsp21xx_device::write_reg1(int regnum, INT32 val) m_i[index] = val & 0x3fff; update_i(index); break; - + case 1: m_m[index] = (INT32)(val << 18) >> 18; break; - + case 2: - m_l[index] = val & 0x3fff; + m_l[index] = val & 0x3fff; update_l(index); break; - + case 3: logerror("ADSP %04x: Writing to an invalid register!\n", m_ppc); break; } } - + void adsp21xx_device::write_reg2(int regnum, INT32 val) { int index = 4 + (regnum & 3); @@ -392,16 +392,16 @@ void adsp21xx_device::write_reg2(int regnum, INT32 val) m_i[index] = val & 0x3fff; update_i(index); break; - + case 1: m_m[index] = (INT32)(val << 18) >> 18; break; - + case 2: - m_l[index] = val & 0x3fff; + m_l[index] = val & 0x3fff; update_l(index); break; - + case 3: logerror("ADSP %04x: Writing to an invalid register!\n", m_ppc); break; @@ -413,7 +413,7 @@ void adsp21xx_device::write_reg3(int regnum, INT32 val) switch (regnum) { case 0x00: m_astat = val & 0x00ff; break; - case 0x01: m_mstat = val & m_mstat_mask; update_mstat(); break; + case 0x01: m_mstat = val & m_mstat_mask; update_mstat(); break; case 0x03: m_imask = val & m_imask_mask; check_irqs(); break; case 0x04: m_icntl = val & 0x001f; check_irqs(); break; case 0x05: cntr_stack_push(); m_cntr = val & 0x3fff; break; @@ -464,7 +464,7 @@ void adsp21xx_device::write_reg3(int regnum, INT32 val) default: logerror("ADSP %04x: Writing to an invalid register!\n", m_ppc); break; } } - + #define WRITE_REG(adsp,grp,reg,val) ((this->*wr_reg[grp][reg])(val)) diff --git a/src/emu/cpu/adsp2100/adsp2100.c b/src/emu/cpu/adsp2100/adsp2100.c index 87875b6d2d1..a6e0dfbbf65 100644 --- a/src/emu/cpu/adsp2100/adsp2100.c +++ b/src/emu/cpu/adsp2100/adsp2100.c @@ -1,8 +1,8 @@ /*************************************************************************** - ADSP2100.c + ADSP2100.c - ADSP-21xx series emulator. + ADSP-21xx series emulator. **************************************************************************** @@ -190,12 +190,12 @@ device_config *adsp2100_device_config::static_alloc_device_config(const machine_ { return global_alloc(adsp2100_device_config(mconfig, tag, owner, clock)); } - + device_config *adsp2101_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) { return global_alloc(adsp2101_device_config(mconfig, static_alloc_device_config, "ADSP-2101", tag, owner, clock, CHIP_TYPE_ADSP2101)); } - + device_config *adsp2181_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) { return global_alloc(adsp2181_device_config(mconfig, tag, owner, clock)); @@ -285,23 +285,23 @@ UINT32 adsp2181_device_config::execute_input_lines() const const address_space_config *adsp2100_device_config::memory_space_config(int spacenum) const { - return (spacenum == AS_PROGRAM) ? &m_program_config : - (spacenum == AS_DATA) ? &m_data_config : + return (spacenum == AS_PROGRAM) ? &m_program_config : + (spacenum == AS_DATA) ? &m_data_config : NULL; } const address_space_config *adsp2101_device_config::memory_space_config(int spacenum) const { - return (spacenum == AS_PROGRAM) ? &m_program_config : - (spacenum == AS_DATA) ? &m_data_config : + return (spacenum == AS_PROGRAM) ? &m_program_config : + (spacenum == AS_DATA) ? &m_data_config : NULL; } const address_space_config *adsp2181_device_config::memory_space_config(int spacenum) const { - return (spacenum == AS_PROGRAM) ? &m_program_config : - (spacenum == AS_DATA) ? &m_data_config : - (spacenum == AS_IO) ? &m_io_config : + return (spacenum == AS_PROGRAM) ? &m_program_config : + (spacenum == AS_DATA) ? &m_data_config : + (spacenum == AS_IO) ? &m_io_config : NULL; } @@ -369,8 +369,8 @@ adsp21xx_device::adsp21xx_device(running_machine &_machine, const adsp21xx_devic m_ifc(0), m_icount(0), m_mstat_mask((config.m_chip_type >= adsp21xx_device_config::CHIP_TYPE_ADSP2101) ? 0x7f : 0x0f), - m_imask_mask((config.m_chip_type >= adsp21xx_device_config::CHIP_TYPE_ADSP2181) ? 0x3ff : - (config.m_chip_type >= adsp21xx_device_config::CHIP_TYPE_ADSP2101) ? 0x3f : 0x0f) + m_imask_mask((config.m_chip_type >= adsp21xx_device_config::CHIP_TYPE_ADSP2181) ? 0x3ff : + (config.m_chip_type >= adsp21xx_device_config::CHIP_TYPE_ADSP2101) ? 0x3f : 0x0f) { // initialize remaining state memset(&m_core, 0, sizeof(m_core)); @@ -774,7 +774,7 @@ void adsp21xx_device::device_start() state_add(ADSP2100_FL0, "FL0", m_fl0).mask(1); state_add(ADSP2100_FL1, "FL1", m_fl1).mask(1); state_add(ADSP2100_FL2, "FL2", m_fl2).mask(1); - + // set our instruction counter m_icountptr = &m_icount; } diff --git a/src/emu/cpu/adsp2100/adsp2100.h b/src/emu/cpu/adsp2100/adsp2100.h index 4490f92d129..360d866006c 100644 --- a/src/emu/cpu/adsp2100/adsp2100.h +++ b/src/emu/cpu/adsp2100/adsp2100.h @@ -2,7 +2,7 @@ adsp2100.h - ADSP-21xx series emulator. + ADSP-21xx series emulator. **************************************************************************** @@ -137,7 +137,7 @@ protected: // address spaces const address_space_config m_program_config; const address_space_config m_data_config; - + // internal state UINT32 m_chip_type; }; @@ -192,7 +192,7 @@ protected: inline void loop_stack_pop(); inline void stat_stack_push(); inline void stat_stack_pop(); -// inline int condition(int c); +// inline int condition(int c); int slow_condition(); inline void modify_address(UINT32 ireg, UINT32 mreg); inline void data_write_dag1(UINT32 op, INT32 val); @@ -233,11 +233,11 @@ protected: inline INT32 read_reg1(int regnum); inline INT32 read_reg2(int regnum); inline INT32 read_reg3(int regnum); - + // interrupts virtual bool generate_irq(int which, int indx = 0) = 0; virtual void check_irqs() = 0; - + // internal state static const int PC_STACK_DEPTH = 16; static const int CNTR_STACK_DEPTH = 4; @@ -381,13 +381,13 @@ protected: direct_read_data * m_direct; // tables - UINT8 m_condition_table[0x1000]; + UINT8 m_condition_table[0x1000]; UINT16 m_mask_table[0x4000]; UINT16 m_reverse_table[0x4000]; // debugging #if ADSP_TRACK_HOTSPOTS - UINT32 m_pcbucket[0x4000]; + UINT32 m_pcbucket[0x4000]; #endif // flag definitions @@ -430,7 +430,7 @@ protected: class adsp2100_device : public adsp21xx_device { friend class adsp2100_device_config; - + // construction/destruction adsp2100_device(running_machine &_machine, const adsp2100_device_config &config); @@ -472,7 +472,7 @@ class adsp2101_device : public adsp21xx_device friend class adsp2104_device_config; friend class adsp2105_device_config; friend class adsp2115_device_config; - + protected: // construction/destruction adsp2101_device(running_machine &_machine, const adsp2101_device_config &config); @@ -514,7 +514,7 @@ protected: class adsp2181_device : public adsp21xx_device { friend class adsp2181_device_config; - + // construction/destruction adsp2181_device(running_machine &_machine, const adsp2181_device_config &config); |