Previous 15994 Revisions Next

r3367 Wednesday 1st October, 2008 at 20:03:12 UTC by Curt Coder
[ABC806] Added E05-16 RTC to device list in driver state, fixed memory map.
[src/mess/drivers]abc80x.c
[src/mess/includes]abc80x.h
[src/mess/video]abc806.c

src/mess/video/abc806.c
r3366r3367
121121{
122122   abc806_state *state = machine->driver_data;
123123 
124   const device_config *e0516 = device_list_find_by_tag(machine->config->devicelist, E0516, E0516_TAG);
125 
126124   /*
127125 
128126      bit      description
r3366r3367
141139   UINT16 hru2_addr = (state->hru2_a8 << 8) | (offset >> 8);
142140   UINT8 data = memory_region(machine, "hru2")[hru2_addr] & 0x0f;
143141 
144   data |= e0516_dio_r(e0516) << 7;
142   data |= e0516_dio_r(state->e0516) << 7;
145143 
146144   return data;
147145}
r3366r3367
152150{
153151   abc806_state *state = machine->driver_data;
154152 
155   const device_config *e0516 = device_list_find_by_tag(machine->config->devicelist, E0516, E0516_TAG);
156 
157153   int level = BIT(data, 7);
158154 
159155   switch (data & 0x07)
r3366r3367
176172      break;
177173   case 5:
178174      /* RTC chip select */
179      e0516_cs_w(e0516, level);
175      e0516_cs_w(state->e0516, level);
180176      break;
181177   case 6:
182178      /* RTC clock */
183      e0516_clk_w(e0516, level);
179      e0516_clk_w(state->e0516, level);
184180      break;
185181   case 7:
186182      /* RTC data in */
187      e0516_dio_w(e0516, level);
183      e0516_dio_w(state->e0516, level);
188184      break;
189185   }
190186}
src/mess/includes/abc80x.h
r3366r3367
110110   const device_config *z80dart;
111111   const device_config *z80sio;
112112   const device_config *mc6845;
113   const device_config *e0516;
113114
114115   /* memory regions */
115116   const UINT8 *rad_prom;   /* line address PROM */
src/mess/drivers/abc80x.c
r3366r3367
443443   AM_RANGE(0x01, 0x01) AM_MIRROR(0xff18) AM_READWRITE(abcbus_status_r, abcbus_channel_w)
444444   AM_RANGE(0x02, 0x05) AM_MIRROR(0xff18) AM_WRITE(abcbus_command_w)
445445   AM_RANGE(0x06, 0x06) AM_MIRROR(0xff18) AM_WRITE(abc806_hrs_w)
446   AM_RANGE(0x07, 0x07) AM_MIRROR(0xff18) AM_READWRITE(abcbus_reset_r, abc806_hrc_w)
446   AM_RANGE(0x07, 0x07) AM_MIRROR(0xff18) AM_MASK(0xff00) AM_READWRITE(abcbus_reset_r, abc806_hrc_w)
447447   AM_RANGE(0x20, 0x23) AM_MIRROR(0xff0c) AM_DEVREADWRITE(Z80DART, Z80DART_TAG, dart_r, dart_w)
448448   AM_RANGE(0x31, 0x31) AM_MIRROR(0xff06) AM_DEVREAD(MC6845, MC6845_TAG, mc6845_register_r)
449449   AM_RANGE(0x34, 0x34) AM_MIRROR(0xff00) AM_MASK(0xff00) AM_READWRITE(abc806_mai_r, abc806_mao_w)
450450   AM_RANGE(0x35, 0x35) AM_MIRROR(0xff00) AM_READWRITE(abc806_ami_r, abc806_amo_w)
451   AM_RANGE(0x36, 0x36) AM_MIRROR(0xff00) AM_WRITE(abc806_sso_w)
452   AM_RANGE(0x37, 0x37) AM_MIRROR(0xff00) AM_READWRITE(abc806_cli_r, abc806_sto_w)
451   AM_RANGE(0x36, 0x36) AM_MIRROR(0xff00) AM_WRITE(abc806_sto_w)
452   AM_RANGE(0x37, 0x37) AM_MIRROR(0xff00) AM_MASK(0xff00) AM_READWRITE(abc806_cli_r, abc806_sso_w)
453453   AM_RANGE(0x38, 0x38) AM_MIRROR(0xff06) AM_DEVWRITE(MC6845, MC6845_TAG, mc6845_address_w)
454454   AM_RANGE(0x39, 0x39) AM_MIRROR(0xff06) AM_DEVWRITE(MC6845, MC6845_TAG, mc6845_register_w)
455455   AM_RANGE(0x40, 0x41) AM_MIRROR(0xff1c) AM_DEVREADWRITE(Z80SIO, Z80SIO_TAG, sio2_r, sio2_w)
r3366r3367
726726   state->z80ctc = device_list_find_by_tag(machine->config->devicelist, Z80CTC, Z80CTC_TAG);
727727   state->z80dart = device_list_find_by_tag(machine->config->devicelist, Z80DART, Z80DART_TAG);
728728   state->z80sio = device_list_find_by_tag(machine->config->devicelist, Z80SIO, Z80SIO_TAG);
729   state->e0516 = device_list_find_by_tag(machine->config->devicelist, E0516, E0516_TAG);
729730
730731   /* allocate timer */
731732

Previous 15994 Revisions Next


© 1998-2018 The MESS Team