Previous 199869 Revisions Next

r17780 Monday 10th September, 2012 at 17:44:55 UTC by Sandro Ronco
Added asl_ext, bclr_dir, bset_dir opcodes to the HC11 core. (nw)
[src/emu/cpu/mc68hc11]hc11ops.c hc11ops.h
[src/mess/drivers]alphasma.c

trunk/src/emu/cpu/mc68hc11/hc11ops.c
r17779r17780
645645   CYCLES(cpustate, 2);
646646}
647647
648/* ASL EXT             0x78 */
649static void HC11OP(asl_ext)(hc11_state *cpustate)
650{
651   UINT16 adr = FETCH16(cpustate);
652   UINT8 i = READ8(cpustate, adr);
653   UINT16 r = i << 1;
654   CLEAR_NZVC(cpustate);
655   SET_C8(r);
656   WRITE8(cpustate, adr, r);
657   SET_N8(r);
658   SET_Z8(r);
659
660   if (((cpustate->ccr & CC_N) && (cpustate->ccr & CC_C) == 0) ||
661      ((cpustate->ccr & CC_N) == 0 && (cpustate->ccr & CC_C)))
662   {
663      cpustate->ccr |= CC_V;
664   }
665
666   CYCLES(cpustate, 6);
667}
668
648669/* BITA IMM         0x85 */
649670static void HC11OP(bita_imm)(hc11_state *cpustate)
650671{
r17779r17780
775796   CYCLES(cpustate, 3);
776797}
777798
799/* BCLR DIR       0x15 */
800static void HC11OP(bclr_dir)(hc11_state *cpustate)
801{
802   UINT8 d = FETCH(cpustate);
803   UINT8 mask = FETCH(cpustate);
804   UINT8 r = READ8(cpustate, d) & ~mask;
805   WRITE8(cpustate, d, r);
806   CLEAR_NZV(cpustate);
807   SET_N8(r);
808   SET_Z8(r);
809   CYCLES(cpustate, 6);
810}
811
778812/* BCLR INDX       0x1d */
779813static void HC11OP(bclr_indx)(hc11_state *cpustate)
780814{
r17779r17780
9671001   CYCLES(cpustate, 3);
9681002}
9691003
1004/* BSET DIR       0x14 */
1005static void HC11OP(bset_dir)(hc11_state *cpustate)
1006{
1007   UINT8 d = FETCH(cpustate);
1008   UINT8 mask = FETCH(cpustate);
1009   UINT8 r = READ8(cpustate, d) | mask;
1010   WRITE8(cpustate, d, r);
1011   CLEAR_NZV(cpustate);
1012   SET_N8(r);
1013   SET_Z8(r);
1014   CYCLES(cpustate, 6);
1015}
1016
9701017/* BSET INDX       0x1c */
9711018static void HC11OP(bset_indx)(hc11_state *cpustate)
9721019{
trunk/src/emu/cpu/mc68hc11/hc11ops.h
r17779r17780
4949   {   0x18,   0xe4,         HC11OP(andb_indy)         },
5050   {   0,      0x48,         HC11OP(asla)            },
5151   {   0,      0x58,         HC11OP(aslb)            },
52//  {   0,      0x78,           HC11OP(asl_ext)             },
52   {   0,      0x78,           HC11OP(asl_ext)             },
5353//  {   0,      0x68,           HC11OP(asl_indx)            },
5454//  {   0x18,   0x68,           HC11OP(asl_indy)            },
5555//  {   0,      0x47,           HC11OP(asra)                },
r17779r17780
5858//  {   0,      0x67,           HC11OP(asr_indx)            },
5959//  {   0x18,   0x67,           HC11OP(asr_indy)            },
6060   {   0,      0x24,         HC11OP(bcc)               },
61//  {   0,      0x15,           HC11OP(bclr_dir)            },
61   {   0,      0x15,           HC11OP(bclr_dir)            },
6262   {   0,      0x1d,         HC11OP(bclr_indx)         },
6363//  {   0x18,   0x1d,           HC11OP(bclr_indy)           },
6464   {   0,      0x25,         HC11OP(bcs)               },
r17779r17780
9090   {   0,      0x12,         HC11OP(brset_dir)         },
9191   {   0,      0x1e,         HC11OP(brset_indx)         },
9292//  {   0x18,   0x1e,           HC11OP(brset_indy)          },
93//  {   0,      0x14,           HC11OP(bset_dir)            },
93   {   0,      0x14,           HC11OP(bset_dir)            },
9494   {   0,      0x1c,         HC11OP(bset_indx)         },
9595//  {   0x18,   0x1c,           HC11OP(bset_indy)           },
9696   {   0,      0x8d,         HC11OP(bsr)               },
trunk/src/mess/drivers/alphasma.c
r17779r17780
6666   MCFG_CPU_PROGRAM_MAP(alphasmart_mem)
6767   MCFG_CPU_IO_MAP(alphasmart_io)
6868   MCFG_CPU_CONFIG(alphasmart_hc11_config)
69   MCFG_CPU_PERIODIC_INT(irq0_line_hold, 50)
6970
7071   /* video hardware */
7172   MCFG_SCREEN_ADD("screen", LCD)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team