Previous 15994 Revisions Next

r4227 Wednesday 4th February, 2009 at 11:19:32 UTC by Curt Coder
[CDP1861] Refactored to use devcb.
[src/mess/drivers]studio2.c tmc1800.c vip.c
[src/mess/includes]tmc1800.h
[src/mess/video]cdp1861.c cdp1861.h tmc1800.c

src/mess/video/tmc1800.c
r4226r4227
77
88/* Telmac 1800 */
99
10static CDP1861_ON_INT_CHANGED( tmc1800_int_w )
10static WRITE_LINE_DEVICE_HANDLER( tmc1800_efx_w )
1111{
12   cpu_set_input_line(device->machine->cpu[0], CDP1802_INPUT_LINE_INT, level);
13}
12   tmc1800_state *driver_state = device->machine->driver_data;
1413
15static CDP1861_ON_DMAO_CHANGED( tmc1800_dmao_w )
16{
17   cpu_set_input_line(device->machine->cpu[0], CDP1802_INPUT_LINE_DMAOUT, level);
14   driver_state->cdp1861_efx = state;
1815}
1916
20static CDP1861_ON_EFX_CHANGED( tmc1800_efx_w )
21{
22   tmc1800_state *state = device->machine->driver_data;
23
24   state->cdp1861_efx = level;
25}
26
2717static CDP1861_INTERFACE( tmc1800_cdp1861_intf )
2818{
19   CDP1802_TAG,
2920   SCREEN_TAG,
30   tmc1800_int_w,
31   tmc1800_dmao_w,
32   tmc1800_efx_w
21   DEVCB_CPU_INPUT_LINE(CDP1802_TAG, CDP1802_INPUT_LINE_INT),
22   DEVCB_CPU_INPUT_LINE(CDP1802_TAG, CDP1802_INPUT_LINE_DMAOUT),
23   DEVCB_LINE(tmc1800_efx_w)
3324};
3425
3526static VIDEO_UPDATE( tmc1800 )
r4226r4227
145136   MDRV_PALETTE_INIT(black_and_white)
146137   MDRV_VIDEO_UPDATE(tmc1800)
147138
148   MDRV_CDP1861_ADD(CDP1861_TAG, XTAL_1_75MHz, tmc1800_cdp1861_intf)
139   MDRV_CDP1861_ADD(CDP1861_TAG, tmc1800_cdp1861_intf, XTAL_1_75MHz)
149140MACHINE_DRIVER_END
150141
151142MACHINE_DRIVER_START( osc1000b_video )
src/mess/video/cdp1861.c
r4226r4227
11#include "driver.h"
22#include "cdp1861.h"
33
4/***************************************************************************
5    PARAMETERS
6***************************************************************************/
7
48#define CDP1861_CYCLES_DMA_START   2*8
59#define CDP1861_CYCLES_DMA_ACTIVE   8*8
610#define CDP1861_CYCLES_DMA_WAIT      6*8
711
12/***************************************************************************
13    TYPE DEFINITIONS
14***************************************************************************/
15
816typedef struct _cdp1861_t cdp1861_t;
917struct _cdp1861_t
1018{
11   const cdp1861_interface *intf;
19   devcb_resolved_write_line   out_int_func;
20   devcb_resolved_write_line   out_dmao_func;
21   devcb_resolved_write_line   out_efx_func;
1222
1323   const device_config *screen;   /* screen */
1424   bitmap_t *bitmap;            /* bitmap */
r4226r4227
2030   emu_timer *int_timer;         /* interrupt timer */
2131   emu_timer *efx_timer;         /* EFx timer */
2232   emu_timer *dma_timer;         /* DMA timer */
33
34   const device_config *cpu;
2335};
2436
37/***************************************************************************
38    INLINE FUNCTIONS
39***************************************************************************/
40
2541INLINE cdp1861_t *get_safe_token(const device_config *device)
2642{
2743   assert(device != NULL);
r4226r4227
3046   return (cdp1861_t *)device->token;
3147}
3248
49INLINE const cdp1861_interface *get_interface(const device_config *device)
50{
51   assert(device != NULL);
52   assert((device->type == CDP1861));
53   return (const cdp1861_interface *) device->static_config;
54}
55
56/***************************************************************************
57    IMPLEMENTATION
58***************************************************************************/
59
3360/* Timer Callbacks */
3461
3562static TIMER_CALLBACK( cdp1861_int_tick )
r4226r4227
4370   {
4471      if (cdp1861->disp)
4572      {
46         cdp1861->intf->on_int_changed(device, HOLD_LINE);
73         devcb_call_write_line(&cdp1861->out_int_func, ASSERT_LINE);
4774      }
4875
4976      timer_adjust_oneshot(cdp1861->int_timer, video_screen_get_time_until_pos(cdp1861->screen, CDP1861_SCANLINE_INT_END, 0), 0);
r4226r4227
5279   {
5380      if (cdp1861->disp)
5481      {
55         cdp1861->intf->on_int_changed(device, CLEAR_LINE);
82         devcb_call_write_line(&cdp1861->out_int_func, CLEAR_LINE);
5683      }
5784
5885      timer_adjust_oneshot(cdp1861->int_timer, video_screen_get_time_until_pos(cdp1861->screen, CDP1861_SCANLINE_INT_START, 0), 0);
r4226r4227
6996   switch (scanline)
7097   {
7198   case CDP1861_SCANLINE_EFX_TOP_START:
72      cdp1861->intf->on_efx_changed(device, ASSERT_LINE);
99      devcb_call_write_line(&cdp1861->out_efx_func, ASSERT_LINE);
73100      timer_adjust_oneshot(cdp1861->efx_timer, video_screen_get_time_until_pos(cdp1861->screen, CDP1861_SCANLINE_EFX_TOP_END, 0), 0);
74101      break;
75102
76103   case CDP1861_SCANLINE_EFX_TOP_END:
77      cdp1861->intf->on_efx_changed(device, CLEAR_LINE);
104      devcb_call_write_line(&cdp1861->out_efx_func, CLEAR_LINE);
78105      timer_adjust_oneshot(cdp1861->efx_timer, video_screen_get_time_until_pos(cdp1861->screen, CDP1861_SCANLINE_EFX_BOTTOM_START, 0), 0);
79106      break;
80107
81108   case CDP1861_SCANLINE_EFX_BOTTOM_START:
82      cdp1861->intf->on_efx_changed(device, ASSERT_LINE);
109      devcb_call_write_line(&cdp1861->out_efx_func, ASSERT_LINE);
83110      timer_adjust_oneshot(cdp1861->efx_timer, video_screen_get_time_until_pos(cdp1861->screen, CDP1861_SCANLINE_EFX_BOTTOM_END, 0), 0);
84111      break;
85112
86113   case CDP1861_SCANLINE_EFX_BOTTOM_END:
87      cdp1861->intf->on_efx_changed(device, CLEAR_LINE);
114      devcb_call_write_line(&cdp1861->out_efx_func, CLEAR_LINE);
88115      timer_adjust_oneshot(cdp1861->efx_timer, video_screen_get_time_until_pos(cdp1861->screen, CDP1861_SCANLINE_EFX_TOP_START, 0), 0);
89116      break;
90117   }
r4226r4227
103130      {
104131         if (scanline >= CDP1861_SCANLINE_DISPLAY_START && scanline < CDP1861_SCANLINE_DISPLAY_END)
105132         {
106            cdp1861->intf->on_dmao_changed(device, CLEAR_LINE);
133            devcb_call_write_line(&cdp1861->out_dmao_func, CLEAR_LINE);
107134         }
108135      }
109136
110      timer_adjust_oneshot(cdp1861->dma_timer, cpu_clocks_to_attotime(machine->cpu[0], CDP1861_CYCLES_DMA_WAIT), 0);
137      timer_adjust_oneshot(cdp1861->dma_timer, cpu_clocks_to_attotime(cdp1861->cpu, CDP1861_CYCLES_DMA_WAIT), 0);
111138
112139      cdp1861->dmaout = 0;
113140   }
r4226r4227
117144      {
118145         if (scanline >= CDP1861_SCANLINE_DISPLAY_START && scanline < CDP1861_SCANLINE_DISPLAY_END)
119146         {
120            cdp1861->intf->on_dmao_changed(device, HOLD_LINE);
147            devcb_call_write_line(&cdp1861->out_dmao_func, ASSERT_LINE);
121148         }
122149      }
123150
124      timer_adjust_oneshot(cdp1861->dma_timer, cpu_clocks_to_attotime(machine->cpu[0], CDP1861_CYCLES_DMA_ACTIVE), 0);
151      timer_adjust_oneshot(cdp1861->dma_timer, cpu_clocks_to_attotime(cdp1861->cpu, CDP1861_CYCLES_DMA_ACTIVE), 0);
125152
126153      cdp1861->dmaout = 1;
127154   }
r4226r4227
144171
145172   cdp1861->disp = 0;
146173
147   cdp1861->intf->on_int_changed(device, CLEAR_LINE);
148   cdp1861->intf->on_dmao_changed(device, CLEAR_LINE);
174   devcb_call_write_line(&cdp1861->out_int_func, CLEAR_LINE);
175   devcb_call_write_line(&cdp1861->out_dmao_func, CLEAR_LINE);
149176}
150177
151178/* DMA Write */
r4226r4227
187214static DEVICE_START( cdp1861 )
188215{
189216   cdp1861_t *cdp1861 = get_safe_token(device);
217   const cdp1861_interface *intf = get_interface(device);
190218
191   /* validate arguments */
192   assert(device != NULL);
193   assert(device->tag != NULL);
194   assert(device->clock > 0);
219   /* resolve callbacks */
220   devcb_resolve_write_line(&cdp1861->out_int_func, &intf->out_int_func, device);
221   devcb_resolve_write_line(&cdp1861->out_dmao_func, &intf->out_dmao_func, device);
222   devcb_resolve_write_line(&cdp1861->out_efx_func, &intf->out_efx_func, device);
195223
196   cdp1861->intf = device->static_config;
224   /* get the cpu */
225   cdp1861->cpu = cputag_get_cpu(device->machine, intf->cpu_tag);
197226
198   assert(cdp1861->intf != NULL);
199   assert(cdp1861->intf->on_int_changed != NULL);
200   assert(cdp1861->intf->on_dmao_changed != NULL);
201   assert(cdp1861->intf->on_efx_changed != NULL);
202
203227   /* get the screen device */
204   cdp1861->screen = devtag_get_device(device->machine, VIDEO_SCREEN, cdp1861->intf->screen_tag);
228   cdp1861->screen = devtag_get_device(device->machine, VIDEO_SCREEN, intf->screen_tag);
205229   assert(cdp1861->screen != NULL);
206230
207231   /* allocate the temporary bitmap */
r4226r4227
224248
225249   timer_adjust_oneshot(cdp1861->int_timer, video_screen_get_time_until_pos(cdp1861->screen, CDP1861_SCANLINE_INT_START, 0), 0);
226250   timer_adjust_oneshot(cdp1861->efx_timer, video_screen_get_time_until_pos(cdp1861->screen, CDP1861_SCANLINE_EFX_TOP_START, 0), 0);
227   timer_adjust_oneshot(cdp1861->dma_timer, cpu_clocks_to_attotime(device->machine->cpu[0], CDP1861_CYCLES_DMA_START), 0);
251   timer_adjust_oneshot(cdp1861->dma_timer, cpu_clocks_to_attotime(cdp1861->cpu, CDP1861_CYCLES_DMA_START), 0);
228252
229253   cdp1861->disp = 0;
230254   cdp1861->dmaout = 0;
231255
232   cdp1861->intf->on_int_changed(device, CLEAR_LINE);
233   cdp1861->intf->on_dmao_changed(device, CLEAR_LINE);
234   cdp1861->intf->on_efx_changed(device, CLEAR_LINE);
256   devcb_call_write_line(&cdp1861->out_int_func, CLEAR_LINE);
257   devcb_call_write_line(&cdp1861->out_dmao_func, CLEAR_LINE);
258   devcb_call_write_line(&cdp1861->out_efx_func, CLEAR_LINE);
235259}
236260
237261static DEVICE_SET_INFO( cdp1861 )
r4226r4227
247271   switch (state)
248272   {
249273      /* --- the following bits of info are returned as 64-bit signed integers --- */
250      case DEVINFO_INT_TOKEN_BYTES:               info->i = sizeof(cdp1861_t);            break;
251      case DEVINFO_INT_INLINE_CONFIG_BYTES:         info->i = 0;                        break;
252      case DEVINFO_INT_CLASS:                     info->i = DEVICE_CLASS_PERIPHERAL;         break;
274      case DEVINFO_INT_TOKEN_BYTES:               info->i = sizeof(cdp1861_t);                  break;
275      case DEVINFO_INT_INLINE_CONFIG_BYTES:         info->i = 0;                              break;
276      case DEVINFO_INT_CLASS:                     info->i = DEVICE_CLASS_PERIPHERAL;               break;
253277
254278      /* --- the following bits of info are returned as pointers to data or functions --- */
255      case DEVINFO_FCT_SET_INFO:                  info->set_info = DEVICE_SET_INFO_NAME(cdp1861); break;
256      case DEVINFO_FCT_START:                     info->start = DEVICE_START_NAME(cdp1861);   break;
257      case DEVINFO_FCT_STOP:                     /* Nothing */                        break;
258      case DEVINFO_FCT_RESET:                     info->reset = DEVICE_RESET_NAME(cdp1861);   break;
279      case DEVINFO_FCT_SET_INFO:                  info->set_info = DEVICE_SET_INFO_NAME(cdp1861);      break;
280      case DEVINFO_FCT_START:                     info->start = DEVICE_START_NAME(cdp1861);         break;
281      case DEVINFO_FCT_STOP:                     /* Nothing */                              break;
282      case DEVINFO_FCT_RESET:                     info->reset = DEVICE_RESET_NAME(cdp1861);         break;
259283
260284      /* --- the following bits of info are returned as NULL-terminated strings --- */
261      case DEVINFO_STR_NAME:                     strcpy(info->s, "RCA CDP1861");               break;
262      case DEVINFO_STR_FAMILY:                  strcpy(info->s, "RCA CDP1800");               break;
263      case DEVINFO_STR_VERSION:                  strcpy(info->s, "1.0");                     break;
285      case DEVINFO_STR_NAME:                     strcpy(info->s, "RCA CDP1861");                  break;
286      case DEVINFO_STR_FAMILY:                  strcpy(info->s, "RCA CDP1800");                  break;
287      case DEVINFO_STR_VERSION:                  strcpy(info->s, "1.0");                        break;
264288      case DEVINFO_STR_SOURCE_FILE:               strcpy(info->s, __FILE__);                     break;
265      case DEVINFO_STR_CREDITS:                  strcpy(info->s, "Copyright MESS Team");         break;
289      case DEVINFO_STR_CREDITS:                  strcpy(info->s, "Copyright MESS Team");            break;
266290   }
267291}
src/mess/video/cdp1861.h
r4226r4227
2424#ifndef __CDP1861__
2525#define __CDP1861__
2626
27#include "devcb.h"
28
29/***************************************************************************
30    PARAMETERS
31***************************************************************************/
32
2733#define CDP1861_VISIBLE_COLUMNS   64
2834#define CDP1861_VISIBLE_LINES   128
2935
r4226r4227
4854#define CDP1861_SCANLINE_EFX_BOTTOM_START   CDP1861_SCANLINE_DISPLAY_END - 4
4955#define CDP1861_SCANLINE_EFX_BOTTOM_END      CDP1861_SCANLINE_DISPLAY_END
5056
51typedef void (*cdp1861_on_int_changed_func) (const device_config *device, int level);
52#define CDP1861_ON_INT_CHANGED(name) void name(const device_config *device, int level)
57/***************************************************************************
58    MACROS / CONSTANTS
59***************************************************************************/
5360
54typedef void (*cdp1861_on_dmao_changed_func) (const device_config *device, int level);
55#define CDP1861_ON_DMAO_CHANGED(name) void name(const device_config *device, int level)
56
57typedef void (*cdp1861_on_efx_changed_func) (const device_config *device, int level);
58#define CDP1861_ON_EFX_CHANGED(name) void name(const device_config *device, int level)
59
6061#define CDP1861      DEVICE_GET_INFO_NAME(cdp1861)
6162
62#define MDRV_CDP1861_ADD(_tag, _clock, _config) \
63#define MDRV_CDP1861_ADD(_tag, _config, _clock) \
6364   MDRV_DEVICE_ADD(_tag, CDP1861, _clock) \
6465   MDRV_DEVICE_CONFIG(_config)
6566
66/* interface */
67#define CDP1861_INTERFACE(name) const cdp1861_interface (name)=
68
69/***************************************************************************
70    TYPE DEFINITIONS
71***************************************************************************/
72
6773typedef struct _cdp1861_interface cdp1861_interface;
6874struct _cdp1861_interface
6975{
76   const char *cpu_tag;      /* cpu we are working with */
7077   const char *screen_tag;      /* screen we are acting on */
7178
7279   /* this gets called for every change of the INT pin (pin 3) */
73   cdp1861_on_int_changed_func      on_int_changed;
80   devcb_write_line      out_int_func;
7481
7582   /* this gets called for every change of the DMAO pin (pin 2) */
76   cdp1861_on_dmao_changed_func   on_dmao_changed;
83   devcb_write_line      out_dmao_func;
7784
7885   /* this gets called for every change of the EFX pin (pin 9) */
79   cdp1861_on_efx_changed_func      on_efx_changed;
86   devcb_write_line      out_efx_func;
8087};
81#define CDP1861_INTERFACE(name) const cdp1861_interface (name)=
8288
89/***************************************************************************
90    PROTOTYPES
91***************************************************************************/
92
8393/* device interface */
8494DEVICE_GET_INFO( cdp1861 );
8595
src/mess/includes/tmc1800.h
r4226r4227
33
44#define SCREEN_TAG "main"
55
6#define CDP1802_TAG "cdp1802"
67#define CDP1861_TAG "cdp1861"
78#define CDP1864_TAG "m3"
89
src/mess/drivers/vip.c
r4226r4227
379379
380380/* Video */
381381
382static CDP1861_ON_INT_CHANGED( vip_int_w )
382static WRITE_LINE_DEVICE_HANDLER( vip_efx_w )
383383{
384   cpu_set_input_line(device->machine->cpu[0], CDP1802_INPUT_LINE_INT, level);
385}
384   vip_state *driver_state = device->machine->driver_data;
386385
387static CDP1861_ON_DMAO_CHANGED( vip_dmao_w )
388{
389   cpu_set_input_line(device->machine->cpu[0], CDP1802_INPUT_LINE_DMAOUT, level);
386   driver_state->cdp1861_efx = state;
390387}
391388
392static CDP1861_ON_EFX_CHANGED( vip_efx_w )
393{
394   vip_state *state = device->machine->driver_data;
395
396   state->cdp1861_efx = level;
397}
398
399389static CDP1861_INTERFACE( vip_cdp1861_intf )
400390{
391   CDP1802_TAG,
401392   SCREEN_TAG,
402   vip_int_w,
403   vip_dmao_w,
404   vip_efx_w
393   DEVCB_CPU_INPUT_LINE(CDP1802_TAG, CDP1802_INPUT_LINE_INT),
394   DEVCB_CPU_INPUT_LINE(CDP1802_TAG, CDP1802_INPUT_LINE_DMAOUT),
395   DEVCB_LINE(vip_efx_w)
405396};
406397
407398static CDP1862_INTERFACE( vip_cdp1862_intf )
r4226r4227
690681   MDRV_PALETTE_INIT(black_and_white)
691682   MDRV_VIDEO_UPDATE(vip)
692683
693   MDRV_CDP1861_ADD(CDP1861_TAG, XTAL_3_52128MHz, vip_cdp1861_intf)
684   MDRV_CDP1861_ADD(CDP1861_TAG, vip_cdp1861_intf, XTAL_3_52128MHz)
694685   MDRV_CDP1862_ADD(CDP1862_TAG, CPD1862_CLOCK, vip_cdp1862_intf)
695686
696687   /* sound hardware */
src/mess/drivers/studio2.c
r4226r4227
277277
278278/* Video */
279279
280static CDP1861_ON_INT_CHANGED( studio2_int_w )
280static WRITE_LINE_DEVICE_HANDLER( studio2_efx_w )
281281{
282   cputag_set_input_line(device->machine, CDP1802_TAG, CDP1802_INPUT_LINE_INT, level);
283}
282   studio2_state *driver_state = device->machine->driver_data;
284283
285static CDP1861_ON_DMAO_CHANGED( studio2_dmao_w )
286{
287   cputag_set_input_line(device->machine, CDP1802_TAG, CDP1802_INPUT_LINE_DMAOUT, level);
284   driver_state->cdp1861_efx = state;
288285}
289286
290static CDP1861_ON_EFX_CHANGED( studio2_efx_w )
291{
292   studio2_state *state = device->machine->driver_data;
293
294   state->cdp1861_efx = level;
295}
296
297287static CDP1861_INTERFACE( studio2_cdp1861_intf )
298288{
289   CDP1802_TAG,
299290   SCREEN_TAG,
300   studio2_int_w,
301   studio2_dmao_w,
302   studio2_efx_w
291   DEVCB_CPU_INPUT_LINE(CDP1802_TAG, CDP1802_INPUT_LINE_INT),
292   DEVCB_CPU_INPUT_LINE(CDP1802_TAG, CDP1802_INPUT_LINE_DMAOUT),
293   DEVCB_LINE(studio2_efx_w)
303294};
304295
305296static VIDEO_UPDATE( studio2 )
r4226r4227
551542   MDRV_PALETTE_INIT(black_and_white)
552543   MDRV_VIDEO_UPDATE(studio2)
553544
554   MDRV_CDP1861_ADD(CDP1861_TAG, XTAL_3_52128MHz, studio2_cdp1861_intf)
545   MDRV_CDP1861_ADD(CDP1861_TAG, studio2_cdp1861_intf, XTAL_3_52128MHz)
555546
556547   // sound hardware
557548
r4226r4227
585576   MDRV_PALETTE_INIT(black_and_white)
586577   MDRV_VIDEO_UPDATE(studio2)
587578
588   MDRV_CDP1861_ADD(CDP1861_TAG, XTAL_3_579545MHz/2/8, studio2_cdp1861_intf)
579   MDRV_CDP1861_ADD(CDP1861_TAG, studio2_cdp1861_intf, XTAL_3_579545MHz/2/8)
589580
590581   // sound hardware
591582
src/mess/drivers/tmc1800.c
r4226r4227
762762
763763   /* RAM banking */
764764
765   memory_configure_bank(machine, 1, 0, 2, memory_region(machine, "main"), 0x8000);
765   memory_configure_bank(machine, 1, 0, 2, memory_region(machine, CDP1802_TAG), 0x8000);
766766
767767   /* ROM/colorram banking */
768768
769769   state->colorram = auto_malloc(TMC2000_COLORRAM_SIZE);
770770
771   memory_configure_bank(machine, 2, TMC2000_BANK_MONITOR, 1, memory_region(machine, "main") + 0x8000, 0);
771   memory_configure_bank(machine, 2, TMC2000_BANK_MONITOR, 1, memory_region(machine, CDP1802_TAG) + 0x8000, 0);
772772   memory_configure_bank(machine, 2, TMC2000_BANK_COLORRAM, 1, state->colorram, 0);
773773
774774   /* randomize color RAM contents */
r4226r4227
819819
820820   /* RAM/ROM banking */
821821
822   memory_configure_bank(machine, 1, 0, 2, memory_region(machine, "main"), 0x8000);
822   memory_configure_bank(machine, 1, 0, 2, memory_region(machine, CDP1802_TAG), 0x8000);
823823
824824   /* allocate monitor timer */
825825   
r4226r4227
870870
871871   // basic system hardware
872872
873   MDRV_CPU_ADD("main", CDP1802, XTAL_1_75MHz)
873   MDRV_CPU_ADD(CDP1802_TAG, CDP1802, XTAL_1_75MHz)
874874   MDRV_CPU_PROGRAM_MAP(tmc1800_map, 0)
875875   MDRV_CPU_IO_MAP(tmc1800_io_map, 0)
876876   MDRV_CPU_CONFIG(tmc1800_config)
r4226r4227
901901
902902   // basic system hardware
903903
904   MDRV_CPU_ADD("main", CDP1802, XTAL_1_75MHz)
904   MDRV_CPU_ADD(CDP1802_TAG, CDP1802, XTAL_1_75MHz)
905905   MDRV_CPU_PROGRAM_MAP(osc1000b_map, 0)
906906   MDRV_CPU_IO_MAP(osc1000b_io_map, 0)
907907   MDRV_CPU_CONFIG(osc1000b_config)
r4226r4227
932932
933933   // basic system hardware
934934
935   MDRV_CPU_ADD("main", CDP1802, XTAL_1_75MHz)
935   MDRV_CPU_ADD(CDP1802_TAG, CDP1802, XTAL_1_75MHz)
936936   MDRV_CPU_PROGRAM_MAP(tmc2000_map, 0)
937937   MDRV_CPU_IO_MAP(tmc2000_io_map, 0)
938938   MDRV_CPU_CONFIG(tmc2000_config)
r4226r4227
963963
964964   // basic system hardware
965965
966   MDRV_CPU_ADD("main", CDP1802, XTAL_1_75MHz)
966   MDRV_CPU_ADD(CDP1802_TAG, CDP1802, XTAL_1_75MHz)
967967   MDRV_CPU_PROGRAM_MAP(oscnano_map, 0)
968968   MDRV_CPU_IO_MAP(oscnano_io_map, 0)
969969   MDRV_CPU_CONFIG(oscnano_config)
r4226r4227
992992/* ROMs */
993993
994994ROM_START( tmc1800 )
995   ROM_REGION( 0x10000, "main", 0 )
995   ROM_REGION( 0x10000, CDP1802_TAG, 0 )
996996   ROM_LOAD( "mmi6341-1.ic2", 0x8000, 0x0200, NO_DUMP ) // equivalent to 82S141
997997ROM_END
998998
999999ROM_START( osc1000b )
1000   ROM_REGION( 0x10000, "main", 0 )
1000   ROM_REGION( 0x10000, CDP1802_TAG, 0 )
10011001   ROM_LOAD( "mmi6341-1.ic2", 0x8000, 0x0200, NO_DUMP ) // equivalent to 82S141
10021002
10031003   ROM_REGION( 0x400, "gfx1", ROMREGION_DISPOSE )
r4226r4227
10061006ROM_END
10071007
10081008ROM_START( tmc2000 )
1009   ROM_REGION( 0x10000, "main", 0 )
1009   ROM_REGION( 0x10000, CDP1802_TAG, 0 )
10101010   ROM_SYSTEM_BIOS( 0, "prom200", "PROM N:o 200" )
10111011   ROMX_LOAD( "200.m5",    0x8000, 0x0200, BAD_DUMP CRC(79da3221) SHA1(008da3ef4f69ab1a493362dfca856375b19c94bd), ROM_BIOS(1) ) // typed in from the manual
10121012   ROM_SYSTEM_BIOS( 1, "prom202", "PROM N:o 202" )
r4226r4227
10161016ROM_END
10171017
10181018ROM_START( oscnano )
1019   ROM_REGION( 0x10000, "main", 0 )
1019   ROM_REGION( 0x10000, CDP1802_TAG, 0 )
10201020   ROM_LOAD( "mmi6349.ic", 0x8000, 0x0200, BAD_DUMP CRC(1ec1b432) SHA1(ac41f5e38bcd4b80bd7a5b277a2c600899fd5fb8) ) // equivalent to 82S141
10211021ROM_END
10221022
r4226r4227
10241024
10251025static QUICKLOAD_LOAD( tmc1800 )
10261026{
1027   UINT8 *ptr = memory_region(image->machine, "main");
1027   UINT8 *ptr = memory_region(image->machine, CDP1802_TAG);
10281028   int size = image_length(image);
10291029
10301030   if (size > mess_ram_size)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team