Previous 15994 Revisions Next

r4714 Friday 15th May, 2009 at 19:31:56 UTC by Wilbert Pol
Moved the configuration of m6502-family callbacks to the cpu configuration.
[src/emu/cpu/m6502]m4510.c m6502.c m6502.h m6509.c m65ce02.c
[src/mess/drivers]apple3.c c128.c c16.c c64.c
[src/mess/includes]apple3.h c128.h
[src/mess/machine]apple3.c c128.c c16.c c64.c

src/emu/cpu/m6502/m4510.c
r4713r4714
146146   const address_space *space;
147147   int    icount;
148148
149   m6502_read_indexed_func rdmem_id;               /* readmem callback for indexed instructions */
150   m6502_write_indexed_func wrmem_id;               /* writemem callback for indexed instructions */
149   read8_space_func rdmem_id;               /* readmem callback for indexed instructions */
150   write8_space_func wrmem_id;               /* writemem callback for indexed instructions */
151151
152152   UINT8    ddr;
153153   UINT8    port;
r4713r4714
197197static CPU_INIT( m4510 )
198198{
199199   m4510_Regs *cpustate = get_safe_token(device);
200   const m6502_interface *intf = (const m6502_interface *)device->static_config;
200201
201202   cpustate->interrupt_inhibit = 0;
202203   cpustate->rdmem_id = default_rdmem_id;
203204   cpustate->wrmem_id = default_wrmem_id;
205   cpustate->port_read = NULL;
206   cpustate->port_write = NULL;
204207   cpustate->irq_callback = irqcallback;
205208   cpustate->device = device;
206209   cpustate->space = memory_find_address_space(device, ADDRESS_SPACE_PROGRAM);
210
211   if ( intf )
212   {
213      if ( intf->read_indexed_func )
214         cpustate->rdmem_id = intf->read_indexed_func;
215
216      if ( intf->write_indexed_func )
217         cpustate->wrmem_id = intf->write_indexed_func;
218
219      if ( intf->port_read_func )
220         cpustate->port_read = intf->port_read_func;
221
222      if ( intf->port_write_func )
223         cpustate->port_write = intf->port_write_func;
224   }
207225}
208226
209227static CPU_RESET( m4510 )
r4713r4714
426444      case CPUINFO_INT_REGISTER + M4510_MEM5:         cpustate->mem[5] = info->i;               break;
427445      case CPUINFO_INT_REGISTER + M4510_MEM6:         cpustate->mem[6] = info->i;               break;
428446      case CPUINFO_INT_REGISTER + M4510_MEM7:         cpustate->mem[7] = info->i;               break;
429
430      /* --- the following bits of info are set as pointers to data or functions --- */
431      case CPUINFO_FCT_M6502_READINDEXED_CALLBACK:   cpustate->rdmem_id = (m6502_read_indexed_func) info->f; break;
432      case CPUINFO_FCT_M6502_WRITEINDEXED_CALLBACK:   cpustate->wrmem_id = (m6502_write_indexed_func) info->f; break;
433      case CPUINFO_FCT_M6510_PORTREAD:            cpustate->port_read = (m6510_port_read_func) info->f; break;
434      case CPUINFO_FCT_M6510_PORTWRITE:            cpustate->port_write = (m6510_port_write_func) info->f; break;
435447   }
436448}
437449
r4713r4714
511523      case CPUINFO_PTR_INSTRUCTION_COUNTER:         info->icount = &cpustate->icount;         break;
512524      case CPUINFO_PTR_INTERNAL_MEMORY_MAP:         info->internal_map8 = ADDRESS_MAP_NAME(m4510_mem); break;
513525      case CPUINFO_FCT_TRANSLATE:                  info->translate = CPU_TRANSLATE_NAME(m4510);      break;
514      case CPUINFO_FCT_M6502_READINDEXED_CALLBACK:   info->f = (genf *) cpustate->rdmem_id;      break;
515      case CPUINFO_FCT_M6502_WRITEINDEXED_CALLBACK:   info->f = (genf *) cpustate->wrmem_id;      break;
516      case CPUINFO_FCT_M6510_PORTREAD:            info->f = (genf *) cpustate->port_read;      break;
517      case CPUINFO_FCT_M6510_PORTWRITE:            info->f = (genf *) cpustate->port_write;   break;
518526
519527      /* --- the following bits of info are returned as NULL-terminated strings --- */
520528      case CPUINFO_STR_NAME:                     strcpy(info->s, "M4510");            break;
src/emu/cpu/m6502/m6502.c
r4713r4714
7474   int      int_occured;
7575   int      icount;
7676
77   m6502_read_indexed_func rdmem_id;               /* readmem callback for indexed instructions */
78   m6502_write_indexed_func wrmem_id;               /* writemem callback for indexed instructions */
77   read8_space_func rdmem_id;               /* readmem callback for indexed instructions */
78   write8_space_func wrmem_id;               /* writemem callback for indexed instructions */
7979
8080   UINT8    ddr;
8181   UINT8    port;
r4713r4714
131131static void m6502_common_init(const device_config *device, cpu_irq_callback irqcallback, UINT8 subtype, void (*const *insn)(m6502_Regs *cpustate), const char *type)
132132{
133133   m6502_Regs *cpustate = get_safe_token(device);
134   const m6502_interface *intf = (const m6502_interface *)device->static_config;
134135
135136   cpustate->irq_callback = irqcallback;
136137   cpustate->device = device;
r4713r4714
139140   cpustate->insn = insn;
140141   cpustate->rdmem_id = default_rdmem_id;
141142   cpustate->wrmem_id = default_wdmem_id;
143   cpustate->port_read = NULL;
144   cpustate->port_write = NULL;
142145
146   if ( intf )
147   {
148      if ( intf->read_indexed_func )
149         cpustate->rdmem_id = intf->read_indexed_func;
150
151      if ( intf->write_indexed_func )
152         cpustate->wrmem_id = intf->write_indexed_func;
153
154      if ( intf->port_read_func )
155         cpustate->port_read = intf->port_read_func;
156
157      if ( intf->port_write_func )
158         cpustate->port_write = intf->port_write_func;
159   }
160
143161   state_save_register_device_item(device, 0, cpustate->pc.w.l);
144162   state_save_register_device_item(device, 0, cpustate->sp.w.l);
145163   state_save_register_device_item(device, 0, cpustate->p);
r4713r4714
636654   return cycles - cpustate->icount;
637655}
638656
639void m6502_set_read_indexed_callback(const device_config *device, m6502_read_indexed_func callback)
640{
641   m6502_Regs *cpustate = get_safe_token(device);
642   cpustate->rdmem_id = callback;
643}
644657
645void m6502_set_write_indexed_callback(const device_config *device, m6502_write_indexed_func callback)
646{
647   m6502_Regs *cpustate = get_safe_token(device);
648   cpustate->wrmem_id = callback;
649}
650
651void m6510_set_port_read_callback(const device_config *device, m6510_port_read_func callback)
652{
653   m6502_Regs *cpustate = get_safe_token(device);
654   cpustate->port_read = callback;
655}
656
657void m6510_set_port_write_callback(const device_config *device, m6510_port_write_func callback)
658{
659   m6502_Regs *cpustate = get_safe_token(device);
660   cpustate->port_write = callback;
661}
662
663658/**************************************************************************
664659 * Generic set_info
665660 **************************************************************************/
r4713r4714
685680      case CPUINFO_INT_REGISTER + M6502_Y:         cpustate->y = info->i;                  break;
686681      case CPUINFO_INT_REGISTER + M6502_EA:         cpustate->ea.w.l = info->i;               break;
687682      case CPUINFO_INT_REGISTER + M6502_ZP:         cpustate->zp.w.l = info->i;               break;
688
689      /* --- the following bits of info are set as pointers to data or functions --- */
690      case CPUINFO_FCT_M6502_READINDEXED_CALLBACK:   cpustate->rdmem_id = (m6502_read_indexed_func) info->f; break;
691      case CPUINFO_FCT_M6502_WRITEINDEXED_CALLBACK:   cpustate->wrmem_id = (m6502_write_indexed_func) info->f; break;
692683   }
693684}
694685
r4713r4714
753744      case CPUINFO_FCT_BURN:                     info->burn = NULL;                  break;
754745      case CPUINFO_FCT_DISASSEMBLE:               info->disassemble = CPU_DISASSEMBLE_NAME(m6502);         break;
755746      case CPUINFO_PTR_INSTRUCTION_COUNTER:         info->icount = &cpustate->icount;         break;
756      case CPUINFO_FCT_M6502_READINDEXED_CALLBACK:   info->f = (genf *) cpustate->rdmem_id;      break;
757      case CPUINFO_FCT_M6502_WRITEINDEXED_CALLBACK:   info->f = (genf *) cpustate->wrmem_id;      break;
758747
759748      /* --- the following bits of info are returned as NULL-terminated strings --- */
760749      case CPUINFO_STR_NAME:                     strcpy(info->s, "M6502");            break;
r4713r4714
812801
813802static CPU_SET_INFO( m6510 )
814803{
815   m6502_Regs *cpustate = get_safe_token(device);
816
817804   switch (state)
818805   {
819      /* --- the following bits of info are set as pointers to data or functions --- */
820      case CPUINFO_FCT_M6510_PORTREAD:   cpustate->port_read = (m6510_port_read_func) info->f;   break;
821      case CPUINFO_FCT_M6510_PORTWRITE:   cpustate->port_write = (m6510_port_write_func) info->f;   break;
822
823806      default:                     CPU_SET_INFO_CALL(m6502);         break;
824807   }
825808}
r4713r4714
836819      case CPUINFO_FCT_RESET:                     info->reset = CPU_RESET_NAME(m6510);            break;
837820      case CPUINFO_FCT_DISASSEMBLE:               info->disassemble = CPU_DISASSEMBLE_NAME(m6510);         break;
838821      case CPUINFO_PTR_INTERNAL_MEMORY_MAP:         info->internal_map8 = ADDRESS_MAP_NAME(m6510_mem); break;
839      case CPUINFO_FCT_M6510_PORTREAD:            info->f = (genf *) cpustate->port_read;      break;
840      case CPUINFO_FCT_M6510_PORTWRITE:            info->f = (genf *) cpustate->port_write;   break;
841822
842823      /* --- the following bits of info are returned as NULL-terminated strings --- */
843824      case CPUINFO_STR_NAME:                     strcpy(info->s, "M6510");            break;
src/emu/cpu/m6502/m6502.h
r4713r4714
5252   positiv edge sets overflow flag */
5353#define M6502_SET_OVERFLOW   1
5454
55typedef UINT8 (*m6502_read_indexed_func)(const address_space *space, offs_t address);
56typedef void (*m6502_write_indexed_func)(const address_space *space, offs_t address, UINT8 data);
5755typedef UINT8 (*m6510_port_read_func)(const device_config *device, UINT8 direction);
5856typedef void (*m6510_port_write_func)(const device_config *device, UINT8 direction, UINT8 data);
5957
6058
61void m6502_set_read_indexed_callback(const device_config *device, m6502_read_indexed_func callback);
62void m6502_set_write_indexed_callback(const device_config *device, m6502_write_indexed_func callback);
63void m6510_set_port_read_callback(const device_config *device, m6510_port_read_func callback);
64void m6510_set_port_write_callback(const device_config *device, m6510_port_write_func callback);
59/* Optional interface to set callbacks */
60typedef struct _m6502_interface m6502_interface;
61struct _m6502_interface
62{
63   read8_space_func      read_indexed_func;
64   write8_space_func      write_indexed_func;
65   m6510_port_read_func   port_read_func;
66   m6510_port_write_func   port_write_func;
67};
68
69
6570enum
6671{
67   CPUINFO_FCT_M6502_READINDEXED_CALLBACK = CPUINFO_FCT_CPU_SPECIFIC,
68   CPUINFO_FCT_M6502_WRITEINDEXED_CALLBACK,
69   CPUINFO_FCT_M6510_PORTREAD,
70   CPUINFO_FCT_M6510_PORTWRITE,
71
7272   CPUINFO_INT_M6510_PORT = CPUINFO_INT_CPU_SPECIFIC
7373};
7474
src/emu/cpu/m6502/m6509.c
r4713r4714
8282
8383   int    icount;
8484
85   m6502_read_indexed_func rdmem_id;               /* readmem callback for indexed instructions */
86   m6502_write_indexed_func wrmem_id;               /* writemem callback for indexed instructions */
85   read8_space_func rdmem_id;               /* readmem callback for indexed instructions */
86   write8_space_func wrmem_id;               /* writemem callback for indexed instructions */
8787};
8888
8989INLINE m6509_Regs *get_safe_token(const device_config *device)
r4713r4714
141141static CPU_INIT( m6509 )
142142{
143143   m6509_Regs *cpustate = get_safe_token(device);
144   const m6502_interface *intf = (const m6502_interface *)device->static_config;
144145
145146   cpustate->rdmem_id = default_rdmem_id;
146147   cpustate->wrmem_id = default_wdmem_id;
147148   cpustate->irq_callback = irqcallback;
148149   cpustate->device = device;
149150   cpustate->space = memory_find_address_space(device, ADDRESS_SPACE_PROGRAM);
151
152   if ( intf )
153   {
154      if ( intf->read_indexed_func )
155         cpustate->rdmem_id = intf->read_indexed_func;
156
157      if ( intf->write_indexed_func )
158         cpustate->wrmem_id = intf->write_indexed_func;
159   }
150160}
151161
152162static CPU_RESET( m6509 )
r4713r4714
309319      case CPUINFO_INT_REGISTER + M6509_IND_BANK:      cpustate->ind_bank.b.h2 = info->i;         break;
310320      case CPUINFO_INT_REGISTER + M6509_EA:         cpustate->ea.w.l = info->i;               break;
311321      case CPUINFO_INT_REGISTER + M6509_ZP:         cpustate->zp.w.l = info->i;               break;
312
313      /* --- the following bits of info are set as pointers to data or functions --- */
314      case CPUINFO_FCT_M6502_READINDEXED_CALLBACK:   cpustate->rdmem_id = (m6502_read_indexed_func) info->f; break;
315      case CPUINFO_FCT_M6502_WRITEINDEXED_CALLBACK:   cpustate->wrmem_id = (m6502_write_indexed_func) info->f; break;
316322   }
317323}
318324
r4713r4714
379385      case CPUINFO_FCT_DISASSEMBLE:               info->disassemble = CPU_DISASSEMBLE_NAME(m6502);         break;
380386      case CPUINFO_PTR_INSTRUCTION_COUNTER:         info->icount = &cpustate->icount;         break;
381387      case CPUINFO_PTR_INTERNAL_MEMORY_MAP:         info->internal_map8 = ADDRESS_MAP_NAME(m6509_mem); break;
382      case CPUINFO_FCT_M6502_READINDEXED_CALLBACK:   info->f = (genf *) cpustate->rdmem_id;      break;
383      case CPUINFO_FCT_M6502_WRITEINDEXED_CALLBACK:   info->f = (genf *) cpustate->wrmem_id;      break;
384388
385389      /* --- the following bits of info are returned as NULL-terminated strings --- */
386390      case CPUINFO_STR_NAME:                     strcpy(info->s, "M6509");            break;
src/emu/cpu/m6502/m65ce02.c
r4713r4714
7676   cpu_irq_callback irq_callback;
7777   const device_config *device;
7878   const address_space *space;
79   m6502_read_indexed_func rdmem_id;               /* readmem callback for indexed instructions */
80   m6502_write_indexed_func wrmem_id;               /* writemem callback for indexed instructions */
79   read8_space_func rdmem_id;               /* readmem callback for indexed instructions */
80   write8_space_func wrmem_id;               /* writemem callback for indexed instructions */
8181};
8282
8383INLINE m65ce02_Regs *get_safe_token(const device_config *device)
r4713r4714
101101static CPU_INIT( m65ce02 )
102102{
103103   m65ce02_Regs *cpustate = get_safe_token(device);
104   const m6502_interface *intf = (const m6502_interface *)device->static_config;
104105
105106   cpustate->rdmem_id = default_rdmem_id;
106107   cpustate->wrmem_id = default_wdmem_id;
107108   cpustate->irq_callback = irqcallback;
108109   cpustate->device = device;
109110   cpustate->space = memory_find_address_space(device, ADDRESS_SPACE_PROGRAM);
111
112   if ( intf )
113   {
114      if ( intf->read_indexed_func )
115         cpustate->rdmem_id = intf->read_indexed_func;
116
117      if ( intf->write_indexed_func )
118         cpustate->wrmem_id = intf->write_indexed_func;
119   }
110120}
111121
112122static CPU_RESET( m65ce02 )
r4713r4714
256266      case CPUINFO_INT_REGISTER + M65CE02_B: cpustate->zp.b.h = info->i; break;
257267      case CPUINFO_INT_REGISTER + M65CE02_EA: cpustate->ea.w.l = info->i; break;
258268      case CPUINFO_INT_REGISTER + M65CE02_ZP: cpustate->zp.b.l = info->i; break;
259
260      /* --- the following bits of info are set as pointers to data or functions --- */
261      case CPUINFO_FCT_M6502_READINDEXED_CALLBACK:   cpustate->rdmem_id = (m6502_read_indexed_func) info->f; break;
262      case CPUINFO_FCT_M6502_WRITEINDEXED_CALLBACK:   cpustate->wrmem_id = (m6502_write_indexed_func) info->f; break;
263269   }
264270}
265271
r4713r4714
324330      case CPUINFO_FCT_BURN:                     info->burn = NULL;                  break;
325331      case CPUINFO_FCT_DISASSEMBLE:               info->disassemble = CPU_DISASSEMBLE_NAME(m65ce02);         break;
326332      case CPUINFO_PTR_INSTRUCTION_COUNTER:         info->icount = &cpustate->icount;         break;
327      case CPUINFO_FCT_M6502_READINDEXED_CALLBACK:   info->f = (genf *) cpustate->rdmem_id;      break;
328      case CPUINFO_FCT_M6502_WRITEINDEXED_CALLBACK:   info->f = (genf *) cpustate->wrmem_id;      break;
329333
330334      /* --- the following bits of info are returned as NULL-terminated strings --- */
331335      case CPUINFO_STR_NAME: strcpy(info->s, "M65CE02");  break;
src/mess/includes/apple3.h
r4713r4714
3636READ8_HANDLER( apple3_00xx_r );
3737WRITE8_HANDLER( apple3_00xx_w );
3838
39READ8_HANDLER( apple3_indexed_read );
40WRITE8_HANDLER( apple3_indexed_write );
3941
4042/*----------- defined in video/apple3.c -----------*/
4143
src/mess/includes/c128.h
r4713r4714
4141WRITE8_HANDLER(c128_write_ff00);
4242WRITE8_HANDLER(c128_write_ff05);
4343
44
45void c128_m6510_port_write(const device_config *device, UINT8 direction, UINT8 data);
46UINT8 c128_m6510_port_read(const device_config *device, UINT8 direction);
47
48
4449extern DRIVER_INIT( c128 );
4550extern DRIVER_INIT( c128pal );
4651extern DRIVER_INIT( c128d );
src/mess/machine/apple3.c
r4713r4714
617617
618618
619619
620static READ8_HANDLER( apple3_indexed_read )
620READ8_HANDLER( apple3_indexed_read )
621621{
622622   UINT8 result;
623623   UINT8 *addr;
r4713r4714
634634
635635
636636
637static WRITE8_HANDLER( apple3_indexed_write )
637WRITE8_HANDLER( apple3_indexed_write )
638638{
639639   UINT8 *addr;
640640
r4713r4714
730730   apple3_update_memory(machine);
731731
732732   memory_set_direct_update_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), apple3_opbase);
733
734   /* the Apple /// does some weird tricks whereby it monitors the SYNC pin
735    * on the CPU to check for indexed instructions and directs them to
736    * different memory locations */
737   m6502_set_read_indexed_callback (cputag_get_cpu(machine, "maincpu"), apple3_indexed_read);
738   m6502_set_write_indexed_callback(cputag_get_cpu(machine, "maincpu"), apple3_indexed_write);
739733}
src/mess/machine/c128.c
r4713r4714
821821
822822static emu_timer *datasette_timer;
823823
824static void c128_m6510_port_write(const device_config *device, UINT8 direction, UINT8 data)
824void c128_m6510_port_write(const device_config *device, UINT8 direction, UINT8 data)
825825{
826826   /* if line is marked as input then keep current value */
827827   data = (c64_port_data & ~direction) | (data & direction);
r4713r4714
866866   c64_memory[0x001] = memory_read_byte( cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM), 1 );
867867}
868868
869static UINT8 c128_m6510_port_read(const device_config *device, UINT8 direction)
869UINT8 c128_m6510_port_read(const device_config *device, UINT8 direction)
870870{
871871   UINT8 data = c64_port_data;
872872
r4713r4714
891891   UINT8 *ram = memory_region(machine, "maincpu");
892892   int i;
893893
894   /* configure the M6510 port */
895   m6510_set_port_read_callback(cputag_get_cpu(machine, "m8502"), c128_m6510_port_read);
896   m6510_set_port_write_callback(cputag_get_cpu(machine, "m8502"),c128_m6510_port_write);
897
898894   c64_memory = ram;
899895
900896   c128_basic = ram+0x100000;
src/mess/machine/c16.c
r4713r4714
431431{
432432   UINT8 *rom;
433433
434   /* configure the M7501 port */
435   m6510_set_port_read_callback(cputag_get_cpu(machine, "maincpu"), c16_m7501_port_read);
436   m6510_set_port_write_callback(cputag_get_cpu(machine, "maincpu"),c16_m7501_port_write);
437
438434   c16_select_roms (cputag_get_address_space(machine,"maincpu",ADDRESS_SPACE_PROGRAM), 0, 0);
439435   c16_switch_to_rom (cputag_get_address_space(machine,"maincpu",ADDRESS_SPACE_PROGRAM), 0, 0);
440436
src/mess/machine/c64.c
r4713r4714
10181018
10191019static void c64_common_driver_init (running_machine *machine)
10201020{
1021   /* configure the M6510 port */
1022   m6510_set_port_read_callback(cputag_get_cpu(machine, "maincpu"), c64_m6510_port_read);
1023   m6510_set_port_write_callback(cputag_get_cpu(machine, "maincpu"),c64_m6510_port_write);
1024   
10251021   if (!ultimax)
10261022   {
10271023      UINT8 *mem = memory_region(machine, "maincpu");
src/mess/drivers/apple3.c
r4713r4714
2929ADDRESS_MAP_END
3030
3131
32/* the Apple /// does some weird tricks whereby it monitors the SYNC pin
33 * on the CPU to check for indexed instructions and directs them to
34 * different memory locations */
35static const m6502_interface apple3_m6502_intf =
36{
37   apple3_indexed_read,
38   apple3_indexed_write,
39   NULL,
40   NULL
41};
3242
43
3344static MACHINE_DRIVER_START( apple3 )
3445   /* basic machine hardware */
3546   MDRV_CPU_ADD("maincpu", M6502, 2000000)        /* 2 MHz */
3647   MDRV_CPU_PROGRAM_MAP(apple3_map)
48   MDRV_CPU_CONFIG( apple3_m6502_intf )
3749   MDRV_CPU_PERIODIC_INT(apple3_interrupt, 192)
3850   MDRV_QUANTUM_TIME(HZ(60))
3951
src/mess/drivers/c128.c
r4713r4714
569569};
570570
571571
572static const m6502_interface c128_m8502_interface =
573{
574   NULL,
575   NULL,
576   c128_m6510_port_read,
577   c128_m6510_port_write
578};
572579
580
573581/*************************************
574582 *
575583 *  Machine driver
r4713r4714
587595
588596   MDRV_CPU_ADD("m8502", M8502, VIC6567_CLOCK)
589597   MDRV_CPU_PROGRAM_MAP( c128_mem)
598   MDRV_CPU_CONFIG( c128_m8502_interface )
590599   MDRV_CPU_VBLANK_INT("screen", c64_frame_interrupt)
591600   MDRV_CPU_PERIODIC_INT(vic2_raster_irq, VIC6567_HRETRACERATE)
592601
r4713r4714
639648   MDRV_IMPORT_FROM( c128 )
640649   MDRV_CPU_REPLACE( "maincpu", Z80, VIC6569_CLOCK )
641650   MDRV_CPU_REPLACE( "m8502", M8502, VIC6569_CLOCK )
651   MDRV_CPU_CONFIG( c128_m8502_interface )
642652   MDRV_SCREEN_MODIFY("screen")
643653   MDRV_SCREEN_REFRESH_RATE(VIC6569_VRETRACERATE)
644654   MDRV_SCREEN_SIZE(VIC6569_COLUMNS * 2, VIC6569_LINES)
src/mess/drivers/c16.c
r4713r4714
403403};
404404
405405
406static const m6502_interface c16_m7501_interface =
407{
408   NULL,
409   NULL,
410   c16_m7501_port_read,
411   c16_m7501_port_write
412};
413
414
406415static MACHINE_DRIVER_START( c16 )
407416   /* basic machine hardware */
408417   MDRV_CPU_ADD("maincpu", M7501, 1400000)        /* 7.8336 MHz */
409418   MDRV_CPU_PROGRAM_MAP(c16_map)
419   MDRV_CPU_CONFIG( c16_m7501_interface )
410420   MDRV_CPU_VBLANK_INT("screen", c16_frame_interrupt)
411421   MDRV_CPU_PERIODIC_INT(ted7360_raster_interrupt, TED7360_HRETRACERATE)
412422   MDRV_QUANTUM_TIME(HZ(60))
r4713r4714
482492   MDRV_IMPORT_FROM( c16 )
483493   MDRV_CPU_REPLACE( "maincpu", M7501, 1200000)
484494   MDRV_CPU_PROGRAM_MAP(plus4_map)
495   MDRV_CPU_CONFIG( c16_m7501_interface )
485496   MDRV_SCREEN_MODIFY("screen")
486497   MDRV_SCREEN_REFRESH_RATE(TED7360NTSC_VRETRACERATE)
487498
src/mess/drivers/c64.c
r4713r4714
469469};
470470
471471
472static const m6502_interface c64_m6510_interface =
473{
474   NULL,
475   NULL,
476   c64_m6510_port_read,
477   c64_m6510_port_write
478};
479
480
472481/*************************************
473482 *
474483 *  Machine driver
r4713r4714
479488   /* basic machine hardware */
480489   MDRV_CPU_ADD("maincpu", M6510, VIC6567_CLOCK)
481490   MDRV_CPU_PROGRAM_MAP(c64_mem)
491   MDRV_CPU_CONFIG( c64_m6510_interface )
482492   MDRV_CPU_VBLANK_INT("screen", c64_frame_interrupt)
483493   MDRV_CPU_PERIODIC_INT(vic2_raster_irq, VIC6567_HRETRACERATE)
484494   MDRV_QUANTUM_TIME(HZ(60))
r4713r4714
519529static MACHINE_DRIVER_START( c64pal )
520530   MDRV_CPU_ADD( "maincpu", M6510, VIC6569_CLOCK)
521531   MDRV_CPU_PROGRAM_MAP(c64_mem)
532   MDRV_CPU_CONFIG( c64_m6510_interface )
522533   MDRV_CPU_VBLANK_INT("screen", c64_frame_interrupt)
523534   MDRV_CPU_PERIODIC_INT(vic2_raster_irq, VIC6569_HRETRACERATE)
524535   MDRV_QUANTUM_TIME(HZ(50))
r4713r4714
556567   MDRV_IMPORT_FROM( c64 )
557568   MDRV_CPU_REPLACE( "maincpu", M6510, VIC6567_CLOCK)
558569   MDRV_CPU_PROGRAM_MAP( ultimax_mem)
570   MDRV_CPU_CONFIG( c64_m6510_interface )
559571
560572   MDRV_SOUND_REPLACE("sid6581", SID6581, VIC6567_CLOCK)
561573   MDRV_SOUND_CONFIG(c64_sound_interface)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team