Previous 15994 Revisions Next

r5733 Monday 14th September, 2009 at 12:56:05 UTC by Curt Coder
[ABC80X] Cleanup.
[src/mess/drivers]abc80x.c

src/mess/drivers/abc80x.c
r5732r5733
721721   driver_state->abc77_txd = state;
722722}
723723
724static WRITE_LINE_DEVICE_HANDLER( abc77_clock_w )
725{
726   const device_config *z80dart = devtag_get_device(device->machine, Z80DART_TAG);
727
728   /* connected to DART channel B clock */
729   z80dart_rxtxcb_w(z80dart, state);
730}
731
732static WRITE_LINE_DEVICE_HANDLER( abc77_keydown_w )
733{
734   const device_config *z80dart = devtag_get_device(device->machine, Z80DART_TAG);
735
736   /* connected to DART channel B DCD */
737   z80dart_dcdb_w(z80dart, state);
738}
739
740724static ABC77_INTERFACE( abc800_abc77_intf )
741725{
742726   DEVCB_LINE(abc800_abc77_txd_w),
743   DEVCB_LINE(abc77_clock_w),
744   DEVCB_LINE(abc77_keydown_w)
727   DEVCB_DEVICE_LINE(Z80DART_TAG, z80dart_rxtxcb_w),
728   DEVCB_DEVICE_LINE(Z80DART_TAG, z80dart_dcdb_w)
745729};
746730
747731static WRITE_LINE_DEVICE_HANDLER( abc802_abc77_txd_w )
r5732r5733
754738static ABC77_INTERFACE( abc802_abc77_intf )
755739{
756740   DEVCB_LINE(abc802_abc77_txd_w),
757   DEVCB_LINE(abc77_clock_w),
758   DEVCB_LINE(abc77_keydown_w)
741   DEVCB_DEVICE_LINE(Z80DART_TAG, z80dart_rxtxcb_w),
742   DEVCB_DEVICE_LINE(Z80DART_TAG, z80dart_dcdb_w)
759743};
760744
761745static WRITE_LINE_DEVICE_HANDLER( abc806_abc77_txd_w )
r5732r5733
768752static ABC77_INTERFACE( abc806_abc77_intf )
769753{
770754   DEVCB_LINE(abc806_abc77_txd_w),
771   DEVCB_LINE(abc77_clock_w),
772   DEVCB_LINE(abc77_keydown_w)
755   DEVCB_DEVICE_LINE(Z80DART_TAG, z80dart_rxtxcb_w),
756   DEVCB_DEVICE_LINE(Z80DART_TAG, z80dart_dcdb_w)
773757};
774758
775759/* Z80 CTC */
r5732r5733
10381022   abc800_state *state = machine->driver_data;
10391023
10401024   /* find devices */
1041
10421025   state->z80ctc = devtag_get_device(machine, Z80CTC_TAG);
10431026   state->z80dart = devtag_get_device(machine, Z80DART_TAG);
10441027   state->z80sio = devtag_get_device(machine, Z80SIO_TAG);
1045   //state->abc77 = devtag_get_device(machine, ABC77_TAG);
1028   state->abc77 = devtag_get_device(machine, ABC77_TAG);
10461029   state->cassette = devtag_get_device(machine, CASSETTE_TAG);
10471030
10481031   /* initialize the ABC BUS */
1049
10501032   abcbus_init(machine, Z80_TAG, abcbus_config);
10511033
10521034   /* configure memory */
1053
10541035   state->videoram = auto_alloc_array(machine, UINT8, ABC800_VIDEO_RAM_SIZE);
10551036
10561037   memory_configure_bank(machine, 1, 0, 1, memory_region(machine, Z80_TAG), 0);
10571038   memory_configure_bank(machine, 1, 1, 1, state->videoram, 0);
10581039
10591040   /* register for state saving */
1060
10611041   state_save_register_global(machine, state->fetch_charram);
10621042   state_save_register_global(machine, state->abc77_txd);
10631043   state_save_register_global(machine, state->pling);
r5732r5733
10741054   abc802_state *state = machine->driver_data;
10751055
10761056   /* find devices */
1077
10781057   state->z80ctc = devtag_get_device(machine, Z80CTC_TAG);
10791058   state->z80dart = devtag_get_device(machine, Z80DART_TAG);
10801059   state->z80sio = devtag_get_device(machine, Z80SIO_TAG);
1081//   state->abc77 = devtag_get_device(machine, ABC77_TAG);
1060   state->abc77 = devtag_get_device(machine, ABC77_TAG);
10821061   state->cassette = devtag_get_device(machine, CASSETTE_TAG);
10831062
10841063   /* initialize the ABC BUS */
1085
10861064   abcbus_init(machine, Z80_TAG, abcbus_config);
10871065
10881066   /* configure memory */
1089
10901067   memory_configure_bank(machine, 1, 0, 1, mess_ram, 0);
10911068   memory_configure_bank(machine, 1, 1, 1, memory_region(machine, Z80_TAG), 0);
10921069
10931070   /* register for state saving */
1094
10951071   state_save_register_global(machine, state->lrs);
10961072   state_save_register_global(machine, state->abc77_txd);
10971073   state_save_register_global(machine, state->pling);
r5732r5733
11281104   int bank;
11291105
11301106   /* find devices */
1131
11321107   state->z80ctc = devtag_get_device(machine, Z80CTC_TAG);
11331108   state->z80dart = devtag_get_device(machine, Z80DART_TAG);
11341109   state->z80sio = devtag_get_device(machine, Z80SIO_TAG);
11351110   state->e0516 = devtag_get_device(machine, E0516_TAG);
1136   //state->abc77 = devtag_get_device(machine, ABC77_TAG);
1111   state->abc77 = devtag_get_device(machine, ABC77_TAG);
11371112   state->cassette = devtag_get_device(machine, CASSETTE_TAG);
11381113
11391114   /* initialize the ABC BUS */
1140
11411115   abcbus_init(machine, Z80_TAG, abcbus_config);
11421116
11431117   /* setup memory banking */
1144
11451118   state->videoram = auto_alloc_array(machine, UINT8, videoram_size);
11461119
11471120   for (bank = 1; bank <= 16; bank++)
r5732r5733
11521125   }
11531126
11541127   /* register for state saving */
1155
11561128   state_save_register_global(machine, state->abc77_txd);
11571129   state_save_register_global(machine, state->keydtr);
11581130   state_save_register_global(machine, state->eme);
r5732r5733
11651137   abc806_state *state = machine->driver_data;
11661138
11671139   /* setup memory banking */
1168
11691140   int bank;
11701141
11711142   for (bank = 1; bank <= 16; bank++)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team