Previous 15994 Revisions Next

r3880 Friday 19th December, 2008 at 13:17:59 UTC by Dirk Best
Removed deprecat.h from c128.c and related Machine -> machine cleanups
[src/mess/includes]c64.h
[src/mess/machine]c128.c c64.c c65.c cbmb.c tpi6525.c tpi6525.h
[src/mess/video]vic4567.c vic4567.h vic6567.c vic6567.h

src/mess/video/vic4567.c
r3879r3880
4646   vic3.palette_dirty=1;
4747}
4848
49void vic4567_init (running_machine *machine, int pal, int (*dma_read) (int),
50                    int (*dma_read_color) (int), void (*irq) (int),
49void vic4567_init(running_machine *machine, int pal, int (*dma_read)(running_machine *, int),
50                    int (*dma_read_color)(running_machine *, int), void (*irq) (int),
5151                    void (*param_port_changed)(int))
5252{
5353   memset(&vic2, 0, sizeof(vic2));
r3879r3880
259259
260260      for (xoff = vic2.x_begin + XPOS; xoff < x_end2 + XPOS; xoff += 8, offs++)
261261      {
262         ch = vic2.dma_read (vic2.videoaddr + offs);
263         attr = vic2.dma_read_color (vic2.videoaddr + offs);
262         ch = vic2.dma_read(machine, vic2.videoaddr + offs);
263         attr = vic2.dma_read_color(machine, vic2.videoaddr + offs);
264264         if (HIRESON)
265265         {
266266            vic2.bitmapmulti[1] = vic2.c64_bitmap[1] = ch >> 4;
r3879r3880
268268            if (MULTICOLORON)
269269            {
270270               vic2.bitmapmulti[3] = attr;
271               vic2_draw_bitmap_multi (ybegin, yend, offs, yoff, xoff, start_x, end_x);
271               vic2_draw_bitmap_multi(machine, ybegin, yend, offs, yoff, xoff, start_x, end_x);
272272            }
273273            else
274274            {
275               vic2_draw_bitmap (ybegin, yend, offs, yoff, xoff, start_x, end_x);
275               vic2_draw_bitmap(machine, ybegin, yend, offs, yoff, xoff, start_x, end_x);
276276            }
277277         }
278278         else if (ECMON)
r3879r3880
280280            ecm = ch >> 6;
281281            vic2.ecmcolor[0] = vic2.colors[ecm];
282282            vic2.ecmcolor[1] = attr;
283            vic2_draw_character (ybegin, yend, ch & ~0xC0, yoff, xoff, vic2.ecmcolor, start_x, end_x);
283            vic2_draw_character(machine, ybegin, yend, ch & ~0xC0, yoff, xoff, vic2.ecmcolor, start_x, end_x);
284284         }
285285         else if (MULTICOLORON && (attr & 8))
286286         {
287287            vic2.multi[3] = attr & 7;
288            vic2_draw_character_multi (ybegin, yend, ch, yoff, xoff, start_x, end_x);
288            vic2_draw_character_multi(machine, ybegin, yend, ch, yoff, xoff, start_x, end_x);
289289         }
290290         else
291291         {
292292            vic2.mono[1] = attr;
293            vic2_draw_character (ybegin, yend, ch, yoff, xoff, vic2.mono, start_x, end_x);
293            vic2_draw_character(machine, ybegin, yend, ch, yoff, xoff, vic2.mono, start_x, end_x);
294294         }
295295      }
296296      /* sprite priority, sprite overwrites lowerprior pixels */
src/mess/video/vic4567.h
r3879r3880
1212
1313extern const unsigned char vic3_palette[0x100 * 3];
1414
15extern void vic4567_init (running_machine *machine, int pal, int (*dma_read) (int),
16                    int (*dma_read_color) (int), void (*irq) (int),
15extern void vic4567_init (running_machine *machine, int pal, int (*dma_read)(running_machine *, int),
16                    int (*dma_read_color)(running_machine *, int), void (*irq)(int),
1717                    void (*param_port_changed)(int));
1818
1919extern INTERRUPT_GEN( vic3_raster_irq );
src/mess/video/vic6567.c
r3879r3880
195195   int vic3;
196196   int on; /* rastering of the screen */
197197
198   int (*dma_read) (int);
199   int (*dma_read_color) (int);
198   int (*dma_read)(running_machine *, int);
199   int (*dma_read_color)(running_machine *, int);
200200   void (*interrupt) (int);
201201   void (*port_changed)(int);
202202
r3879r3880
264264static void vic2_drawlines (running_machine *machine, int first, int last, int start_x, int end_x);
265265
266266void vic6567_init (int chip_vic2e, int pal,
267               int (*dma_read) (int), int (*dma_read_color) (int),
267               int (*dma_read) (running_machine *, int), int (*dma_read_color) (running_machine *, int),
268268               void (*irq) (int))
269269{
270270   memset(&vic2, 0, sizeof(vic2));
r3879r3880
795795   }
796796}
797797
798static void vic2_draw_character (int ybegin, int yend, int ch, int yoff, int xoff, UINT16 *color, int start_x, int end_x)
798static void vic2_draw_character (running_machine *machine, int ybegin, int yend, int ch, int yoff, int xoff, UINT16 *color, int start_x, int end_x)
799799{
800800   int y, code;
801801
802802   for (y = ybegin; y <= yend; y++)
803803   {
804      code = vic2.dma_read (vic2.chargenaddr + ch * 8 + y);
804      code = vic2.dma_read(machine, vic2.chargenaddr + ch * 8 + y);
805805      vic2.screen[y + yoff][xoff >> 3] = code;
806806      if ((xoff + 0 > start_x) && (xoff + 0 < end_x)) *BITMAP_ADDR16(vic2.bitmap, y + yoff + FIRSTLINE, xoff + 0) = color[code >> 7];
807807      if ((xoff + 1 > start_x) && (xoff + 0 < end_x)) *BITMAP_ADDR16(vic2.bitmap, y + yoff + FIRSTLINE, xoff + 1) = color[(code >> 6) & 1];
r3879r3880
814814   }
815815}
816816
817static void vic2_draw_character_multi (int ybegin, int yend, int ch, int yoff, int xoff, int start_x, int end_x )
817static void vic2_draw_character_multi(running_machine *machine, int ybegin, int yend, int ch, int yoff, int xoff, int start_x, int end_x )
818818{
819819   int y, code;
820820
821821   for (y = ybegin; y <= yend; y++)
822822   {
823      code = vic2.dma_read (vic2.chargenaddr + ch * 8 + y);
823      code = vic2.dma_read(machine, vic2.chargenaddr + ch * 8 + y);
824824      vic2.screen[y + yoff][xoff >> 3] = vic2.foreground[code];
825825      if ((xoff + 0 > start_x) && (xoff + 0 < end_x)) *BITMAP_ADDR16(vic2.bitmap, y + yoff + FIRSTLINE, xoff + 0) = vic2.multi[code >> 6];
826826      if ((xoff + 1 > start_x) && (xoff + 1 < end_x)) *BITMAP_ADDR16(vic2.bitmap, y + yoff + FIRSTLINE, xoff + 1) = vic2.multi[code >> 6];
r3879r3880
833833   }
834834}
835835
836static void vic2_draw_bitmap (int ybegin, int yend, int ch, int yoff, int xoff, int start_x, int end_x)
836static void vic2_draw_bitmap(running_machine *machine, int ybegin, int yend, int ch, int yoff, int xoff, int start_x, int end_x)
837837{
838838   int y, code;
839839
840840   for (y = ybegin; y <= yend; y++)
841841   {
842      code = vic2.dma_read ((vic2.chargenaddr&0x2000) + ch * 8 + y);
842      code = vic2.dma_read(machine, (vic2.chargenaddr&0x2000) + ch * 8 + y);
843843      vic2.screen[y + yoff][xoff >> 3] = code;
844844      if ((xoff + 0 > start_x) && (xoff + 0 < end_x)) *BITMAP_ADDR16(vic2.bitmap, y + yoff + FIRSTLINE, xoff + 0) = vic2.c64_bitmap[code >> 7];
845845      if ((xoff + 1 > start_x) && (xoff + 1 < end_x)) *BITMAP_ADDR16(vic2.bitmap, y + yoff + FIRSTLINE, xoff + 1) = vic2.c64_bitmap[(code >> 6) & 1];
r3879r3880
852852   }
853853}
854854
855static void vic2_draw_bitmap_multi (int ybegin, int yend, int ch, int yoff, int xoff, int start_x, int end_x)
855static void vic2_draw_bitmap_multi(running_machine *machine, int ybegin, int yend, int ch, int yoff, int xoff, int start_x, int end_x)
856856{
857857   int y, code;
858858
859859   for (y = ybegin; y <= yend; y++)
860860   {
861      code = vic2.dma_read ((vic2.chargenaddr&0x2000) + ch * 8 + y);
861      code = vic2.dma_read(machine, (vic2.chargenaddr&0x2000) + ch * 8 + y);
862862      vic2.screen[y + yoff][xoff >> 3] = vic2.foreground[code];
863863      if ((xoff + 0 > start_x) && (xoff + 0 < end_x)) *BITMAP_ADDR16(vic2.bitmap, y + yoff + FIRSTLINE, xoff + 0) = vic2.bitmapmulti[code >> 6];
864864      if ((xoff + 1 > start_x) && (xoff + 1 < end_x)) *BITMAP_ADDR16(vic2.bitmap, y + yoff + FIRSTLINE, xoff + 1) = vic2.bitmapmulti[code >> 6];
r3879r3880
959959   int value, value2, value3 = 0, bg, color[2];
960960
961961   xbegin = SPRITE_X_POS (nr);
962   addr = vic2.dma_read (SPRITE_ADDR (nr)) << 6;
962   addr = vic2.dma_read(machine, SPRITE_ADDR (nr)) << 6;
963963   vic2.spritemulti[2] = SPRITE_COLOR (nr);
964964   prior = SPRITE_PRIORITY (nr);
965965   collision = SPRITE_BG_COLLISION (nr);
r3879r3880
973973         vic2.sprites[nr].paintedline[y] = 1;
974974         for (i = 0; i < 3; i++)
975975         {
976            value = vic2.expandx_multi[bg = vic2.dma_read (addr + vic2.sprites[nr].line * 3 + i)];
976            value = vic2.expandx_multi[bg = vic2.dma_read(machine, addr + vic2.sprites[nr].line * 3 + i)];
977977            value2 = vic2.expandx[vic2.multi_collision[bg]];
978978            vic2.sprites[nr].bitmap[y][i*2] = value2 >> 8;
979979            vic2.sprites[nr].bitmap[y][i*2+1] = value2 & 0xff;
r3879r3880
10241024         vic2.sprites[nr].paintedline[y] = 1;
10251025         for (i = 0; i < 3; i++)
10261026         {
1027            value = vic2.dma_read (addr + vic2.sprites[nr].line * 3 + i);
1027            value = vic2.dma_read(machine, addr + vic2.sprites[nr].line * 3 + i);
10281028            vic2.sprites[nr].bitmap[y][i] =
10291029               value2 = vic2.multi_collision[value];
10301030            vic2_sprite_collision(machine, nr, y, xbegin + i * 8, value2);
r3879r3880
10721072   int value, value3 = 0;
10731073
10741074   xbegin = SPRITE_X_POS (nr);
1075   addr = vic2.dma_read (SPRITE_ADDR (nr)) << 6;
1075   addr = vic2.dma_read(machine, SPRITE_ADDR (nr)) << 6;
10761076   color = SPRITE_COLOR (nr);
10771077   prior = SPRITE_PRIORITY (nr);
10781078   collision = SPRITE_BG_COLLISION (nr);
r3879r3880
10841084         vic2.sprites[nr].paintedline[y] = 1;
10851085         for (i = 0; i < 3; i++)
10861086         {
1087            value = vic2.expandx[vic2.dma_read (addr + vic2.sprites[nr].line * 3 + i)];
1087            value = vic2.expandx[vic2.dma_read(machine, addr + vic2.sprites[nr].line * 3 + i)];
10881088            vic2.sprites[nr].bitmap[y][i*2] = value>>8;
10891089            vic2.sprites[nr].bitmap[y][i*2+1] = value&0xff;
10901090            vic2_sprite_collision(machine, nr, y, xbegin + i * 16, value >> 8);
r3879r3880
11261126         vic2.sprites[nr].paintedline[y] = 1;
11271127         for (i = 0; i < 3; i++)
11281128         {
1129            value = vic2.dma_read (addr + vic2.sprites[nr].line * 3 + i);
1129            value = vic2.dma_read(machine, addr + vic2.sprites[nr].line * 3 + i);
11301130            vic2.sprites[nr].bitmap[y][i] = value;
11311131            vic2_sprite_collision(machine, nr, y, xbegin + i * 8, value);
11321132            if (prior || !collision)
r3879r3880
12531253      vic2.shift[line] = HORIZONTALPOS;
12541254      for (xoff = vic2.x_begin + XPOS; xoff < vic2.x_end + XPOS; xoff += 8, offs++)
12551255      {
1256         ch = vic2.dma_read (vic2.videoaddr + offs);
1256         ch = vic2.dma_read(machine, vic2.videoaddr + offs);
12571257#if 0
1258         attr = vic2.dma_read_color (vic2.videoaddr + offs);
1258         attr = vic2.dma_read_color(machine, vic2.videoaddr + offs);
12591259#else
12601260         /* temporaery until vic3 finished */
1261         attr = vic2.dma_read_color ((vic2.videoaddr + offs)&0x3ff)&0x0f;
1261         attr = vic2.dma_read_color(machine, (vic2.videoaddr + offs)&0x3ff)&0x0f;
12621262#endif
12631263         if (HIRESON)
12641264         {
r3879r3880
12671267            if (MULTICOLORON)
12681268            {
12691269                vic2.bitmapmulti[3] = attr;
1270               vic2_draw_bitmap_multi (ybegin, yend, offs, yoff, xoff, start_x, end_x);
1270               vic2_draw_bitmap_multi(machine, ybegin, yend, offs, yoff, xoff, start_x, end_x);
12711271            }
12721272            else
12731273            {
1274               vic2_draw_bitmap (ybegin, yend, offs, yoff, xoff, start_x, end_x);
1274               vic2_draw_bitmap(machine, ybegin, yend, offs, yoff, xoff, start_x, end_x);
12751275            }
12761276         }
12771277         else if (ECMON)
r3879r3880
12791279            ecm = ch >> 6;
12801280            vic2.ecmcolor[0] = vic2.colors[ecm];
12811281            vic2.ecmcolor[1] = attr;
1282            vic2_draw_character (ybegin, yend, ch & ~0xC0, yoff, xoff, vic2.ecmcolor, start_x, end_x);
1282            vic2_draw_character(machine, ybegin, yend, ch & ~0xC0, yoff, xoff, vic2.ecmcolor, start_x, end_x);
12831283         }
12841284         else if (MULTICOLORON && (attr & 8))
12851285         {
12861286            vic2.multi[3] = attr & 7;
1287            vic2_draw_character_multi (ybegin, yend, ch, yoff, xoff, start_x, end_x);
1287            vic2_draw_character_multi(machine, ybegin, yend, ch, yoff, xoff, start_x, end_x);
12881288         }
12891289         else
12901290         {
12911291            vic2.mono[1] = attr;
1292            vic2_draw_character (ybegin, yend, ch, yoff, xoff, vic2.mono, start_x, end_x);
1292            vic2_draw_character(machine, ybegin, yend, ch, yoff, xoff, vic2.mono, start_x, end_x);
12931293         }
12941294      }
12951295
src/mess/video/vic6567.h
r3879r3880
8585
8686/* call to init videodriver */
8787/* dma_read: videochip fetched 1 byte data from system bus */
88extern void vic6567_init (int vic2e, int pal, int (*dma_read) (int), int (*dma_read_color) (int), void (*irq) (int));
88extern void vic6567_init(int vic2e, int pal, int (*dma_read)(running_machine *, int), int (*dma_read_color)(running_machine *, int), void (*irq)(int));
8989
9090extern void vic2_set_rastering(int onoff);
9191
src/mess/includes/c64.h
r3879r3880
3030extern UINT8 *c64_chargen;
3131extern UINT8 *c64_memory;
3232
33UINT8 c64_m6510_port_read(UINT8 direction);
34void c64_m6510_port_write(UINT8 direction, UINT8 data);
33UINT8 c64_m6510_port_read(const device_config *device, UINT8 direction);
34void c64_m6510_port_write(const device_config *device, UINT8 direction, UINT8 data);
3535
3636READ8_HANDLER ( c64_colorram_read );
3737WRITE8_HANDLER ( c64_colorram_write );
src/mess/machine/c65.c
r3879r3880
769769 * a15 and a14 portlines
770770 * 0x1000-0x1fff, 0x9000-0x9fff char rom
771771 */
772static int c65_dma_read (int offset)
772static int c65_dma_read(running_machine *machine, int offset)
773773{
774774   if (!c64_game && c64_exrom)
775775   {
r3879r3880
792792   return c64_vicaddr[offset & 0x3fff];
793793}
794794
795static int c65_dma_read_color (int offset)
795static int c65_dma_read_color(running_machine *machine, int offset)
796796{
797797   if (c64mode) return c64_colorram[offset&0x3ff]&0xf;
798798   return c64_colorram[offset & 0x7ff];
r3879r3880
813813
814814   /*memset(c64_memory+0x40000, 0, 0x800000-0x40000); */
815815
816   vic4567_init (machine, c64_pal, c65_dma_read, c65_dma_read_color,
816   vic4567_init(machine, c64_pal, c65_dma_read, c65_dma_read_color,
817817              c64_vic_interrupt, c65_bankswitch_interface);
818818}
819819
820820DRIVER_INIT( c65 )
821821{
822822   dma.version=2;
823   c65_common_driver_init (machine);
823   c65_common_driver_init(machine);
824824
825825}
826826
r3879r3880
828828{
829829   dma.version=1;
830830   c64_pal = 1;
831   c65_common_driver_init (machine);
831   c65_common_driver_init(machine);
832832}
833833
834834MACHINE_START( c65 )
src/mess/machine/cbmb.c
r3879r3880
33
44    peter.trauner@jk.uni-linz.ac.at
55***************************************************************************/
6#include <ctype.h>
6
77#include "driver.h"
88#include "cpu/m6502/m6509.h"
99#include "sound/sid6581.h"
1010#include "machine/6526cia.h"
11#include "deprecat.h"
1211
1312#include "includes/cbm.h"
1413#include "machine/tpi6525.h"
r3879r3880
7372 i1 self pb0
7473 i0 tod (50 or 60 hertz frequency)
7574 */
76static int cbmb_tpi0_port_a_r(void)
75static int cbmb_tpi0_port_a_r(running_machine *machine)
7776{
78   running_machine *machine = Machine;
7977   int data = 0;
78
8079   if (cbm_ieee_nrfd_r(machine)) data |= 0x80;
8180   if (cbm_ieee_ndac_r(machine)) data |= 0x40;
8281   if (cbm_ieee_eoi_r(machine)) data |= 0x20;
8382   if (cbm_ieee_dav_r(machine)) data |= 0x10;
8483   if (cbm_ieee_atn_r(machine)) data |= 0x08;
8584/*   if (cbm_ieee_ren_r(machine)) data |= 0x04; */
85
8686   return data;
8787}
8888
89static void cbmb_tpi0_port_a_w(int data)
89static void cbmb_tpi0_port_a_w(running_machine *machine, int data)
9090{
9191   cbm_ieee_nrfd_w(0, data & 0x80);
9292   cbm_ieee_ndac_w(0, data & 0x40);
r3879r3880
109109   port c6 ?
110110  port c5 .. c0 keyboard line select
111111  port a7..a0 b7..b0 keyboard input */
112static void cbmb_keyboard_line_select_a(int line)
112static void cbmb_keyboard_line_select_a(running_machine *machine, int line)
113113{
114114   cbmb_keyline_a=line;
115115}
116116
117static void cbmb_keyboard_line_select_b(int line)
117static void cbmb_keyboard_line_select_b(running_machine *machine, int line)
118118{
119119   cbmb_keyline_b=line;
120120}
121121
122static void cbmb_keyboard_line_select_c(int line)
122static void cbmb_keyboard_line_select_c(running_machine *machine, int line)
123123{
124124   cbmb_keyline_c=line;
125125}
126126
127static int cbmb_keyboard_line_a(void)
127static int cbmb_keyboard_line_a(running_machine *machine)
128128{
129129   int data = 0;
130130   
131131   if (!(cbmb_keyline_c & 0x01))
132      data |= input_port_read(Machine, "ROW0");
132      data |= input_port_read(machine, "ROW0");
133133
134134   if (!(cbmb_keyline_c & 0x02))
135      data |= input_port_read(Machine, "ROW2");
135      data |= input_port_read(machine, "ROW2");
136136
137137   if (!(cbmb_keyline_c & 0x04))
138      data |= input_port_read(Machine, "ROW4");
138      data |= input_port_read(machine, "ROW4");
139139
140140   if (!(cbmb_keyline_c & 0x08))
141      data |= input_port_read(Machine, "ROW6");
141      data |= input_port_read(machine, "ROW6");
142142
143143   if (!(cbmb_keyline_c & 0x10))
144      data |= input_port_read(Machine, "ROW8");
144      data |= input_port_read(machine, "ROW8");
145145
146146   if (!(cbmb_keyline_c & 0x20))
147      data |= input_port_read(Machine, "ROW10");
147      data |= input_port_read(machine, "ROW10");
148148
149149   return data ^0xff;
150150}
151151
152static int cbmb_keyboard_line_b(void)
152static int cbmb_keyboard_line_b(running_machine *machine)
153153{
154154   int data = 0;
155155   
156156   if (!(cbmb_keyline_c & 0x01))
157      data |= input_port_read(Machine, "ROW1");
157      data |= input_port_read(machine, "ROW1");
158158
159159   if (!(cbmb_keyline_c & 0x02))
160      data |= input_port_read(Machine, "ROW3");
160      data |= input_port_read(machine, "ROW3");
161161
162162   if (!(cbmb_keyline_c & 0x04))
163      data |= input_port_read(Machine, "ROW5");
163      data |= input_port_read(machine, "ROW5");
164164
165165   if (!(cbmb_keyline_c & 0x08))
166      data |= input_port_read(Machine, "ROW7");
166      data |= input_port_read(machine, "ROW7");
167167
168168   if (!(cbmb_keyline_c & 0x10))
169      data |= input_port_read(Machine, "ROW9") | ((input_port_read(Machine, "SPECIAL") & 0x04) ? 1 : 0 );
169      data |= input_port_read(machine, "ROW9") | ((input_port_read(machine, "SPECIAL") & 0x04) ? 1 : 0 );
170170
171171   if (!(cbmb_keyline_c & 0x20))
172      data |= input_port_read(Machine, "ROW11");
172      data |= input_port_read(machine, "ROW11");
173173
174174   return data ^0xff;
175175}
176176
177static int cbmb_keyboard_line_c(void)
177static int cbmb_keyboard_line_c(running_machine *machine)
178178{
179179   int data = 0;
180180
181   if ((input_port_read(Machine, "ROW0") & ~cbmb_keyline_a) ||
182            (input_port_read(Machine, "ROW1") & ~cbmb_keyline_b))
181   if ((input_port_read(machine, "ROW0") & ~cbmb_keyline_a) ||
182            (input_port_read(machine, "ROW1") & ~cbmb_keyline_b))
183183       data |= 0x01;
184184
185   if ((input_port_read(Machine, "ROW2") & ~cbmb_keyline_a) ||
186            (input_port_read(Machine, "ROW3") & ~cbmb_keyline_b))
185   if ((input_port_read(machine, "ROW2") & ~cbmb_keyline_a) ||
186            (input_port_read(machine, "ROW3") & ~cbmb_keyline_b))
187187       data |= 0x02;
188188
189   if ((input_port_read(Machine, "ROW4") & ~cbmb_keyline_a) ||
190            (input_port_read(Machine, "ROW5") & ~cbmb_keyline_b))
189   if ((input_port_read(machine, "ROW4") & ~cbmb_keyline_a) ||
190            (input_port_read(machine, "ROW5") & ~cbmb_keyline_b))
191191       data |= 0x04;
192192
193   if ((input_port_read(Machine, "ROW6") & ~cbmb_keyline_a) ||
194            (input_port_read(Machine, "ROW7") & ~cbmb_keyline_b))
193   if ((input_port_read(machine, "ROW6") & ~cbmb_keyline_a) ||
194            (input_port_read(machine, "ROW7") & ~cbmb_keyline_b))
195195       data |= 0x08;
196196
197   if ((input_port_read(Machine, "ROW8") & ~cbmb_keyline_a) ||
198            ((input_port_read(Machine, "ROW9") | ((input_port_read(Machine, "SPECIAL") & 0x04) ? 1 : 0)) & ~cbmb_keyline_b))
197   if ((input_port_read(machine, "ROW8") & ~cbmb_keyline_a) ||
198            ((input_port_read(machine, "ROW9") | ((input_port_read(machine, "SPECIAL") & 0x04) ? 1 : 0)) & ~cbmb_keyline_b))
199199       data |= 0x10;
200200
201   if ((input_port_read(Machine, "ROW10") & ~cbmb_keyline_a) ||
202            (input_port_read(Machine, "ROW11") & ~cbmb_keyline_b))
201   if ((input_port_read(machine, "ROW10") & ~cbmb_keyline_a) ||
202            (input_port_read(machine, "ROW11") & ~cbmb_keyline_b))
203203       data |= 0x20;
204204
205205   if (!p500)
r3879r3880
213213   return data ^0xff;
214214}
215215
216static void cbmb_irq (running_machine *machine, int level)
216static void cbmb_irq(running_machine *machine, int level)
217217{
218218   static int old_level = 0;
219219
r3879r3880
265265   cbmb_colorram[offset] = data | 0xf0;
266266}
267267
268static int cbmb_dma_read(int offset)
268static int cbmb_dma_read(running_machine *machine, int offset)
269269{
270270   if (offset >= 0x1000)
271271      return cbmb_videoram[offset & 0x3ff];
r3879r3880
273273      return cbmb_chargen[offset & 0xfff];
274274}
275275
276static int cbmb_dma_read_color(int offset)
276static int cbmb_dma_read_color(running_machine *machine, int offset)
277277{
278278   return cbmb_colorram[offset & 0x3ff];
279279}
src/mess/machine/c128.c
r3879r3880
1414#include "cpu/m6502/m6502.h"
1515#include "sound/sid6581.h"
1616#include "machine/6526cia.h"
17#include "deprecat.h"
1817
1918#include "includes/cbmserb.h"
2019#include "includes/vc1541.h"
r3879r3880
2625
2726#include "devices/cassette.h"
2827
29#include "deprecat.h"
3028
31
3229#define VERBOSE_LEVEL 0
3330#define DBG_LOG(N,M,A) \
3431   do { \
r3879r3880
184181   return 0xff;
185182}
186183
187void c128_bankswitch_64 (running_machine *machine, int reset)
184void c128_bankswitch_64(running_machine *machine, int reset)
188185{
189186   static int old, exrom, game;
190187   int data, loram, hiram, charen;
r3879r3880
306303
307304/* typical z80 configuration
308305   0x3f 0x3f 0x7f 0x3e 0x7e 0xb0 0x0b 0x00 0x00 0x01 0x00 */
309static void c128_bankswitch_z80 (running_machine *machine)
306static void c128_bankswitch_z80(running_machine *machine)
310307{
311308    c128_ram = c64_memory + MMU_RAM_ADDR;
312309    c128_va1617 = MMU_VIC_ADDR;
r3879r3880
781778 * a15 and a14 portlines
782779 * 0x1000-0x1fff, 0x9000-0x9fff char rom
783780 */
784static int c128_dma_read(int offset)
781static int c128_dma_read(running_machine *machine, int offset)
785782{
786   UINT8 c64_port6510 = (UINT8) cpu_get_info_int(Machine->cpu[0], CPUINFO_INT_M6510_PORT);
783   UINT8 c64_port6510 = (UINT8) cpu_get_info_int(machine->cpu[0], CPUINFO_INT_M6510_PORT);
787784
788785   /* main memory configuration to include */
789786   if (c64mode)
r3879r3880
804801   return c128_vicaddr[offset];
805802}
806803
807static int c128_dma_read_color (int offset)
804static int c128_dma_read_color(running_machine *machine, int offset)
808805{
809   UINT8 c64_port6510 = (UINT8) cpu_get_info_int(Machine->cpu[0], CPUINFO_INT_M6510_PORT);
806   UINT8 c64_port6510 = (UINT8) cpu_get_info_int(machine->cpu[0], CPUINFO_INT_M6510_PORT);
810807
811808   if (c64mode)
812809      return c64_colorram[offset & 0x3ff] & 0xf;
r3879r3880
822819
823820static emu_timer *datasette_timer;
824821
825static void c128_m6510_port_write(UINT8 direction, UINT8 data)
822static void c128_m6510_port_write(const device_config *device, UINT8 direction, UINT8 data)
826823{
827   running_machine *machine = Machine;
828
829824   /* if line is marked as input then keep current value */
830825   data = (c64_port_data & ~direction) | (data & direction);
831826
r3879r3880
845840   {
846841      if (direction & 0x08)
847842      {
848         cassette_output(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ), (data & 0x08) ? -(0x5a9e >> 1) : +(0x5a9e >> 1));
843         cassette_output(device_list_find_by_tag(device->machine->config->devicelist, CASSETTE, "cassette" ), (data & 0x08) ? -(0x5a9e >> 1) : +(0x5a9e >> 1));
849844      }
850845
851846      if (direction & 0x20)
852847      {
853848         if(!(data & 0x20))
854849         {
855            cassette_change_state(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ),CASSETTE_MOTOR_ENABLED,CASSETTE_MASK_MOTOR);
850            cassette_change_state(device_list_find_by_tag(device->machine->config->devicelist, CASSETTE, "cassette" ),CASSETTE_MOTOR_ENABLED,CASSETTE_MASK_MOTOR);
856851            timer_adjust_periodic(datasette_timer, attotime_zero, 0, ATTOTIME_IN_HZ(44100));
857852         }
858853         else
859854         {
860            cassette_change_state(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ),CASSETTE_MOTOR_DISABLED ,CASSETTE_MASK_MOTOR);
855            cassette_change_state(device_list_find_by_tag(device->machine->config->devicelist, CASSETTE, "cassette" ),CASSETTE_MOTOR_DISABLED ,CASSETTE_MASK_MOTOR);
861856            timer_reset(datasette_timer, attotime_never);
862857         }
863858      }
864859   }
865860
866   c128_bankswitch_64(machine, 0);
861   c128_bankswitch_64(device->machine, 0);
867862
868   c64_memory[0x000] = memory_read_byte( cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0 );
869   c64_memory[0x001] = memory_read_byte( cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 1 );
863   c64_memory[0x000] = memory_read_byte( cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM), 0 );
864   c64_memory[0x001] = memory_read_byte( cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM), 1 );
870865}
871866
872static UINT8 c128_m6510_port_read(UINT8 direction)
867static UINT8 c128_m6510_port_read(const device_config *device, UINT8 direction)
873868{
874   running_machine *machine = Machine;
875869   UINT8 data = c64_port_data;
876870
877   if ((cassette_get_state(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" )) & CASSETTE_MASK_UISTATE) != CASSETTE_STOPPED)
871   if ((cassette_get_state(device_list_find_by_tag(device->machine->config->devicelist, CASSETTE, "cassette" )) & CASSETTE_MASK_UISTATE) != CASSETTE_STOPPED)
878872      data &= ~0x10;
879873   else
880874      data |=  0x10;
881875
882   if (input_port_read(machine, "SPECIAL") & 0x20)      /* Check Caps Lock */
876   if (input_port_read(device->machine, "SPECIAL") & 0x20)      /* Check Caps Lock */
883877   {
884878      data &= ~0x40;
885879   } else {
src/mess/machine/tpi6525.c
r3879r3880
7171  highest interrupt can be found in air register
7272  read clears highest interrupt
7373*/
74#include <ctype.h>
75#include "driver.h"
7674
75#include "driver.h"
7776#include "tpi6525.h"
7877
7978
r3879r3880
201200   }
202201}
203202
204static int tpi6525_port_a_r(TPI6525 *This, int offset)
203static int tpi6525_port_a_r(running_machine *machine, TPI6525 *This, int offset)
205204{
206205   int data=This->a.in;
207206
208   if (This->a.read) data=This->a.read();
207   if (This->a.read) data=This->a.read(machine);
209208   data=(data&~This->a.ddr)|(This->a.ddr&This->a.port);
210209
211210   return data;
212211}
213212
214static void tpi6525_port_a_w(TPI6525 *This, int offset, int data)
213static void tpi6525_port_a_w(running_machine *machine, TPI6525 *This, int offset, int data)
215214{
216215   This->a.in=data;
217216}
218217
219static int tpi6525_port_b_r(TPI6525 *This, int offset)
218static int tpi6525_port_b_r(running_machine *machine, TPI6525 *This, int offset)
220219{
221220   int data=This->b.in;
222221
223   if (This->b.read) data=This->b.read();
222   if (This->b.read) data=This->b.read(machine);
224223   data=(data&~This->b.ddr)|(This->b.ddr&This->b.port);
225224
226225   return data;
227226}
228227
229static void tpi6525_port_b_w(TPI6525 *This, int offset, int data)
228static void tpi6525_port_b_w(running_machine *machine, TPI6525 *This, int offset, int data)
230229{
231230   This->b.in=data;
232231}
233232
234static int tpi6525_port_c_r(TPI6525 *This, int offset)
233static int tpi6525_port_c_r(running_machine *machine, TPI6525 *This, int offset)
235234{
236235   int data=This->c.in;
237236
238   if (This->c.read) data&=This->c.read();
237   if (This->c.read) data&=This->c.read(machine);
239238   data=(data&~This->c.ddr)|(This->c.ddr&This->c.port);
240239
241240   return data;
242241}
243242
244static void tpi6525_port_c_w(TPI6525 *This, int offset, int data)
243static void tpi6525_port_c_w(running_machine *machine, TPI6525 *This, int offset, int data)
245244{
246245   This->c.in=data;
247246}
r3879r3880
252251   switch (offset&7) {
253252   case 0:
254253      data=This->a.in;
255      if (This->a.read) data&=This->a.read();
254      if (This->a.read) data&=This->a.read(machine);
256255      data=(data&~This->a.ddr)|(This->a.ddr&This->a.port);
257256      break;
258257   case 1:
259258      data=This->b.in;
260      if (This->b.read) data&=This->b.read();
259      if (This->b.read) data&=This->b.read(machine);
261260      data=(data&~This->b.ddr)|(This->b.ddr&This->b.port);
262261      break;
263262   case 2:
r3879r3880
273272         if (This->cb.level) data|=0x80;
274273      } else {
275274         data=This->c.in;
276         if (This->c.read) data&=This->c.read();
275         if (This->c.read) data&=This->c.read(machine);
277276         data=(data&~This->c.ddr)|(This->c.ddr&This->c.port);
278277      }
279278      DBG_LOG (2, "tpi6525",
r3879r3880
330329   case 0:
331330      This->a.port=data;
332331      if (This->a.output) {
333         This->a.output(This->a.port&This->a.ddr);
332         This->a.output(machine, This->a.port&This->a.ddr);
334333      }
335334      break;
336335   case 1:
337336      This->b.port=data;
338337      if (This->b.output) {
339         This->b.output(This->b.port&This->b.ddr);
338         This->b.output(machine, This->b.port&This->b.ddr);
340339      }
341340      break;
342341   case 2:
343342      This->c.port=data;
344343      if (!INTERRUPT_MODE&&This->c.output) {
345         This->c.output(This->c.port&This->c.ddr);
344         This->c.output(machine, This->c.port&This->c.ddr);
346345      }
347346      break;
348347   case 3:
349348      This->a.ddr=data;
350349      if (This->a.output) {
351         This->a.output(This->a.port&This->a.ddr);
350         This->a.output(machine, This->a.port&This->a.ddr);
352351      }
353352      break;
354353   case 4:
355354      This->b.ddr=data;
356355      if (This->b.output) {
357         This->b.output(This->b.port&This->b.ddr);
356         This->b.output(machine, This->b.port&This->b.ddr);
358357      }
359358      break;
360359   case 5:
361360      This->c.ddr=data;
362361      if (!INTERRUPT_MODE&&This->c.output) {
363         This->c.output(This->c.port&This->c.ddr);
362         This->c.output(machine, This->c.port&This->c.ddr);
364363      }
365364      break;
366365   case 6:
r3879r3880
457456   tpi6525_irq4_level(machine, tpi6525+1, level);
458457}
459458
460 READ8_HANDLER ( tpi6525_0_port_r )
459READ8_HANDLER ( tpi6525_0_port_r )
461460{
462461   return tpi6525_port_r(space->machine, tpi6525, offset);
463462}
464463
465 READ8_HANDLER ( tpi6525_1_port_r )
464READ8_HANDLER ( tpi6525_1_port_r )
466465{
467466   return tpi6525_port_r(space->machine, tpi6525+1, offset);
468467}
469468
470 READ8_HANDLER ( tpi6525_2_port_r )
469READ8_HANDLER ( tpi6525_2_port_r )
471470{
472471   return tpi6525_port_r(space->machine, tpi6525+2, offset);
473472}
474473
475 READ8_HANDLER ( tpi6525_3_port_r )
474READ8_HANDLER ( tpi6525_3_port_r )
476475{
477476   return tpi6525_port_r(space->machine, tpi6525+3, offset);
478477}
r3879r3880
497496   tpi6525_port_w(space->machine, tpi6525+3, offset, data);
498497}
499498
500 READ8_HANDLER ( tpi6525_0_port_a_r )
499READ8_HANDLER ( tpi6525_0_port_a_r )
501500{
502   return tpi6525_port_a_r(tpi6525, offset);
501   return tpi6525_port_a_r(space->machine, tpi6525, offset);
503502}
504503
505 READ8_HANDLER ( tpi6525_1_port_a_r )
504READ8_HANDLER ( tpi6525_1_port_a_r )
506505{
507   return tpi6525_port_a_r(tpi6525+1, offset);
506   return tpi6525_port_a_r(space->machine, tpi6525+1, offset);
508507}
509508
510 READ8_HANDLER ( tpi6525_2_port_a_r )
509READ8_HANDLER ( tpi6525_2_port_a_r )
511510{
512   return tpi6525_port_a_r(tpi6525+2, offset);
511   return tpi6525_port_a_r(space->machine, tpi6525+2, offset);
513512}
514513
515 READ8_HANDLER ( tpi6525_3_port_a_r )
514READ8_HANDLER ( tpi6525_3_port_a_r )
516515{
517   return tpi6525_port_a_r(tpi6525+3, offset);
516   return tpi6525_port_a_r(space->machine, tpi6525+3, offset);
518517}
519518
520519WRITE8_HANDLER ( tpi6525_0_port_a_w )
521520{
522   tpi6525_port_a_w(tpi6525, offset, data);
521   tpi6525_port_a_w(space->machine, tpi6525, offset, data);
523522}
524523
525524WRITE8_HANDLER ( tpi6525_1_port_a_w )
526525{
527   tpi6525_port_a_w(tpi6525+1, offset, data);
526   tpi6525_port_a_w(space->machine, tpi6525+1, offset, data);
528527}
529528
530529WRITE8_HANDLER ( tpi6525_2_port_a_w )
531530{
532   tpi6525_port_a_w(tpi6525+2, offset, data);
531   tpi6525_port_a_w(space->machine, tpi6525+2, offset, data);
533532}
534533
535534WRITE8_HANDLER ( tpi6525_3_port_a_w )
536535{
537   tpi6525_port_a_w(tpi6525+3, offset, data);
536   tpi6525_port_a_w(space->machine, tpi6525+3, offset, data);
538537}
539538
540 READ8_HANDLER ( tpi6525_0_port_b_r )
539READ8_HANDLER ( tpi6525_0_port_b_r )
541540{
542   return tpi6525_port_b_r(tpi6525, offset);
541   return tpi6525_port_b_r(space->machine, tpi6525, offset);
543542}
544543
545 READ8_HANDLER ( tpi6525_1_port_b_r )
544READ8_HANDLER ( tpi6525_1_port_b_r )
546545{
547   return tpi6525_port_b_r(tpi6525+1, offset);
546   return tpi6525_port_b_r(space->machine, tpi6525+1, offset);
548547}
549548
550 READ8_HANDLER ( tpi6525_2_port_b_r )
549READ8_HANDLER ( tpi6525_2_port_b_r )
551550{
552   return tpi6525_port_b_r(tpi6525+2, offset);
551   return tpi6525_port_b_r(space->machine, tpi6525+2, offset);
553552}
554553
555 READ8_HANDLER ( tpi6525_3_port_b_r )
554READ8_HANDLER ( tpi6525_3_port_b_r )
556555{
557   return tpi6525_port_b_r(tpi6525+3, offset);
556   return tpi6525_port_b_r(space->machine, tpi6525+3, offset);
558557}
559558
560559WRITE8_HANDLER ( tpi6525_0_port_b_w )
561560{
562   tpi6525_port_b_w(tpi6525, offset, data);
561   tpi6525_port_b_w(space->machine, tpi6525, offset, data);
563562}
564563
565564WRITE8_HANDLER ( tpi6525_1_port_b_w )
566565{
567   tpi6525_port_b_w(tpi6525+1, offset, data);
566   tpi6525_port_b_w(space->machine, tpi6525+1, offset, data);
568567}
569568
570569WRITE8_HANDLER ( tpi6525_2_port_b_w )
571570{
572   tpi6525_port_b_w(tpi6525+2, offset, data);
571   tpi6525_port_b_w(space->machine, tpi6525+2, offset, data);
573572}
574573
575574WRITE8_HANDLER ( tpi6525_3_port_b_w )
576575{
577   tpi6525_port_b_w(tpi6525+3, offset, data);
576   tpi6525_port_b_w(space->machine, tpi6525+3, offset, data);
578577}
579578
580 READ8_HANDLER ( tpi6525_0_port_c_r )
579READ8_HANDLER ( tpi6525_0_port_c_r )
581580{
582   return tpi6525_port_c_r(tpi6525, offset);
581   return tpi6525_port_c_r(space->machine, tpi6525, offset);
583582}
584583
585 READ8_HANDLER ( tpi6525_1_port_c_r )
584READ8_HANDLER ( tpi6525_1_port_c_r )
586585{
587   return tpi6525_port_c_r(tpi6525+1, offset);
586   return tpi6525_port_c_r(space->machine, tpi6525+1, offset);
588587}
589588
590 READ8_HANDLER ( tpi6525_2_port_c_r )
589READ8_HANDLER ( tpi6525_2_port_c_r )
591590{
592   return tpi6525_port_c_r(tpi6525+2, offset);
591   return tpi6525_port_c_r(space->machine, tpi6525+2, offset);
593592}
594593
595 READ8_HANDLER ( tpi6525_3_port_c_r )
594READ8_HANDLER ( tpi6525_3_port_c_r )
596595{
597   return tpi6525_port_c_r(tpi6525+3, offset);
596   return tpi6525_port_c_r(space->machine, tpi6525+3, offset);
598597}
599598
600599WRITE8_HANDLER ( tpi6525_0_port_c_w )
601600{
602   tpi6525_port_c_w(tpi6525, offset, data);
601   tpi6525_port_c_w(space->machine, tpi6525, offset, data);
603602}
604603
605604WRITE8_HANDLER ( tpi6525_1_port_c_w )
606605{
607   tpi6525_port_c_w(tpi6525+1, offset, data);
606   tpi6525_port_c_w(space->machine, tpi6525+1, offset, data);
608607}
609608
610609WRITE8_HANDLER ( tpi6525_2_port_c_w )
611610{
612   tpi6525_port_c_w(tpi6525+2, offset, data);
611   tpi6525_port_c_w(space->machine, tpi6525+2, offset, data);
613612}
614613
615614WRITE8_HANDLER ( tpi6525_3_port_c_w )
616615{
617   tpi6525_port_c_w(tpi6525+3, offset, data);
616   tpi6525_port_c_w(space->machine, tpi6525+3, offset, data);
618617}
619
src/mess/machine/tpi6525.h
r3879r3880
3434typedef struct {
3535   int number;
3636   struct {
37      int (*read)(void);
38      void (*output)(int data);
37      int (*read)(running_machine *machine);
38      void (*output)(running_machine *machine, int data);
3939      int port, ddr, in;
4040   } a,b,c;
4141
src/mess/machine/c64.c
r3879r3880
784784
785785static emu_timer *datasette_timer;
786786
787void c64_m6510_port_write(UINT8 direction, UINT8 data)
787void c64_m6510_port_write(const device_config *device, UINT8 direction, UINT8 data)
788788{
789   running_machine *machine = Machine;
790
791789   /* if line is marked as input then keep current value */
792790   data = (c64_port_data & ~direction) | (data & direction);
793791
r3879r3880
807805   {
808806      if (direction & 0x08)
809807      {
810         cassette_output(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ), (data & 0x08) ? -(0x5a9e >> 1) : +(0x5a9e >> 1));
808         cassette_output(device_list_find_by_tag(device->machine->config->devicelist, CASSETTE, "cassette" ), (data & 0x08) ? -(0x5a9e >> 1) : +(0x5a9e >> 1));
811809      }
812810
813811      if (direction & 0x20)
814812      {
815813         if(!(data & 0x20))
816814         {
817            cassette_change_state(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ), CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR);
815            cassette_change_state(device_list_find_by_tag(device->machine->config->devicelist, CASSETTE, "cassette" ), CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR);
818816            timer_adjust_periodic(datasette_timer, attotime_zero, 0, ATTOTIME_IN_HZ(44100));
819817         }
820818         else
821819         {
822            cassette_change_state(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ), CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR);
820            cassette_change_state(device_list_find_by_tag(device->machine->config->devicelist, CASSETTE, "cassette" ), CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR);
823821            timer_reset(datasette_timer, attotime_never);
824822         }
825823      }
826824   }
827825
828   if (is_c65(machine))
826   if (is_c65(device->machine))
829827   {
830828      // NPW 8-Feb-2004 - Don't know why I have to do this
831829      //c65_bankswitch(machine);
832830   }
833831
834832   else if (!ultimax)
835      c64_bankswitch(machine, 0);
833      c64_bankswitch(device->machine, 0);
836834
837   c64_memory[0x000] = memory_read_byte( cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0 );
838   c64_memory[0x001] = memory_read_byte( cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 1 );
835   c64_memory[0x000] = memory_read_byte( cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM), 0 );
836   c64_memory[0x001] = memory_read_byte( cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM), 1 );
839837}
840838
841UINT8 c64_m6510_port_read(UINT8 direction)
839UINT8 c64_m6510_port_read(const device_config *device, UINT8 direction)
842840{
843   running_machine *machine = Machine;
844841   UINT8 data = c64_port_data;
845842
846843   if (c64_tape_on)
847844   {
848      if ((cassette_get_state(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" )) & CASSETTE_MASK_UISTATE) != CASSETTE_STOPPED)
845      if ((cassette_get_state(device_list_find_by_tag(device->machine->config->devicelist, CASSETTE, "cassette" )) & CASSETTE_MASK_UISTATE) != CASSETTE_STOPPED)
849846         data &= ~0x10;
850847      else
851848         data |=  0x10;
852849   }
853850
854   if (is_c65(machine))
851   if (is_c65(device->machine))
855852   {
856      if (input_port_read(machine, "SPECIAL") & 0x20)      /* Check Caps Lock */
853      if (input_port_read(device->machine, "SPECIAL") & 0x20)      /* Check Caps Lock */
857854         data &= ~0x40;
858855
859856      else
r3879r3880
980977 * a15 and a14 portlines
981978 * 0x1000-0x1fff, 0x9000-0x9fff char rom
982979 */
983static int c64_dma_read( int offset )
980static int c64_dma_read(running_machine *machine, int offset)
984981{
985982   if (!c64_game && c64_exrom)
986983   {
r3879r3880
996993   return c64_vicaddr[offset];
997994}
998995
999static int c64_dma_read_ultimax( int offset )
996static int c64_dma_read_ultimax(running_machine *machine, int offset )
1000997{
1001998   if (offset < 0x3000)
1002999      return c64_memory[offset];
r3879r3880
10041001   return c64_romh[offset & 0x1fff];
10051002}
10061003
1007static int c64_dma_read_color( int offset )
1004static int c64_dma_read_color(running_machine *machine, int offset)
10081005{
10091006   return c64_colorram[offset & 0x3ff] & 0xf;
10101007}

Previous 15994 Revisions Next


© 1998-2018 The MESS Team