Previous 15994 Revisions Next

r4735 Monday 18th May, 2009 at 07:46:16 UTC by Fabio Priuli
[CBM] Refactored code to reduce cross-references between c64, c65 and c128 (part 1)
[src/mess/drivers]c128.c c65.c
[src/mess/includes]c128.h c64.h c65.h
[src/mess/machine]c128.c c64.c c65.c cbmipt.c cbmipt.h

src/mess/includes/c65.h
r4734r4735
2525DRIVER_INIT( c65 );
2626DRIVER_INIT( c65pal );
2727MACHINE_START( c65 );
28INTERRUPT_GEN( c65_frame_interrupt );
2829
2930
3031#endif /* C65_H_ */
src/mess/includes/c128.h
r4734r4735
5151extern DRIVER_INIT( c128d );
5252extern DRIVER_INIT( c128dpal );
5353extern MACHINE_RESET( c128 );
54extern INTERRUPT_GEN( c128_frame_interrupt );
5455
5556extern VIDEO_START( c128 );
5657extern VIDEO_UPDATE( c128 );
src/mess/includes/c64.h
r4734r4735
1919/*----------- defined in machine/c64.c -----------*/
2020
2121/* private area */
22extern UINT8 c65_keyline;
2322extern UINT8 c65_6511_port;
2423
25extern UINT8 c128_keyline[3];
26
2724extern UINT8 *c64_colorram;
2825extern UINT8 *c64_basic;
2926extern UINT8 *c64_kernal;
r4734r4735
6057extern int c64_tape_on;
6158extern UINT8 *c64_roml;
6259extern UINT8 *c64_romh;
63extern UINT8 c64_keyline[10];
6460extern int c128_va1617;
6561extern UINT8 *c64_vicaddr, *c128_vicaddr;
6662extern UINT8 c64_game, c64_exrom;
src/mess/machine/c65.c
r4734r4735
1414
1515#include "includes/cbmserb.h"
1616#include "includes/cbmdrive.h"
17#include "cbmipt.h"            /* we need cbm_common_interrupt & c64_keyline for input reading */
1718
1819#include "includes/c65.h"
1920#include "includes/c64.h"
r4734r4735
2930      } \
3031   } while (0)
3132
32static int c65_charset_select=0;
33static int c65_charset_select = 0;
3334
34static int c64mode=0;
35static int c64mode = 0;
3536
37static UINT8 c65_keyline = { 0xff };
38
39
3640/*UINT8 *c65_basic; */
3741/*UINT8 *c65_kernal; */
3842UINT8 *c65_chargen;
r4734r4735
850854   c65_bankswitch_interface(machine, 0xff);
851855   c65_bankswitch (machine);
852856}
857
858
859static void c65_nmi(running_machine *machine)
860{
861   static int nmilevel = 0;
862   const device_config *cia_1 = devtag_get_device(machine, "cia_1");
863   int cia1irq = cia_get_irq(cia_1);
864
865   if (nmilevel != (input_port_read(machine, "SPECIAL") & 0x80) || cia1irq)   /* KEY_RESTORE */
866   {
867      cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, (input_port_read(machine, "SPECIAL") & 0x80) || cia1irq);
868
869      nmilevel = (input_port_read(machine, "SPECIAL") & 0x80) || cia1irq;
870   }
871}
872
873
874INTERRUPT_GEN( c65_frame_interrupt )
875{
876   int value;
877
878   c65_nmi(device->machine);
879
880   /* common keys input ports */
881   cbm_common_interrupt(device);
882
883   /* c65 specific: function keys input ports */
884   value = 0xff;
885
886   value &= ~input_port_read(device->machine, "FUNCT");
887   c65_keyline = value;
888}
src/mess/machine/c128.c
r4734r4735
2020#include "video/vic6567.h"
2121#include "video/vdc8563.h"
2222
23#include "cbmipt.h"            /* we need cbm_common_interrupt & c64_keyline for input reading */
24
2325#include "includes/c128.h"
2426#include "includes/c64.h"
2527
r4734r4735
7072
7173static UINT8 c64_port_data;
7274
75static UINT8 c128_keyline[3] = {0xff, 0xff, 0xff};
76
7377static void c128_set_m8502_read_handler(running_machine *machine, UINT16 start, UINT16 end, read8_space_func rh)
7478{
7579   const device_config *cpu;
r4734r4735
959963   cputag_set_input_line(machine, "m8502", INPUT_LINE_HALT, ASSERT_LINE);
960964}
961965
966
967static void c128_nmi(running_machine *machine)
968{
969   static int nmilevel = 0;
970   const device_config *cia_1 = devtag_get_device(machine, "cia_1");
971   int cia1irq = cia_get_irq(cia_1);
972
973   if (nmilevel != (input_port_read(machine, "SPECIAL") & 0x80) || cia1irq)   /* KEY_RESTORE */
974   {
975      if (1) // this was never valid, there is no active CPU during a timer firing!  cpu_getactivecpu() == 0)
976      {
977         /* z80 */
978         cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, (input_port_read(machine, "SPECIAL") & 0x80) || cia1irq);
979      }
980      else
981      {
982         cputag_set_input_line(machine, "m8502", INPUT_LINE_NMI, (input_port_read(machine, "SPECIAL") & 0x80) || cia1irq);
983      }
984
985      nmilevel = (input_port_read(machine, "SPECIAL") & 0x80) || cia1irq;
986   }
987}
988
989INTERRUPT_GEN( c128_frame_interrupt )
990{
991   static int monitor = -1;
992   static const char *const c128ports[] = { "KP0", "KP1", "KP2" };
993   int i, value;
994
995   c128_nmi(device->machine);
996
997   if ((input_port_read(device->machine, "SPECIAL") & 0x08) != monitor)
998   {
999      if (input_port_read(device->machine, "SPECIAL") & 0x08)
1000      {
1001         vic2_set_rastering(0);
1002         vdc8563_set_rastering(1);
1003         video_screen_set_visarea(device->machine->primary_screen, 0, 655, 0, 215);
1004      }
1005      else
1006      {
1007         vic2_set_rastering(1);
1008         vdc8563_set_rastering(0);
1009         if (c64_pal)
1010            video_screen_set_visarea(device->machine->primary_screen, VIC6569_STARTVISIBLECOLUMNS, VIC6569_STARTVISIBLECOLUMNS + VIC6569_VISIBLECOLUMNS - 1, VIC6569_STARTVISIBLELINES, VIC6569_STARTVISIBLELINES + VIC6569_VISIBLELINES - 1);
1011         else
1012            video_screen_set_visarea(device->machine->primary_screen, VIC6567_STARTVISIBLECOLUMNS, VIC6567_STARTVISIBLECOLUMNS + VIC6567_VISIBLECOLUMNS - 1, VIC6567_STARTVISIBLELINES, VIC6567_STARTVISIBLELINES + VIC6567_VISIBLELINES - 1);
1013      }
1014      monitor = input_port_read(device->machine, "SPECIAL") & 0x08;
1015   }
1016
1017
1018   /* common keys input ports */
1019   cbm_common_interrupt(device);
1020
1021   /* Fix Me! Currently, neither left Shift nor Shift Lock work in c128, but reading the correspondent input produces a bug!
1022   Hence, we overwrite the actual reading as it never happens */
1023   if ((input_port_read(device->machine, "SPECIAL") & 0x40))   //
1024      c64_keyline[1] |= 0x80;
1025
1026   /* c128 specific: keypad input ports */
1027   for (i = 0; i < 3; i++)
1028   {
1029      value = 0xff;
1030      value &= ~input_port_read(device->machine, c128ports[i]);
1031      c128_keyline[i] = value;
1032   }
1033}
1034
1035
9621036VIDEO_START( c128 )
9631037{
9641038   VIDEO_START_CALL(vdc8563);
src/mess/machine/cbmipt.c
r4734r4735
1919#include "driver.h"
2020#include "machine/cbmipt.h"
2121
22
23
24
25/***********************************************
26
27   Input Reading - Common Components
28
29***********************************************/
30
31/* These are needed by c64, c65 and c128, each machine has also additional specific
32components in its INTERRUPT_GEN */
33
34/* keyboard lines */
35UINT8 c64_keyline[10] =
36{
37   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
38};
39
40
41static TIMER_CALLBACK( lightpen_tick )
42{
43   if ((input_port_read(machine, "CTRLSEL") & 0x07) == 0x04)
44   {
45      /* enable lightpen crosshair */
46      crosshair_set_screen(machine, 0, CROSSHAIR_SCREEN_ALL);
47   }
48   else
49   {
50      /* disable lightpen crosshair */
51      crosshair_set_screen(machine, 0, CROSSHAIR_SCREEN_NONE);
52   }
53}
54
55void cbm_common_interrupt( const device_config *device )
56{
57   int value, i;
58   int controller1 = input_port_read(device->machine, "CTRLSEL") & 0x07;
59   int controller2 = input_port_read(device->machine, "CTRLSEL") & 0x70;
60   static const char *const c64ports[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7" };
61
62   /* Lines 0-7 : common keyboard */
63   for (i = 0; i < 8; i++)
64   {
65      value = 0xff;
66      value &= ~input_port_read(device->machine, c64ports[i]);
67
68      /* Shift Lock is mapped on Left Shift */
69      if ((i == 1) && (input_port_read(device->machine, "SPECIAL") & 0x40))
70         value &= ~0x80;
71
72      c64_keyline[i] = value;
73   }
74
75
76   value = 0xff;
77   switch(controller1)
78   {
79      case 0x00:
80         value &= ~input_port_read(device->machine, "JOY1_1B");         /* Joy1 Directions + Button 1 */
81         break;
82
83      case 0x01:
84         if (input_port_read(device->machine, "OTHER") & 0x40)         /* Paddle2 Button */
85            value &= ~0x08;
86         if (input_port_read(device->machine, "OTHER") & 0x80)         /* Paddle1 Button */
87            value &= ~0x04;
88         break;
89
90      case 0x02:
91         if (input_port_read(device->machine, "OTHER") & 0x02)         /* Mouse Button Left */
92            value &= ~0x10;
93         if (input_port_read(device->machine, "OTHER") & 0x01)         /* Mouse Button Right */
94            value &= ~0x01;
95         break;
96
97      case 0x03:
98         value &= ~(input_port_read(device->machine, "JOY1_2B") & 0x1f);   /* Joy1 Directions + Button 1 */
99         break;
100
101      case 0x04:
102/* was there any input on the lightpen? where is it mapped? */
103//         if (input_port_read(device->machine, "OTHER") & 0x04)         /* Lightpen Signal */
104//            value &= ?? ;
105         break;
106
107      case 0x07:
108         break;
109
110      default:
111         logerror("Invalid Controller 1 Setting %d\n", controller1);
112         break;
113   }
114
115   c64_keyline[8] = value;
116
117
118   value = 0xff;
119   switch(controller2)
120   {
121      case 0x00:
122         value &= ~input_port_read(device->machine, "JOY2_1B");         /* Joy2 Directions + Button 1 */
123         break;
124
125      case 0x10:
126         if (input_port_read(device->machine, "OTHER") & 0x10)         /* Paddle4 Button */
127            value &= ~0x08;
128         if (input_port_read(device->machine, "OTHER") & 0x20)         /* Paddle3 Button */
129            value &= ~0x04;
130         break;
131
132      case 0x20:
133         if (input_port_read(device->machine, "OTHER") & 0x02)         /* Mouse Button Left */
134            value &= ~0x10;
135         if (input_port_read(device->machine, "OTHER") & 0x01)         /* Mouse Button Right */
136            value &= ~0x01;
137         break;
138
139      case 0x30:
140         value &= ~(input_port_read(device->machine, "JOY2_2B") & 0x1f);   /* Joy2 Directions + Button 1 */
141         break;
142
143      case 0x40:
144/* was there any input on the lightpen? where is it mapped? */
145//         if (input_port_read(device->machine, "OTHER") & 0x04)         /* Lightpen Signal */
146//            value &= ?? ;
147         break;
148
149      case 0x70:
150         break;
151
152      default:
153         logerror("Invalid Controller 2 Setting %d\n", controller2);
154         break;
155   }
156
157   c64_keyline[9] = value;
158
159//   vic2_frame_interrupt does nothing so this is not necessary
160//   vic2_frame_interrupt (device);
161
162   /* check if lightpen has been chosen as input: if so, enable crosshair */
163   timer_set(device->machine, attotime_zero, NULL, 0, lightpen_tick);
164
165   set_led_status (1, input_port_read(device->machine, "SPECIAL") & 0x40 ? 1 : 0);      /* Shift Lock */
166   set_led_status (0, input_port_read(device->machine, "CTRLSEL") & 0x80 ? 1 : 0);      /* Joystick Swap */
167}
168
169
170
171
172/***********************************************
173
174   Input Ports
175
176***********************************************/
177
22178/***************************** Commodore 64 ****************************************
23179 *
24180 *   - common_cbm_keyboard: C64 keyboard; used by C16, C65 and C128 as well
r4734r4735
388544     ESC  TAB  ALT  LOCK           HELP  FEED  DISPLAY SCROLL      UP  DOWN  LEFT  RIGHT          F1  F3  F5  F7
389545 
390546                                                                             CLR    INST
391      <-   1!   2"   3#   4$   5%   6&   7'   8(   9)   0     +    -    £    HOME   DEL          7   8   9   +
547      <-   1!   2"   3#   4$   5%   6&   7'   8(   9)   0     +    -    £    HOME   DEL          7   8   9   +
392548 
393549   
394550   CONTROL   Q    W    E    R    T     Y    U    I    O    P    @    *     UP    RESTORE          4   5   6   -
src/mess/machine/cbmipt.h
r4734r4735
22#define CBMIPT_H_
33
44
5/*---------- needed for keyboard reading ---------*/
6
7/* keyboard lines */
8UINT8 c64_keyline[10];
9void cbm_common_interrupt( const device_config *device );
10
11
12/*------------------ input ports -----------------*/
13
514/* Commodore 64 */
615
716INPUT_PORTS_EXTERN( common_cbm_keyboard );   /* shared with c16, c65, c128 */
r4734r4735
4958
5059
5160#endif /* CBMIPT_H_ */
52
src/mess/machine/c64.c
r4734r4735
2626#include "includes/cbmserb.h"
2727#include "includes/cbmdrive.h"
2828#include "includes/vc1541.h"
29#include "cbmipt.h"            /* we need cbm_common_interrupt & c64_keyline for input reading */
2930
3031#include "includes/c64.h"
3132#include "includes/c128.h"      /* we need c128_bankswitch_64 in MACHINE_START */
r4734r4735
4445      } \
4546   } while (0)
4647
47unsigned char c65_keyline = { 0xff };
48UINT8 c65_6511_port=0xff;
48/* still needed for CIA interfaces, will be factored out soon... */
49UINT8 c65_6511_port = 0xff;
50static UINT8 c65_keyline = { 0xff };
51static UINT8 c128_keyline[3] = {0xff, 0xff, 0xff};
4952
50UINT8 c128_keyline[3] = {0xff, 0xff, 0xff};
51
52
53/* keyboard lines */
54UINT8 c64_keyline[10] =
55{
56   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
57};
58
5953/* expansion port lines input */
6054int c64_pal = 0;
6155UINT8 c64_game = 1, c64_exrom = 1;
r4734r4735
108102
109103   if (nmilevel != (input_port_read(machine, "SPECIAL") & 0x80) || cia1irq)   /* KEY_RESTORE */
110104   {
111      if (is_c128(machine))
112      {
113         if (1) // this was never valid, there is no active CPU during a timer firing!  cpu_getactivecpu() == 0)
114         {
115            /* z80 */
116            cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, (input_port_read(machine, "SPECIAL") & 0x80) || cia1irq);
117         }
118         else
119         {
120            cputag_set_input_line(machine, "m8502", INPUT_LINE_NMI, (input_port_read(machine, "SPECIAL") & 0x80) || cia1irq);
121         }
122      }
105      cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, (input_port_read(machine, "SPECIAL") & 0x80) || cia1irq);
123106
124      else
125      {
126         cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, (input_port_read(machine, "SPECIAL") & 0x80) || cia1irq);
127      }
128
129107      nmilevel = (input_port_read(machine, "SPECIAL") & 0x80) || cia1irq;
130108   }
131109}
r4734r4735
848826   {
849827      if (input_port_read(device->machine, "SPECIAL") & 0x20)      /* Check Caps Lock */
850828         data &= ~0x40;
851
852829      else
853830         data |=  0x40;
854831   }
r4734r4735
10771054{
10781055   if (is_sx64 /* || is_c128d(machine) */)
10791056   {
1080      cbm_serial_config(machine, &cbm_fake_drive_interface);
1057      cbm_serial_config(machine, &cbm_emu_drive_interface);
10811058      drive_reset ();
10821059   }
10831060
r4734r4735
11091086}
11101087
11111088
1112static TIMER_CALLBACK( lightpen_tick )
1113{
1114   if ((input_port_read(machine, "CTRLSEL") & 0x07) == 0x04)
1115   {
1116      /* enable lightpen crosshair */
1117      crosshair_set_screen(machine, 0, CROSSHAIR_SCREEN_ALL);
1118   }
1119   else
1120   {
1121      /* disable lightpen crosshair */
1122      crosshair_set_screen(machine, 0, CROSSHAIR_SCREEN_NONE);
1123   }
1124}
1125
11261089INTERRUPT_GEN( c64_frame_interrupt )
11271090{
1128   static int monitor = -1;
1129   int value, i;
1130   int controller1 = input_port_read(device->machine, "CTRLSEL") & 0x07;
1131   int controller2 = input_port_read(device->machine, "CTRLSEL") & 0x70;
1132   static const char *const c64ports[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7" };
1133   static const char *const c128ports[] = { "KP0", "KP1", "KP2" };
1134
11351091   c64_nmi(device->machine);
1136
1137    if (is_c128(device->machine))
1138    {
1139       if ((input_port_read(device->machine, "SPECIAL") & 0x08) != monitor)
1140      {
1141         if (input_port_read(device->machine, "SPECIAL") & 0x08)
1142         {
1143            vic2_set_rastering(0);
1144            vdc8563_set_rastering(1);
1145            video_screen_set_visarea(device->machine->primary_screen, 0, 655, 0, 215);
1146         }
1147         else
1148         {
1149            vic2_set_rastering(1);
1150            vdc8563_set_rastering(0);
1151            if (c64_pal)
1152               video_screen_set_visarea(device->machine->primary_screen, VIC6569_STARTVISIBLECOLUMNS, VIC6569_STARTVISIBLECOLUMNS + VIC6569_VISIBLECOLUMNS - 1, VIC6569_STARTVISIBLELINES, VIC6569_STARTVISIBLELINES + VIC6569_VISIBLELINES - 1);
1153            else
1154               video_screen_set_visarea(device->machine->primary_screen, VIC6567_STARTVISIBLECOLUMNS, VIC6567_STARTVISIBLECOLUMNS + VIC6567_VISIBLECOLUMNS - 1, VIC6567_STARTVISIBLELINES, VIC6567_STARTVISIBLELINES + VIC6567_VISIBLELINES - 1);
1155         }
1156         monitor = input_port_read(device->machine, "SPECIAL") & 0x08;
1157      }
1158   }
1159
1160   /* Lines 0-7 : common keyboard */
1161   for (i = 0; i < 8; i++)
1162   {
1163      value = 0xff;
1164      value &= ~input_port_read(device->machine, c64ports[i]);
1165
1166      /* Shift Lock is mapped on Left Shift */
1167      if ((i == 1) && (input_port_read(device->machine, "SPECIAL") & 0x40) && !is_c128(device->machine))   // Fix Me! Currently, neither left Shift nor Shift Lock works in c128, but reading this in c128 produces a bug!
1168         value &= ~0x80;
1169
1170      c64_keyline[i] = value;
1171   }
1172
1173
1174   value = 0xff;
1175   switch(controller1)
1176   {
1177      case 0x00:
1178         value &= ~input_port_read(device->machine, "JOY1_1B");         /* Joy1 Directions + Button 1 */
1179         break;
1180
1181      case 0x01:
1182         if (input_port_read(device->machine, "OTHER") & 0x40)         /* Paddle2 Button */
1183            value &= ~0x08;
1184         if (input_port_read(device->machine, "OTHER") & 0x80)         /* Paddle1 Button */
1185            value &= ~0x04;
1186         break;
1187
1188      case 0x02:
1189         if (input_port_read(device->machine, "OTHER") & 0x02)         /* Mouse Button Left */
1190            value &= ~0x10;
1191         if (input_port_read(device->machine, "OTHER") & 0x01)         /* Mouse Button Right */
1192            value &= ~0x01;
1193         break;
1194
1195      case 0x03:
1196         value &= ~(input_port_read(device->machine, "JOY1_2B") & 0x1f);   /* Joy1 Directions + Button 1 */
1197         break;
1198
1199      case 0x04:
1200/* was there any input on the lightpen? where is it mapped? */
1201//         if (input_port_read(device->machine, "OTHER") & 0x04)         /* Lightpen Signal */
1202//            value &= ?? ;
1203         break;
1204
1205      case 0x07:
1206         break;
1207
1208      default:
1209         logerror("Invalid Controller 1 Setting %d\n", controller1);
1210         break;
1211   }
1212
1213   c64_keyline[8] = value;
1214
1215
1216   value = 0xff;
1217   switch(controller2)
1218   {
1219      case 0x00:
1220         value &= ~input_port_read(device->machine, "JOY2_1B");         /* Joy2 Directions + Button 1 */
1221         break;
1222
1223      case 0x10:
1224         if (input_port_read(device->machine, "OTHER") & 0x10)         /* Paddle4 Button */
1225            value &= ~0x08;
1226         if (input_port_read(device->machine, "OTHER") & 0x20)         /* Paddle3 Button */
1227            value &= ~0x04;
1228         break;
1229
1230      case 0x20:
1231         if (input_port_read(device->machine, "OTHER") & 0x02)         /* Mouse Button Left */
1232            value &= ~0x10;
1233         if (input_port_read(device->machine, "OTHER") & 0x01)         /* Mouse Button Right */
1234            value &= ~0x01;
1235         break;
1236
1237      case 0x30:
1238         value &= ~(input_port_read(device->machine, "JOY2_2B") & 0x1f);   /* Joy2 Directions + Button 1 */
1239         break;
1240
1241      case 0x40:
1242/* was there any input on the lightpen? where is it mapped? */
1243//         if (input_port_read(device->machine, "OTHER") & 0x04)         /* Lightpen Signal */
1244//            value &= ?? ;
1245         break;
1246
1247      case 0x70:
1248         break;
1249
1250      default:
1251         logerror("Invalid Controller 2 Setting %d\n", controller2);
1252         break;
1253   }
1254
1255   c64_keyline[9] = value;
1256
1257   /* C128 only : keypad input ports */
1258   if (is_c128(device->machine))
1259   {
1260      for (i = 0; i < 3; i++)
1261      {
1262         value = 0xff;
1263         value &= ~input_port_read(device->machine, c128ports[i]);
1264         c128_keyline[i] = value;
1265      }
1266   }
1267
1268   /* C65 only : function keys input ports */
1269   if (is_c65(device->machine))
1270   {
1271      value = 0xff;
1272
1273      value &= ~input_port_read(device->machine, "FUNCT");
1274      c65_keyline = value;
1275   }
1276
1277// vic2_frame_interrupt does nothing so this is not necessary
1278//   vic2_frame_interrupt (device);
1279
1280   /* check if lightpen has been chosen as input: if so, enable crosshair */
1281   timer_set(device->machine, attotime_zero, NULL, 0, lightpen_tick);
1282
1283   set_led_status (1, input_port_read(device->machine, "SPECIAL") & 0x40 ? 1 : 0);      /* Shift Lock */
1284   set_led_status (0, input_port_read(device->machine, "CTRLSEL") & 0x80 ? 1 : 0);      /* Joystick Swap */
1092   cbm_common_interrupt(device);
12851093}
12861094
12871095
src/mess/drivers/c65.c
r4734r4735
213213   /* basic machine hardware */
214214   MDRV_CPU_ADD("maincpu", M4510, 3500000)  /* or VIC6567_CLOCK, */
215215   MDRV_CPU_PROGRAM_MAP(c65_mem)
216   MDRV_CPU_VBLANK_INT("screen", c64_frame_interrupt)
216   MDRV_CPU_VBLANK_INT("screen", c65_frame_interrupt)
217217   MDRV_CPU_PERIODIC_INT(vic3_raster_irq, VIC6567_HRETRACERATE)
218218
219219   MDRV_MACHINE_START( c65 )
src/mess/drivers/c128.c
r4734r4735
590590   MDRV_CPU_ADD("maincpu", Z80, VIC6567_CLOCK)
591591   MDRV_CPU_PROGRAM_MAP( c128_z80_mem)
592592   MDRV_CPU_IO_MAP( c128_z80_io)
593   MDRV_CPU_VBLANK_INT("screen", c64_frame_interrupt)
593   MDRV_CPU_VBLANK_INT("screen", c128_frame_interrupt)
594594   MDRV_CPU_PERIODIC_INT(vic2_raster_irq, VIC6567_HRETRACERATE)
595595
596596   MDRV_CPU_ADD("m8502", M8502, VIC6567_CLOCK)
597597   MDRV_CPU_PROGRAM_MAP( c128_mem)
598598   MDRV_CPU_CONFIG( c128_m8502_interface )
599   MDRV_CPU_VBLANK_INT("screen", c64_frame_interrupt)
599   MDRV_CPU_VBLANK_INT("screen", c128_frame_interrupt)
600600   MDRV_CPU_PERIODIC_INT(vic2_raster_irq, VIC6567_HRETRACERATE)
601601
602602   MDRV_MACHINE_RESET( c128 )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team