Previous 15994 Revisions Next

r5084 Friday 26th June, 2009 at 05:03:14 UTC by R. Belmont
[BEBOX] Hack to work around MPC105 impossibility with current MAME architecture.
[src/mess/drivers]bebox.c

src/mess/drivers/bebox.c
r5083r5084
8181   AM_RANGE(0xFFF04000, 0xFFFFFFFF) AM_READWRITE( bebox_flash_r, bebox_flash_w )
8282ADDRESS_MAP_END
8383
84// The following is a gross hack to let the BeBox boot ROM identify the processors correctly.
85// This needs to be done in a better way if someone comes up with one.
8486
87static READ64_HANDLER(bb_slave_64be_r)
88{
89   const device_config *device = devtag_get_device(space->machine, "pcibus");
90
91   if (cpu_get_pc(space->cpu) == 0xfff02e94)
92   {
93      return 0x108000ff;   // indicate slave CPU
94   }
95
96   return pci_64be_r(device, offset, mem_mask);
97}
98
99static ADDRESS_MAP_START( bebox_slave_mem, ADDRESS_SPACE_PROGRAM, 64 )
100   AM_RANGE(0x80000cf8, 0x80000cff) AM_READ(bb_slave_64be_r)
101   AM_RANGE(0x80000cf8, 0x80000cff) AM_DEVWRITE("pcibus", pci_64be_w )
102   AM_IMPORT_FROM(bebox_mem)
103ADDRESS_MAP_END
104
105
85106static MACHINE_DRIVER_START( bebox )
86107   /* basic machine hardware */
87108   MDRV_CPU_ADD("ppc1", PPC603, 66000000)   /* 66 MHz */
88109   MDRV_CPU_PROGRAM_MAP(bebox_mem)
89110
90111   MDRV_CPU_ADD("ppc2", PPC603, 66000000)   /* 66 MHz */
91   MDRV_CPU_PROGRAM_MAP(bebox_mem)
112   MDRV_CPU_PROGRAM_MAP(bebox_slave_mem)
92113
93114   MDRV_QUANTUM_TIME(HZ(60))
94115

Previous 15994 Revisions Next


© 1998-2018 The MESS Team