Previous 199869 Revisions Next

r44482 Monday 25th January, 2016 at 18:05:13 UTC by David Haywood
apply: 27c27
(MESS) CPUID.ASM (Bob Smith 1985) suggests that in situations where
m_no_interrupt is 1, (directly after POP SS / MOV_SREG), single step
IRQs don't fire. [Karl-Ludwig Deisenhofer]
[src/devices/cpu/i86]i86.cpp

trunk/src/devices/cpu/i86/i86.cpp
r252993r252994
144144         m_seg_prefix = false;
145145
146146            /* Dispatch IRQ */
147         if ( m_pending_irq && m_no_interrupt == 0 )
147         if ( m_pending_irq && (m_no_interrupt == 0) )
148148         {
149149            if ( m_pending_irq & NMI_IRQ )
150150            {
r252993r252994
159159            }
160160         }
161161
162         /* No interrupt allowed between last instruction and this one */
163         if ( m_no_interrupt )
162         /* Trap should allow one instruction to be executed.
163            CPUID.ASM (by Bob Smith, 1985) suggests that in situations where m_no_interrupt is 1,
164            (directly after POP SS / MOV_SREG), single step IRQs don't fire.
165         */
166         if (m_fire_trap )
164167         {
165            m_no_interrupt--;
166         }
167
168         /* trap should allow one instruction to be executed */
169         if ( m_fire_trap )
170         {
171            if ( m_fire_trap >= 2 )
168            if ( (m_fire_trap >= 2) && (m_no_interrupt == 0) )
172169            {
170               m_fire_trap = 0; // reset trap flag upon entry
173171               interrupt(1);
174               m_fire_trap = 0;
175172            }
176173            else
177174            {
178175               m_fire_trap++;
179176            }
180177         }
178
179         /* No interrupt allowed between last instruction and this one */
180         if ( m_no_interrupt )
181         {
182            m_no_interrupt--;
183         }
184
181185      }
182186
183187      if (!m_seg_prefix)
r252993r252994
14041408         m_src = GetRMWord();
14051409         m_sregs[(m_modrm & 0x18) >> 3] = m_src; // confirmed on hw: modrm bit 5 ignored
14061410         CLKM(MOV_SR,MOV_SM);
1411         m_no_interrupt = 1; // Disable IRQ after load segment register.
14071412         break;
14081413
14091414      case 0x8f: // i_popw


Previous 199869 Revisions Next


© 1997-2024 The MAME Team