src/emu/cpu/h6280/h6280.c
| r994 | r995 | |
| 102 | 102 | - Added 1 delay when accessing the VDC or VCE areas. |
| 103 | 103 | - Implemented low and high speed cpu modes. |
| 104 | 104 | |
| 105 | Changelog, version 1.11, 18/09/07: (Wilbert Pol) |
| 106 | |
| 107 | - Improvements to the handling of taking of delayed interrupts. |
| 108 | |
| 105 | 109 | ******************************************************************************/ |
| 106 | 110 | #include "debugger.h" |
| 107 | 111 | #include "h6280.h" |
| r994 | r995 | |
| 228 | 232 | int in; |
| 229 | 233 | h6280_ICount = cycles; |
| 230 | 234 | |
| 235 | if ( h6280.irq_pending == 2 ) { |
| 236 | h6280.irq_pending--; |
| 237 | } |
| 238 | |
| 231 | 239 | /* Execute instructions */ |
| 232 | 240 | do |
| 233 | 241 | { |
| r994 | r995 | |
| 243 | 251 | insnh6280[in](); |
| 244 | 252 | |
| 245 | 253 | if ( h6280.irq_pending ) { |
| 246 | | h6280.irq_pending--; |
| 247 | | if ( ! h6280.irq_pending ) { |
| 248 | | CHECK_AND_TAKE_IRQ_LINES; |
| 254 | if ( h6280.irq_pending == 1 ) { |
| 255 | if ( !(P & _fI) ) { |
| 256 | h6280.irq_pending--; |
| 257 | CHECK_AND_TAKE_IRQ_LINES; |
| 258 | } |
| 259 | } else { |
| 260 | h6280.irq_pending--; |
| 249 | 261 | } |
| 250 | 262 | } |
| 251 | 263 | |
| r994 | r995 | |
| 255 | 267 | if(h6280.timer_value<=0) |
| 256 | 268 | { |
| 257 | 269 | if ( ! h6280.irq_pending ) |
| 258 | | h6280.irq_pending = 2; |
| 270 | h6280.irq_pending = 1; |
| 259 | 271 | while( h6280.timer_value <= 0 ) |
| 260 | 272 | h6280.timer_value += h6280.timer_load; |
| 261 | 273 | set_irq_line(2,ASSERT_LINE); |
| r994 | r995 | |
| 508 | 520 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 509 | 521 | case CPUINFO_STR_NAME: strcpy(info->s, "HuC6280"); break; |
| 510 | 522 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Hudsonsoft 6280"); break; |
| 511 | | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.10"); break; |
| 523 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.11"); break; |
| 512 | 524 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 513 | 525 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright (c) 1999, 2000 Bryan McPhail, mish@tendril.co.uk"); break; |
| 514 | 526 | |