static void gwar_draw_sprites_16x16(osd_bitmap bitmap, int xscroll, int yscroll ){
            GfxElement gfx = Machine.gfx[GFX_SPRITES];
            //const unsigned char *source = &memory_region(REGION_CPU1)[0xe800];
            UBytePtr source = new UBytePtr(memory_region(REGION_CPU1),0xe800);
            
            rectangle clip = Machine.drv.visible_area;

            int which;
            for( which=0; which<(64)*4; which+=4 )
            {
                    int attributes = source.read(which+3); /* YBBX.BCCC */
                    int tile_number = source.read(which+1);
                    int sy = -xscroll + source.read(which);
                    int sx =  yscroll - source.read(which+2);
                    if(( attributes&0x10 )!=0) sy += 256;
                    if(( attributes&0x80 )!=0) sx -= 256;

                    if(( attributes&0x08 )!=0) tile_number += 256;
                    if(( attributes&0x20 )!=0) tile_number += 512;
                    if(( attributes&0x40 )!=0) tile_number += 1024;

                    sy &= 0x1ff; if( sy>512-16 ) sy-=512;
                    sx = (-sx)&0x1ff; if( sx>512-16 ) sx-=512;

                    drawgfx(bitmap,gfx,
                            tile_number,
                            (attributes&7), /* color */
                            0,0, /* flip */
                            sx,sy,
                            clip,TRANSPARENCY_PEN,15 );
            }
    }