private void tiles_to_blocks()
        {
            tiles_data data = null;

            screen_data  new_pattern = null;
            pattern_data pattern     = null;

            screen_data new_scr;

            int data_n;
            int ptrn_n;
            int scr_n;
            int tile_n;
            int block_n;
            int x_pos;
            int y_pos;

            for (data_n = 0; data_n < tiles_data_cnt; data_n++)
            {
                data = get_tiles_data(data_n);

                // convert screens
                for (scr_n = 0; scr_n < data.screen_data_cnt(); scr_n++)
                {
                    new_scr = new screen_data(EScreenDataType.sdt_Blocks2x2);

                    for (tile_n = 0; tile_n < platform_data.get_screen_tiles_cnt(); tile_n++)
                    {
                        for (block_n = 0; block_n < utils.CONST_BLOCK_SIZE; block_n++)
                        {
                            x_pos = ((tile_n % platform_data.get_screen_tiles_width()) << 1) + (block_n & 0x01);
                            y_pos = ((tile_n / platform_data.get_screen_tiles_width()) << 1) + ((block_n & 0x02) >> 1);

                            if ((y_pos < platform_data.get_screen_blocks_height()) && (x_pos < platform_data.get_screen_blocks_width()))
                            {
                                new_scr.set_tile((y_pos * platform_data.get_screen_blocks_width()) + x_pos, utils.get_ushort_from_ulong(data.tiles[data.get_screen_tile(scr_n, tile_n)], block_n));
                            }
                        }
                    }

                    data.screen_data_replace(scr_n, new_scr);
                }

                // convert tiles patterns
                foreach (string key in data.patterns_data.Keys)
                {
                    List <pattern_data> pattrn_list = data.patterns_data[key] as List <pattern_data>;

                    for (ptrn_n = 0; ptrn_n < pattrn_list.Count; ptrn_n++)
                    {
                        pattern = pattrn_list[ptrn_n];

                        new_pattern = new screen_data(pattern.width << 1, pattern.height << 1);

                        for (tile_n = 0; tile_n < pattern.data.length; tile_n++)
                        {
                            for (block_n = 0; block_n < utils.CONST_BLOCK_SIZE; block_n++)
                            {
                                new_pattern.set_tile(((((tile_n / pattern.width) << 1) + ((block_n & 0x02) >> 1)) * (pattern.width << 1)) + ((tile_n % pattern.width) << 1) + (block_n & 0x01), utils.get_ushort_from_ulong(data.tiles[pattern.data.get_tile(tile_n)], block_n));
                            }
                        }

                        pattrn_list[ptrn_n] = new pattern_data(pattern.name, new_pattern);
                        pattern.reset();
                    }
                }

                Array.Clear(data.tiles, 0, data.tiles.Length);
            }
        }