Esempio n. 1
0
        public static void video_start_cps()
        {
            /*bmAll = new Bitmap(512, 512);
             * Graphics g = Graphics.FromImage(bmAll);
             * g.Clear(Color.Magenta);
             * g.Dispose();*/
            int i;

            /*ttmap[0].enable = true;
             * ttmap[1].enable = true;
             * ttmap[2].enable = true;
             * ttmap[0].all_tiles_dirty = true;
             * ttmap[1].all_tiles_dirty = true;
             * ttmap[2].all_tiles_dirty = true;
             * Array.Clear(ttmap[0].pen_to_flags, 0, 0x40);
             * Array.Clear(ttmap[1].pen_to_flags, 0, 0x40);
             * Array.Clear(ttmap[2].pen_to_flags, 0, 0x40);*/
            cps1_update_transmasks();
            for (i = 0; i < 0xc00; i++)
            {
                Palette.palette_entry_set_color(i, Palette.make_rgb(0, 0, 0));
            }
            primasks           = new uint[8];
            cps1_stars_enabled = new int[2];
            cps1_buffered_obj  = new ushort[0x400];
            cps2_buffered_obj  = new ushort[0x1000];
            cps2_objram1       = new ushort[0x1000];
            cps2_objram2       = new ushort[0x1000];

            uuBFF = new ushort[0x200 * 0x200];
            for (i = 0; i < 0x40000; i++)
            {
                uuBFF[i] = 0xbff;
            }
            Array.Clear(cps1_buffered_obj, 0, 0x400);
            Array.Clear(cps2_buffered_obj, 0, 0x1000);

            Array.Clear(gfxram, 0, 0x30000);
            Array.Clear(cps_a_regs, 0, 0x20);
            Array.Clear(cps_b_regs, 0, 0x20);
            Array.Clear(cps2_objram1, 0, 0x1000);
            Array.Clear(cps2_objram2, 0, 0x1000);

            cps_a_regs[CPS1_OBJ_BASE]     = 0x9200;
            cps_a_regs[CPS1_SCROLL1_BASE] = 0x9000;
            cps_a_regs[CPS1_SCROLL2_BASE] = 0x9040;
            cps_a_regs[CPS1_SCROLL3_BASE] = 0x9080;
            cps_a_regs[CPS1_OTHER_BASE]   = 0x9100;
            if (bootleg_kludge == 0)
            {
                scroll1xoff = 0;
                scroll2xoff = 0;
                scroll3xoff = 0;
            }
            else if (bootleg_kludge == 1)
            {
                scroll1xoff = -0x0c;
                scroll2xoff = -0x0e;
                scroll3xoff = -0x10;
            }
            else if (bootleg_kludge == 2)
            {
                scroll1xoff = -0x0c;
                scroll2xoff = -0x10;
                scroll3xoff = -0x10;
            }
            else if (bootleg_kludge == 3)
            {
                scroll1xoff = -0x08;
                scroll2xoff = -0x0b;
                scroll3xoff = -0x0c;
            }
            else if (bootleg_kludge == 0x88)
            {
                scroll1xoff = 0x4;
                scroll2xoff = 0x6;
                scroll3xoff = 0xa;
            }
            cps1_get_video_base();   /* Calculate base pointers */
            cps1_get_video_base();   /* Calculate old base pointers */
        }
Esempio n. 2
0
 public static void set_color_555(int color, int rshift, int gshift, int bshift, ushort data)
 {
     Palette.palette_entry_set_color2(color, Palette.make_rgb(Palette.pal5bit((byte)(data >> rshift)), Palette.pal5bit((byte)(data >> gshift)), (int)Palette.pal5bit((byte)(data >> bshift))));
 }
Esempio n. 3
0
 public static void changecolor(int color, int r, int g, int b)
 {
     Palette.palette_entry_set_color(color, Palette.make_rgb(Palette.pal5bit((byte)r), Palette.pal5bit((byte)g), Palette.pal5bit((byte)b)));
 }
Esempio n. 4
0
        public static void machine_start()
        {
            switch (Machine.sBoard)
            {
            case "CPS-1":
            case "CPS-1(QSound)":
            case "CPS2":
                Palette.palette_init();
                //Tilemap.tilemap_init();
                Eeprom.eeprom_init();
                CPS.video_start_cps();
                machine_reset_callback = CPS.machine_reset_cps;
                break;

                /*case "Neo Geo":
                 *  Neogeo.nvram_handler_load_neogeo();
                 *  Neogeo.machine_start_neogeo();
                 *  Neogeo.video_start_neogeo();
                 *  machine_reset_callback = Neogeo.machine_reset_neogeo;
                 *  break;
                 * case "Namco System 1":
                 *  Palette.palette_init();
                 *  Tilemap.tilemap_init();
                 *  Namcos1.driver_init();
                 *  Namcos1.video_start_namcos1();
                 *  machine_reset_callback = Namcos1.machine_reset_namcos1;
                 *  break;
                 * case "IGS011":
                 *  Palette.palette_init();
                 *  IGS011.video_start_igs011();
                 *  machine_reset_callback = IGS011.machine_reset_igs011;
                 *  break;
                 * case "PGM":
                 *  Palette.palette_init();
                 *  Tilemap.tilemap_init();
                 *  PGM.device_init();
                 *  PGM.video_start_pgm();
                 *  machine_reset_callback = PGM.machine_reset_pgm;
                 *  break;
                 * case "M72":
                 *  Palette.palette_init();
                 *  Tilemap.tilemap_init();
                 *  M72.machine_start_m72();
                 *  M72.video_start_m72();
                 *  machine_reset_callback = M72.machine_reset_m72;
                 *  switch (Machine.sName)
                 *  {
                 *      case "ltswords":
                 *      case "kengo":
                 *      case "kengoa":
                 *          machine_reset_callback = M72.machine_reset_kengo;
                 *          break;
                 *  }
                 *  break;
                 * case "M92":
                 *  Palette.palette_init();
                 *  Tilemap.tilemap_init();
                 *  M92.machine_start_m92();
                 *  M92.video_start_m92();
                 *  machine_reset_callback = M92.machine_reset_m92;
                 *  break;*/
            }
        }