Previous 15994 Revisions Next

r8014 Tuesday 11th May, 2010 at 20:35:25 UTC by Angelo Salese
Placeholder for the Zilog Z8001 CPU core
[src/emu/cpu/z8000]z8000.c z8000.h
[src/mess/drivers]m20.c p8k.c

src/emu/cpu/z8000/z8000.c
r8013r8014
367367   cpustate->program = device->space(AS_PROGRAM);
368368   cpustate->io = device->space(AS_IO);
369369   cpustate->fcw = RDMEM_W(cpustate,  2); /* get reset cpustate->fcw */
370   cpustate->pc   = RDMEM_W(cpustate,  4); /* get reset cpustate->pc  */
370   if(cpustate->fcw & F_SEG)
371   {
372      //cpustate->seg_pc = RDMEM_W(cpustate, 4);
373      cpustate->pc = RDMEM_W(cpustate,  6);
374   }
375   else
376   {
377      cpustate->pc = RDMEM_W(cpustate,  4); /* get reset cpustate->pc  */
378   }
371379}
372380
373381static CPU_EXIT( z8000 )
r8013r8014
468476 * Generic set_info
469477 **************************************************************************/
470478
471static CPU_SET_INFO( z8000 )
479static CPU_SET_INFO( z8002 )
472480{
473481   z8000_state *cpustate = get_safe_token(device);
474482
r8013r8014
514522 * Generic get_info
515523 **************************************************************************/
516524
517CPU_GET_INFO( z8000 )
525CPU_GET_INFO( z8002 )
518526{
519527   z8000_state *cpustate = (device != NULL && device->token != NULL) ? get_safe_token(device) : NULL;
520528
r8013r8014
576584      case CPUINFO_INT_REGISTER + Z8000_R15:         info->i = cpustate->RW(15);                  break;
577585
578586      /* --- the following bits of info are returned as pointers to data or functions --- */
579      case CPUINFO_FCT_SET_INFO:                  info->setinfo = CPU_SET_INFO_NAME(z8000);      break;
587      case CPUINFO_FCT_SET_INFO:                  info->setinfo = CPU_SET_INFO_NAME(z8002);      break;
580588      case CPUINFO_FCT_INIT:                     info->init = CPU_INIT_NAME(z8000);            break;
581589      case CPUINFO_FCT_RESET:                     info->reset = CPU_RESET_NAME(z8000);         break;
582590      case CPUINFO_FCT_EXIT:                     info->exit = CPU_EXIT_NAME(z8000);            break;
r8013r8014
638646      case CPUINFO_STR_REGISTER + Z8000_R15:         sprintf(info->s, "R15:%04X", cpustate->RW(15)); break;
639647   }
640648}
649
650/*
651handling for the z8001
652*/
653
654CPU_GET_INFO( z8001 )
655{
656   switch (state)
657   {
658      /* --- the following bits of info are returned as pointers to data or functions --- */
659
660      /* --- the following bits of info are returned as NULL-terminated strings --- */
661      case DEVINFO_STR_NAME:                     strcpy(info->s, "Zilog Z8001");         break;
662
663      default:                              CPU_GET_INFO_CALL(z8002);            break;
664   }
665}
src/emu/cpu/z8000/z8000.h
r8013r8014
2424#define Z8000_HALT      0x0100   /* halted flag  */
2525
2626/* PUBLIC FUNCTIONS */
27extern CPU_GET_INFO( z8000 );
28#define CPU_Z8000 CPU_GET_INFO_NAME( z8000 )
27extern CPU_GET_INFO( z8001 );
28#define CPU_Z8001 CPU_GET_INFO_NAME( z8001 )
29extern CPU_GET_INFO( z8002 );
30#define CPU_Z8002 CPU_GET_INFO_NAME( z8002 )
2931
3032CPU_DISASSEMBLE( z8000 );
3133
src/mess/drivers/m20.c
r8013r8014
9898
9999static MACHINE_DRIVER_START( m20 )
100100    /* basic machine hardware */
101    MDRV_CPU_ADD("maincpu", Z8000, MAIN_CLOCK)
101    MDRV_CPU_ADD("maincpu", Z8001, MAIN_CLOCK)
102102    MDRV_CPU_PROGRAM_MAP(m20_mem)
103103    MDRV_CPU_IO_MAP(m20_io)
104104
src/mess/drivers/p8k.c
r8013r8014
537537
538538static MACHINE_DRIVER_START( p8k_16 )
539539   /* basic machine hardware */
540   MDRV_CPU_ADD("maincpu", Z8000, XTAL_4MHz )   // actually z8001, appropriate changes pending
540   MDRV_CPU_ADD("maincpu", Z8001, XTAL_4MHz )   // actually z8001, appropriate changes pending
541541   MDRV_CPU_CONFIG(p8k_16_daisy_chain)
542542   MDRV_CPU_PROGRAM_MAP(p8k_16_memmap)
543543//  MDRV_CPU_IO_MAP(p8k_16_iomap)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team