Previous 15994 Revisions Next

r3823 Friday 12th December, 2008 at 08:06:33 UTC by Miodrag Milanović
Converting upd7002 to device and adding function type to ins8154
[src/mess/drivers]bbc.c
[src/mess/includes]bbc.h
[src/mess/machine]bbc.c ins8154.c ins8154.h upd7002.c upd7002.h

src/mess/includes/bbc.h
r3822r3823
1111#ifndef BBC_H_
1212#define BBC_H_
1313
14#include "machine/upd7002.h"
1415
1516/*----------- defined in machine/bbc.c -----------*/
1617
r3822r3823
8990
9091WRITE8_HANDLER ( BBC_SerialULA_w );
9192
93extern const uPD7002_interface BBC_uPD7002;
9294
9395/*----------- defined in video/bbc.c -----------*/
9496
src/mess/machine/ins8154.c
r3822r3823
2727   MDR_STROBED_OUTPUT_3STATE = 0xe0
2828};
2929
30
30typedef struct _ins8154_t ins8154_t;
3131struct _ins8154_t
3232{
3333   const ins8154_interface *intf; /* Pointer to our interface */
src/mess/machine/ins8154.h
r3822r3823
99#ifndef INS8154_H_
1010#define INS8154_H_
1111
12/***************************************************************************
13    MACROS
14***************************************************************************/
15
1216#define INS8154  DEVICE_GET_INFO_NAME(ins8154)
1317
18/***************************************************************************
19    TYPE DEFINITIONS
20***************************************************************************/
1421
22typedef void (*ins8154_irq_func)(const device_config *device, int state);
23#define INS8154_IRQ(name)   void name(const device_config *device, int state )
24
1525/******************* Interface **********************************************/
1626
17typedef struct _ins8154_t ins8154_t;
1827typedef struct _ins8154_interface ins8154_interface;
1928
2029struct _ins8154_interface
r3822r3823
2332   read8_device_func in_b_func;
2433   write8_device_func out_a_func;
2534   write8_device_func out_b_func;
26   void (*irq_func)(int state);   
35   ins8154_irq_func irq_func;   
2736};
2837
2938DEVICE_GET_INFO( ins8154 );
src/mess/machine/upd7002.c
r3822r3823
1212#include "upd7002.h"
1313
1414
15// local copy of the uPD7002 external procedure calls
16static struct uPD7002_interface
17uPD7002_calls={
18   0,
19   0,
20};
21
22
23void uPD7002_config(const struct uPD7002_interface *intf)
15typedef struct _uPD7002_t uPD7002_t;
16struct _uPD7002_t
2417{
25   uPD7002_calls.get_analogue_func=*intf->get_analogue_func;
26   uPD7002_calls.EOC_func=*intf->EOC_func;
27}
18   /* Pointer to our interface */
19   const uPD7002_interface *intf;
2820
21   /* Status Register
22      D0 and D1 define the currently selected input channel
23      D2 flag output
24      D3 0 = 8 bit mode   1 = 12 bit mode
25      D4 2nd MSB of conversion
26      D5     MSB of conversion
27      D6 0 = busy, 1 = not busy    (~busy)
28      D7 0 = conversion completed, 1 = conversion not completed  (~EOC)
29   */
30   int status;
31   
32   /* High data byte
33      This byte contains the 8 most significant bits of the analogue to digital conversion. */
34   int data1;
35   
36   /* Low data byte
37      In 12 bit mode: Bits 7 to 4 define the four low order bits of the conversion.
38      In  8 bit mode. All bits 7 to 4 are inaccurate.
39      Bits 3 to 0 are always set to low. */
40   int data0;
41   
42   
43   /* temporary store of the next A to D conversion */
44   int digitalvalue;
2945
30/* Status Register
31   D0 and D1 define the currently selected input channel
32   D2 flag output
33   D3 0 = 8 bit mode   1 = 12 bit mode
34   D4 2nd MSB of conversion
35   D5     MSB of conversion
36   D6 0 = busy, 1 = not busy    (~busy)
37   D7 0 = conversion completed, 1 = conversion not completed  (~EOC)
38*/
39static int uPD7002_status=0;
46   /* this counter is used to check a full end of conversion has been reached
47   if the uPD7002 is half way through one conversion and a new conversion is requested
48   the counter at the end of the first conversion will not match and not be processed
49   only then at the end of the second conversion will the conversion complete function run */
50   int conversion_counter;   
51};
4052
41/* High data byte
42   This byte contains the 8 most significant bits of the analogue to digital conversion. */
43static int uPD7002_data1=0;
4453
45/* Low data byte
46   In 12 bit mode: Bits 7 to 4 define the four low order bits of the conversion.
47   In  8 bit mode. All bits 7 to 4 are inaccurate.
48   Bits 3 to 0 are always set to low. */
49static int uPD7002_data0=0;
54/*****************************************************************************
55 Implementation
56*****************************************************************************/
5057
58INLINE uPD7002_t *get_safe_token(const device_config *device)
59{
60   assert(device != NULL);
61   assert(device->token != NULL);
5162
52/* temporary store of the next A to D conversion */
53static int uPD7002_digitalvalue=0;
63   return (uPD7002_t *)device->token;
64}
5465
55
56 READ8_HANDLER ( uPD7002_EOC_r )
66READ8_DEVICE_HANDLER ( uPD7002_EOC_r )
5767{
58   return (uPD7002_status>>7)&0x01;
68   uPD7002_t *uPD7002 = get_safe_token(device);
69   return (uPD7002->status>>7)&0x01;
5970}
6071
6172
62
63
64/* this counter is used to check a full end of conversion has been reached
65   if the uPD7002 is half way through one conversion and a new conversion is requested
66   the counter at the end of the first conversion will not match and not be processed
67   only then at the end of the second conversion will the conversion complete function run */
68static int conversion_counter=0;
69
7073static TIMER_CALLBACK(uPD7002_conversioncomplete)
7174{
75   const device_config *device = ptr;
76   uPD7002_t *uPD7002 = get_safe_token(device);
77
7278   int counter_value = param;
73   if (counter_value==conversion_counter)
79   if (counter_value==uPD7002->conversion_counter)
7480   {
7581      // this really always does a 12 bit conversion
76      uPD7002_data1=uPD7002_digitalvalue>>8;
77      uPD7002_data0=uPD7002_digitalvalue&0xf0;
82      uPD7002->data1 = uPD7002->digitalvalue>>8;
83      uPD7002->data0 = uPD7002->digitalvalue&0xf0;
7884
7985      // set the status register with top 2 MSB, not busy and conversion complete
80      uPD7002_status=(uPD7002_status&0x0f)|((uPD7002_data1&0xc0)>>2)|0x40;
86      uPD7002->status = (uPD7002->status & 0x0f)|((uPD7002->data1 & 0xc0)>>2)|0x40;
8187
8288      // call the EOC function with EOC from status
8389      // uPD7002_EOC_r(0) this has just been set to 0
84      if (uPD7002_calls.EOC_func) (uPD7002_calls.EOC_func)(0);
85      conversion_counter=0;
90      if (uPD7002->intf->EOC_func) (uPD7002->intf->EOC_func)(device,0);
91      uPD7002->conversion_counter=0;
8692   }
8793}
8894
8995
96READ8_DEVICE_HANDLER ( uPD7002_r )
97{
98   uPD7002_t *uPD7002 = get_safe_token(device);
9099
91
92 READ8_HANDLER ( uPD7002_r )
93{
94100   switch(offset&0x03)
95101   {
96102      case 0:
97         return uPD7002_status;
103         return uPD7002->status;
98104         break;
99105
100106      case 1:
101         return uPD7002_data1;
107         return uPD7002->data1;
102108         break;
103109
104110      case 2: case 3:
105         return uPD7002_data0;
111         return uPD7002->data0;
106112         break;
107113   }
108114   return 0;
r3822r3823
110116
111117
112118
113WRITE8_HANDLER ( uPD7002_w )
119WRITE8_DEVICE_HANDLER ( uPD7002_w )
114120{
115
121   uPD7002_t *uPD7002 = get_safe_token(device);
116122   /* logerror("write to uPD7002 $%02X = $%02X\n",offset,data); */
117123
118124   switch(offset&0x03)
r3822r3823
132138      */
133139
134140      /* set D6=0 busy ,D7=1 conversion not complete */
135      uPD7002_status=(data & 0x0f) | 0x80;
141      uPD7002->status=(data & 0x0f) | 0x80;
136142
137143      // call the EOC function with EOC from status
138144      // uPD7002_EOC_r(0) this has just been set to 1
139      if (uPD7002_calls.EOC_func) (uPD7002_calls.EOC_func)(1);
145      if (uPD7002->intf->EOC_func) uPD7002->intf->EOC_func(device, 1);
140146
141147      /* the uPD7002 works by sampling the analogue value at the start of the conversion
142148         so it is read hear and stored until the end of the A to D conversion */
143149
144150      // this function should return a 16 bit value.
145      uPD7002_digitalvalue=(uPD7002_calls.get_analogue_func)(uPD7002_status&0x03);
151      uPD7002->digitalvalue = uPD7002->intf->get_analogue_func(device, uPD7002->status & 0x03);
146152
147      conversion_counter+=1;
153      uPD7002->conversion_counter++;
148154
149155      // call a timer to start the conversion
150      if (uPD7002_status&0x08)
156      if (uPD7002->status & 0x08)
151157      {
152158         // 12 bit conversion takes 10ms
153         timer_set(space->machine, ATTOTIME_IN_MSEC(10), NULL, conversion_counter, uPD7002_conversioncomplete);
159         timer_set(device->machine, ATTOTIME_IN_MSEC(10), (void *)device, uPD7002->conversion_counter, uPD7002_conversioncomplete);
154160      } else {
155161         // 8 bit conversion takes 4ms
156         timer_set(space->machine, ATTOTIME_IN_MSEC(4),  NULL, conversion_counter, uPD7002_conversioncomplete);
162         timer_set(device->machine, ATTOTIME_IN_MSEC(4),  (void *)device, uPD7002->conversion_counter, uPD7002_conversioncomplete);
157163      }
158164      break;
159165
r3822r3823
170176   }
171177}
172178
179/* Device Interface */
173180
181static DEVICE_START( uPD7002 )
182{
183   uPD7002_t *uPD7002 = get_safe_token(device);
184   // validate arguments
174185
186   assert(device != NULL);
187   assert(device->tag != NULL);
188   assert(strlen(device->tag) < 20);
189   assert(device->static_config != NULL);
175190
191   uPD7002->intf = device->static_config;
192   uPD7002->status = 0;
193   uPD7002->data1 = 0;
194   uPD7002->data0 = 0;
195   uPD7002->digitalvalue = 0;
196   uPD7002->conversion_counter = 0;
197   
198   // register for state saving
199   state_save_register_item(device->machine, "uPD7002", device->tag, 0, uPD7002->status);
200   state_save_register_item(device->machine, "uPD7002", device->tag, 0, uPD7002->data1);
201   state_save_register_item(device->machine, "uPD7002", device->tag, 0, uPD7002->data0);
202   state_save_register_item(device->machine, "uPD7002", device->tag, 0, uPD7002->digitalvalue);
203   state_save_register_item(device->machine, "uPD7002", device->tag, 0, uPD7002->conversion_counter);
204   return DEVICE_START_OK;
205}
176206
207static DEVICE_RESET( uPD7002 )
208{
209   uPD7002_t *uPD7002 = get_safe_token(device);
210   uPD7002->status = 0;
211   uPD7002->data1 = 0;
212   uPD7002->data0 = 0;
213   uPD7002->digitalvalue = 0;
214   uPD7002->conversion_counter = 0;
215}
216
217static DEVICE_SET_INFO( uPD7002 )
218{
219   switch (state)
220   {
221      /* no parameters to set */
222   }
223}
224
225DEVICE_GET_INFO( uPD7002 )
226{
227   switch (state)
228   {
229      /* --- the following bits of info are returned as 64-bit signed integers --- */
230      case DEVINFO_INT_TOKEN_BYTES:               info->i = sizeof(uPD7002_t);               break;
231      case DEVINFO_INT_INLINE_CONFIG_BYTES:         info->i = 0;                        break;
232      case DEVINFO_INT_CLASS:                     info->i = DEVICE_CLASS_PERIPHERAL;         break;
233
234      /* --- the following bits of info are returned as pointers to data or functions --- */
235      case DEVINFO_FCT_SET_INFO:                  info->set_info = DEVICE_SET_INFO_NAME(uPD7002); break;
236      case DEVINFO_FCT_START:                     info->start = DEVICE_START_NAME(uPD7002);      break;
237      case DEVINFO_FCT_STOP:                     /* Nothing */                        break;
238      case DEVINFO_FCT_RESET:                     info->reset = DEVICE_RESET_NAME(uPD7002);      break;
239
240      /* --- the following bits of info are returned as NULL-terminated strings --- */
241      case DEVINFO_STR_NAME:                     info->s = "uPD7002";                  break;
242      case DEVINFO_STR_FAMILY:                  info->s = "uPD7002";                  break;
243      case DEVINFO_STR_VERSION:                  info->s = "1.0";                     break;
244      case DEVINFO_STR_SOURCE_FILE:               info->s = __FILE__;                     break;
245      case DEVINFO_STR_CREDITS:                  info->s = "Copyright MESS Team";         break;
246   }
247}
src/mess/machine/upd7002.h
r3822r3823
1111#ifndef UPD7002_H_
1212#define UPD7002_H_
1313
14/***************************************************************************
15    MACROS
16***************************************************************************/
1417
15struct uPD7002_interface
18#define UPD7002      DEVICE_GET_INFO_NAME(uPD7002)
19
20/***************************************************************************
21    TYPE DEFINITIONS
22***************************************************************************/
23
24typedef int (*uPD7002_get_analogue_func)(const device_config *device, int channel_number);
25#define UPD7002_GET_ANALOGUE(name)   int name(const device_config *device, int channel_number )
26
27typedef void (*uPD7002_eoc_func)(const device_config *device, int data);
28#define UPD7002_EOC(name)   void name(const device_config *device, int data )
29
30
31typedef struct _uPD7002_interface uPD7002_interface;
32struct _uPD7002_interface
1633{
17   int  (*get_analogue_func)(int channel_number);
18   void (*EOC_func)(int data);
34   uPD7002_get_analogue_func get_analogue_func;
35   uPD7002_eoc_func         EOC_func;
1936};
2037
38/***************************************************************************
39    FUNCTION PROTOTYPES
40***************************************************************************/
2141
22/*----------- defined in machine/upd7002.c -----------*/
42/* device interface */
43DEVICE_GET_INFO( uPD7002 );
2344
24void uPD7002_config(const struct uPD7002_interface *intf);
45/* Standard handlers */
2546
26 READ8_HANDLER ( uPD7002_EOC_r );
47READ8_DEVICE_HANDLER ( uPD7002_EOC_r );
48READ8_DEVICE_HANDLER ( uPD7002_r );
49WRITE8_DEVICE_HANDLER ( uPD7002_w );
2750
28 READ8_HANDLER ( uPD7002_r );
29WRITE8_HANDLER ( uPD7002_w );
3051
52/***************************************************************************
53    DEVICE CONFIGURATION MACROS
54***************************************************************************/
3155
56#define MDRV_UPD7002_ADD(_tag, _intrf) \
57   MDRV_DEVICE_ADD(_tag, UPD7002) \
58   MDRV_DEVICE_CONFIG(_intrf)
59
60
3261#endif /* UPD7002_H_ */
src/mess/machine/bbc.c
r3822r3823
594594      if ((myo>=0x00) && (myo<=0x07)) return BBC_6845_r(space, myo-0x00);      /* Video Controller */
595595      if ((myo>=0x08) && (myo<=0x0f)) return BBC_6850_r(space, myo-0x08);      /* Serial Controller */
596596      if ((myo>=0x10) && (myo<=0x17)) return 0xfe;                  /* Serial System Chip */
597      if ((myo>=0x18) && (myo<=0x1f)) return uPD7002_r(space, myo-0x18);         /* A to D converter */
597      if ((myo>=0x18) && (myo<=0x1f)) return uPD7002_r((device_config*)device_list_find_by_tag( space->machine->config->devicelist, UPD7002, "upd7002" ), myo-0x18);         /* A to D converter */
598598      if ((myo>=0x20) && (myo<=0x23)) return 0xfe;                  /* VideoULA */
599599      if ((myo>=0x24) && (myo<=0x27)) return bbcm_wd1770l_read(space, myo-0x24); /* 1770 */
600600      if ((myo>=0x28) && (myo<=0x2f)) return bbcm_wd1770_read(space, myo-0x28);  /* disc control latch */
r3822r3823
622622      if ((myo>=0x00) && (myo<=0x07)) BBC_6845_w(space, myo-0x00,data);         /* Video Controller */
623623      if ((myo>=0x08) && (myo<=0x0f)) BBC_6850_w(space, myo-0x08,data);         /* Serial Controller */
624624      if ((myo>=0x10) && (myo<=0x17)) BBC_SerialULA_w(space, myo-0x10,data);      /* Serial System Chip */
625      if ((myo>=0x18) && (myo<=0x1f)) uPD7002_w(space, myo-0x18,data);         /* A to D converter */
625      if ((myo>=0x18) && (myo<=0x1f)) uPD7002_w((device_config*)device_list_find_by_tag( space->machine->config->devicelist, UPD7002, "upd7002" ),myo-0x18,data);         /* A to D converter */
626626      if ((myo>=0x20) && (myo<=0x23)) videoULA_w(space, myo-0x20,data);         /* VideoULA */
627627      if ((myo>=0x24) && (myo<=0x27)) bbcm_wd1770l_write(space, myo-0x24,data);    /* 1770 */
628628      if ((myo>=0x28) && (myo<=0x2f)) bbcm_wd1770_write(space, myo-0x28,data);     /* disc control latch */
r3822r3823
11591159/* joystick EOC */
11601160static  READ8_HANDLER( bbcb_via_system_read_cb1 )
11611161{
1162  return uPD7002_EOC_r(space, 0);
1162  return uPD7002_EOC_r((device_config*)device_list_find_by_tag( space->machine->config->devicelist, UPD7002, "upd7002" ),0);
11631163}
11641164
11651165
r3822r3823
13121312BBC Joystick Support
13131313**************************************/
13141314
1315static int BBC_get_analogue_input(int channel_number)
1315UPD7002_GET_ANALOGUE(BBC_get_analogue_input)
13161316{
13171317   switch(channel_number)
13181318   {
13191319      case 0:
1320         return ((0xff-input_port_read(Machine, "JOY0"))<<8);
1320         return ((0xff-input_port_read(device->machine, "JOY0"))<<8);
13211321         break;
13221322      case 1:
1323         return ((0xff-input_port_read(Machine, "JOY1"))<<8);
1323         return ((0xff-input_port_read(device->machine, "JOY1"))<<8);
13241324         break;
13251325      case 2:
1326         return ((0xff-input_port_read(Machine, "JOY2"))<<8);
1326         return ((0xff-input_port_read(device->machine, "JOY2"))<<8);
13271327         break;
13281328      case 3:
1329         return ((0xff-input_port_read(Machine, "JOY3"))<<8);
1329         return ((0xff-input_port_read(device->machine, "JOY3"))<<8);
13301330         break;
13311331   }
13321332
13331333   return 0;
13341334}
13351335
1336static void BBC_uPD7002_EOC(int data)
1336UPD7002_EOC(BBC_uPD7002_EOC)
13371337{
13381338   via_0_cb1_w(cpu_get_address_space(Machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0,data);
13391339}
13401340
1341static const struct uPD7002_interface BBC_uPD7002 =
1341const uPD7002_interface BBC_uPD7002 =
13421342{
13431343   BBC_get_analogue_input,
13441344   BBC_uPD7002_EOC
13451345};
13461346
13471347
1348
1349
13501348/***************************************
13511349  BBC 6850 Serial Controller
13521350****************************************/
r3822r3823
22052203
22062204   bbcb_IC32_initialise();
22072205
2208   uPD7002_config(&BBC_uPD7002);
22092206   MC6850_config(&BBC_MC6850_calls);
22102207
22112208   opusbank=0;
r3822r3823
22492246
22502247   bbcb_IC32_initialise();
22512248
2252   uPD7002_config(&BBC_uPD7002);
22532249   MC6850_config(&BBC_MC6850_calls);
22542250
22552251   previous_wd177x_int_state=1;
r3822r3823
22902286
22912287   bbcb_IC32_initialise();
22922288
2293   uPD7002_config(&BBC_uPD7002);
22942289   MC6850_config(&BBC_MC6850_calls);
22952290
22962291   previous_wd177x_int_state=1;
src/mess/drivers/bbc.c
r3822r3823
147147   AM_RANGE(0xfe60, 0xfe7f) AM_READWRITE(via_1_r          , via_1_w           )   /*    fe60-fe7f  6522 VIA       USER VIA                        */
148148   AM_RANGE(0xfe80, 0xfe9f) AM_READWRITE(bbc_disc_r      , bbc_disc_w      )   /*    fe80-fe9f  8271 FDC       Floppy disc controller          */
149149   AM_RANGE(0xfea0, 0xfebf) AM_READ    (return8_FE                           )   /*    fea0-febf  68B54 ADLC     ECONET controller               */
150   AM_RANGE(0xfec0, 0xfedf) AM_READWRITE(uPD7002_r         , uPD7002_w          )   /*    fec0-fedf  uPD7002        Analogue to digital converter   */
150   AM_RANGE(0xfec0, 0xfedf) AM_DEVREADWRITE(UPD7002, "upd7002",uPD7002_r,uPD7002_w   )   /*    fec0-fedf  uPD7002        Analogue to digital converter   */
151151   AM_RANGE(0xfee0, 0xfeff) AM_READ    (return8_FE                      )   /*    fee0-feff  Tube ULA       Tube system interface           */
152152
153153   AM_RANGE(0xff00, 0xffff) AM_ROM AM_REGION("user1", 0x43f00)            /*    ff00-ffff                 OS Rom (continued)              */
r3822r3823
181181   AM_RANGE(0xfe60, 0xfe7f) AM_READWRITE(via_1_r         , via_1_w         )   /*    fe60-fe7f  6522 VIA       USER VIA                        */
182182   AM_RANGE(0xfe80, 0xfe9f) AM_READWRITE(bbc_wd1770_read   , bbc_wd1770_write   )   /*    fe80-fe9f  1770 FDC       Floppy disc controller          */
183183   AM_RANGE(0xfea0, 0xfebf) AM_READ     (return8_FE                     )   /*    fea0-febf  68B54 ADLC     ECONET controller               */
184   AM_RANGE(0xfec0, 0xfedf) AM_READWRITE(uPD7002_r         , uPD7002_w         )   /*    fec0-fedf  uPD7002        Analogue to digital converter   */
184   AM_RANGE(0xfec0, 0xfedf) AM_DEVREADWRITE(UPD7002, "upd7002", uPD7002_r, uPD7002_w)   /*    fec0-fedf  uPD7002        Analogue to digital converter   */
185185   AM_RANGE(0xfee0, 0xfeff) AM_READ    (return8_FE                     )   /*    fee0-feff  Tube ULA       Tube system interface           */
186186
187187   AM_RANGE(0xff00, 0xffff) AM_ROM AM_REGION("user1", 0x43f00)            /*    ff00-ffff                 OS Rom (continued)              */
r3822r3823
217217   AM_RANGE(0xfe60, 0xfe7f) AM_READWRITE(via_1_r         , via_1_w         )   /*    fe60-fe7f  6522 VIA       USER VIA                        */
218218   AM_RANGE(0xfe80, 0xfe9f) AM_READWRITE(bbc_wd1770_read   , bbc_wd1770_write   )   /*    fe80-fe9f  1770 FDC       Floppy disc controller          */
219219   AM_RANGE(0xfea0, 0xfebf) AM_READ     (return8_FE                     )   /*    fea0-febf  68B54 ADLC     ECONET controller               */
220   AM_RANGE(0xfec0, 0xfedf) AM_READWRITE(uPD7002_r         , uPD7002_w         )   /*    fec0-fedf  uPD7002        Analogue to digital converter   */
220   AM_RANGE(0xfec0, 0xfedf) AM_DEVREADWRITE(UPD7002, "upd7002",uPD7002_r, uPD7002_w   )   /*    fec0-fedf  uPD7002        Analogue to digital converter   */
221221   AM_RANGE(0xfee0, 0xfeff) AM_READ    (return8_FE                     )   /*    fee0-feff  Tube ULA       Tube system interface           */
222222
223223   AM_RANGE(0xff00, 0xffff) AM_ROM AM_REGION("user1", 0x43f00)            /*    ff00-ffff                 OS Rom (continued)              */
r3822r3823
271271    AM_RANGE(0xfe00, 0xfe07) AM_READWRITE(BBC_6845_r        , BBC_6845_w        )         fe00-fe07  6845 CRTC      Video controller
272272    AM_RANGE(0xfe08, 0xfe0f) AM_READWRITE(BBC_6850_r        , BBC_6850_w        )         fe08-fe0f  6850 ACIA      Serial Controller
273273    AM_RANGE(0xfe10, 0xfe17) AM_NOP                                                       fe10-fe17  Serial ULA     Serial system chip
274    AM_RANGE(0xfe18, 0xfe1f) AM_READWRITE(uPD7002_r         , uPD7002_w        )         fec0-fedf  uPD7002        Analogue to digital converter
274    AM_RANGE(0xfe18, 0xfe1f) M_DEVREADWRITE(UPD7002, "uPD7002",uPD7002_r, uPD7002_w )         fec0-fedf  uPD7002        Analogue to digital converter
275275    AM_RANGE(0xfe20, 0xfe23) AM_READWRITE(return8_FE        , videoULA_w        )         fe20-fe23  Video ULA      Video system chip
276276    AM_RANGE(0xfe24, 0xfe27) AM_READWRITE(bbcm_wd1770l_read , bbcm_wd1770l_write)         fe24-fe27  1770 Latch     1770 Control Latch
277277    AM_RANGE(0xfe28, 0xfe2f) AM_READWRITE(bbcm_wd1770_read  , bbcm_wd1770_write )         fe28-fe2f  1770 FDC       Floppy disc controller
r3822r3823
749749//  MDRV_SOUND_ADD("tms5220", TMS5220, tms5220_interface)
750750
751751   MDRV_CASSETTE_ADD( "cassette", bbc_cassette_config )
752   
753   /* devices */
754   MDRV_UPD7002_ADD("upd7002",BBC_uPD7002)
752755MACHINE_DRIVER_END
753756
754757
r3822r3823
818821   MDRV_DEVICE_ADD("printer", PRINTER)
819822
820823   MDRV_CASSETTE_ADD( "cassette", bbc_cassette_config )
824   
825   /* devices */
826   MDRV_UPD7002_ADD("upd7002",BBC_uPD7002)
821827MACHINE_DRIVER_END
822828
823829static void bbc_cartslot_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team