trunk/src/emu/cpu/m68000/m68000.h
| r242646 | r242647 | |
| 376 | 376 | void init_cpu_m68008(void); |
| 377 | 377 | void init_cpu_m68010(void); |
| 378 | 378 | void init_cpu_m68020(void); |
| 379 | void init_cpu_m68020fpu(void); |
| 379 | 380 | void init_cpu_m68020pmmu(void); |
| 380 | 381 | void init_cpu_m68020hmmu(void); |
| 381 | 382 | void init_cpu_m68ec020(void); |
| r242646 | r242647 | |
| 554 | 555 | protected: |
| 555 | 556 | }; |
| 556 | 557 | |
| 558 | class m68020fpu_device : public m68000_base_device |
| 559 | { |
| 560 | public: |
| 561 | // construction/destruction |
| 562 | m68020fpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 563 | |
| 564 | virtual UINT32 disasm_min_opcode_bytes() const { return 2; }; |
| 565 | virtual UINT32 disasm_max_opcode_bytes() const { return 20; }; |
| 566 | virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); |
| 567 | |
| 568 | virtual UINT32 execute_min_cycles() const { return 2; }; |
| 569 | virtual UINT32 execute_max_cycles() const { return 158; }; |
| 570 | |
| 571 | virtual UINT32 execute_default_irq_vector() const { return -1; }; |
| 572 | |
| 573 | // device-level overrides |
| 574 | virtual void device_start(); |
| 575 | protected: |
| 576 | }; |
| 577 | |
| 557 | 578 | class m68020pmmu_device : public m68000_base_device |
| 558 | 579 | { |
| 559 | 580 | public: |
| r242646 | r242647 | |
| 773 | 794 | extern const device_type M68010; |
| 774 | 795 | extern const device_type M68EC020; |
| 775 | 796 | extern const device_type M68020; |
| 797 | extern const device_type M68020FPU; |
| 776 | 798 | extern const device_type M68020PMMU; |
| 777 | 799 | extern const device_type M68020HMMU; |
| 778 | 800 | extern const device_type M68EC030; |
trunk/src/emu/cpu/m68000/m68k_in.c
| r242646 | r242647 | |
| 272 | 272 | extern void m68040_fpu_op0(m68000_base_device *m68k); |
| 273 | 273 | extern void m68040_fpu_op1(m68000_base_device *m68k); |
| 274 | 274 | extern void m68881_mmu_ops(m68000_base_device *m68k); |
| 275 | extern void m68881_ftrap(m68000_base_device *m68k); |
| 275 | 276 | |
| 276 | 277 | /* ======================================================================== */ |
| 277 | 278 | /* ========================= INSTRUCTION HANDLERS ========================= */ |
| r242646 | r242647 | |
| 551 | 552 | cpgen 32 . . 1111...000...... .......... . . U U . . U . . 4 4 . . . |
| 552 | 553 | cpscc 32 . . 1111...001...... .......... . . U U . . U . . 4 4 . . . |
| 553 | 554 | cptrapcc 32 . . 1111...001111... .......... . . U U . . U . . 4 4 . . . |
| 555 | ftrapcc 32 . . 1111001001111... .......... . . U U . . U . . 4 4 . . . |
| 554 | 556 | dbt 16 . . 0101000011001... .......... U U U U U U U 12 12 6 6 6 6 6 |
| 555 | 557 | dbf 16 . . 0101000111001... .......... U U U U U U U 12 12 6 4 4 4 4 |
| 556 | 558 | dbcc 16 . . 0101....11001... .......... U U U U U U U 12 12 6 6 6 6 6 |
| r242646 | r242647 | |
| 4477 | 4479 | m68ki_exception_1111(mc68kcpu); |
| 4478 | 4480 | } |
| 4479 | 4481 | |
| 4482 | M68KMAKE_OP(ftrapcc, 32, ., .) |
| 4483 | { |
| 4484 | if((mc68kcpu)->has_fpu) |
| 4485 | { |
| 4486 | m68881_ftrap(mc68kcpu); |
| 4487 | return; |
| 4488 | } |
| 4489 | m68ki_exception_1111(mc68kcpu); |
| 4490 | } |
| 4491 | |
| 4480 | 4492 | M68KMAKE_OP(dbt, 16, ., .) |
| 4481 | 4493 | { |
| 4482 | 4494 | REG_PC(mc68kcpu) += 2; |
trunk/src/emu/cpu/m68000/m68kcpu.c
| r242646 | r242647 | |
| 699 | 699 | { |
| 700 | 700 | /* only the 68010 throws this unique type-1000 frame */ |
| 701 | 701 | m68ki_stack_frame_1000(m68k, REG_PPC(m68k), sr, EXCEPTION_BUS_ERROR); |
| 702 | | } |
| 702 | } |
| 703 | 703 | else if (m68k->mmu_tmp_buserror_address == REG_PPC(m68k)) |
| 704 | 704 | { |
| 705 | 705 | m68ki_stack_frame_1010(m68k, sr, EXCEPTION_BUS_ERROR, REG_PPC(m68k), m68k->mmu_tmp_buserror_address); |
| r242646 | r242647 | |
| 1885 | 1885 | define_state(); |
| 1886 | 1886 | } |
| 1887 | 1887 | |
| 1888 | void m68000_base_device::init_cpu_m68020fpu(void) |
| 1889 | { |
| 1890 | init_cpu_m68020(); |
| 1888 | 1891 | |
| 1892 | has_fpu = 1; |
| 1893 | } |
| 1894 | |
| 1889 | 1895 | void m68000_base_device::init_cpu_m68020pmmu(void) |
| 1890 | 1896 | { |
| 1891 | 1897 | init_cpu_m68020(); |
| r242646 | r242647 | |
| 2243 | 2249 | offs_t m68010_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) { return CPU_DISASSEMBLE_NAME(dasm_m68010)(this, buffer, pc, oprom, opram, options); }; |
| 2244 | 2250 | offs_t m68ec020_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) { return CPU_DISASSEMBLE_NAME(dasm_m68020)(this, buffer, pc, oprom, opram, options); }; |
| 2245 | 2251 | offs_t m68020_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) { return CPU_DISASSEMBLE_NAME(dasm_m68020)(this, buffer, pc, oprom, opram, options); }; |
| 2252 | offs_t m68020fpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) { return CPU_DISASSEMBLE_NAME(dasm_m68020)(this, buffer, pc, oprom, opram, options); }; |
| 2246 | 2253 | offs_t m68020pmmu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) { return CPU_DISASSEMBLE_NAME(dasm_m68020)(this, buffer, pc, oprom, opram, options); }; |
| 2247 | 2254 | offs_t m68020hmmu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) { return CPU_DISASSEMBLE_NAME(dasm_m68020)(this, buffer, pc, oprom, opram, options); }; |
| 2248 | 2255 | offs_t m68ec030_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) { return CPU_DISASSEMBLE_NAME(dasm_m68ec030)(this, buffer, pc, oprom, opram, options); }; |
| r242646 | r242647 | |
| 2547 | 2554 | const device_type M68010 = &device_creator<m68010_device>; |
| 2548 | 2555 | const device_type M68EC020 = &device_creator<m68ec020_device>; |
| 2549 | 2556 | const device_type M68020 = &device_creator<m68020_device>; |
| 2557 | const device_type M68020FPU = &device_creator<m68020fpu_device>; |
| 2550 | 2558 | const device_type M68020PMMU = &device_creator<m68020pmmu_device>; |
| 2551 | 2559 | const device_type M68020HMMU = &device_creator<m68020hmmu_device>; |
| 2552 | 2560 | const device_type M68EC030 = &device_creator<m68ec030_device>; |
| r242646 | r242647 | |
| 2646 | 2654 | init_cpu_m68020(); |
| 2647 | 2655 | } |
| 2648 | 2656 | |
| 2657 | |
| 2658 | m68020fpu_device::m68020fpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 2659 | : m68000_base_device(mconfig, "M68020FPU", tag, owner, clock, M68020, 32,32, "m68020fpu", __FILE__) |
| 2660 | { |
| 2661 | } |
| 2662 | |
| 2663 | void m68020fpu_device::device_start() |
| 2664 | { |
| 2665 | init_cpu_m68020fpu(); |
| 2666 | } |
| 2667 | |
| 2649 | 2668 | // 68020 with 68851 PMMU |
| 2650 | 2669 | m68020pmmu_device::m68020pmmu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 2651 | 2670 | : m68000_base_device(mconfig, "M68020PMMU", tag, owner, clock, M68020PMMU, 32,32, "m68020pmmu", __FILE__) |