public machine_driver_srdmissn()
        {
            cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80, 18432000 / 4, driver_kyugo.srdmissn_readmem, driver_kyugo.srdmissn_writemem, driver_kyugo.srdmissn_readport, driver_kyugo.srdmissn_writeport, Mame.nmi_interrupt, 1));
            cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80, 18432000 / 4, driver_kyugo.srdmissn_sub_readmem, driver_kyugo.srdmissn_sub_writemem, driver_kyugo.srdmissn_sub_readport, driver_kyugo.srdmissn_sub_writeport, Mame.interrupt, 4));

            frames_per_second = 60;
            vblank_duration = Mame.DEFAULT_REAL_60HZ_VBLANK_DURATION;
            cpu_slices_per_frame = 100;
            screen_width = 64 * 8;
            screen_height = 32 * 8;
            visible_area = new Mame.rectangle(0 * 8, 36 * 8 - 1, 2 * 8, 30 * 8 - 1);
            gfxdecodeinfo = driver_kyugo.gfxdecodeinfo;
            total_colors = 256;
            color_table_len = 256;
            video_attributes = Mame.VIDEO_TYPE_RASTER;
            sound_attributes = 0;
            sound.Add(new Mame.MachineSound(Mame.SOUND_AY8910, driver_kyugo.ay8910_interface));
        }
Beispiel #2
0
 public machine_driver_gottlieb()
 {
     cpu.Add(new Mame.MachineCPU(Mame.CPU_I86, 5000000, gottlieb_readmem, gottlieb_writemem, null, null, gottlieb_interrupt, 1));
     cpu.Add(new Mame.MachineCPU(Mame.CPU_M6502 | Mame.CPU_AUDIO_CPU, 3579545 / 4, gottlieb_sound_readmem, gottlieb_sound_writemem, null, null, Mame.ignore_interrupt, 1));
     frames_per_second = 61;
     vblank_duration = 1018;
     cpu_slices_per_frame = 1;
     screen_width = 32 * 8;
     screen_height = 32 * 8;
     visible_area = new Mame.rectangle(0 * 8, 32 * 8 - 1, 0 * 8, 30 * 8 - 1);
     gfxdecodeinfo = charROM_gfxdecodeinfo;
     total_colors = 16;
     color_table_len = 16;
     video_attributes = Mame.VIDEO_TYPE_RASTER | Mame.VIDEO_SUPPORTS_DIRTY | Mame.VIDEO_MODIFIES_PALETTE;
     //, 0, gottlieb_vh_start, gottlieb_vh_stop, gottlieb_vh_screenrefresh,
     //0,0,0,0, { { SOUND_DAC, &dac1_interface }, { SOUND_SAMPLES, &samples_interface } }, nvram_handler };        }
     sound_attributes = 0;
     sound.Add(new Mame.MachineSound(Mame.SOUND_DAC, dac1_interface));
     sound.Add(new Mame.MachineSound(Mame.SOUND_SAMPLES, samples_interface));
 }
 public machine_driver_jackal()
 {
     cpu.Add(new Mame.MachineCPU(Mame.CPU_M6809, 2000000, jackal_readmem, jackal_writemem, null, null, jackal_interrupt, 1));
     cpu.Add(new Mame.MachineCPU(Mame.CPU_M6809, 2000000, jackal_sound_readmem, jackal_sound_writemem, null, null, Mame.ignore_interrupt, 1));
     frames_per_second = 60;
     vblank_duration = Mame.DEFAULT_60HZ_VBLANK_DURATION;
     cpu_slices_per_frame = 10;
     screen_width = 32 * 8;
     screen_height = 32 * 8;
     gfxdecodeinfo = jackal_gfxdecodeinfo;
     visible_area = new Mame.rectangle(1 * 8, 31 * 8 - 1, 2 * 8, 30 * 8 - 1);
     total_colors = 512;
     color_table_len = 512 + 16 * 16 + 16 * 16;
     video_attributes = Mame.VIDEO_TYPE_RASTER | Mame.VIDEO_MODIFIES_PALETTE;
     sound_attributes = Mame.SOUND_SUPPORTS_STEREO;
     sound.Add(new Mame.MachineSound(Mame.SOUND_YM2151, ym2151_interface));
 }
 public machine_driver_ddragon2()
 {
     cpu.Add(new Mame.MachineCPU(Mame.CPU_HD6309, 3579545, driver_ddragonb.readmem, dd2_writemem, null, null, driver_ddragonb.dd_interrupt, 1));
     cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80, 12000000 / 3, dd2_sub_readmem, dd2_sub_writemem, null, null, Mame.ignore_interrupt, 0));
     cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80 | Mame.CPU_AUDIO_CPU, 3579545, dd2_sound_readmem, dd2_sound_writemem, null, null, Mame.ignore_interrupt, 0));
     frames_per_second = 60;
     vblank_duration = Mame.DEFAULT_REAL_60HZ_VBLANK_DURATION;
     cpu_slices_per_frame = 100;
     screen_width = 32 * 8;
     screen_height = 32 * 8;
     visible_area = new Mame.rectangle(1 * 8, 31 * 8 - 1, 2 * 8, 30 * 8 - 1);
     gfxdecodeinfo = dd2_gfxdecodeinfo;
     total_colors = 384;
     color_table_len = 384;
     video_attributes = Mame.VIDEO_TYPE_RASTER | Mame.VIDEO_MODIFIES_PALETTE;
     sound_attributes = Mame.SOUND_SUPPORTS_STEREO;
     sound.Add(new Mame.MachineSound(Mame.SOUND_YM2151, driver_ddragonb.ym2151_interface));
     sound.Add(new Mame.MachineSound(Mame.SOUND_OKIM6295, okim6295_interface));
 }
 public machine_driver_blockout()
 {
     cpu.Add(new Mame.MachineCPU(Mame.CPU_M68000, 8760000, readmem, writemem, null, null, blockout_interrupt, 2));
     cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80 | Mame.CPU_AUDIO_CPU, 3579545, sound_readmem, sound_writemem, null, null, Mame.ignore_interrupt, 1));
     frames_per_second = 60;
     vblank_duration = Mame.DEFAULT_60HZ_VBLANK_DURATION;
     cpu_slices_per_frame = 1;
     screen_width = 320;
     screen_height = 256;
     visible_area = new Mame.rectangle(0, 319, 8, 247);
     gfxdecodeinfo = null;
     total_colors = 513;
     color_table_len = 0;
     video_attributes = Mame.VIDEO_TYPE_RASTER | Mame.VIDEO_MODIFIES_PALETTE;
     sound_attributes = Mame.SOUND_SUPPORTS_STEREO;
     sound.Add(new Mame.MachineSound(Mame.SOUND_YM2151, ym2151_interface));
     sound.Add(new Mame.MachineSound(Mame.SOUND_OKIM6295, okim6295_interface));
 }
            public override void vh_update(Mame.osd_bitmap bitmap, int full_refresh)
            {

                Mame.palette_init_used_colors();

                for (int offs = Generic.videoram_size[0] - 1; offs >= 0; offs--)
                {
                    int code, color;

                    code = Mame.memory_region(Mame.REGION_GFX4)[0x1000 * bg_image + offs];
                    color = Mame.memory_region(Mame.REGION_GFX4)[0xc000 + 0x100 * bg_image + code];
                    for (int i = 0; i < 16; i++) Mame.palette_used_colors[i + 256 + 16 * color] = Mame.PALETTE_COLOR_USED;
                }
                for (int offs = 0; offs < 256; offs++)
                {
                    int color;

                    color = citycon_charlookup[offs];
                    Mame.palette_used_colors[512 + 4 * color] = Mame.PALETTE_COLOR_TRANSPARENT;
                    for (int i = 0; i < 3; i++) Mame.palette_used_colors[i + 512 + 4 * color + 1] = Mame.PALETTE_COLOR_USED; ;
                }
                for (int offs = Generic.spriteram_size[0] - 4; offs >= 0; offs -= 4)
                {
                    int color;

                    color = Generic.spriteram[offs + 2] & 0x0f;
                    for (int i = 0; i < 15; i++) Mame.palette_used_colors[i + 16 * color + 1] = Mame.PALETTE_COLOR_USED;
                }

                if (Mame.palette_recalc() != null)
                {
                    Generic.SetDirtyBuffer(true);
                    dirty_background = 1;
                }

                /* Create the background */
                if (dirty_background != 0)
                {
                    dirty_background = 0;

                    for (int offs = Generic.videoram_size[0] - 1; offs >= 0; offs--)
                    {
                        int sx, sy, code;


                        sy = offs / 32;
                        sx = (offs % 32) + (sy & 0x60);
                        sy = sy & 31;
                        if (flipscreen != 0)
                        {
                            sx = 127 - sx;
                            sy = 31 - sy;
                        }

                        code = Mame.memory_region(Mame.REGION_GFX4)[0x1000 * bg_image + offs];

                        Mame.drawgfx(tmpbitmap2, Mame.Machine.gfx[3 + bg_image],
                                (uint)code,
                                Mame.memory_region(Mame.REGION_GFX4)[0xc000 + 0x100 * bg_image + code],
                                flipscreen != 0, flipscreen != 0,
                                8 * sx, 8 * sy,
                                null, Mame.TRANSPARENCY_NONE, 0);
                    }
                }

                /* copy the temporary bitmap to the screen */
                {
                    int scroll;

                    if (flipscreen != 0)
                        scroll = 256 + ((citycon_scroll[0] * 256 + citycon_scroll[1]) >> 1);
                    else
                        scroll = -((citycon_scroll[0] * 256 + citycon_scroll[1]) >> 1);

                    Mame.copyscrollbitmap(bitmap, tmpbitmap2, 1, new int[] { scroll }, 0, null, Mame.Machine.drv.visible_area, Mame.TRANSPARENCY_NONE, 0);
                }


                /* for every character in the Video RAM, check if it has been modified */
                /* since last time and update it accordingly. */
                for (int offs = Generic.videoram_size[0] - 1; offs >= 0; offs--)
                {
                    int sx, sy;


                    sy = offs / 32;
                    sx = (offs % 32) + (sy & 0x60);
                    sy = sy & 0x1f;

                    if (Generic.dirtybuffer[offs] || dirtylookup[sy])
                    {
                        int i;
                        Mame.rectangle clip = new Mame.rectangle();


                        Generic.dirtybuffer[offs] = false;

                        if (flipscreen != 0)
                        {
                            sx = 127 - sx;
                            sy = 31 - sy;
                        }
                        clip.min_x = 8 * sx;
                        clip.max_x = 8 * sx + 7;

                        /* City Connection controls the color code for each _scanline_, not */
                        /* for each character as happens in most games. Therefore, we have to draw */
                        /* the character eight times, each time clipped to one line and using */
                        /* the color code for that scanline */
                        for (i = 0; i < 8; i++)
                        {
                            clip.min_y = 8 * sy + i;
                            clip.max_y = 8 * sy + i;

                            Mame.drawgfx(Generic.tmpbitmap, Mame.Machine.gfx[0],
                                    Generic.videoram[offs],
                                    citycon_charlookup[flipscreen != 0 ? (255 - 8 * sy - i) : 8 * sy + i],
                                    flipscreen!=0, flipscreen!=0,
                                    8 * sx, 8 * sy,
                                    clip, Mame.TRANSPARENCY_NONE, 0);
                        }
                    }
                }


                /* copy the temporary bitmap to the screen */
                {
                    int i;
                    int[] scroll = new int[32];

                    if (flipscreen != 0)
                    {
                        for (i = 0; i < 6; i++)
                            scroll[31 - i] = 256;
                        for (i = 6; i < 32; i++)
                            scroll[31 - i] = 256 + (citycon_scroll[0] * 256 + citycon_scroll[1]);
                    }
                    else
                    {
                        for (i = 0; i < 6; i++)
                            scroll[i] = 0;
                        for (i = 6; i < 32; i++)
                            scroll[i] = -(citycon_scroll[0] * 256 + citycon_scroll[1]);
                    }
                    Mame.copyscrollbitmap(bitmap, Generic.tmpbitmap, 32, scroll, 0, null,
                            Mame.Machine.drv.visible_area, Mame.TRANSPARENCY_PEN, Mame.palette_transparent_pen);
                }


                for (int offs = Generic.spriteram_size[0] - 4; offs >= 0; offs -= 4)
                {
                    int sx, sy;
                    bool flipx;


                    sx = Generic.spriteram[offs + 3];
                    sy = 239 - Generic.spriteram[offs];
                    flipx = (~Generic.spriteram[offs + 2] & 0x10) != 0;
                    if (flipscreen != 0)
                    {
                        sx = 240 - sx;
                        sy = 238 - sy;
                        flipx = !flipx;
                    }

                    Mame.drawgfx(bitmap, Mame.Machine.gfx[(Generic.spriteram[offs + 1] & 0x80) != 0 ? 2 : 1],
                            (uint)(Generic.spriteram[offs + 1] & 0x7f),
                            (uint)(Generic.spriteram[offs + 2] & 0x0f),
                            flipx, flipscreen != 0,
                            sx, sy,
                            Mame.Machine.drv.visible_area, Mame.TRANSPARENCY_PEN, 0);
                }


                for (int offs = 0; offs < 32; offs++)
                    dirtylookup[offs] = false;
            }
 public machine_driver_atetris()
 {
     cpu.Add(new Mame.MachineCPU(Mame.CPU_M6502, 1750000, readmem, writemem, null, null, Mame.interrupt, 4));
     frames_per_second = 60;
     vblank_duration = Mame.DEFAULT_REAL_60HZ_VBLANK_DURATION;
     cpu_slices_per_frame = 1;
     screen_width = 42 * 8;
     screen_height = 32 * 8;
     visible_area = new Mame.rectangle(0 * 8, 42 * 8 - 1, 0 * 8, 30 * 8 - 1);
     gfxdecodeinfo = driver_atetris.gfxdecodeinfo;
     total_colors = 256;
     color_table_len = 256;
     video_attributes = Mame.VIDEO_TYPE_RASTER | Mame.VIDEO_MODIFIES_PALETTE;
     sound_attributes = 0;
     sound.Add(new Mame.MachineSound(Mame.SOUND_POKEY, pokey_interface));
 }
     public machine_driver_llander()
 {
     cpu.Add(new Mame.MachineCPU(Mame.CPU_M6502, 1500000, llander_readmem, llander_writemem, null, null, llander_interrupt, 6));
     frames_per_second = 40;
     vblank_duration = 0;
     cpu_slices_per_frame = 1;
     screen_width = 400;
     screen_height = 300;
         visible_area = new Mame.rectangle(0,1050,0,900);
         total_colors=256;
         color_table_len=256;
         video_attributes = Mame.VIDEO_TYPE_VECTOR;
         sound_attributes = 0;
         //sound.Add(new Mame.MachineSound(Mame.SOUND_CUSTOM,llander_custom_interface));
 }
            public machine_driver_gberet()
            {
                cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80, 18432000 / 6, readmem, writemem, null, null, gberet_interrupt, 32));
                frames_per_second = 30;
                vblank_duration = Mame.DEFAULT_30HZ_VBLANK_DURATION;
                cpu_slices_per_frame = 1;

                screen_width = 32 * 8;
                screen_height = 32 * 8;
                visible_area = new Mame.rectangle(1 * 8, 31 * 8 - 1, 2 * 8, 30 * 8 - 1);
                gfxdecodeinfo = driver_gberet.gfxdecodeinfo;
                total_colors = 32;
                color_table_len = 2 * 16 * 16;
                video_attributes = Mame.VIDEO_TYPE_RASTER;
                sound_attributes = 0;
                sound.Add(new Mame.MachineSound(Mame.SOUND_SN76496, sn76496_interface));
            }
            public override void vh_update(Mame.osd_bitmap bitmap, int full_refresh)
            {
                int offs, _base;

                if (Mame.palette_recalc() != null) Generic.SetDirtyBuffer(true);

                _base = 0x200 * (background_image & 0x07);

                /* for every character in the Video RAM, check if it has been modified */
                /* since last time and update it accordingly. */
                for (offs = Generic.videoram_size[0] - 1; offs >= 0; offs--)
                {
                    int tilecode = 0, tileattribute = 0xff;

                    int sx = offs % 32;
                    int sy = offs / 32;

                    if ((background_image & 0x10) != 0)
                    {
                        int bgoffs;


                        bgoffs = _base + 16 * (sy / 2) + sx / 2;

                        tilecode = Mame.memory_region(Mame.REGION_GFX4)[bgoffs];
                        tileattribute = Mame.memory_region(Mame.REGION_GFX4)[bgoffs + 0x100];
                    }

                    if (Generic.dirtybuffer[offs])
                    {
                        if (flipscreen != 0)
                        {
                            sx = 31 - sx;
                            sy = 31 - sy;
                        }

                        /* draw the background (this can be handled better) */
                        if (tilecode != 0xff)
                        {
                            Mame.rectangle clip = new Mame.rectangle();

                            clip.min_x = 8 * sx;
                            clip.max_x = 8 * sx + 7;
                            clip.min_y = 8 * sy;
                            clip.max_y = 8 * sy + 7;

                            bool flipy = (tileattribute & 0x80) != 0;
                            if (flipscreen != 0) flipy = !flipy;

                            Mame.drawgfx(Generic.tmpbitmap, Mame.Machine.gfx[1],
                                    (uint)tilecode,
                                    (uint)(tileattribute & 0x0f),
                                    flipscreen != 0, flipy,
                                    16 * (sx / 2), 16 * (sy / 2),
                                    clip, Mame.TRANSPARENCY_NONE, 0);

                            Mame.drawgfx(Generic.tmpbitmap, Mame.Machine.gfx[0],
                                    (uint)(Generic.videoram[offs] + 16 * (Generic.colorram[offs] & 0x10)),
                                    (uint)(Generic.colorram[offs] & 0x0f),
                                    flipscreen != 0, flipscreen != 0,
                                    8 * sx, 8 * sy,
                                    Mame.Machine.drv.visible_area, Mame.TRANSPARENCY_PEN, 0);
                        }
                        else
                            Mame.drawgfx(Generic.tmpbitmap, Mame.Machine.gfx[0],
                                    (uint)(Generic.videoram[offs] + 16 * (Generic.colorram[offs] & 0x10)),
                                    (uint)(Generic.colorram[offs] & 0x0f),
                                    flipscreen != 0, flipscreen != 0,
                                    8 * sx, 8 * sy,
                                    Mame.Machine.drv.visible_area, Mame.TRANSPARENCY_NONE, 0);


                        Generic.dirtybuffer[offs] = false;
                    }
                }


                /* copy the character mapped graphics */
                Mame.copybitmap(bitmap, Generic.tmpbitmap, false, false, 0, 0, Mame.Machine.drv.visible_area, Mame.TRANSPARENCY_NONE, 0);


                /* Draw the sprites. */
                for (offs = Generic.spriteram_size[0] - 4; offs >= 0; offs -= 4)
                {

                    /*
                     abbbbbbb cdefgggg hhhhhhhh iiiiiiii

                     a        use big sprites (32x32 instead of 16x16)
                     bbbbbbb  sprite code
                     c        x flip
                     d        y flip (used only in death sequence?)
                     e        ? (set when big sprites are selected)
                     f        ? (set only when the bonus (B) materializes?)
                     gggg     color
                     hhhhhhhh x position
                     iiiiiiii y position
                    */
                    int sx, sy;
                    bool flipx, flipy;


                    sx = Generic.spriteram[offs + 3];
                    if ((Generic.spriteram[offs] & 0x80) != 0)
                        sy = 225 - Generic.spriteram[offs + 2];
                    else
                        sy = 241 - Generic.spriteram[offs + 2];
                    flipx = (Generic.spriteram[offs + 1] & 0x40) != 0;
                    flipy = (Generic.spriteram[offs + 1] & 0x80) != 0;
                    if (flipscreen != 0)
                    {
                        if ((Generic.spriteram[offs + 1] & 0x20) != 0)
                        {
                            sx = 224 - sx;
                            sy = 224 - sy;
                        }
                        else
                        {
                            sx = 240 - sx;
                            sy = 240 - sy;
                        }
                        flipx = !flipx;
                        flipy = !flipy;
                    }

                    Mame.drawgfx(bitmap, Mame.Machine.gfx[(Generic.spriteram[offs] & 0x80) != 0 ? 3 : 2],
                            (uint)(Generic.spriteram[offs] & 0x7f),
                            (uint)(Generic.spriteram[offs + 1] & 0x0f),
                            flipx, flipy,
                            sx, sy,
                            Mame.Machine.drv.visible_area, Mame.TRANSPARENCY_PEN, 0);
                }
            }
 public machine_driver_galaga()
 {
     cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80, 3125000, readmem_cpu1, writemem_cpu1, null, null, galaga_interrupt_1, 1));
     cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80, 3125000, readmem_cpu2, writemem_cpu2, null, null, galaga_interrupt_2, 1));
     cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80, 3125000, readmem_cpu3, writemem_cpu3, null, null, galaga_interrupt_3, 2));
     frames_per_second = 60;
     vblank_duration = Mame.DEFAULT_60HZ_VBLANK_DURATION;
     cpu_slices_per_frame = 99;
     screen_width = 36 * 8;
     screen_height = 28 * 8;
     visible_area = new Mame.rectangle(0 * 8, 36 * 8 - 1, 0 * 8, 28 * 8 - 1);
     gfxdecodeinfo = driver_galaga.gfxdecodeinfo;
     total_colors = 32 + 64;
     color_table_len = 64 * 4;
     video_attributes = Mame.VIDEO_TYPE_RASTER;
     sound_attributes = 0;
     sound.Add(new Mame.MachineSound(Mame.SOUND_NAMCO, namco_interface));
     sound.Add(new Mame.MachineSound(Mame.SOUND_SAMPLES, samples_interface));
 }
 public machine_driver_skykid()
 {
     cpu.Add(new Mame.MachineCPU(Mame.CPU_M6809, 49152000 / 32, skykid_readmem, skykid_writemem, null, null, skykid_interrupt, 1));
     cpu.Add(new Mame.MachineCPU(Mame.CPU_HD63701, 49152000 / 32, mcu_readmem, mcu_writemem, mcu_readport, mcu_writeport, Mame.interrupt, 1));
     frames_per_second = 60;
     vblank_duration = Mame.DEFAULT_REAL_60HZ_VBLANK_DURATION;
     cpu_slices_per_frame = 100;
     screen_width = 36 * 8;
     screen_height = 28 * 8;
     visible_area = new Mame.rectangle(0 * 8, 36 * 8 - 1, 0 * 8, 28 * 8 - 1);
     gfxdecodeinfo = driver_skykid.gfxdecodeinfo;
     total_colors = 256;
     color_table_len = 64 * 4 + 128 * 4 + 64 * 8;
     video_attributes = Mame.VIDEO_TYPE_RASTER;
     sound_attributes = 0;
     sound.Add(new Mame.MachineSound(Mame.SOUND_NAMCO, namco_interface));
 }
 public machine_driver_bombjack()
 {
     cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80, 4000000, readmem, writemem, null, null, Mame.nmi_interrupt, 1));
     cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80 | Mame.CPU_AUDIO_CPU, 3072000, bombjack_sound_readmem, bombjack_sound_writemem, null, bombjack_sound_writeport, Mame.nmi_interrupt, 1));
     frames_per_second = 60;
     vblank_duration = Mame.DEFAULT_60HZ_VBLANK_DURATION;
     cpu_slices_per_frame = 1;
     screen_width = 32 * 8;
     screen_height = 32 * 8;
     visible_area = new Mame.rectangle(0 * 8, 32 * 8 - 1, 0 * 8, 32 * 8 - 1);
     gfxdecodeinfo = driver_bombjack.gfxdecodeinfo;
     total_colors = 128;
     color_table_len = 128;
     video_attributes = Mame.VIDEO_TYPE_RASTER | Mame.VIDEO_MODIFIES_PALETTE;
     sound_attributes = 0;
     sound.Add(new Mame.MachineSound(Mame.SOUND_AY8910, ay8910_interface));
 }
            public machine_driver_bublbobl()
            {
                cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80, 6000000, bublbobl_readmem, bublbobl_writemem, null, null, Mame.ignore_interrupt, 0));
                cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80, 6000000, bublbobl_readmem2, bublbobl_writemem2, null, null, Mame.interrupt, 1));
                cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80 | Mame.CPU_AUDIO_CPU, 4000000, sound_readmem, sound_writemem, null, null, Mame.ignore_interrupt, 0));
                cpu.Add(new Mame.MachineCPU(Mame.CPU_M68705, 4000000 / 2, m68705_readmem, m68705_writemem, null, null, bublbobl_m68705_interrupt, 2));
                frames_per_second = 60;
                vblank_duration = Mame.DEFAULT_60HZ_VBLANK_DURATION;
                cpu_slices_per_frame = 100;
                screen_width = 32 * 8;
                screen_height = 32 * 8;
                visible_area = new Mame.rectangle(0, 32 * 8 - 1, 2 * 8, 30 * 8 - 1);
                gfxdecodeinfo = driver_bublbobl.gfxdecodeinfo;
                total_colors = 256;
                color_table_len = 256;
                video_attributes = Mame.VIDEO_TYPE_RASTER | Mame.VIDEO_MODIFIES_PALETTE;
                sound_attributes = 0;
                sound.Add(new Mame.MachineSound(Mame.SOUND_YM2203, ym2203_interface));
                sound.Add(new Mame.MachineSound(Mame.SOUND_YM3526, ym3526_interface));

            }
 public machine_driver_vigilant()
 {
     cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80, 3579645, vigilant_readmem, vigilant_writemem, vigilant_readport, vigilant_writeport, Mame.interrupt, 1));
     cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80 | Mame.CPU_AUDIO_CPU, 3579645, sound_readmem, sound_writemem, sound_readport, sound_writeport, Mame.nmi_interrupt, 128));
     frames_per_second = 55;
     vblank_duration = Mame.DEFAULT_REAL_60HZ_VBLANK_DURATION;
     cpu_slices_per_frame = 1;
     screen_width = 64 * 8;
     screen_height = 32 * 8;
     visible_area = new Mame.rectangle(16 * 8, (64 - 16) * 8 - 1, 0 * 8, 32 * 8 - 1);
     gfxdecodeinfo = vigilant_gfxdecodeinfo;
     total_colors = 512 + 32;
     color_table_len = 512 + 32;
     video_attributes = Mame.VIDEO_TYPE_RASTER | Mame.VIDEO_MODIFIES_PALETTE;
     sound_attributes = Mame.SOUND_SUPPORTS_STEREO;
     sound.Add(new Mame.MachineSound(Mame.SOUND_YM2151, ym2151_interface));
     sound.Add(new Mame.MachineSound(Mame.SOUND_DAC, dac_interface));
 }
 public machine_driver_gtmr()
 {
     cpu.Add(new Mame.MachineCPU(Mame.CPU_M68000, 16000000, gtmr_readmem, gtmr_writemem, null, null, gtmr_interrupt, driver_gtmr.GTMR_INTERRUPTS_NUM));
     frames_per_second = 60;
     vblank_duration = Mame.DEFAULT_60HZ_VBLANK_DURATION;
     cpu_slices_per_frame = 1;
     screen_width = 320;
     screen_height = 240;
     visible_area = new Mame.rectangle(0, 320 - 1, 0, 240 - 1);
     gfxdecodeinfo = gtmr_gfxdecodeinfo;
     total_colors = 0x10000 / 2;
     color_table_len = 0x10000 / 2;
     video_attributes = Mame.VIDEO_TYPE_RASTER | Mame.VIDEO_MODIFIES_PALETTE | Mame.VIDEO_UPDATE_AFTER_VBLANK;
     sound_attributes = 0;
     sound.Add(new Mame.MachineSound(Mame.SOUND_OKIM6295, gtmr_okim6295_interface));
 }
            public machine_driver_retofinv()
            {
                cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80, 3072000, readmem, writemem, null, null, Mame.interrupt, 1));
                cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80, 3072000, readmem_sub, writemem_sub, null, null, Mame.interrupt, 1));
                cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80, 3072000, readmem_sound, writemem_sound, null, null, Mame.nmi_interrupt, 2));

                frames_per_second = 60;
                vblank_duration = Mame.DEFAULT_REAL_60HZ_VBLANK_DURATION;
                cpu_slices_per_frame = 100;
                screen_width = 36 * 8;
                screen_height = 32 * 8;
                visible_area = new Mame.rectangle(0 * 8, 36 * 8 - 1, 2 * 8, 30 * 8 - 1);
                gfxdecodeinfo = driver_retofinv.gfxdecodeinfo;
                total_colors = 256;
                color_table_len = 256 * 2 + 64 * 16 + 64 * 16;
                video_attributes = Mame.VIDEO_TYPE_RASTER;
                sound_attributes = 0;
                sound.Add(new Mame.MachineSound(Mame.SOUND_SN76496, sn76496_interface));
            }
 public machine_driver_pang()
 {
     cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80, 8000000, driver_mitchell.readmem, driver_mitchell.writemem, driver_mitchell.readport, driver_mitchell.writeport, Mame.interrupt, 2));
     frames_per_second = 60;
     vblank_duration = Mame.DEFAULT_60HZ_VBLANK_DURATION;
     cpu_slices_per_frame = 1;
     screen_width = 64 * 8;
     screen_height = 32 * 8;
     visible_area = new Mame.rectangle(8 * 8, (64 - 8) * 8 - 1, 1 * 8, 31 * 8 - 1);
     gfxdecodeinfo = driver_pang.gfxdecodeinfo;
     total_colors = 2048;
     color_table_len = 2048;
     video_attributes = Mame.VIDEO_TYPE_RASTER | Mame.VIDEO_MODIFIES_PALETTE;
     sound_attributes = 0;
     sound.Add(new Mame.MachineSound(Mame.SOUND_OKIM6295, driver_pang.okim6295_interface));
     sound.Add(new Mame.MachineSound(Mame.SOUND_YM2413, driver_pang.ym2413_interface));
 }
 public machine_driver_frogger()
 {
     cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80, 18432000 / 6, readmem, writemem, null, null, Mame.nmi_interrupt, 1));
     cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80 | Mame.CPU_AUDIO_CPU, 14318000 / 8, sound_readmem, sound_writemem, sound_readport, sound_writeport, Mame.ignore_interrupt, 1));
     frames_per_second = 60;
     vblank_duration = 2500;
     cpu_slices_per_frame = 1;
     screen_width = 32 * 8;
     screen_height = 32 * 8;
     visible_area = new Mame.rectangle(0 * 8, 32 * 8 - 1, 2 * 8, 30 * 8 - 1);
     gfxdecodeinfo = driver_frogger.gfxdecodeinfo;
     total_colors = 32;
     color_table_len = 64;
     video_attributes = Mame.VIDEO_TYPE_RASTER;
     sound_attributes = 0;
     sound.Add(new Mame.MachineSound(Mame.SOUND_AY8910, ay8910_interface));
 }
Beispiel #20
0
 public machine_driver_silkworm()
 {
     cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80, 7600000, readmem, silkworm_writemem, null, null, Mame.interrupt, 1));
     cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80 | Mame.CPU_AUDIO_CPU, 4000000, sound_readmem, sound_writemem, null, null, Mame.interrupt, 2));
     frames_per_second = 60;
     vblank_duration = Mame.DEFAULT_60HZ_VBLANK_DURATION;
     cpu_slices_per_frame = 1;
     screen_width = 32 * 8;
     screen_height = 32 * 8;
     visible_area = new Mame.rectangle(0 * 8, 32 * 8 - 1, 2 * 8, 30 * 8 - 1);
     gfxdecodeinfo = driver_tecmo.gfxdecodeinfo;
     total_colors = 1024;
     color_table_len = 1024;
     video_attributes = Mame.VIDEO_TYPE_RASTER | Mame.VIDEO_MODIFIES_PALETTE;
     sound_attributes = 0;
     sound.Add(new Mame.MachineSound(Mame.SOUND_YM3812, ym3812_interface));
     sound.Add(new Mame.MachineSound(Mame.SOUND_ADPCM, adpcm_interface));
 }
            public override void vh_update(Mame.osd_bitmap bitmap, int full_refresh)
            {
               int i, pwidth, pheight;
	float scale;
	Mame.osd_bitmap vector_bitmap=new Mame.osd_bitmap();
	Mame.rectangle rect=new Mame.rectangle();

	if (llander_panel == null)
	{
		AvgDvg.dvg_screenrefresh(bitmap,full_refresh);
		return;
	}

	pwidth = llander_panel._artwork.width;
	pheight = llander_panel._artwork.height;

	vector_bitmap.width = bitmap.width;
	vector_bitmap.height = bitmap.height - pheight;
	vector_bitmap._private = bitmap._private;
	vector_bitmap.line = bitmap.line;

	AvgDvg.dvg_screenrefresh(vector_bitmap,full_refresh);

	if (full_refresh!=0)
	{
		rect.min_x = 0;
		rect.max_x = pwidth-1;
		rect.min_y = bitmap.height - pheight;
		rect.max_y = bitmap.height - 1;

		Mame.copybitmap(bitmap,llander_panel._artwork,false,false,0, bitmap.height - pheight, rect, Mame.TRANSPARENCY_NONE, 0);
		Mame.osd_mark_dirty (rect.min_x,rect.min_y,rect.max_x,rect.max_y,0);
	}

	scale = pwidth/800.0f;

	for (i=0;i<NUM_LIGHTS;i++)
	{
		if (lights_changed[i] || full_refresh!=0)
		{
			rect.min_x = (int)(scale * light_areas[i].min_x);
			rect.max_x = (int)(scale * light_areas[i].max_x);
			rect.min_y = (int)(bitmap.height - pheight + scale * light_areas[i].min_y);
			rect.max_y = (int)(bitmap.height - pheight + scale * light_areas[i].max_y);

			if (lights[i])
                Mame.copybitmap(bitmap, llander_lit_panel._artwork, false,false,0, bitmap.height - pheight, rect, Mame.TRANSPARENCY_NONE, 0);
			else
                Mame.copybitmap(bitmap, llander_panel._artwork, false,false,0, bitmap.height - pheight, rect, Mame.TRANSPARENCY_NONE, 0);

            Mame.osd_mark_dirty(rect.min_x, rect.min_y, rect.max_x, rect.max_y, 0);

			lights_changed[i] = false;
		}
	}
            }
Beispiel #22
0
 public machine_driver_1943()
 {
     cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80, 6000000, readmem, writemem, null, null, Mame.interrupt, 1));
     cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80 | Mame.CPU_AUDIO_CPU, 3000000, sound_readmem, sound_writemem, null, null, Mame.interrupt, 4));
     frames_per_second = 60;
     vblank_duration = Mame.DEFAULT_60HZ_VBLANK_DURATION;
     cpu_slices_per_frame = 1;
     screen_width = 32 * 8;
     screen_height = 32 * 8;
     visible_area = new Mame.rectangle(0 * 8, 32 * 8 - 1, 2 * 8, 30 * 8 - 1);
     gfxdecodeinfo = driver_1943.gfxdecodeinfo;
     total_colors = 256;
     color_table_len = 32 * 4 + 16 * 16 + 16 * 16 + 16 * 16;
     video_attributes = Mame.VIDEO_TYPE_RASTER;
     sound_attributes = 0;
     sound.Add(new Mame.MachineSound(Mame.SOUND_YM2203, ym2203_interface));
 }
 public machine_driver_raiden()
 {
     cpu.Add(new Mame.MachineCPU(Mame.CPU_V30, 20000000, readmem, writemem, null, null, raiden_interrupt, 1));
     cpu.Add(new Mame.MachineCPU(Mame.CPU_V30, 20000000, sub_readmem, sub_writemem, null, null, raiden_interrupt, 1));
     cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80 | Mame.CPU_AUDIO_CPU, 14318180 / 4, sound_readmem, sound_writemem, null, null, Mame.ignore_interrupt, 0));
     frames_per_second = 60;
     vblank_duration = Mame.DEFAULT_REAL_60HZ_VBLANK_DURATION * 2;
     cpu_slices_per_frame = 70;
     screen_width = 32 * 8;
     screen_height = 32 * 8;
     visible_area = new Mame.rectangle(0 * 8, 32 * 8 - 1, 2 * 8, 30 * 8 - 1);
     gfxdecodeinfo = raiden_gfxdecodeinfo;
     total_colors = 2048;
     color_table_len = 2048;
     video_attributes = Mame.VIDEO_TYPE_RASTER | Mame.VIDEO_MODIFIES_PALETTE | Mame.VIDEO_BUFFERS_SPRITERAM;
     sound_attributes = 0;
     sound.Add(new Mame.MachineSound(Mame.SOUND_YM3812, ym3812_interface));
     sound.Add(new Mame.MachineSound(Mame.SOUND_OKIM6295,okim6295_interface));
 }
 public machine_driver_pacman()
 {
     cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80, 18432000 / 6,	/* 3.072 Mhz */
             readmem, writemem, null, writeport, pacman_interrupt, 1)
         );
     frames_per_second = 60;
     vblank_duration = 2500;
     cpu_slices_per_frame = 1;
     screen_width = 36 * 8;
     screen_height = 28 * 8;
     visible_area = new Mame.rectangle(0 * 8, 36 * 8 - 1, 0 * 8, 28 * 8 - 1);
     gfxdecodeinfo = driver_pacman.gfxdecodeinfo;
     total_colors = 16;
     color_table_len = 4 * 32;
     video_attributes = Mame.VIDEO_TYPE_RASTER | Mame.VIDEO_SUPPORTS_DIRTY;
     sound_attributes = 0;
     sound.Add(new Mame.MachineSound(Mame.SOUND_NAMCO, namco_interface));
 }
 public machine_driver_citycon()
 {
     cpu.Add(new Mame.MachineCPU(Mame.CPU_M6809, 2048000, readmem, writemem, null, null, Mame.interrupt, 1));
     cpu.Add(new Mame.MachineCPU(Mame.CPU_M6809 | Mame.CPU_AUDIO_CPU, 640000, readmem_sound, writemem_sound, null, null, Mame.interrupt, 1));
     frames_per_second = 60;
     vblank_duration = Mame.DEFAULT_60HZ_VBLANK_DURATION;
     cpu_slices_per_frame = 1;
     screen_width = 32 * 8;
     screen_height = 32 * 8;
     visible_area = new Mame.rectangle(1 * 8, 31 * 8 - 1, 2 * 8, 30 * 8 - 1);
     gfxdecodeinfo = driver_citycon.gfxdecodeinfo;
     total_colors = 640;
     color_table_len = 640;
     video_attributes = Mame.VIDEO_TYPE_RASTER | Mame.VIDEO_MODIFIES_PALETTE;
     sound_attributes = 0;
     sound.Add(new Mame.MachineSound(Mame.SOUND_YM2203, ym2203_interface));
 }
 public machine_driver_troangel()
 {
     cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80, 3000000, troangel_readmem, troangel_writemem, null, null, Mame.interrupt, 1));
     cpu.Add(new Mame.MachineCPU(Mame.CPU_M6803 | Mame.CPU_AUDIO_CPU, 6000000 / 4, irem.irem_sound_readmem, irem.irem_sound_writemem, irem.irem_sound_readport, irem.irem_sound_writeport, null, 0));
     frames_per_second = 57;
     vblank_duration = 1790;
     cpu_slices_per_frame = 1;
     screen_width = 32 * 8;
     screen_height = 32 * 8;
     visible_area = new Mame.rectangle(1 * 8, 31 * 8 - 1, 1 * 8, 31 * 8 - 1);
     total_colors = 32 * 8 + 16;
     color_table_len = 32 * 8 + 32 * 8;
     gfxdecodeinfo = troangel_gfxdecodeinfo;
     video_attributes = Mame.VIDEO_TYPE_RASTER;
     sound_attributes = 0;
     sound.Add(new Mame.MachineSound(Mame.SOUND_AY8910, irem.irem_ay8910_interface));
     sound.Add(new Mame.MachineSound(Mame.SOUND_MSM5205, irem.irem_msm5205_interface));
 }
 public machine_driver_phozon()
 {
     cpu.Add(new Mame.MachineCPU(Mame.CPU_M6809, 1536000, readmem_cpu1, writemem_cpu1, null, null, Mame.interrupt, 1));
     cpu.Add(new Mame.MachineCPU(Mame.CPU_M6809, 1536000, readmem_cpu2, writemem_cpu2, null, null, Mame.interrupt, 1));
     cpu.Add(new Mame.MachineCPU(Mame.CPU_M6809, 1536000, readmem_cpu3, writemem_cpu3, null, null, Mame.interrupt, 1));
     frames_per_second = 60;
     vblank_duration = Mame.DEFAULT_60HZ_VBLANK_DURATION;
     cpu_slices_per_frame = 100;
     screen_width = 36 * 8;
     screen_height = 28 * 8;
     visible_area = new Mame.rectangle(0 * 8, 36 * 8 - 1, 0 * 8, 28 * 8 - 1);
     gfxdecodeinfo = driver_phozon.gfxdecodeinfo;
     total_colors = 256;
     color_table_len = 64 * 4 + 64 * 8;
     video_attributes = Mame.VIDEO_TYPE_RASTER;
     sound_attributes = 0;
     sound.Add(new Mame.MachineSound(Mame.SOUND_NAMCO, namco_interface));
 }
 public machine_driver_gunfight()
 {
     cpu.Add(new Mame.MachineCPU(Mame.CPU_8080, 2000000, readmem, writemem, driver_boothill.boothill_readport, gunfight_writeport, driver_invaders.invaders_interrupt, 2));
     frames_per_second = 60;
     vblank_duration = Mame.DEFAULT_60HZ_VBLANK_DURATION;
     cpu_slices_per_frame = 1;
     screen_width = 32 * 8;
     screen_height = 32 * 8;
     visible_area = new Mame.rectangle(0 * 8, 32 * 8 - 1, 0 * 8, 28 * 8 - 1);
     gfxdecodeinfo = null;
     total_colors = 256;
     color_table_len = 0;
     video_attributes = Mame.VIDEO_TYPE_RASTER | Mame.VIDEO_SUPPORTS_DIRTY | Mame.VIDEO_MODIFIES_PALETTE;
     sound_attributes = 0;
     sound.Add(new Mame.MachineSound(Mame.SOUND_SAMPLES,samples_interface));
 }
Beispiel #29
0
            public machine_driver_namcos1()
            {
                cpu.Add(new Mame.MachineCPU(Mame.CPU_M6809, 49152000 / 32, main_readmem, main_writemem, null, null, Mame.interrupt, 1));
                cpu.Add(new Mame.MachineCPU(Mame.CPU_M6809, 49152000 / 32, sub_readmem, sub_writemem, null, null, Mame.interrupt, 1));
                cpu.Add(new Mame.MachineCPU(Mame.CPU_M6809, 49152000 / 32, sound_readmem, sound_writemem, null, null, Mame.interrupt, 1));
                cpu.Add(new Mame.MachineCPU(Mame.CPU_HD63701, 49152000 / 8 / 4, mcu_readmem, mcu_writemem, mcu_readport, mcu_writeport, Mame.interrupt, 1));
                frames_per_second = 60;
                vblank_duration = Mame.DEFAULT_REAL_60HZ_VBLANK_DURATION;
                cpu_slices_per_frame = 0;
                screen_width = 36 * 8;
                screen_height = 28 * 8;
                visible_area = new Mame.rectangle(0 * 8, 36 * 8 - 1, 0 * 8, 28 * 8 - 1);
                gfxdecodeinfo = driver_namcos1.gfxdecodeinfo;
                total_colors = 128 * 16 + 6 * 256 + 6 * 256 + 1;
                color_table_len = 128 * 16 + 6 * 256 + 1;
                video_attributes = Mame.VIDEO_TYPE_RASTER | Mame.VIDEO_MODIFIES_PALETTE | Mame.VIDEO_UPDATE_BEFORE_VBLANK;
                sound_attributes = Mame.SOUND_SUPPORTS_STEREO;

                sound.Add(new Mame.MachineSound(Mame.SOUND_YM2151, ym2151_interface));
                sound.Add(new Mame.MachineSound(Mame.SOUND_NAMCO, namco_interface));
                sound.Add(new Mame.MachineSound(Mame.SOUND_DAC, dac_interface));
            }
 public machine_driver_arkanoid()
 {
     cpu.Add(new Mame.MachineCPU(Mame.CPU_Z80, 6000000, readmem, writemem, null, null, Mame.interrupt, 1));
     cpu.Add(new Mame.MachineCPU(Mame.CPU_M68705, 500000, mcu_readmem, mcu_writemem, null, null, Mame.ignore_interrupt, 1));
     frames_per_second = 60;
     vblank_duration = Mame.DEFAULT_60HZ_VBLANK_DURATION;
     cpu_slices_per_frame = 100;
     screen_width = 32 * 8;
     screen_height = 32 * 8;
     visible_area = new Mame.rectangle(0 * 8, 32 * 8 - 1, 0 * 8, 32 * 8 - 1);
     gfxdecodeinfo = driver_arkanoid.gfxdecodeinfo;
     total_colors = 512;
     color_table_len = 512;
     video_attributes = Mame.VIDEO_TYPE_RASTER | Mame.VIDEO_SUPPORTS_DIRTY;
     sound_attributes = 0;
     sound.Add(new Mame.MachineSound(Mame.SOUND_AY8910, ay8910_interface));
 }