Previous 199869 Revisions Next

r21908 Sunday 17th March, 2013 at 13:40:40 UTC by hap
nevermind previous commit :) the other way around makes more sense, since konami's TFR works like that.
Also changed konami's exchange mask globally to 7
[src/emu/cpu/m6809]konami.c konami.ops

trunk/src/emu/cpu/m6809/konami.ops
r21907r21908
431431   {
432432      // konami's EXG instruction differs enough from 6809 to fork the code
433433      UINT8 param = read_opcode_arg();
434      exgtfr_register reg1 = read_exgtfr_register(param >> 4);
435      exgtfr_register reg2 = read_exgtfr_register(param >> 0);
436      write_exgtfr_register(param >> 4, reg2);
437      write_exgtfr_register(param >> 0, reg1);
434      exgtfr_register reg1 = read_exgtfr_register(param >> 0);
435      exgtfr_register reg2 = read_exgtfr_register(param >> 4);
436      write_exgtfr_register(param >> 0, reg2);
437      write_exgtfr_register(param >> 4, reg1);
438438   }
439439   eat(hd6309_native_mode() ? 3 : 6);
440440   return;
r21907r21908
444444      // konami's TFR instruction differs enough from 6809 to fork the code
445445      UINT8 param = read_opcode_arg();
446446      exgtfr_register reg = read_exgtfr_register(param >> 0);
447      write_exgtfr_register((param >> 4) & 0x07, reg);
447      write_exgtfr_register(param >> 4, reg);
448448   }
449449   eat(hd6309_native_mode() ? 2 : 4);
450450   return;
trunk/src/emu/cpu/m6809/konami.c
r21907r21908
197197   exgtfr_register result;
198198   result.word_value = 0x00FF;
199199
200   switch(reg & 0x0F)
200   switch(reg & 0x07)
201201   {
202202      case  0: result.word_value = m_d.b.h;   break;   // A
203203      case  1: result.word_value = m_d.b.l;   break;   // B
r21907r21908
217217
218218ATTR_FORCE_INLINE void konami_cpu_device::write_exgtfr_register(UINT8 reg, m6809_base_device::exgtfr_register value)
219219{
220   switch(reg & 0x0F)
220   switch(reg & 0x07)
221221   {
222222      case  0: m_d.b.h = value.byte_value;   break;   // A
223223      case  1: m_d.b.l = value.byte_value;   break;   // B

Previous 199869 Revisions Next


© 1997-2024 The MAME Team