Previous 15994 Revisions Next

r4015 Tuesday 30th December, 2008 at 10:15:10 UTC by Dirk Best
[SCC8530] Changed to use an inline config
[src/mess/drivers]apple2gs.c atarist.c ip20.c mac.c x68k.c
[src/mess/includes]mac.h
[src/mess/machine]8530scc.c 8530scc.h mac.c

src/mess/includes/mac.h
r4014r4015
2323
2424/*----------- defined in machine/mac.c -----------*/
2525
26extern const scc8530_interface mac_scc8530_interface;
2726extern const via6522_interface mac_via6522_intf;
2827extern const via6522_interface mac_via6522_2_intf;
2928extern const via6522_interface mac_via6522_adb_intf;
r4014r4015
5251READ16_HANDLER ( macplus_scsi_r );
5352WRITE16_HANDLER ( macplus_scsi_w );
5453NVRAM_HANDLER( mac );
54void mac_scc_ack(const device_config *device);
5555void mac_scc_mouse_irq( running_machine *machine, int x, int y );
5656void mac_fdc_set_enable_lines(const device_config *device, int enable_mask);
5757
src/mess/machine/8530scc.c
r4014r4015
5050INLINE scc8530_interface *get_interface(const device_config *device)
5151{
5252   assert(device->type == SCC8530);
53   return (scc8530_interface *) device->static_config;
53   return (scc8530_interface *) device->inline_config;
5454}
5555
5656
r4014r4015
359359   {
360360      /* --- the following bits of info are returned as 64-bit signed integers --- */
361361      case DEVINFO_INT_TOKEN_BYTES:               info->i = sizeof(scc8530_t);            break;
362      case DEVINFO_INT_INLINE_CONFIG_BYTES:         info->i = 0;                        break;
362      case DEVINFO_INT_INLINE_CONFIG_BYTES:         info->i = sizeof(scc8530_interface);      break;
363363      case DEVINFO_INT_CLASS:                     info->i = DEVICE_CLASS_PERIPHERAL;         break;
364364
365365      /* --- the following bits of info are returned as pointers to data or functions --- */
src/mess/machine/8530scc.h
r4014r4015
3434    DEVICE CONFIGURATION MACROS
3535***************************************************************************/
3636
37#define MDRV_SCC8530_ADD(_tag, _intrf) \
38   MDRV_DEVICE_ADD(_tag, SCC8530, 0) \
39   MDRV_DEVICE_CONFIG(_intrf)
37#define MDRV_SCC8530_ADD(_tag) \
38   MDRV_DEVICE_ADD(_tag, SCC8530, 0)
4039
40#define MDRV_SCC8530_ACK(_acknowledge) \
41   MDRV_DEVICE_CONFIG_DATAPTR(scc8530_interface, acknowledge, _acknowledge)
4142
4243
44
4345/***************************************************************************
4446    FUNCTION PROTOTYPES
4547***************************************************************************/
src/mess/machine/mac.c
r4014r4015
880880 * Serial Control Chip
881881 * *************************************************************************/
882882
883static void mac_scc_ack(const device_config *device)
883void mac_scc_ack(const device_config *device)
884884{
885885   set_scc_interrupt(device->machine, 0);
886886}
r4014r4015
940940   scc_w(scc, offset, wdata);
941941}
942942
943const scc8530_interface mac_scc8530_interface =
944{
945   mac_scc_ack
946};
947943
948944
949
950945/* *************************************************************************
951946 * RTC
952947 *
src/mess/drivers/apple2gs.c
r4014r4015
148148   apple2gs_docram
149149};
150150
151static const scc8530_interface apple2gs_scc8530_interface =
152{
153   NULL
154};
155
156151static MACHINE_DRIVER_START( apple2gs )
157152   MDRV_IMPORT_FROM( apple2e )
158153   MDRV_CPU_REPLACE("main", G65816, APPLE2GS_14M/5)
r4014r4015
184179   MDRV_APPLEFDC_REMOVE("fdc")
185180   MDRV_IWM_ADD("fdc", apple2_fdc_interface)
186181   /* SCC */
187   MDRV_SCC8530_ADD("scc", apple2gs_scc8530_interface)
182   MDRV_SCC8530_ADD("scc")
188183MACHINE_DRIVER_END
189184
190185
src/mess/drivers/mac.c
r4014r4015
175175
176176   /* devices */
177177   MDRV_IWM_ADD("fdc", mac_iwm_interface)
178   MDRV_SCC8530_ADD("scc", mac_scc8530_interface)
178   MDRV_SCC8530_ADD("scc")
179   MDRV_SCC8530_ACK(mac_scc_ack)
179180   MDRV_VIA6522_ADD("via6522_0", 1000000, mac_via6522_intf)
180181MACHINE_DRIVER_END
181182
src/mess/drivers/x68k.c
r4014r4015
21232123   led_timer = timer_alloc(machine, x68k_led_callback,NULL);
21242124}
21252125
2126static const scc8530_interface x68000_scc8530_interface =
2127{
2128   NULL
2129};
2130
21312126static MACHINE_DRIVER_START( x68000 )
21322127   /* basic machine hardware */
21332128   MDRV_CPU_ADD("main", M68000, 10000000)  /* 10 MHz */
r4014r4015
21472142
21482143   MDRV_X68KHDC_ADD( "x68k_hdc" )
21492144
2150   MDRV_SCC8530_ADD( "scc", x68000_scc8530_interface )
2145   MDRV_SCC8530_ADD( "scc" )
21512146
21522147    /* video hardware */
21532148   MDRV_SCREEN_ADD("main", RASTER)
src/mess/drivers/atarist.c
r4014r4015
17891789   MDRV_CARTSLOT_LOAD(atarist_cart)
17901790MACHINE_DRIVER_END
17911791
1792static const scc8530_interface atarist_scc8530_interface =
1793{
1794   NULL
1795};
1796
17971792static MACHINE_DRIVER_START( atarist )
17981793   MDRV_DRIVER_DATA(atarist_state)
17991794
r4014r4015
18091804
18101805   // device hardware
18111806   MDRV_MC68901_ADD(MC68901_TAG, mfp_intf)
1812   MDRV_SCC8530_ADD("scc", atarist_scc8530_interface)
1807   MDRV_SCC8530_ADD("scc")
18131808
18141809   // video hardware
18151810   MDRV_SCREEN_ADD("main", RASTER)
r4014r4015
18621857
18631858   // device hardware
18641859   MDRV_MC68901_ADD(MC68901_TAG, atariste_mfp_intf)
1865   MDRV_SCC8530_ADD("scc", atarist_scc8530_interface)
1860   MDRV_SCC8530_ADD("scc")
18661861
18671862   // video hardware
18681863   MDRV_SCREEN_ADD("main", RASTER)
r4014r4015
19211916
19221917   // device hardware
19231918   MDRV_MC68901_ADD(MC68901_TAG, stbook_mfp_intf)
1924   MDRV_SCC8530_ADD("scc", atarist_scc8530_interface)
1919   MDRV_SCC8530_ADD("scc")
19251920
19261921   // video hardware
19271922   MDRV_SCREEN_ADD("main", LCD)
src/mess/drivers/ip20.c
r4014r4015
619619   32768   /* data cache size */
620620};
621621
622static const scc8530_interface ip20_scc8530_interface =
623{
624   NULL
625};
626
627622static MACHINE_DRIVER_START( ip204415 )
628623   MDRV_CPU_ADD( "main", R4600BE, 50000000*3 )
629624   MDRV_CPU_CONFIG( config )
r4014r4015
649644   MDRV_SOUND_ADD( "cdda", CDDA, 0 )
650645   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
651646
652   MDRV_SCC8530_ADD("scc", ip20_scc8530_interface)
647   MDRV_SCC8530_ADD("scc")
653648
654649   MDRV_CDROM_ADD( "cdrom" )
655650MACHINE_DRIVER_END

Previous 15994 Revisions Next


© 1998-2018 The MESS Team