Previous 15994 Revisions Next

r5468 Thursday 20th August, 2009 at 13:33:53 UTC by Curt Coder
[MM1] Added Intel 8212 emulation, and flesh on the bones.
[src/mess]mess.mak
[src/mess/drivers]mikromik.c
[src/mess/includes]mikromik.h
[src/mess/machine]i8212.c* i8212.h*

src/mess/includes/mikromik.h
r5467r5468
11#ifndef __MIKROMIK__
22#define __MIKROMIK__
33
4#define SCREEN_TAG         "screen"
5#define I8085_TAG         "ic40"
6#define I8212_TAG         "ic12"
7#define I8237_TAG         "ic45"
8#define I8253_TAG         "ic6"
9#define UPD765_TAG         "ic15"
10#define I8275_TAG         "ic59"
11#define UPD7201_TAG         "ic11"
12#define UPD7220_TAG         "ic101"
4#define SCREEN_TAG      "screen"
5#define I8085A_TAG      "ic40"
6#define I8212_TAG      "ic12"
7#define I8237_TAG      "ic45"
8#define I8253_TAG      "ic6"
9#define UPD765_TAG      "ic15"
10#define I8275_TAG      "ic59"
11#define UPD7201_TAG      "ic11"
12#define UPD7220_TAG      "ic101"
1313
14#define DMA_CRT         0
15#define DMA_MPSC_TX      1
16#define DMA_MPSC_RX      2
17#define DMA_FDC         3
18
1419typedef struct _mm1_state mm1_state;
1520struct _mm1_state
1621{
22   /* video state */
23   UINT8 *char_rom;
24
1725   /* devices */
26   const device_config      *i8212;
1827   const device_config      *i8237;
28   const device_config      *i8275;
1929   const device_config      *upd765;
20   const device_config      *i8275;
21   const device_config      *upd7220;
30   const device_config      *upd7201;
2231};
2332
2433#endif
src/mess/machine/i8212.c
r0r5468
1/**********************************************************************
2
3    Intel 8212 8-Bit Input/Output Port emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10#include "driver.h"
11#include "i8212.h"
12
13/***************************************************************************
14    PARAMETERS
15***************************************************************************/
16
17#define LOG 1
18
19/***************************************************************************
20    TYPE DEFINITIONS
21***************************************************************************/
22
23typedef struct _i8212_t i8212_t;
24struct _i8212_t
25{
26   devcb_resolved_write_line   out_int_func;
27   devcb_resolved_read8      in_di_func;
28   devcb_resolved_write8      out_do_func;
29
30   int md;                  /* mode */
31   int stb;               /* strobe */
32   UINT8 data;               /* data latch */
33};
34
35/***************************************************************************
36    INLINE FUNCTIONS
37***************************************************************************/
38
39INLINE i8212_t *get_safe_token(const device_config *device)
40{
41   assert(device != NULL);
42   assert(device->token != NULL);
43   return (i8212_t *)device->token;
44}
45
46INLINE const i8212_interface *get_interface(const device_config *device)
47{
48   assert(device != NULL);
49   assert((device->type == I8212));
50   return (const i8212_interface *) device->static_config;
51}
52
53/***************************************************************************
54    IMPLEMENTATION
55***************************************************************************/
56
57/*-------------------------------------------------
58    i8212_r - data output read
59-------------------------------------------------*/
60
61READ8_DEVICE_HANDLER( i8212_r )
62{
63   i8212_t *i8212 = get_safe_token(device);
64
65   /* clear interrupt line */
66   devcb_call_write_line(&i8212->out_int_func, CLEAR_LINE);
67
68   if (LOG) logerror("I8212 '%s' INT: %u\n", device->tag, CLEAR_LINE);
69
70   return i8212->data;
71}
72
73/*-------------------------------------------------
74    i8212_w - data input write
75-------------------------------------------------*/
76
77WRITE8_DEVICE_HANDLER( i8212_w )
78{
79   i8212_t *i8212 = get_safe_token(device);
80
81   /* latch data */
82   i8212->data = data;
83
84   /* output data */
85   devcb_call_write8(&i8212->out_do_func, 0, i8212->data);
86}
87
88/*-------------------------------------------------
89    i8212_md_w - mode write
90-------------------------------------------------*/
91
92WRITE_LINE_DEVICE_HANDLER( i8212_md_w )
93{
94   i8212_t *i8212 = get_safe_token(device);
95
96   if (LOG) logerror("I8212 '%s' Mode: %s\n", device->tag, state ? "output" : "input");
97
98   i8212->md = state;
99}
100
101/*-------------------------------------------------
102    i8212_stb_w - strobe write
103-------------------------------------------------*/
104
105WRITE_LINE_DEVICE_HANDLER( i8212_stb_w )
106{
107   i8212_t *i8212 = get_safe_token(device);
108
109   if (LOG) logerror("I8212 '%s' STB: %u\n", device->tag, state);
110
111   if (i8212->md == I8212_MODE_INPUT)
112   {
113      if (i8212->stb && !state)
114      {
115         /* input data */
116         i8212->data = devcb_call_read8(&i8212->in_di_func, 0);
117
118         /* assert interrupt line */
119         devcb_call_write_line(&i8212->out_int_func, ASSERT_LINE);
120
121         if (LOG) logerror("I8212 '%s' INT: %u\n", device->tag, ASSERT_LINE);
122      }
123   }
124
125   i8212->stb = state;
126}
127
128/*-------------------------------------------------
129    DEVICE_START( i8212 )
130-------------------------------------------------*/
131
132static DEVICE_START( i8212 )
133{
134   i8212_t *i8212 = get_safe_token(device);
135   const i8212_interface *intf = get_interface(device);
136
137   /* resolve callbacks */
138   devcb_resolve_write_line(&i8212->out_int_func, &intf->out_int_func, device);
139   devcb_resolve_read8(&i8212->in_di_func, &intf->in_di_func, device);
140   devcb_resolve_write8(&i8212->out_do_func, &intf->out_do_func, device);
141   
142   /* register for state saving */
143   state_save_register_device_item(device, 0, i8212->md);
144   state_save_register_device_item(device, 0, i8212->stb);
145   state_save_register_device_item(device, 0, i8212->data);
146}
147
148/*-------------------------------------------------
149    DEVICE_RESET( i8212 )
150-------------------------------------------------*/
151
152static DEVICE_RESET( i8212 )
153{
154   i8212_t *i8212 = get_safe_token(device);
155
156   i8212->data = 0;
157
158   if (i8212->md == I8212_MODE_OUTPUT)
159   {
160      /* output data */
161      devcb_call_write8(&i8212->out_do_func, 0, i8212->data);
162   }
163}
164
165/*-------------------------------------------------
166    DEVICE_GET_INFO( i8212 )
167-------------------------------------------------*/
168
169DEVICE_GET_INFO( i8212 )
170{
171   switch (state)
172   {
173      /* --- the following bits of info are returned as 64-bit signed integers --- */
174      case DEVINFO_INT_TOKEN_BYTES:               info->i = sizeof(i8212_t);               break;
175      case DEVINFO_INT_INLINE_CONFIG_BYTES:         info->i = 0;                        break;
176      case DEVINFO_INT_CLASS:                     info->i = DEVICE_CLASS_PERIPHERAL;         break;
177
178      /* --- the following bits of info are returned as pointers to data or functions --- */
179      case DEVINFO_FCT_START:                     info->start = DEVICE_START_NAME(i8212);      break;
180      case DEVINFO_FCT_STOP:                     /* Nothing */                        break;
181      case DEVINFO_FCT_RESET:                     info->reset = DEVICE_RESET_NAME(i8212);      break;
182
183      /* --- the following bits of info are returned as NULL-terminated strings --- */
184      case DEVINFO_STR_NAME:                     strcpy(info->s, "Intel 8212");            break;
185      case DEVINFO_STR_FAMILY:                  strcpy(info->s, "Intel 8080");            break;
186      case DEVINFO_STR_VERSION:                  strcpy(info->s, "1.0");                  break;
187      case DEVINFO_STR_SOURCE_FILE:               strcpy(info->s, __FILE__);               break;
188      case DEVINFO_STR_CREDITS:                  strcpy(info->s, "Copyright MESS Team");      break;
189   }
190}
src/mess/machine/i8212.h
r0r5468
1/**********************************************************************
2
3    Intel 8212 8-Bit Input/Output Port emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************
9                     _____   _____
10              _DS1    1 |*    \_/     | 24  Vcc
11                MD    2 |          | 23  _INT
12               DI1    3 |          | 22  DI8
13               DO1    4 |          | 21  DO8
14               DI2    5 |          | 20  DI7
15               DO2    6 |   8212    | 19  DO7
16               DI3    7 |          | 18  DI6
17               DO3    8 |          | 17  DO6
18               DI4    9 |          | 16  DI5
19               DO4   10 |          | 15  DO5
20               STB   11 |          | 14  DI4
21               GND  12 |_____________| 13  DO4
22
23**********************************************************************/
24
25#ifndef __I8212__
26#define __I8212__
27
28#include "devcb.h"
29
30/***************************************************************************
31    MACROS / CONSTANTS
32***************************************************************************/
33
34#define I8212      DEVICE_GET_INFO_NAME(i8212)
35
36#define MDRV_I8212_ADD(_tag, _intrf) \
37   MDRV_DEVICE_ADD(_tag, I8212, 0) \
38   MDRV_DEVICE_CONFIG(_intrf)
39
40#define I8212_INTERFACE(name) \
41   const i8212_interface (name)=
42
43/***************************************************************************
44    TYPE DEFINITIONS
45***************************************************************************/
46
47enum
48{
49   I8212_MODE_INPUT = 0,
50   I8212_MODE_OUTPUT
51};
52
53typedef struct _i8212_interface i8212_interface;
54struct _i8212_interface
55{
56   devcb_write_line   out_int_func;
57
58   devcb_read8         in_di_func;
59   devcb_write8      out_do_func;
60};
61
62/***************************************************************************
63    PROTOTYPES
64***************************************************************************/
65
66/* device interface */
67DEVICE_GET_INFO( i8212 );
68
69/* data latch access */
70READ8_DEVICE_HANDLER( i8212_r );
71WRITE8_DEVICE_HANDLER( i8212_w );
72
73/* mode */
74WRITE_LINE_DEVICE_HANDLER( i8212_mode_w );
75
76/* strobe */
77WRITE_LINE_DEVICE_HANDLER( i8212_stb_w );
78
79#endif
src/mess/mess.mak
r5467r5468
427427   $(MESS_MACHINE)/e0516.o      \
428428   $(MESS_MACHINE)/hd63450.o   \
429429   $(MESS_MACHINE)/i8155.o      \
430   $(MESS_MACHINE)/i8212.o      \
430431   $(MESS_MACHINE)/i8214.o      \
431432   $(MESS_MACHINE)/i82439tx.o   \
432433   $(MESS_MACHINE)/i8271.o      \
src/mess/drivers/mikromik.c
r5467r5468
55#include "devices/mflopimg.h"
66#include "cpu/i8085/i8085.h"
77#include "machine/8237dma.h"
8#include "machine/i8212.h"
89#include "machine/nec765.h"
910#include "machine/pit8253.h"
1011#include "video/i8275.h"
12#include "video/i82720.h"
1113#include "video/upd7220.h"
1214
1315/*
r5467r5468
1719
1820   Parts:
1921
20   6,144 MHz xtal
21   18,720 MHz xtal
22   16 MHz xtal
22   6,144 MHz xtal (CPU clock)
23   18,720 MHz xtal (pixel clock)
24   16 MHz xtal (FDC clock)
2325   Intel 8085AP (CPU)
2426   Intel 8253-5P (PIT)
2527   Intel 8275P (CRTC)
r5467r5468
5052
5153   TODO:
5254
53   - Intel 8212 emulation
55   - ROM dumps
56   - pixel display
57   - floppy
58   - keyboard
59   - memory banking
5460   - PCB layout
55   - character generator
56   - memory mapped I/O
57   - pixel display
58   - system disks
59   - hook up DMA channels
60   - NEC µPD7220 emulation (Intel 82720 GDC)
61   - NEC µPD7220 (devicify Intel 82720 GDC)
62   - NEC µPD7201
6163
6264*/
6365
64#define MM1_DMA_I8275   0
65#define MM1_DMA_I8272   0
66#define MM1_DMA_UPD7220   0
66INLINE const device_config *get_floppy_image(running_machine *machine, int drive)
67{
68   return image_from_devtype_and_index(machine, IO_FLOPPY, drive);
69}
6770
71/* Read/Write Handlers */
72
73static WRITE8_HANDLER( cs6_w )
74{
75   int d = BIT(data, 0);
76
77   switch (offset)
78   {
79   case 0: /* IC24 A8 */
80      break;
81
82   case 1: /* RECALL */
83      break;
84
85   case 2: /* _RV28/RX21 */
86      break;
87
88   case 3: /* _TX21 */
89      break;
90
91   case 4: /* _RCL */
92      break;
93
94   case 5: /* _INTC */
95      break;
96
97   case 6: /* C?EN (blurry schematics) */
98      break;
99
100   case 7: /* MOTOR ON */
101      floppy_drive_set_motor_state(get_floppy_image(space->machine, 0), d);
102      floppy_drive_set_ready_state(get_floppy_image(space->machine, 0), d, 1);
103      break;
104   }
105}
106
107/* Memory Maps */
108
109static ADDRESS_MAP_START( mm1_map, ADDRESS_SPACE_PROGRAM, 8 )
110   AM_RANGE(0x0000, 0x3fff) AM_ROM
111   AM_RANGE(0x4000, 0xbfff) AM_RAM
112   AM_RANGE(0xff00, 0xff0f) AM_DEVREADWRITE(I8237_TAG, dma8237_r, dma8237_w)
113//   AM_RANGE(0xff10, 0xff13) AM_DEVREADWRITE(UPD7201_TAG, upd7201_r, upd7201_w)
114    AM_RANGE(0xff20, 0xff21) AM_DEVREADWRITE(I8275_TAG, i8275_r, i8275_w)
115   AM_RANGE(0xff30, 0xff33) AM_DEVREADWRITE(I8253_TAG, pit8253_r, pit8253_w)
116   AM_RANGE(0xff40, 0xff40) AM_DEVREADWRITE(I8212_TAG, i8212_r, i8212_w)
117   AM_RANGE(0xff50, 0xff50) AM_DEVREAD(UPD765_TAG, nec765_status_r)
118   AM_RANGE(0xff51, 0xff51) AM_DEVREADWRITE(UPD765_TAG, nec765_data_r, nec765_data_w)
119   AM_RANGE(0xff60, 0xff67) AM_WRITE(cs6_w)
120//   AM_RANGE(0xff70, 0xff7f) AM_DEVREADWRITE(UPD7220_TAG, upd7220_r, upd7220_w)
121ADDRESS_MAP_END
122
123/* Input Ports */
124
125static INPUT_PORTS_START( mm1 )
126INPUT_PORTS_END
127
68128/* Video */
69129
70130static I8275_DMA_REQUEST( crtc_dma_request )
71131{
72132   mm1_state *driver_state = device->machine->driver_data;
73133   //logerror("i8275 DMA\n");
74   dma8237_drq_write(driver_state->i8237, MM1_DMA_I8275, state);
134   dma8237_drq_write(driver_state->i8237, DMA_CRT, state);
75135}
76136
77static I8275_INT_REQUEST( crtc_int_request )
137static I8275_DISPLAY_PIXELS( crtc_display_pixels )
78138{
79   //logerror("i8275 INT\n");
80}
139   mm1_state *state = device->machine->driver_data;
81140
82static I8275_DISPLAY_PIXELS( crtc_display_pixels )
83{
141   UINT8 data = state->char_rom[((charcode & 0x3f) << 4) | linecount];
142   int i;
143   
144   for (i = 0; i < 6; i++)
145   {
146      *BITMAP_ADDR16(tmpbitmap, y, x + i) = BIT(data, i);
147   }
84148}
85149
86150static const i8275_interface mm1_i8275_intf =
r5467r5468
89153   8,
90154   0,
91155   crtc_dma_request,
92   crtc_int_request,
156   NULL,
93157   crtc_display_pixels
94158};
95159
r5467r5468
97161{
98162}
99163
100static WRITE_LINE_DEVICE_HANDLER( hgdc_drq_w )
101{
102   mm1_state *driver_state = device->machine->driver_data;
103
104   dma8237_drq_write(driver_state->i8237, MM1_DMA_UPD7220, state);
105}
106
107164static UPD7220_INTERFACE( mm1_upd7220_intf )
108165{
109166   SCREEN_TAG,
r5467r5468
111168   hgdc_display_pixels,
112169   DEVCB_NULL,
113170   DEVCB_NULL,
114   DEVCB_LINE(hgdc_drq_w),
115171   DEVCB_NULL,
116172   DEVCB_NULL,
173   DEVCB_NULL,
117174   DEVCB_NULL
118175};
119176
177static VIDEO_START( mm1 )
178{
179   mm1_state *state = machine->driver_data;
180
181   /* find memory regions */
182   state->char_rom = memory_region(machine, "chargen");
183
184   VIDEO_START_CALL(generic_bitmapped);
185}
186
120187static VIDEO_UPDATE( mm1 )
121188{
122189   mm1_state *state = screen->machine->driver_data;
123190
124191   i8275_update(state->i8275, bitmap, cliprect);
192   VIDEO_UPDATE_CALL(generic_bitmapped);
125193
126194   return 0;
127195}
128196
197/* 8212 Interface */
198
199static READ8_DEVICE_HANDLER( i8212_di_r )
200{
201   /* keyboard data */
202   return 0;
203}
204
205static I8212_INTERFACE( mm1_i8212_intf )
206{
207   DEVCB_CPU_INPUT_LINE(I8085A_TAG, I8085_RST65_LINE),
208   DEVCB_HANDLER(i8212_di_r),
209   DEVCB_NULL
210};
211
212/* 8237 Interface */
213
129214static DMA8237_HRQ_CHANGED( dma_hrq_changed )
130215{
131   cputag_set_input_line( device->machine, I8085_TAG, INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE );
216   cputag_set_input_line(device->machine, I8085A_TAG, INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
132217
133218   /* Assert HLDA */
134219   dma8237_set_hlda( device, state );
r5467r5468
136221
137222static DMA8237_MEM_READ( memory_dma_r )
138223{
139   const address_space *program = cputag_get_address_space(device->machine, I8085_TAG, ADDRESS_SPACE_PROGRAM);
224   const address_space *program = cputag_get_address_space(device->machine, I8085A_TAG, ADDRESS_SPACE_PROGRAM);
140225   //logerror("DMA read %04x\n", offset);
141226   return memory_read_byte(program, offset);
142227}
143228
144229static DMA8237_MEM_WRITE( memory_dma_w )
145230{
146   const address_space *program = cputag_get_address_space(device->machine, I8085_TAG, ADDRESS_SPACE_PROGRAM);
231   const address_space *program = cputag_get_address_space(device->machine, I8085A_TAG, ADDRESS_SPACE_PROGRAM);
147232   //logerror("DMA write %04x:%02x\n", offset, data);
148233   memory_write_byte(program, offset, data);
149234}
r5467r5468
155240   i8275_dack_set_data(state->i8275, data);
156241}
157242
158#ifdef UNUSED_CODE
159static DMA8237_CHANNEL_WRITE( hgdc_dack_w )
243static DMA8237_CHANNEL_READ( mpsc_dack_r )
160244{
161   mm1_state *state = device->machine->driver_data;
245   //mm1_state *state = device->machine->driver_data;
246   
247   return 0; //upd7201_dack_r(state->upd7201, 0);
248}
162249
163   upd7220_dack_w(state->upd7220, 0, data);
250static DMA8237_CHANNEL_WRITE( mpsc_dack_w )
251{
252   //mm1_state *state = device->machine->driver_data;
253
254   //upd7201_dack_w(state->upd7201, 0, data);
164255}
165256
166257static DMA8237_CHANNEL_READ( fdc_dack_r )
167258{
168259   mm1_state *state = device->machine->driver_data;
169260
170   return nec765_dack_r(state->i8272, 0);
261   return nec765_dack_r(state->upd765, 0);
171262}
172263
173264static DMA8237_CHANNEL_WRITE( fdc_dack_w )
174265{
175266   mm1_state *state = device->machine->driver_data;
176267
177   nec765_dack_w(state->i8272, 0, data);
268   nec765_dack_w(state->upd765, 0, data);
178269}
179#endif
180270
181static DMA8237_OUT_EOP( dma_eop_w )
182{
183}
184
185271static const struct dma8237_interface mm1_dma8237_intf =
186272{
187   XTAL_18_720MHz/3, /* this needs to be verified */
273   XTAL_6_144MHz/2/2, // what is this field for?
188274   dma_hrq_changed,
189275   memory_dma_r,
190276   memory_dma_w,
191   { NULL, NULL, NULL, NULL },
192   { crtc_dack_w, NULL, NULL, NULL },
193   dma_eop_w
277   { NULL, NULL, mpsc_dack_r, fdc_dack_r },
278   { crtc_dack_w, mpsc_dack_w, NULL, fdc_dack_w },
279   NULL
194280};
195281
282/* µPD765 Interface */
283
196284static NEC765_INTERRUPT( fdc_irq )
197285{
286   cputag_set_input_line(device->machine, I8085A_TAG, I8085_RST55_LINE, state ? ASSERT_LINE : CLEAR_LINE);
198287}
199288
200289static NEC765_DMA_REQUEST( fdc_drq )
201290{
202291   mm1_state *driver_state = device->machine->driver_data;
203292
204   dma8237_drq_write(driver_state->i8237, MM1_DMA_I8272, state);
293   dma8237_drq_write(driver_state->i8237, DMA_FDC, state);
205294}
206295
207296static const nec765_interface mm1_nec765_intf =
r5467r5468
212301   NEC765_RDY_PIN_CONNECTED // ???
213302};
214303
304/* 8253 Interface */
305
306static PIT8253_OUTPUT_CHANGED( itxc_w )
307{
308}
309
310static PIT8253_OUTPUT_CHANGED( irxc_w )
311{
312}
313
314static PIT8253_OUTPUT_CHANGED( auxc_w )
315{
316}
317
215318static const struct pit8253_config mm1_pit8253_intf =
216319{
217320   {
218321      {
219322         XTAL_6_144MHz/2/2,
220         NULL /* _ITxC */
323         itxc_w
221324      }, {
222325         XTAL_6_144MHz/2/2,
223         NULL /* _IRxC */
326         irxc_w
224327      }, {
225328         XTAL_6_144MHz/2/2,
226         NULL /* _AUXC */
329         auxc_w
227330      }
228331   }
229332};
230333
231/* Memory Maps */
232
233static ADDRESS_MAP_START( mm1_map, ADDRESS_SPACE_PROGRAM, 8 )
234   AM_RANGE(0x0000, 0x0fff) AM_ROM
235   AM_RANGE(0x1000, 0xfeff) AM_RAM
236   AM_RANGE(0xff00, 0xff0f) AM_DEVREADWRITE(I8237_TAG, dma8237_r, dma8237_w)
237//   AM_RANGE(0xff10, 0xff1f) µPD7201
238    AM_RANGE(0xff20, 0xff21) AM_DEVREADWRITE(I8275_TAG, i8275_r, i8275_w)
239   AM_RANGE(0xff30, 0xff33) AM_DEVREADWRITE(I8253_TAG, pit8253_r, pit8253_w)
240//   AM_RANGE(0xff40, 0xff4f) 8212
241   AM_RANGE(0xff50, 0xff50) AM_DEVREAD(UPD765_TAG, nec765_status_r)
242   AM_RANGE(0xff51, 0xff51) AM_DEVREADWRITE(UPD765_TAG, nec765_data_r, nec765_data_w)
243//   AM_RANGE(0xff60, 0xff6f)
244//   AM_RANGE(0xff70, 0xff7f) µPD7220
245ADDRESS_MAP_END
246
247/* Input Ports */
248
249static INPUT_PORTS_START( mm1 )
250INPUT_PORTS_END
251
252334/* Machine Initialization */
253335
254336static MACHINE_START( mm1 )
r5467r5468
256338   mm1_state *state = machine->driver_data;
257339
258340   /* look up devices */
341   state->i8212 = devtag_get_device(machine, I8212_TAG);
259342   state->i8237 = devtag_get_device(machine, I8237_TAG);
343   state->i8275 = devtag_get_device(machine, I8275_TAG);
260344   state->upd765 = devtag_get_device(machine, UPD765_TAG);
261   state->i8275 = devtag_get_device(machine, I8275_TAG);
345   state->upd7201 = devtag_get_device(machine, UPD7201_TAG);
262346
263347   /* register for state saving */
264348   //state_save_register_global(machine, state->);
r5467r5468
270354   MDRV_DRIVER_DATA(mm1_state)
271355
272356   /* basic system hardware */
273   MDRV_CPU_ADD(I8085_TAG, 8085A, XTAL_6_144MHz)
357   MDRV_CPU_ADD(I8085A_TAG, 8085A, XTAL_6_144MHz)
274358   MDRV_CPU_PROGRAM_MAP(mm1_map)
275359
276360   MDRV_MACHINE_START(mm1)
r5467r5468
284368
285369   MDRV_PALETTE_LENGTH(2)
286370   MDRV_PALETTE_INIT(black_and_white)
371
372   MDRV_VIDEO_START(mm1)
287373   MDRV_VIDEO_UPDATE(mm1)
288374
289375   /* peripheral hardware */
376   MDRV_I8212_ADD(I8212_TAG, mm1_i8212_intf)
290377   MDRV_I8275_ADD(I8275_TAG, mm1_i8275_intf)
291   MDRV_DMA8237_ADD(I8237_TAG, mm1_dma8237_intf)
378   MDRV_DMA8237_ADD(I8237_TAG, /* XTAL_6_144MHz/2/2, */ mm1_dma8237_intf)
292379   MDRV_PIT8253_ADD(I8253_TAG, mm1_pit8253_intf)
293   MDRV_NEC765A_ADD(UPD765_TAG, mm1_nec765_intf)
380   MDRV_NEC765A_ADD(UPD765_TAG, /* XTAL_16MHz/2/2, */ mm1_nec765_intf)
294381MACHINE_DRIVER_END
295382
296383static MACHINE_DRIVER_START( mm1m6 )
r5467r5468
302389/* ROMs */
303390
304391ROM_START( mm1m6 )
305   ROM_REGION( 0x1000, I8085_TAG, 0 )
306   ROM_LOAD( "mm1.bin", 0x0000, 0x1000, CRC(07400e72) SHA1(354ff97817a607ca38d296af8b2813878d092a08) )
392   ROM_REGION( 0x4000, I8085A_TAG, 0 )
393   ROM_LOAD( "mm1.ic2",  0x0000, 0x2000, NO_DUMP )
394   ROM_LOAD( "mm1.ic10", 0x2000, 0x2000, NO_DUMP )
395   ROM_LOAD( "mm1.bin",  0x0000, 0x1000, BAD_DUMP CRC(07400e72) SHA1(354ff97817a607ca38d296af8b2813878d092a08) )
307396
308   ROM_REGION( 0x1000, "chargen", 0 )
309   ROM_LOAD( "chargen", 0x0000, 0x1000, NO_DUMP )
397   ROM_REGION( 0x200, "prom", 0 )
398   ROM_LOAD( "mm6349-1.ic24", 0x0000, 0x0200, NO_DUMP )
399
400   ROM_REGION( 0x800, "chargen", 0 )
401   ROM_LOAD( "chargen.ic51", 0x0000, 0x0800, NO_DUMP )
310402ROM_END
311403
312404#define rom_mm1m7 rom_mm1m6
r5467r5468
370462}
371463
372464static SYSTEM_CONFIG_START( mm1m6 )
373   CONFIG_RAM_DEFAULT   (64 * 1024)
465   CONFIG_RAM_DEFAULT   (32 * 1024)
374466   CONFIG_DEVICE(dual_640kb_floppy)
375467SYSTEM_CONFIG_END
376468
377469static SYSTEM_CONFIG_START( mm1m7 )
378   CONFIG_RAM_DEFAULT   (64 * 1024)
470   CONFIG_RAM_DEFAULT   (32 * 1024)
379471   CONFIG_DEVICE(dual_640kb_floppy)
380472   // 5MB Winchester
381473SYSTEM_CONFIG_END

Previous 15994 Revisions Next


© 1998-2018 The MESS Team