Previous 15994 Revisions Next

r7579 Tuesday 16th March, 2010 at 08:12:07 UTC by Curt Coder
[TANDY2K] Implemented DMA mux register.
[src/mess/drivers]tandy2k.c
[src/mess/includes]tandy2k.h

src/mess/includes/tandy2k.h
r7578r7579
2323
2424   tandy2k_state(running_machine &machine) { }
2525
26   /* DMA state */
27   UINT8 dma_mux;
28
2629   /* keyboard state */
2730   int kben;
2831   UINT16 keylatch;
src/mess/drivers/tandy2k.c
r7578r7579
127127      7      DMA channel 3 select
128128
129129   */
130
131   tandy2k_state *state = (tandy2k_state *)space->machine->driver_data;
132
133   state->dma_mux = data;
134
135   /* check for DMA error */
136   int drq0 = 0;
137   int drq1 = 0;
138
139   for (int ch = 0; ch < 4; ch++)
140   {
141      if (BIT(data, ch)) { if (BIT(data, ch + 4)) drq1++; else drq0++; }
142   }
143
144   int dme = (drq0 > 2) || (drq1 > 2);
145   pic8259_ir6_w(state->pic1, dme);
130146}
131147
148static void dma_request(running_machine *machine, int line, int state)
149{
150
151}
152
132153static READ8_DEVICE_HANDLER( fldtc_r )
133154{
134155   upd765_tc_w(device, 1);
r7578r7579
714735
715736static UPD765_DMA_REQUEST( busdmarq0_w )
716737{
738   dma_request(device->machine, 0, state);
717739}
718740
719741static const struct upd765_interface i8272_intf =

Previous 15994 Revisions Next


© 1998-2018 The MESS Team