diff options
-rw-r--r-- | src/devices/cpu/dsp32/dsp32.cpp | 16 | ||||
-rw-r--r-- | src/devices/cpu/i8085/i8085.cpp | 19 | ||||
-rw-r--r-- | src/devices/cpu/i8085/i8085.h | 2 | ||||
-rw-r--r-- | src/devices/cpu/nec/necinstr.inc | 16 | ||||
-rw-r--r-- | src/devices/sound/tms5110.cpp | 6 | ||||
-rw-r--r-- | src/devices/sound/tms5220.cpp | 8 | ||||
-rw-r--r-- | src/lib/formats/upd765_dsk.cpp | 2 | ||||
-rw-r--r-- | src/mame/drivers/rabbit.cpp | 2 | ||||
-rw-r--r-- | src/mame/drivers/vboy.cpp | 2 | ||||
-rw-r--r-- | src/mame/machine/namcos2.cpp | 4 |
10 files changed, 39 insertions, 38 deletions
diff --git a/src/devices/cpu/dsp32/dsp32.cpp b/src/devices/cpu/dsp32/dsp32.cpp index 21de1f18a74..8d7600cba80 100644 --- a/src/devices/cpu/dsp32/dsp32.cpp +++ b/src/devices/cpu/dsp32/dsp32.cpp @@ -344,14 +344,14 @@ void dsp32c_device::state_export(const device_state_entry &entry) { case STATE_GENFLAGS: // no actual flags register, so just make something up - m_iotemp = ((zFLAG != 0) << 0) | - ((nFLAG != 0) << 1) | - ((cFLAG != 0) << 2) | - ((vFLAG != 0) << 3) | - ((ZFLAG != 0) << 4) | - ((NFLAG != 0) << 5) | - ((UFLAG != 0) << 6) | - ((VFLAG != 0) << 7); + m_iotemp = (zFLAG ? 0x01 : 0) | + (nFLAG ? 0x02 : 0) | + (cFLAG ? 0x04 : 0) | + (vFLAG ? 0x08 : 0) | + (ZFLAG ? 0x10 : 0) | + (NFLAG ? 0x20 : 0) | + (UFLAG ? 0x40 : 0) | + (VFLAG ? 0x80 : 0); break; case DSP32_PCR: diff --git a/src/devices/cpu/i8085/i8085.cpp b/src/devices/cpu/i8085/i8085.cpp index 3e278f64d6c..0323cbbd56f 100644 --- a/src/devices/cpu/i8085/i8085.cpp +++ b/src/devices/cpu/i8085/i8085.cpp @@ -916,7 +916,7 @@ void i8085a_cpu_device::device_start() m_trap_pending = 0; m_trap_im_copy = 0; m_sod_state = 0; - m_ietemp = 0; + m_ietemp = false; init_tables(); @@ -1005,16 +1005,24 @@ void i8085a_cpu_device::state_import(const device_state_entry &entry) { case I8085_SID: if (m_ietemp) - m_IM |= IM_SID; + { + m_IM |= IM_SID; + } else + { m_IM &= ~IM_SID; + } break; case I8085_INTE: if (m_ietemp) + { m_IM |= IM_IE; + } else + { m_IM &= ~IM_IE; + } break; default: @@ -1028,12 +1036,7 @@ void i8085a_cpu_device::state_export(const device_state_entry &entry) switch (entry.index()) { case I8085_SID: - { - int sid = m_in_sid_func(); - - m_ietemp = ((m_IM & IM_SID) != 0); - m_ietemp = (sid != 0); - } + m_ietemp = ((m_IM & IM_SID) != 0) && m_in_sid_func() != 0; break; case I8085_INTE: diff --git a/src/devices/cpu/i8085/i8085.h b/src/devices/cpu/i8085/i8085.h index a0e8f5d8d3a..97f856117a2 100644 --- a/src/devices/cpu/i8085/i8085.h +++ b/src/devices/cpu/i8085/i8085.h @@ -116,7 +116,7 @@ private: UINT8 m_trap_im_copy; /* copy of IM register when TRAP was taken */ UINT8 m_sod_state; /* state of the SOD line */ - UINT8 m_ietemp; /* import/export temp space */ + bool m_ietemp; /* import/export temp space */ address_space *m_program; direct_read_data *m_direct; diff --git a/src/devices/cpu/nec/necinstr.inc b/src/devices/cpu/nec/necinstr.inc index 1630bf5c82f..9fc2d9cef5f 100644 --- a/src/devices/cpu/nec/necinstr.inc +++ b/src/devices/cpu/nec/necinstr.inc @@ -571,14 +571,14 @@ OP( 0xf2, i_repne ) { UINT32 next = fetchop(); UINT16 c = Wreg(CW); case 0x6f: CLK(2); if (c) do { i_outsw(); c--; } while (c>0); Wreg(CW)=c; break; case 0xa4: CLK(2); if (c) do { i_movsb(); c--; } while (c>0); Wreg(CW)=c; break; case 0xa5: CLK(2); if (c) do { i_movsw(); c--; } while (c>0); Wreg(CW)=c; break; - case 0xa6: CLK(2); if (c) do { i_cmpsb(); c--; } while (c>0 && ZF==0); Wreg(CW)=c; break; - case 0xa7: CLK(2); if (c) do { i_cmpsw(); c--; } while (c>0 && ZF==0); Wreg(CW)=c; break; + case 0xa6: CLK(2); if (c) do { i_cmpsb(); c--; } while (c>0 && !ZF); Wreg(CW)=c; break; + case 0xa7: CLK(2); if (c) do { i_cmpsw(); c--; } while (c>0 && !ZF); Wreg(CW)=c; break; case 0xaa: CLK(2); if (c) do { i_stosb(); c--; } while (c>0); Wreg(CW)=c; break; case 0xab: CLK(2); if (c) do { i_stosw(); c--; } while (c>0); Wreg(CW)=c; break; case 0xac: CLK(2); if (c) do { i_lodsb(); c--; } while (c>0); Wreg(CW)=c; break; case 0xad: CLK(2); if (c) do { i_lodsw(); c--; } while (c>0); Wreg(CW)=c; break; - case 0xae: CLK(2); if (c) do { i_scasb(); c--; } while (c>0 && ZF==0); Wreg(CW)=c; break; - case 0xaf: CLK(2); if (c) do { i_scasw(); c--; } while (c>0 && ZF==0); Wreg(CW)=c; break; + case 0xae: CLK(2); if (c) do { i_scasb(); c--; } while (c>0 && !ZF); Wreg(CW)=c; break; + case 0xaf: CLK(2); if (c) do { i_scasw(); c--; } while (c>0 && !ZF); Wreg(CW)=c; break; default: logerror("%06x: REPNE invalid\n",PC()); (this->*s_nec_instruction[next])(); } m_seg_prefix=FALSE; @@ -598,14 +598,14 @@ OP( 0xf3, i_repe ) { UINT32 next = fetchop(); UINT16 c = Wreg(CW); case 0x6f: CLK(2); if (c) do { i_outsw(); c--; } while (c>0); Wreg(CW)=c; break; case 0xa4: CLK(2); if (c) do { i_movsb(); c--; } while (c>0); Wreg(CW)=c; break; case 0xa5: CLK(2); if (c) do { i_movsw(); c--; } while (c>0); Wreg(CW)=c; break; - case 0xa6: CLK(2); if (c) do { i_cmpsb(); c--; } while (c>0 && ZF==1); Wreg(CW)=c; break; - case 0xa7: CLK(2); if (c) do { i_cmpsw(); c--; } while (c>0 && ZF==1); Wreg(CW)=c; break; + case 0xa6: CLK(2); if (c) do { i_cmpsb(); c--; } while (c>0 && ZF); Wreg(CW)=c; break; + case 0xa7: CLK(2); if (c) do { i_cmpsw(); c--; } while (c>0 && ZF); Wreg(CW)=c; break; case 0xaa: CLK(2); if (c) do { i_stosb(); c--; } while (c>0); Wreg(CW)=c; break; case 0xab: CLK(2); if (c) do { i_stosw(); c--; } while (c>0); Wreg(CW)=c; break; case 0xac: CLK(2); if (c) do { i_lodsb(); c--; } while (c>0); Wreg(CW)=c; break; case 0xad: CLK(2); if (c) do { i_lodsw(); c--; } while (c>0); Wreg(CW)=c; break; - case 0xae: CLK(2); if (c) do { i_scasb(); c--; } while (c>0 && ZF==1); Wreg(CW)=c; break; - case 0xaf: CLK(2); if (c) do { i_scasw(); c--; } while (c>0 && ZF==1); Wreg(CW)=c; break; + case 0xae: CLK(2); if (c) do { i_scasb(); c--; } while (c>0 && ZF); Wreg(CW)=c; break; + case 0xaf: CLK(2); if (c) do { i_scasw(); c--; } while (c>0 && ZF); Wreg(CW)=c; break; default: logerror("%06x: REPE invalid\n",PC()); (this->*s_nec_instruction[next])(); } m_seg_prefix=FALSE; diff --git a/src/devices/sound/tms5110.cpp b/src/devices/sound/tms5110.cpp index bd6223cfe21..3ab0b67f52d 100644 --- a/src/devices/sound/tms5110.cpp +++ b/src/devices/sound/tms5110.cpp @@ -393,9 +393,9 @@ void tms5110_device::process(INT16 *buffer, unsigned int size) * Old frame was unvoiced, new is voiced * Old frame was unvoiced, new frame is silence/zero energy (non-existent on tms51xx rev D and F (present and working on tms52xx, present but buggy on tms51xx rev A and B)) */ - if ( ((OLD_FRAME_UNVOICED_FLAG == 0) && (NEW_FRAME_UNVOICED_FLAG == 1)) - || ((OLD_FRAME_UNVOICED_FLAG == 1) && (NEW_FRAME_UNVOICED_FLAG == 0)) - || ((OLD_FRAME_SILENCE_FLAG == 1) && (NEW_FRAME_SILENCE_FLAG == 0)) ) + if ( ((OLD_FRAME_UNVOICED_FLAG == 0) && NEW_FRAME_UNVOICED_FLAG) + || ((OLD_FRAME_UNVOICED_FLAG == 1) && !NEW_FRAME_UNVOICED_FLAG) + || ((OLD_FRAME_SILENCE_FLAG == 1) && !NEW_FRAME_SILENCE_FLAG) ) //|| ((m_inhibit == 1) && (OLD_FRAME_UNVOICED_FLAG == 1) && (NEW_FRAME_SILENCE_FLAG == 1)) ) //TMS51xx INTERP BUG1 //|| ((OLD_FRAME_UNVOICED_FLAG == 1) && (NEW_FRAME_SILENCE_FLAG == 1)) ) m_inhibit = 1; diff --git a/src/devices/sound/tms5220.cpp b/src/devices/sound/tms5220.cpp index 2be495b797b..d04069e50b9 100644 --- a/src/devices/sound/tms5220.cpp +++ b/src/devices/sound/tms5220.cpp @@ -788,11 +788,11 @@ void tms5220_device::process(INT16 *buffer, unsigned int size) * Old frame was unvoiced, new is voiced * Old frame was unvoiced, new frame is silence/zero energy (non-existent on tms51xx rev D and F (present and working on tms52xx, present but buggy on tms51xx rev A and B)) */ - if ( ((OLD_FRAME_UNVOICED_FLAG == 0) && (NEW_FRAME_UNVOICED_FLAG == 1)) - || ((OLD_FRAME_UNVOICED_FLAG == 1) && (NEW_FRAME_UNVOICED_FLAG == 0)) - || ((OLD_FRAME_SILENCE_FLAG == 1) && (NEW_FRAME_SILENCE_FLAG == 0)) + if ( ((OLD_FRAME_UNVOICED_FLAG == 0) && NEW_FRAME_UNVOICED_FLAG) + || ((OLD_FRAME_UNVOICED_FLAG == 1) && !NEW_FRAME_UNVOICED_FLAG) + || ((OLD_FRAME_SILENCE_FLAG == 1) && !NEW_FRAME_SILENCE_FLAG) //|| ((m_inhibit == 1) && (OLD_FRAME_UNVOICED_FLAG == 1) && (NEW_FRAME_SILENCE_FLAG == 1)) ) //TMS51xx INTERP BUG1 - || ((OLD_FRAME_UNVOICED_FLAG == 1) && (NEW_FRAME_SILENCE_FLAG == 1)) ) + || ((OLD_FRAME_UNVOICED_FLAG == 1) && NEW_FRAME_SILENCE_FLAG) ) m_inhibit = 1; else // normal frame, normal interpolation m_inhibit = 0; diff --git a/src/lib/formats/upd765_dsk.cpp b/src/lib/formats/upd765_dsk.cpp index 45a05d37b86..eef28c23a4b 100644 --- a/src/lib/formats/upd765_dsk.cpp +++ b/src/lib/formats/upd765_dsk.cpp @@ -304,7 +304,7 @@ bool upd765_format::save(io_generic *io, floppy_image *image) // Handling enough tracks is better than not if(cn.track_count >= tracks && cc.track_count < tracks) goto change; - else if(cn.track_count >= tracks && cc.track_count < tracks) + else if(cc.track_count >= tracks && cn.track_count < tracks) goto dont_change; // Both are on the same side of the track count, so closest is best diff --git a/src/mame/drivers/rabbit.cpp b/src/mame/drivers/rabbit.cpp index 7cbd81cc68d..97ea8d77e31 100644 --- a/src/mame/drivers/rabbit.cpp +++ b/src/mame/drivers/rabbit.cpp @@ -314,8 +314,6 @@ void rabbit_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect xflip = (source[0]&0x00008000)>>15; yflip = (source[0]&0x00004000)>>14; - colr = (source[1]&0x0ff00000)>>15; - tileno = (source[1]&0x0001ffff); colr = (source[1]&0x0ff00000)>>20; diff --git a/src/mame/drivers/vboy.cpp b/src/mame/drivers/vboy.cpp index 9d7ee13f70f..a50522781a6 100644 --- a/src/mame/drivers/vboy.cpp +++ b/src/mame/drivers/vboy.cpp @@ -627,7 +627,7 @@ READ32_MEMBER( vboy_state::io_r ) // attotime new_time = machine().time(); // if((new_time - m_input_latch_time) < m_maincpu->cycles_to_attotime(640)) - value |= machine().rand() & 2; +// value |= machine().rand() & 2; value = m_vboy_regs.kcr | 0x4c; } diff --git a/src/mame/machine/namcos2.cpp b/src/mame/machine/namcos2.cpp index aca73bc16dc..5561aac6300 100644 --- a/src/mame/machine/namcos2.cpp +++ b/src/mame/machine/namcos2.cpp @@ -674,8 +674,8 @@ INTERRUPT_GEN_MEMBER(namcos2_shared_state::namcos2_68k_slave_vblank) INTERRUPT_GEN_MEMBER(namcos2_shared_state::namcos2_68k_gpu_vblank) { /* only used by namcos21 */ - int scanline = get_posirq_scanline(); - scanline = 0x50+0x89; /* HACK for Winning Run */ + //int scanline = get_posirq_scanline(); + INT32 scanline = 0x50+0x89; /* HACK for Winning Run */ //printf( "namcos2_68k_gpu_vblank(%d)\n",m_68k_gpu_C148[NAMCOS2_C148_POSIRQ] ); adjust_posirq_timer(scanline); |