1 // license:BSD-3-Clause 2 // copyright-holders:Wilbert Pol 3 #ifndef MAME_CPU_TLCS900_TLCS900_H 4 #define MAME_CPU_TLCS900_TLCS900_H 5 6 #pragma once 7 8 9 enum tlcs900_inputs 10 { 11 TLCS900_NMI=0, 12 TLCS900_INTWD, 13 TLCS900_INT0, 14 TLCS900_INTAD, 15 TLCS900_INT1, 16 TLCS900_INT2, 17 TLCS900_INT3, 18 TLCS900_INT4, 19 TLCS900_INT5, 20 TLCS900_INT6, 21 TLCS900_INT7, 22 TLCS900_INT8, 23 TLCS900_TIO, 24 TLCS900_NUM_INPUTS 25 }; 26 27 28 enum 29 { 30 TLCS900_PC=1, TLCS900_SR, 31 TLCS900_XWA0, TLCS900_XBC0, TLCS900_XDE0, TLCS900_XHL0, 32 TLCS900_XWA1, TLCS900_XBC1, TLCS900_XDE1, TLCS900_XHL1, 33 TLCS900_XWA2, TLCS900_XBC2, TLCS900_XDE2, TLCS900_XHL2, 34 TLCS900_XWA3, TLCS900_XBC3, TLCS900_XDE3, TLCS900_XHL3, 35 TLCS900_XIX, TLCS900_XIY, TLCS900_XIZ, TLCS900_XNSP, TLCS900_XSSP, 36 TLCS900_DMAS0, TLCS900_DMAS1, TLCS900_DMAS2, TLCS900_DMAS3, 37 TLCS900_DMAD0, TLCS900_DMAD1, TLCS900_DMAD2, TLCS900_DMAD3, 38 TLCS900_DMAC0, TLCS900_DMAC1, TLCS900_DMAC2, TLCS900_DMAC3, 39 TLCS900_DMAM0, TLCS900_DMAM1, TLCS900_DMAM2, TLCS900_DMAM3 40 }; 41 42 43 class tlcs900_device : public cpu_device 44 { 45 public: 46 // configuration helpers set_am8_16(int am8_16)47 void set_am8_16(int am8_16) { m_am8_16 = am8_16; } 48 49 protected: 50 // construction/destruction 51 tlcs900_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); 52 53 // device-level overrides 54 virtual void device_start() override; 55 virtual void device_reset() override; 56 57 // device_execute_interface overrides execute_min_cycles()58 virtual uint32_t execute_min_cycles() const noexcept override { return 1; } /* FIXME */ execute_max_cycles()59 virtual uint32_t execute_max_cycles() const noexcept override { return 1; } /* FIXME */ execute_input_lines()60 virtual uint32_t execute_input_lines() const noexcept override { return 6; } execute_input_edge_triggered(int inputnum)61 virtual bool execute_input_edge_triggered(int inputnum) const noexcept override { return inputnum == INPUT_LINE_NMI; } 62 virtual void execute_run() override; 63 64 // device_memory_interface overrides 65 virtual space_config_vector memory_space_config() const override; 66 67 // device_state_interface overrides 68 virtual void state_string_export(const device_state_entry &entry, std::string &str) const override; 69 70 // device_disasm_interface overrides 71 virtual std::unique_ptr<util::disasm_interface> create_disassembler() override; 72 73 protected: 74 int m_am8_16; 75 address_space_config m_program_config; 76 RDMEM(offs_t addr)77 uint8_t RDMEM(offs_t addr) { return m_program->read_byte( addr ); } RDMEMW(offs_t addr)78 uint16_t RDMEMW(offs_t addr) { return m_program->read_word_unaligned( addr ); } RDMEML(offs_t addr)79 uint32_t RDMEML(offs_t addr) { return m_program->read_dword_unaligned( addr ); } WRMEM(offs_t addr,uint8_t data)80 void WRMEM(offs_t addr, uint8_t data) { m_program->write_byte( addr, data ); } WRMEMW(offs_t addr,uint16_t data)81 void WRMEMW(offs_t addr,uint16_t data) { m_program->write_word_unaligned( addr, data ); } WRMEML(offs_t addr,uint32_t data)82 void WRMEML(offs_t addr,uint32_t data) { m_program->write_dword_unaligned( addr, data ); } 83 84 /* registers */ 85 PAIR m_xwa[4]; 86 PAIR m_xbc[4]; 87 PAIR m_xde[4]; 88 PAIR m_xhl[4]; 89 PAIR m_xix; 90 PAIR m_xiy; 91 PAIR m_xiz; 92 PAIR m_xssp; 93 PAIR m_xnsp; 94 PAIR m_pc; 95 PAIR m_sr; 96 PAIR m_f2; /* f' */ 97 /* DMA registers */ 98 PAIR m_dmas[4]; 99 PAIR m_dmad[4]; 100 PAIR m_dmac[4]; 101 PAIR m_dmam[4]; 102 103 /* Internal timers, irqs, etc */ 104 uint32_t m_timer_pre; 105 uint8_t m_timer[6]; 106 int m_timer_change[4]; 107 bool m_prefetch_clear; 108 uint8_t m_prefetch_index; 109 uint8_t m_prefetch[4]; 110 111 /* Current state of input levels */ 112 int m_level[TLCS900_NUM_INPUTS]; 113 int m_check_irqs; 114 int m_ad_cycles_left; 115 int m_nmi_state; 116 117 /* used during execution */ 118 PAIR m_dummy; /* for illegal register references */ 119 uint8_t m_op; 120 PAIR m_ea1, m_ea2; 121 PAIR m_imm1, m_imm2; 122 int m_cycles; 123 uint8_t *m_p1_reg8, *m_p2_reg8; 124 uint16_t *m_p1_reg16, *m_p2_reg16; 125 uint32_t *m_p1_reg32, *m_p2_reg32; 126 127 int m_halted; 128 int m_icount; 129 int m_regbank; 130 address_space *m_program; 131 132 typedef void (tlcs900_device::*ophandler)(); 133 struct tlcs900inst 134 { 135 ophandler opfunc; 136 int operand1; 137 int operand2; 138 int cycles; 139 }; 140 static const tlcs900inst s_mnemonic_80[256]; 141 static const tlcs900inst s_mnemonic_88[256]; 142 static const tlcs900inst s_mnemonic_90[256]; 143 static const tlcs900inst s_mnemonic_98[256]; 144 static const tlcs900inst s_mnemonic_a0[256]; 145 static const tlcs900inst s_mnemonic_b0[256]; 146 static const tlcs900inst s_mnemonic_b8[256]; 147 static const tlcs900inst s_mnemonic_c0[256]; 148 static const tlcs900inst s_mnemonic_c8[256]; 149 static const tlcs900inst s_mnemonic_d0[256]; 150 static const tlcs900inst s_mnemonic_d8[256]; 151 static const tlcs900inst s_mnemonic_e0[256]; 152 static const tlcs900inst s_mnemonic_e8[256]; 153 static const tlcs900inst s_mnemonic_f0[256]; 154 static const tlcs900inst s_mnemonic[256]; 155 const tlcs900inst *m_mnemonic_80; 156 const tlcs900inst *m_mnemonic_88; 157 const tlcs900inst *m_mnemonic_90; 158 const tlcs900inst *m_mnemonic_98; 159 const tlcs900inst *m_mnemonic_a0; 160 const tlcs900inst *m_mnemonic_b0; 161 const tlcs900inst *m_mnemonic_b8; 162 const tlcs900inst *m_mnemonic_c0; 163 const tlcs900inst *m_mnemonic_c8; 164 const tlcs900inst *m_mnemonic_d0; 165 const tlcs900inst *m_mnemonic_d8; 166 const tlcs900inst *m_mnemonic_e0; 167 const tlcs900inst *m_mnemonic_e8; 168 const tlcs900inst *m_mnemonic_f0; 169 const tlcs900inst *m_mnemonic; 170 171 inline uint8_t RDOP(); 172 virtual void tlcs900_check_hdma() = 0; 173 virtual void tlcs900_check_irqs() = 0; 174 virtual void tlcs900_handle_ad() = 0; 175 virtual void tlcs900_handle_timers() = 0; 176 tlcs900_gpr_cycles()177 virtual int tlcs900_gpr_cycles() const { return 1; } tlcs900_mem_index_cycles()178 virtual int tlcs900_mem_index_cycles() const { return 2; } tlcs900_mem_absolute_8_cycles()179 virtual int tlcs900_mem_absolute_8_cycles() const { return 2; } tlcs900_mem_absolute_16_cycles()180 virtual int tlcs900_mem_absolute_16_cycles() const { return 2; } tlcs900_mem_absolute_24_cycles()181 virtual int tlcs900_mem_absolute_24_cycles() const { return 3; } tlcs900_mem_gpr_indirect_cycles()182 virtual int tlcs900_mem_gpr_indirect_cycles() const { return 5; } tlcs900_mem_gpr_index_cycles()183 virtual int tlcs900_mem_gpr_index_cycles() const { return 5; } tlcs900_mem_gpr_reg_index_cycles()184 virtual int tlcs900_mem_gpr_reg_index_cycles() const { return 8; } tlcs900_mem_indirect_prepost_cycles()185 virtual int tlcs900_mem_indirect_prepost_cycles() const { return 3; } tlcs900_ldxx_repeat_cycles()186 virtual int tlcs900_ldxx_repeat_cycles() const { return 4; } tlcs900_jp_true_cycles()187 virtual int tlcs900_jp_true_cycles() const { return 4; } tlcs900_call_true_cycles()188 virtual int tlcs900_call_true_cycles() const { return 6; } tlcs900_djnz_true_cycles()189 virtual int tlcs900_djnz_true_cycles() const { return 4; } tlcs900_shift_cycles(uint8_t n)190 virtual int tlcs900_shift_cycles(uint8_t n) const { return 2 * n; } 191 192 int condition_true( uint8_t cond ); 193 uint8_t *get_reg8_current( uint8_t reg ); 194 uint16_t *get_reg16_current( uint8_t reg ); 195 uint32_t *get_reg32_current( uint8_t reg ); 196 PAIR *get_reg( uint8_t reg ); 197 uint8_t *get_reg8( uint8_t reg ); 198 uint16_t *get_reg16( uint8_t reg ); 199 uint32_t *get_reg32( uint8_t reg ); 200 void parity8( uint8_t a ); 201 void parity16( uint16_t a ); 202 void parity32( uint32_t a ); 203 uint8_t adc8( uint8_t a, uint8_t b); 204 uint16_t adc16( uint16_t a, uint16_t b); 205 uint32_t adc32( uint32_t a, uint32_t b); 206 uint8_t add8( uint8_t a, uint8_t b); 207 uint16_t add16( uint16_t a, uint16_t b); 208 uint32_t add32( uint32_t a, uint32_t b); 209 uint8_t sbc8( uint8_t a, uint8_t b); 210 uint16_t sbc16( uint16_t a, uint16_t b); 211 uint32_t sbc32( uint32_t a, uint32_t b); 212 uint8_t sub8( uint8_t a, uint8_t b); 213 uint16_t sub16( uint16_t a, uint16_t b); 214 uint32_t sub32( uint32_t a, uint32_t b); 215 uint8_t and8( uint8_t a, uint8_t b); 216 uint16_t and16( uint16_t a, uint16_t b); 217 uint32_t and32( uint32_t a, uint32_t b); 218 uint8_t or8( uint8_t a, uint8_t b); 219 uint16_t or16( uint16_t a, uint16_t b); 220 uint32_t or32( uint32_t a, uint32_t b); 221 uint8_t xor8( uint8_t a, uint8_t b); 222 uint16_t xor16( uint16_t a, uint16_t b); 223 uint32_t xor32( uint32_t a, uint32_t b); 224 void ldcf8( uint8_t a, uint8_t b ); 225 void ldcf16( uint8_t a, uint8_t b ); 226 void andcf8( uint8_t a, uint8_t b ); 227 void andcf16( uint8_t a, uint8_t b ); 228 void orcf8( uint8_t a, uint8_t b ); 229 void orcf16( uint8_t a, uint8_t b ); 230 void xorcf8( uint8_t a, uint8_t b ); 231 void xorcf16( uint8_t a, uint8_t b ); 232 uint8_t rl8( uint8_t a, uint8_t s ); 233 uint16_t rl16( uint16_t a, uint8_t s ); 234 uint32_t rl32( uint32_t a, uint8_t s ); 235 uint8_t rlc8( uint8_t a, uint8_t s ); 236 uint16_t rlc16( uint16_t a, uint8_t s ); 237 uint32_t rlc32( uint32_t a, uint8_t s ); 238 uint8_t rr8( uint8_t a, uint8_t s ); 239 uint16_t rr16( uint16_t a, uint8_t s ); 240 uint32_t rr32( uint32_t a, uint8_t s ); 241 uint8_t rrc8( uint8_t a, uint8_t s ); 242 uint16_t rrc16( uint16_t a, uint8_t s ); 243 uint32_t rrc32( uint32_t a, uint8_t s ); 244 uint8_t sla8( uint8_t a, uint8_t s ); 245 uint16_t sla16( uint16_t a, uint8_t s ); 246 uint32_t sla32( uint32_t a, uint8_t s ); 247 uint8_t sra8( uint8_t a, uint8_t s ); 248 uint16_t sra16( uint16_t a, uint8_t s ); 249 uint32_t sra32( uint32_t a, uint8_t s ); 250 uint8_t srl8( uint8_t a, uint8_t s ); 251 uint16_t srl16( uint16_t a, uint8_t s ); 252 uint32_t srl32( uint32_t a, uint8_t s ); 253 uint16_t div8( uint16_t a, uint8_t b ); 254 uint32_t div16( uint32_t a, uint16_t b ); 255 uint16_t divs8( int16_t a, int8_t b ); 256 uint32_t divs16( int32_t a, int16_t b ); 257 void op_ADCBMI(); 258 void op_ADCBMR(); 259 void op_ADCBRI(); 260 void op_ADCBRM(); 261 void op_ADCBRR(); 262 void op_ADCWMI(); 263 void op_ADCWMR(); 264 void op_ADCWRI(); 265 void op_ADCWRM(); 266 void op_ADCWRR(); 267 void op_ADCLMR(); 268 void op_ADCLRI(); 269 void op_ADCLRM(); 270 void op_ADCLRR(); 271 void op_ADDBMI(); 272 void op_ADDBMR(); 273 void op_ADDBRI(); 274 void op_ADDBRM(); 275 void op_ADDBRR(); 276 void op_ADDWMI(); 277 void op_ADDWMR(); 278 void op_ADDWRI(); 279 void op_ADDWRM(); 280 void op_ADDWRR(); 281 void op_ADDLMR(); 282 void op_ADDLRI(); 283 void op_ADDLRM(); 284 void op_ADDLRR(); 285 void op_ANDBMI(); 286 void op_ANDBMR(); 287 void op_ANDBRI(); 288 void op_ANDBRM(); 289 void op_ANDBRR(); 290 void op_ANDWMI(); 291 void op_ANDWMR(); 292 void op_ANDWRI(); 293 void op_ANDWRM(); 294 void op_ANDWRR(); 295 void op_ANDLMR(); 296 void op_ANDLRI(); 297 void op_ANDLRM(); 298 void op_ANDLRR(); 299 void op_ANDCFBIM(); 300 void op_ANDCFBIR(); 301 void op_ANDCFBRM(); 302 void op_ANDCFBRR(); 303 void op_ANDCFWIR(); 304 void op_ANDCFWRR(); 305 void op_BITBIM(); 306 void op_BITBIR(); 307 void op_BITWIR(); 308 void op_BS1BRR(); 309 void op_BS1FRR(); 310 void op_CALLI(); 311 void op_CALLM(); 312 void op_CALR(); 313 void op_CCF(); 314 void op_CHGBIM(); 315 void op_CHGBIR(); 316 void op_CHGWIR(); 317 void op_CPBMI(); 318 void op_CPBMR(); 319 void op_CPBRI(); 320 void op_CPBRM(); 321 void op_CPBRR(); 322 void op_CPWMI(); 323 void op_CPWMR(); 324 void op_CPWRI(); 325 void op_CPWRM(); 326 void op_CPWRR(); 327 void op_CPLMR(); 328 void op_CPLRI(); 329 void op_CPLRM(); 330 void op_CPLRR(); 331 void op_CPD(); 332 void op_CPDR(); 333 void op_CPDW(); 334 void op_CPDRW(); 335 void op_CPI(); 336 void op_CPIR(); 337 void op_CPIW(); 338 void op_CPIRW(); 339 void op_CPLBR(); 340 void op_CPLWR(); 341 void op_DAABR(); 342 void op_DB(); 343 void op_DECBIM(); 344 void op_DECBIR(); 345 void op_DECWIM(); 346 void op_DECWIR(); 347 void op_DECLIR(); 348 void op_DECF(); 349 void op_DIVBRI(); 350 void op_DIVBRM(); 351 void op_DIVBRR(); 352 void op_DIVWRI(); 353 void op_DIVWRM(); 354 void op_DIVWRR(); 355 void op_DIVSBRI(); 356 void op_DIVSBRM(); 357 void op_DIVSBRR(); 358 void op_DIVSWRI(); 359 void op_DIVSWRM(); 360 void op_DIVSWRR(); 361 void op_DJNZB(); 362 void op_DJNZW(); 363 void op_EI(); 364 void op_EXBMR(); 365 void op_EXBRR(); 366 void op_EXWMR(); 367 void op_EXWRR(); 368 void op_EXTSWR(); 369 void op_EXTSLR(); 370 void op_EXTZWR(); 371 void op_EXTZLR(); 372 void op_HALT(); 373 void op_INCBIM(); 374 void op_INCBIR(); 375 void op_INCWIM(); 376 void op_INCWIR(); 377 void op_INCLIR(); 378 void op_INCF(); 379 void op_JPI(); 380 void op_JPM(); 381 void op_JR(); 382 void op_JRL(); 383 void op_LDBMI(); 384 void op_LDBMM(); 385 void op_LDBMR(); 386 void op_LDBRI(); 387 void op_LDBRM(); 388 void op_LDBRR(); 389 void op_LDWMI(); 390 void op_LDWMM(); 391 void op_LDWMR(); 392 void op_LDWRI(); 393 void op_LDWRM(); 394 void op_LDWRR(); 395 void op_LDLRI(); 396 void op_LDLRM(); 397 void op_LDLRR(); 398 void op_LDLMR(); 399 void op_LDAW(); 400 void op_LDAL(); 401 void op_LDCBRR(); 402 void op_LDCWRR(); 403 void op_LDCLRR(); 404 void op_LDCFBIM(); 405 void op_LDCFBIR(); 406 void op_LDCFBRM(); 407 void op_LDCFBRR(); 408 void op_LDCFWIR(); 409 void op_LDCFWRR(); 410 void op_LDD(); 411 void op_LDDR(); 412 void op_LDDRW(); 413 void op_LDDW(); 414 void op_LDF(); 415 void op_LDI(); 416 void op_LDIR(); 417 void op_LDIRW(); 418 void op_LDIW(); 419 void op_LDX(); 420 void op_LINK(); 421 void op_MAX(); 422 void op_MDEC1(); 423 void op_MDEC2(); 424 void op_MDEC4(); 425 void op_MINC1(); 426 void op_MINC2(); 427 void op_MINC4(); 428 void op_MIRRW(); 429 void op_MULBRI(); 430 void op_MULBRM(); 431 void op_MULBRR(); 432 void op_MULWRI(); 433 void op_MULWRM(); 434 void op_MULWRR(); 435 void op_MULAR(); 436 void op_MULSBRI(); 437 void op_MULSBRM(); 438 void op_MULSBRR(); 439 void op_MULSWRI(); 440 void op_MULSWRM(); 441 void op_MULSWRR(); 442 void op_NEGBR(); 443 void op_NEGWR(); 444 void op_NOP(); 445 void op_NORMAL(); 446 void op_ORBMI(); 447 void op_ORBMR(); 448 void op_ORBRI(); 449 void op_ORBRM(); 450 void op_ORBRR(); 451 void op_ORWMI(); 452 void op_ORWMR(); 453 void op_ORWRI(); 454 void op_ORWRM(); 455 void op_ORWRR(); 456 void op_ORLMR(); 457 void op_ORLRI(); 458 void op_ORLRM(); 459 void op_ORLRR(); 460 void op_ORCFBIM(); 461 void op_ORCFBIR(); 462 void op_ORCFBRM(); 463 void op_ORCFBRR(); 464 void op_ORCFWIR(); 465 void op_ORCFWRR(); 466 void op_PAAWR(); 467 void op_PAALR(); 468 void op_POPBM(); 469 void op_POPBR(); 470 void op_POPWM(); 471 void op_POPWR(); 472 void op_POPWSR(); 473 void op_POPLR(); 474 void op_PUSHBI(); 475 void op_PUSHBM(); 476 void op_PUSHBR(); 477 void op_PUSHWI(); 478 void op_PUSHWM(); 479 void op_PUSHWR(); 480 void op_PUSHLR(); 481 void op_RCF(); 482 void op_RESBIM(); 483 void op_RESBIR(); 484 void op_RESWIR(); 485 void op_RET(); 486 void op_RETCC(); 487 void op_RETD(); 488 void op_RETI(); 489 void op_RLBM(); 490 void op_RLWM(); 491 void op_RLBIR(); 492 void op_RLBRR(); 493 void op_RLWIR(); 494 void op_RLWRR(); 495 void op_RLLIR(); 496 void op_RLLRR(); 497 void op_RLCBM(); 498 void op_RLCWM(); 499 void op_RLCBIR(); 500 void op_RLCBRR(); 501 void op_RLCWIR(); 502 void op_RLCWRR(); 503 void op_RLCLIR(); 504 void op_RLCLRR(); 505 void op_RLDRM(); 506 void op_RRBM(); 507 void op_RRWM(); 508 void op_RRBIR(); 509 void op_RRBRR(); 510 void op_RRWIR(); 511 void op_RRWRR(); 512 void op_RRLIR(); 513 void op_RRLRR(); 514 void op_RRCBM(); 515 void op_RRCWM(); 516 void op_RRCBIR(); 517 void op_RRCBRR(); 518 void op_RRCWIR(); 519 void op_RRCWRR(); 520 void op_RRCLIR(); 521 void op_RRCLRR(); 522 void op_RRDRM(); 523 void op_SBCBMI(); 524 void op_SBCBMR(); 525 void op_SBCBRI(); 526 void op_SBCBRM(); 527 void op_SBCBRR(); 528 void op_SBCWMI(); 529 void op_SBCWMR(); 530 void op_SBCWRI(); 531 void op_SBCWRM(); 532 void op_SBCWRR(); 533 void op_SBCLMR(); 534 void op_SBCLRI(); 535 void op_SBCLRM(); 536 void op_SBCLRR(); 537 void op_SCCBR(); 538 void op_SCCWR(); 539 void op_SCF(); 540 void op_SETBIM(); 541 void op_SETBIR(); 542 void op_SETWIR(); 543 void op_SLABM(); 544 void op_SLAWM(); 545 void op_SLABIR(); 546 void op_SLABRR(); 547 void op_SLAWIR(); 548 void op_SLAWRR(); 549 void op_SLALIR(); 550 void op_SLALRR(); 551 void op_SLLBM(); 552 void op_SLLWM(); 553 void op_SLLBIR(); 554 void op_SLLBRR(); 555 void op_SLLWIR(); 556 void op_SLLWRR(); 557 void op_SLLLIR(); 558 void op_SLLLRR(); 559 void op_SRABM(); 560 void op_SRAWM(); 561 void op_SRABIR(); 562 void op_SRABRR(); 563 void op_SRAWIR(); 564 void op_SRAWRR(); 565 void op_SRALIR(); 566 void op_SRALRR(); 567 void op_SRLBM(); 568 void op_SRLWM(); 569 void op_SRLBIR(); 570 void op_SRLBRR(); 571 void op_SRLWIR(); 572 void op_SRLWRR(); 573 void op_SRLLIR(); 574 void op_SRLLRR(); 575 void op_STCFBIM(); 576 void op_STCFBIR(); 577 void op_STCFBRM(); 578 void op_STCFBRR(); 579 void op_STCFWIR(); 580 void op_STCFWRR(); 581 void op_SUBBMI(); 582 void op_SUBBMR(); 583 void op_SUBBRI(); 584 void op_SUBBRM(); 585 void op_SUBBRR(); 586 void op_SUBWMI(); 587 void op_SUBWMR(); 588 void op_SUBWRI(); 589 void op_SUBWRM(); 590 void op_SUBWRR(); 591 void op_SUBLMR(); 592 void op_SUBLRI(); 593 void op_SUBLRM(); 594 void op_SUBLRR(); 595 void op_SWI(); 596 void op_SWI900(); 597 void op_TSETBIM(); 598 void op_TSETBIR(); 599 void op_TSETWIR(); 600 void op_UNLK(); 601 void op_XORBMI(); 602 void op_XORBMR(); 603 void op_XORBRI(); 604 void op_XORBRM(); 605 void op_XORBRR(); 606 void op_XORWMI(); 607 void op_XORWMR(); 608 void op_XORWRI(); 609 void op_XORWRM(); 610 void op_XORWRR(); 611 void op_XORLMR(); 612 void op_XORLRI(); 613 void op_XORLRM(); 614 void op_XORLRR(); 615 void op_XORCFBIM(); 616 void op_XORCFBIR(); 617 void op_XORCFBRM(); 618 void op_XORCFBRR(); 619 void op_XORCFWIR(); 620 void op_XORCFWRR(); 621 void op_ZCF(); 622 void prepare_operands(const tlcs900inst *inst); 623 void op_80(); 624 void op_88(); 625 void op_90(); 626 void op_98(); 627 void op_A0(); 628 void op_A8(); 629 void op_B0(); 630 void op_B8(); 631 void op_C0(); 632 void oC8(); 633 void op_D0(); 634 void oD8(); 635 void op_E0(); 636 void op_E8(); 637 void op_F0(); 638 }; 639 640 class tlcs900h_device : public tlcs900_device 641 { 642 protected: 643 // construction/destruction 644 tlcs900h_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); 645 646 // device-level overrides 647 virtual void device_reset() override; 648 tlcs900_gpr_cycles()649 virtual int tlcs900_gpr_cycles() const override { return 1; } tlcs900_mem_index_cycles()650 virtual int tlcs900_mem_index_cycles() const override { return 1; } tlcs900_mem_absolute_8_cycles()651 virtual int tlcs900_mem_absolute_8_cycles() const override { return 1; } tlcs900_mem_absolute_16_cycles()652 virtual int tlcs900_mem_absolute_16_cycles() const override { return 2; } tlcs900_mem_absolute_24_cycles()653 virtual int tlcs900_mem_absolute_24_cycles() const override { return 3; } tlcs900_mem_gpr_indirect_cycles()654 virtual int tlcs900_mem_gpr_indirect_cycles() const override { return 1; } tlcs900_mem_gpr_index_cycles()655 virtual int tlcs900_mem_gpr_index_cycles() const override { return 3; } tlcs900_mem_gpr_reg_index_cycles()656 virtual int tlcs900_mem_gpr_reg_index_cycles() const override { return 3; } tlcs900_mem_indirect_prepost_cycles()657 virtual int tlcs900_mem_indirect_prepost_cycles() const override { return 1; } tlcs900_ldxx_repeat_cycles()658 virtual int tlcs900_ldxx_repeat_cycles() const override { return -1; } tlcs900_jp_true_cycles()659 virtual int tlcs900_jp_true_cycles() const override { return 3; } tlcs900_call_true_cycles()660 virtual int tlcs900_call_true_cycles() const override { return 8; } tlcs900_djnz_true_cycles()661 virtual int tlcs900_djnz_true_cycles() const override { return 2; } tlcs900_shift_cycles(uint8_t n)662 virtual int tlcs900_shift_cycles(uint8_t n) const override { return n / 4; } 663 664 static const tlcs900inst s_mnemonic_80[256]; 665 static const tlcs900inst s_mnemonic_88[256]; 666 static const tlcs900inst s_mnemonic_90[256]; 667 static const tlcs900inst s_mnemonic_98[256]; 668 static const tlcs900inst s_mnemonic_a0[256]; 669 static const tlcs900inst s_mnemonic_b0[256]; 670 static const tlcs900inst s_mnemonic_b8[256]; 671 static const tlcs900inst s_mnemonic_c0[256]; 672 static const tlcs900inst s_mnemonic_c8[256]; 673 static const tlcs900inst s_mnemonic_d0[256]; 674 static const tlcs900inst s_mnemonic_d8[256]; 675 static const tlcs900inst s_mnemonic_e0[256]; 676 static const tlcs900inst s_mnemonic_e8[256]; 677 static const tlcs900inst s_mnemonic_f0[256]; 678 static const tlcs900inst s_mnemonic[256]; 679 }; 680 681 #endif // MAME_CPU_TLCS900_TLCS900_H 682