void invaders_videoram_w (int offset,int data) { if (invaders_videoram[offset] != data) { int i,x,y; int col; invaders_videoram[offset] = data; y = offset / 32; x = 8 * (offset % 32); /* Calculate overlay color for this byte */ col = Machine->pens[WHITE]; if (x >= 16 && x < 72) col = Machine->pens[GREEN]; if (x < 16 && y > 16 && y < 134) col = Machine->pens[GREEN]; if (x >= 192 && x < 224) col = Machine->pens[RED]; for (i = 0; i < 8; i++) { if (!(data & 0x01)) plot_pixel_8080 (x, y, Machine->pens[BLACK]); else plot_pixel_8080 (x, y, col); x ++; data >>= 1; } }
static void phantom2_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) { unsigned char *clouds; int x, y; /* update the bitmap */ vh_screenrefresh(bitmap, full_refresh); /* draw the clouds */ clouds = memory_region(REGION_PROMS); for (y = 0; y < 128; y++) { unsigned char *offs = &memory_region(REGION_PROMS)[y * 0x10]; for (x = 0; x < 128; x++) { if (offs[x >> 3] & (1 << (x & 0x07))) { plot_pixel_8080(x*2, y*2, 1); plot_pixel_8080(x*2+1, y*2, 1); plot_pixel_8080(x*2, y*2+1, 1); plot_pixel_8080(x*2+1, y*2+1, 1); } } } }
void ramtek_videoram_w (int offset,int data) { data = data & ~mask; if (ramtek_videoram[offset] != data) { int i,x,y; ramtek_videoram[offset] = data; y = offset / 32; x = 8 * (offset % 32); for (i = 0; i < 8; i++) { if (!(data & 0x80)) plot_pixel_8080 (x, y, Machine->pens[BLACK]); else plot_pixel_8080 (x, y, Machine->pens[WHITE]); x ++; data <<= 1; } } }
static void draw_sight(int x_center, int y_center) { int x,y; if (x_center<2) x_center=2; if (x_center>253) x_center=253; if (y_center<2) y_center=2; if (y_center>253) y_center=253; for(y = y_center-10; y < y_center+11; y++) if((y >= 0) && (y < 256)) plot_pixel_8080(x_center,y,1); for(x = x_center-20; x < x_center+21; x++) if((x >= 0) && (x < 256)) plot_pixel_8080(x,y_center,1); }