| Previous | 15994 Revisions | Next |
| r13818 Monday 2nd January, 2012 at 07:40:23 UTC by Aaron Giles |
|---|
| MESS equivalent ofMAME r14905: Removed machine.generic.tmpbitmap, VIDEO_START(generic_bitmapped), and SCREEN_UPDATE(generic_bitmapped). In their place, each screen_device now maintains a default bitmap which is automatically copied to the screen on each update if no SCREEN_UPDATE function is provided and if no driver_device::video_update override is present. This bitmap can be found by querying the screen's new default_bitmap() method. [Aaron Giles] |
| [src/emu] | drawgfxm.h machine.c machine.h rendutil.c rendutil.h screen.c screen.h tilemap.c video.c video.h |
| [src/emu/video] | generic.c generic.h |
| [src/mame/drivers] | 3do.c adp.c big10.c gei.c kas89.c sangho.c sfkick.c sothello.c |
| [src/mame/includes] | naughtyb.h tunhunt.h |
| [src/mame/video] | atari.c galpanic.c magmax.c mcd212.c naughtyb.c tunhunt.c zac2650.c |
| [src/mess/drivers] | a5105.c apogee.c atarist.c b16.c compis.c craft.c exelv.c gamecom.c gb.c gba.c gp32.c if800.c intv.c ipds.c lynx.c mikrosha.c msx.c osbexec.c osborne1.c partner.c pc9801.c pockstat.c pokemini.c qx10.c radio86.c rt1715.c samcoupe.c sm1800.c ssem.c uzebox.c vt100.c vt240.c wswan.c zx.c |
| [src/mess/includes] | compis.h |
| [src/mess/machine] | lynx.c osborne1.c pokemini.c |
| [src/mess/machine/ti99] | videowrp.c videowrp.h |
| [src/mess/video] | a7800.c atarist.c cgenie.c epnick.c galaxy.c gamecom.c gb.c gba.c gf4500.c intv.c mikromik.c radio86.c samcoupe.c tms3556.c tms3556.h wswan.c zx.c |
| r13817 | r13818 | |
|---|---|---|
| 9 | 9 | UINT8 *m_spriteram; |
| 10 | 10 | UINT8 *m_videoram; |
| 11 | 11 | tilemap_t *m_fg_tilemap; |
| 12 | bitmap_t m_tmpbitmap; | |
| 12 | 13 | }; |
| 13 | 14 | |
| 14 | 15 |
| r13817 | r13818 | |
|---|---|---|
| 14 | 14 | int m_cocktail; |
| 15 | 15 | UINT8 m_palreg; |
| 16 | 16 | int m_bankreg; |
| 17 | bitmap_t m_tmpbitmap; | |
| 17 | 18 | }; |
| 18 | 19 | |
| 19 | 20 |
| r13817 | r13818 | |
|---|---|---|
| 76 | 76 | */ |
| 77 | 77 | tunhunt_state *state = machine.driver_data<tunhunt_state>(); |
| 78 | 78 | |
| 79 | | |
| 79 | sta | |
| 80 | 80 | |
| 81 | 81 | state->m_fg_tilemap = tilemap_create(machine, get_fg_tile_info, tilemap_scan_cols, 8, 8, 32, 32); |
| 82 | 82 | |
| r13817 | r13818 | |
| 214 | 214 | */ |
| 215 | 215 | |
| 216 | 216 | tunhunt_state *state = machine.driver_data<tunhunt_state>(); |
| 217 | bitmap_t &tmpbitmap = | |
| 217 | bitmap_t &tmpbitmap = stat | |
| 218 | 218 | UINT8 *spriteram = state->m_spriteram; |
| 219 | 219 | UINT8 *tunhunt_ram = state->m_workram; |
| 220 | 220 | //int skip = tunhunt_ram[MOBST]; |
| r13817 | r13818 | |
|---|---|---|
| 1332 | 1332 | static void mcd212_draw_scanline(mcd212_regs_t *mcd212, int y) |
| 1333 | 1333 | { |
| 1334 | 1334 | running_machine &machine = mcd212->machine(); |
| 1335 | bitmap_t &bitmap = | |
| 1335 | bitmap_t &bitmap = | |
| 1336 | 1336 | UINT8 plane_a_r[768], plane_a_g[768], plane_a_b[768]; |
| 1337 | 1337 | UINT8 plane_b_r[768], plane_b_g[768], plane_b_b[768]; |
| 1338 | 1338 | UINT32 out[768]; |
| r13817 | r13818 | |
| 1652 | 1652 | { |
| 1653 | 1653 | cdi_state *state = machine.driver_data<cdi_state>(); |
| 1654 | 1654 | |
| 1655 | VIDEO_START_CALL(generic_bitmapped); | |
| 1656 | 1655 | mcd212_ab_init(&state->m_mcd212_ab); |
| 1657 | 1656 | mcd212_init(machine, &state->m_mcd212_regs); |
| 1658 | 1657 | state->m_mcd212_regs.scan_timer = machine.scheduler().timer_alloc(FUNC(mcd212_perform_scan)); |
| r13817 | r13818 | |
| 1663 | 1662 | |
| 1664 | 1663 | SCREEN_UPDATE( cdimono1 ) |
| 1665 | 1664 | { |
| 1666 | copybitmap(bitmap, | |
| 1665 | copybitmap(bitmap, | |
| 1667 | 1666 | return 0; |
| 1668 | 1667 | } |
| 1669 | 1668 |
| r13817 | r13818 | |
|---|---|---|
| 6 | 6 | VIDEO_START( galpanic ) |
| 7 | 7 | { |
| 8 | 8 | galpanic_state *state = machine.driver_data<galpanic_state>(); |
| 9 | machine.generic.tmpbitmap = machine.primary_screen->alloc_compatible_bitmap(); | |
| 10 | 9 | state->m_sprites_bitmap = machine.primary_screen->alloc_compatible_bitmap(); |
| 11 | 10 | } |
| 12 | 11 | |
| r13817 | r13818 | |
| 34 | 33 | sy = offset / 256; |
| 35 | 34 | sx = offset % 256; |
| 36 | 35 | |
| 37 | space->machine(). | |
| 36 | space->machine().p | |
| 38 | 37 | } |
| 39 | 38 | |
| 40 | 39 | WRITE16_HANDLER( galpanic_paletteram_w ) |
| r13817 | r13818 | |
| 105 | 104 | device_t *pandora = screen.machine().device("pandora"); |
| 106 | 105 | |
| 107 | 106 | /* copy the temporary bitmap to the screen */ |
| 108 | copybitmap(bitmap, | |
| 107 | copybitmap(bitmap, | |
| 109 | 108 | |
| 110 | 109 | draw_fgbitmap(screen.machine(), bitmap, cliprect); |
| 111 | 110 | |
| r13817 | r13818 | |
| 118 | 117 | { |
| 119 | 118 | galpanic_state *state = screen.machine().driver_data<galpanic_state>(); |
| 120 | 119 | /* copy the temporary bitmap to the screen */ |
| 121 | copybitmap(bitmap, | |
| 120 | copybitmap(bitmap, | |
| 122 | 121 | |
| 123 | 122 | draw_fgbitmap(screen.machine(), bitmap, cliprect); |
| 124 | 123 |
| r13817 | r13818 | |
|---|---|---|
| 73 | 73 | state->m_prom_tab = auto_alloc_array(machine, UINT32, 256); |
| 74 | 74 | |
| 75 | 75 | /* Allocate temporary bitmap */ |
| 76 | machine.generic.tmpbitmap = machine.primary_screen->alloc_compatible_bitmap(); | |
| 77 | ||
| 78 | 76 | for (i=0; i<256; i++) |
| 79 | 77 | { |
| 80 | 78 | v = (prom14D[i] << 4) + prom14D[i + 0x100]; |
| r13817 | r13818 | |
| 105 | 103 | UINT32 scroll_v = (*state->m_scroll_y) & 0xff; |
| 106 | 104 | |
| 107 | 105 | /*clear background-over-sprites bitmap*/ |
| 108 | screen. | |
| 106 | screen.d | |
| 109 | 107 | |
| 110 | 108 | for (v = 2*8; v < 30*8; v++) /*only for visible area*/ |
| 111 | 109 | { |
| r13817 | r13818 | |
| 156 | 154 | |
| 157 | 155 | /*priority: background over sprites*/ |
| 158 | 156 | if (map_v_scr_100 && ((graph_data & 0x0c)==0x0c)) |
| 159 | screen. | |
| 157 | screen.d | |
| 160 | 158 | } |
| 161 | 159 | |
| 162 | 160 | if (state->m_flipscreen) |
| r13817 | r13818 | |
| 211 | 209 | } |
| 212 | 210 | |
| 213 | 211 | if (!(*state->m_vreg & 0x40)) /* background disable */ |
| 214 | copybitmap_trans(bitmap, | |
| 212 | copybitmap_trans(bitmap, | |
| 215 | 213 | |
| 216 | 214 | /* draw the foreground characters */ |
| 217 | 215 | for (offs = 32*32-1; offs >= 0; offs -= 1) |
| r13817 | r13818 | |
|---|---|---|
| 104 | 104 | state->m_palreg = state->m_bankreg = 0; |
| 105 | 105 | |
| 106 | 106 | /* Naughty Boy has a virtual screen twice as large as the visible screen */ |
| 107 | | |
| 107 | sta | |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | |
| r13817 | r13818 | |
| 190 | 190 | |
| 191 | 191 | naughtyb_state *state = screen.machine().driver_data<naughtyb_state>(); |
| 192 | 192 | UINT8 *videoram = state->m_videoram; |
| 193 | bitmap_t &tmpbitmap = | |
| 193 | bitmap_t &tmpbitmap = | |
| 194 | 194 | int offs; |
| 195 | 195 | |
| 196 | 196 | // for every character in the Video RAM |
| r13817 | r13818 | |
|---|---|---|
| 759 | 759 | { |
| 760 | 760 | antic.video[i] = auto_alloc_clear(machine, VIDEO); |
| 761 | 761 | } |
| 762 | ||
| 763 | VIDEO_START_CALL(generic_bitmapped); | |
| 764 | 762 | } |
| 765 | 763 | |
| 766 | 764 | /************************************************************************ |
| r13817 | r13818 | |
| 772 | 770 | { |
| 773 | 771 | UINT32 new_tv_artifacts; |
| 774 | 772 | |
| 775 | | |
| 773 | copybitmap | |
| 776 | 774 | |
| 777 | 775 | new_tv_artifacts = input_port_read_safe(screen.machine(), "artifacts", 0); |
| 778 | 776 | if( tv_artifacts != new_tv_artifacts ) |
| r13817 | r13818 | |
| 1043 | 1041 | dst[2] = antic.color_lookup[PBK] | antic.color_lookup[PBK] << 16; |
| 1044 | 1042 | dst[3] = antic.color_lookup[PBK] | antic.color_lookup[PBK] << 16; |
| 1045 | 1043 | |
| 1046 | draw_scanline8( | |
| 1044 | draw_scanline8( | |
| 1047 | 1045 | } |
| 1048 | 1046 | |
| 1049 | 1047 | static int cycle(running_machine &machine) |
| r13817 | r13818 | |
|---|---|---|
| 145 | 145 | 24, 24, 32, 32); |
| 146 | 146 | |
| 147 | 147 | state->m_spritebitmap = machine.primary_screen->alloc_compatible_bitmap(); |
| 148 | machine.generic.tmpbitmap = machine.primary_screen->alloc_compatible_bitmap(); | |
| 149 | 148 | |
| 150 | 149 | gfx_element_set_source(machine.gfx[1], state->m_s2636_0_ram); |
| 151 | 150 | gfx_element_set_source(machine.gfx[2], state->m_s2636_0_ram); |
| r13817 | r13818 | |
| 171 | 170 | state->m_CollisionBackground = 0; /* Read from 0x1e80 bit 7 */ |
| 172 | 171 | |
| 173 | 172 | // for collision detection checking |
| 174 | copybitmap( | |
| 173 | copybitmap( | |
| 175 | 174 | |
| 176 | 175 | for(offs=0;offs<0x50;offs+=0x10) |
| 177 | 176 | { |
| r13817 | r13818 | |
| 202 | 201 | continue; |
| 203 | 202 | } |
| 204 | 203 | |
| 205 | if (bitmap.pix16(y, x) != machine. | |
| 204 | if (bitmap.pix16(y, x) != machine.p | |
| 206 | 205 | { |
| 207 | 206 | state->m_CollisionBackground = 0x80; |
| 208 | 207 | break; |
| r13817 | r13818 | |
|---|---|---|
| 93 | 93 | |
| 94 | 94 | static VIDEO_START( big10 ) |
| 95 | 95 | { |
| 96 | VIDEO_START_CALL(generic_bitmapped); | |
| 97 | v9938_init (machine, 0, *machine.primary_screen, *machine.generic.tmpbitmap, MODEL_V9938, VDP_MEM, big10_vdp_interrupt); | |
| 96 | v9938_init (machine, 0, *machine.primary_screen, machine.primary_screen->default_bitmap(), MODEL_V9938, VDP_MEM, big10_vdp_interrupt); | |
| 98 | 97 | v9938_reset(0); |
| 99 | 98 | } |
| 100 | 99 | |
| r13817 | r13818 | |
| 268 | 267 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 269 | 268 | MCFG_SCREEN_SIZE(512 + 32, (212 + 28) * 2) |
| 270 | 269 | MCFG_SCREEN_VISIBLE_AREA(0, 512 + 32 - 1, 0, (212 + 28) * 2 - 1) |
| 271 | MCFG_SCREEN_UPDATE(generic_bitmapped) | |
| 272 | 270 | |
| 273 | 271 | MCFG_PALETTE_LENGTH(512) |
| 274 | 272 | MCFG_PALETTE_INIT(v9938) |
| r13817 | r13818 | |
|---|---|---|
| 162 | 162 | |
| 163 | 163 | required_device<h63484_device> m_h63484; |
| 164 | 164 | |
| 165 | virtual void video_start(); | |
| 166 | 165 | virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect); |
| 167 | 166 | |
| 168 | 167 | /* misc */ |
| r13817 | r13818 | |
| 175 | 174 | device_t *m_duart; |
| 176 | 175 | }; |
| 177 | 176 | |
| 178 | void adp_state::video_start() | |
| 179 | { | |
| 180 | VIDEO_START_NAME(generic_bitmapped)(machine()); | |
| 181 | } | |
| 182 | 177 | |
| 183 | ||
| 184 | 178 | static H63484_DISPLAY_PIXELS( acrtc_display_pixels ) |
| 185 | 179 | { |
| 186 | 180 | bitmap.pix16(y, x) = data & 0xf; |
| r13817 | r13818 | |
| 679 | 673 | MCFG_PALETTE_LENGTH(0x10) |
| 680 | 674 | |
| 681 | 675 | MCFG_PALETTE_INIT(adp) |
| 682 | // MCFG_VIDEO_START(adp) | |
| 683 | 676 | |
| 684 | 677 | MCFG_H63484_ADD("h63484", 0, adp_h63484_intf, adp_h63484_map) |
| 685 | 678 | |
| r13817 | r13818 | |
| 712 | 705 | MCFG_PALETTE_LENGTH(0x10) |
| 713 | 706 | |
| 714 | 707 | MCFG_PALETTE_INIT(adp) |
| 715 | // MCFG_VIDEO_START(adp) | |
| 716 | 708 | |
| 717 | 709 | MCFG_H63484_ADD("h63484", 0, adp_h63484_intf, adp_h63484_map) |
| 718 | 710 | |
| r13817 | r13818 | |
| 744 | 736 | MCFG_PALETTE_LENGTH(0x10) |
| 745 | 737 | |
| 746 | 738 | // MCFG_PALETTE_INIT(adp) |
| 747 | // MCFG_VIDEO_START(adp) | |
| 748 | 739 | |
| 749 | 740 | MCFG_H63484_ADD("h63484", 0, adp_h63484_intf, adp_h63484_map) |
| 750 | 741 |
| r13817 | r13818 | |
|---|---|---|
| 241 | 241 | |
| 242 | 242 | static VIDEO_START( kas89 ) |
| 243 | 243 | { |
| 244 | VIDEO_START_CALL(generic_bitmapped); | |
| 245 | v9938_init (machine, 0, *machine.primary_screen, *machine.generic.tmpbitmap, MODEL_V9938, VDP_MEM, kas89_vdp_interrupt); | |
| 244 | v9938_init (machine, 0, *machine.primary_screen, machine.primary_screen->default_bitmap(), MODEL_V9938, VDP_MEM, kas89_vdp_interrupt); | |
| 246 | 245 | v9938_reset(0); |
| 247 | 246 | } |
| 248 | 247 | |
| r13817 | r13818 | |
| 802 | 801 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 803 | 802 | MCFG_SCREEN_SIZE(544, 524) |
| 804 | 803 | MCFG_SCREEN_VISIBLE_AREA(0, 544 - 1, 0, 480 - 1) |
| 805 | MCFG_SCREEN_UPDATE(generic_bitmapped) | |
| 806 | 804 | |
| 807 | 805 | MCFG_PALETTE_LENGTH(512) |
| 808 | 806 | MCFG_PALETTE_INIT(v9938) |
| r13817 | r13818 | |
|---|---|---|
| 338 | 338 | |
| 339 | 339 | static VIDEO_START( sothello ) |
| 340 | 340 | { |
| 341 | VIDEO_START_CALL(generic_bitmapped); | |
| 342 | v9938_init (machine, 0, *machine.primary_screen, *machine.generic.tmpbitmap, MODEL_V9938, VDP_MEM, sothello_vdp_interrupt); | |
| 341 | v9938_init (machine, 0, *machine.primary_screen, machine.primary_screen->default_bitmap(), MODEL_V9938, VDP_MEM, sothello_vdp_interrupt); | |
| 343 | 342 | v9938_reset(0); |
| 344 | 343 | } |
| 345 | 344 | |
| r13817 | r13818 | |
| 387 | 386 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 388 | 387 | MCFG_SCREEN_SIZE(512 + 32, (212 + 28) * 2) |
| 389 | 388 | MCFG_SCREEN_VISIBLE_AREA(0, 512 + 32 - 1, 0, (212 + 28) * 2 - 1) |
| 390 | MCFG_SCREEN_UPDATE(generic_bitmapped) | |
| 391 | 389 | |
| 392 | 390 | MCFG_PALETTE_LENGTH(512) |
| 393 | 391 | MCFG_PALETTE_INIT( v9938 ) |
| r13817 | r13818 | |
|---|---|---|
| 116 | 116 | |
| 117 | 117 | |
| 118 | 118 | for (i = 0; i < 8; i++) |
| 119 | space->machine(). | |
| 119 | space->machine().p | |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | static PALETTE_INIT(gei) |
| r13817 | r13818 | |
| 1087 | 1087 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 1088 | 1088 | MCFG_SCREEN_SIZE(512, 256) |
| 1089 | 1089 | MCFG_SCREEN_VISIBLE_AREA(48, 511-48, 16, 255-16) |
| 1090 | MCFG_SCREEN_UPDATE(generic_bitmapped) | |
| 1091 | 1090 | |
| 1092 | 1091 | MCFG_PALETTE_LENGTH(8) |
| 1093 | 1092 | MCFG_PALETTE_INIT(gei) |
| 1094 | 1093 | |
| 1095 | 1094 | MCFG_NVRAM_ADD_0FILL("nvram") |
| 1096 | 1095 | |
| 1097 | MCFG_VIDEO_START(generic_bitmapped) | |
| 1098 | ||
| 1099 | 1096 | MCFG_PPI8255_ADD( "ppi8255_0", getrivia_ppi8255_intf[0] ) |
| 1100 | 1097 | MCFG_PPI8255_ADD( "ppi8255_1", getrivia_ppi8255_intf[1] ) |
| 1101 | 1098 | MCFG_TICKET_DISPENSER_ADD("ticket", 100, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH) |
| r13817 | r13818 | |
|---|---|---|
| 436 | 436 | |
| 437 | 437 | static VIDEO_START( sfkick ) |
| 438 | 438 | { |
| 439 | VIDEO_START_CALL(generic_bitmapped); | |
| 440 | v9938_init (machine, 0, *machine.primary_screen, *machine.generic.tmpbitmap, MODEL_V9938, 0x80000, sfkick_vdp_interrupt); | |
| 439 | v9938_init (machine, 0, *machine.primary_screen, machine.primary_screen->default_bitmap(), MODEL_V9938, 0x80000, sfkick_vdp_interrupt); | |
| 441 | 440 | v9938_reset(0); |
| 442 | 441 | } |
| 443 | 442 | |
| r13817 | r13818 | |
| 496 | 495 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 497 | 496 | MCFG_SCREEN_SIZE(MSX2_TOTAL_XRES_PIXELS, MSX2_TOTAL_YRES_PIXELS) |
| 498 | 497 | MCFG_SCREEN_VISIBLE_AREA(MSX2_XBORDER_PIXELS - MSX2_VISIBLE_XBORDER_PIXELS, MSX2_TOTAL_XRES_PIXELS - MSX2_XBORDER_PIXELS + MSX2_VISIBLE_XBORDER_PIXELS - 1, MSX2_YBORDER_PIXELS - MSX2_VISIBLE_YBORDER_PIXELS, MSX2_TOTAL_YRES_PIXELS - MSX2_YBORDER_PIXELS + MSX2_VISIBLE_YBORDER_PIXELS - 1) |
| 499 | MCFG_SCREEN_UPDATE(generic_bitmapped) | |
| 500 | 498 | |
| 501 | 499 | MCFG_PALETTE_LENGTH(512) |
| 502 | 500 |
| r13817 | r13818 | |
|---|---|---|
| 368 | 368 | |
| 369 | 369 | static VIDEO_START( sangho ) |
| 370 | 370 | { |
| 371 | VIDEO_START_CALL(generic_bitmapped); | |
| 372 | v9938_init (machine, 0, *machine.primary_screen, *machine.generic.tmpbitmap, MODEL_V9938, 0x20000, msx_vdp_interrupt); | |
| 371 | v9938_init (machine, 0, *machine.primary_screen, machine.primary_screen->default_bitmap(), MODEL_V9938, 0x20000, msx_vdp_interrupt); | |
| 373 | 372 | } |
| 374 | 373 | |
| 375 | 374 | static MACHINE_CONFIG_START( pzlestar, sangho_state ) |
| r13817 | r13818 | |
| 387 | 386 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 388 | 387 | MCFG_SCREEN_SIZE(512 + 32, (212 + 28) * 2) |
| 389 | 388 | MCFG_SCREEN_VISIBLE_AREA(0, 512 + 32 - 1, 0, (212 + 28) * 2 - 1) |
| 390 | MCFG_SCREEN_UPDATE( generic_bitmapped ) | |
| 391 | 389 | |
| 392 | 390 | MCFG_PALETTE_LENGTH(512) |
| 393 | 391 | |
| r13817 | r13818 | |
| 420 | 418 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 421 | 419 | MCFG_SCREEN_SIZE(512 + 32, (212 + 28) * 2) |
| 422 | 420 | MCFG_SCREEN_VISIBLE_AREA(0, 512 + 32 - 1, 0, (212 + 28) * 2 - 1) |
| 423 | MCFG_SCREEN_UPDATE( generic_bitmapped ) | |
| 424 | 421 | |
| 425 | 422 | MCFG_PALETTE_LENGTH(512) |
| 426 | 423 |
| r13817 | r13818 | |
|---|---|---|
| 163 | 163 | |
| 164 | 164 | MCFG_MACHINE_RESET( 3do ) |
| 165 | 165 | |
| 166 | // MCFG_VIDEO_START( generic_bitmapped ) | |
| 167 | 166 | MCFG_VIDEO_START( _3do ) |
| 168 | 167 | |
| 169 | 168 | MCFG_SCREEN_ADD("screen", RASTER) |
| 170 | 169 | MCFG_SCREEN_FORMAT( BITMAP_FORMAT_RGB32 ) |
| 171 | 170 | MCFG_SCREEN_RAW_PARAMS( X2_CLOCK_NTSC / 2, 1592, 254, 1534, 263, 22, 262 ) |
| 172 | // MCFG_SCREEN_UPDATE( generic_bitmapped ) | |
| 173 | 171 | MCFG_SCREEN_UPDATE( _3do ) |
| 174 | 172 | |
| 175 | 173 | MCFG_CDROM_ADD( "cdrom", _3do_cdrom) |
| r13817 | r13818 | |
| 184 | 182 | |
| 185 | 183 | MCFG_MACHINE_RESET( 3do ) |
| 186 | 184 | |
| 187 | MCFG_VIDEO_START( generic_bitmapped ) | |
| 188 | ||
| 189 | 185 | MCFG_SCREEN_ADD("screen", RASTER) |
| 190 | 186 | MCFG_SCREEN_FORMAT( BITMAP_FORMAT_RGB32 ) |
| 191 | 187 | MCFG_SCREEN_SIZE( 640, 625 ) |
| 192 | 188 | MCFG_SCREEN_VISIBLE_AREA( 0, 639, 0, 479 ) |
| 193 | 189 | MCFG_SCREEN_REFRESH_RATE( 50 ) |
| 194 | MCFG_SCREEN_UPDATE( generic_bitmapped ) | |
| 195 | 190 | |
| 196 | 191 | MCFG_CDROM_ADD( "cdrom", _3do_cdrom) |
| 197 | 192 | MACHINE_CONFIG_END |
| r13817 | r13818 | |
|---|---|---|
| 262 | 262 | |
| 263 | 263 | |
| 264 | 264 | /*************************************************************************** |
| 265 | GENERIC VIDEO START/UPDATE | |
| 266 | ***************************************************************************/ | |
| 267 | ||
| 268 | /*------------------------------------------------- | |
| 269 | VIDEO_START( generic_bitmapped ) - general video | |
| 270 | system with a bitmap | |
| 271 | -------------------------------------------------*/ | |
| 272 | ||
| 273 | VIDEO_START( generic_bitmapped ) | |
| 274 | { | |
| 275 | /* allocate the temporary bitmap */ | |
| 276 | machine.generic.tmpbitmap = machine.primary_screen->alloc_compatible_bitmap(); | |
| 277 | ||
| 278 | /* ensure the contents of the bitmap are saved */ | |
| 279 | machine.save().save_item(NAME(*machine.generic.tmpbitmap)); | |
| 280 | } | |
| 281 | ||
| 282 | ||
| 283 | /*------------------------------------------------- | |
| 284 | SCREEN_UPDATE( generic_bitmapped ) - blast the | |
| 285 | generic bitmap to the screen | |
| 286 | -------------------------------------------------*/ | |
| 287 | ||
| 288 | SCREEN_UPDATE( generic_bitmapped ) | |
| 289 | { | |
| 290 | copybitmap(bitmap, *screen.machine().generic.tmpbitmap, 0, 0, 0, 0, cliprect); | |
| 291 | return 0; | |
| 292 | } | |
| 293 | ||
| 294 | ||
| 295 | ||
| 296 | /*************************************************************************** | |
| 297 | 265 | GENERIC SPRITE BUFFERING |
| 298 | 266 | ***************************************************************************/ |
| 299 | 267 |
| r13817 | r13818 | |
|---|---|---|
| 40 | 40 | /* set up all the common systems */ |
| 41 | 41 | void generic_video_init(running_machine &machine); |
| 42 | 42 | |
| 43 | /* generic video start with a temporary bitmap */ | |
| 44 | VIDEO_START( generic_bitmapped ); | |
| 45 | 43 | |
| 46 | /* generic video update to blit a temporary bitmap */ | |
| 47 | SCREEN_UPDATE( generic_bitmapped ); | |
| 48 | 44 | |
| 49 | ||
| 50 | ||
| 51 | 45 | /* ----- sprite buffering ----- */ |
| 52 | 46 | |
| 53 | 47 | /* buffered sprite RAM write handlers */ |
| r13817 | r13818 | |
|---|---|---|
| 117 | 117 | INT32 dy_flipped; /* global vertical scroll offset when flipped */ |
| 118 | 118 | |
| 119 | 119 | /* pixel data */ |
| 120 | bitmap_t | |
| 120 | bitmap_t | |
| 121 | 121 | |
| 122 | 122 | /* transparency mapping */ |
| 123 | bitmap_t | |
| 123 | bitmap_t | |
| 124 | 124 | UINT8 * tileflags; /* per-tile flags */ |
| 125 | 125 | UINT8 * pen_to_flags; /* mapping of pens to flags */ |
| 126 | 126 | |
| r13817 | r13818 | |
| 389 | 389 | tmap->colscroll = auto_alloc_array_clear(machine, INT32, tmap->width); |
| 390 | 390 | |
| 391 | 391 | /* allocate the pixel data cache */ |
| 392 | tmap->pixmap | |
| 392 | tmap->pixmap. | |
| 393 | 393 | |
| 394 | 394 | /* allocate transparency mapping data */ |
| 395 | 395 | tmap->tileflags = auto_alloc_array(machine, UINT8, tmap->max_logical_index); |
| 396 | tmap->flagsmap | |
| 396 | tmap->flagsmap. | |
| 397 | 397 | tmap->pen_to_flags = auto_alloc_array_clear(machine, UINT8, MAX_PEN_TO_FLAGS * TILEMAP_NUM_GROUPS); |
| 398 | 398 | for (group = 0; group < TILEMAP_NUM_GROUPS; group++) |
| 399 | 399 | tilemap_map_pens_to_layer(tmap, group, 0, 0, TILEMAP_PIXEL_LAYER0); |
| r13817 | r13818 | |
| 780 | 780 | { |
| 781 | 781 | /* ensure all the tiles are up-to-date and then return the pixmap */ |
| 782 | 782 | pixmap_update(tmap); |
| 783 | return | |
| 783 | return | |
| 784 | 784 | } |
| 785 | 785 | |
| 786 | 786 | |
| r13817 | r13818 | |
| 793 | 793 | { |
| 794 | 794 | /* ensure all the tiles are up-to-date and then return the flagsmap */ |
| 795 | 795 | pixmap_update(tmap); |
| 796 | return | |
| 796 | return | |
| 797 | 797 | } |
| 798 | 798 | |
| 799 | 799 | |
| r13817 | r13818 | |
| 1171 | 1171 | /* free allocated memory */ |
| 1172 | 1172 | auto_free(tmap->machine(), tmap->pen_to_flags); |
| 1173 | 1173 | auto_free(tmap->machine(), tmap->tileflags); |
| 1174 | auto_free(tmap->machine(), tmap->flagsmap); | |
| 1175 | auto_free(tmap->machine(), tmap->pixmap); | |
| 1176 | 1174 | auto_free(tmap->machine(), tmap->colscroll); |
| 1177 | 1175 | auto_free(tmap->machine(), tmap->rowscroll); |
| 1178 | 1176 | auto_free(tmap->machine(), tmap->logical_to_memory); |
| r13817 | r13818 | |
| 1361 | 1359 | static UINT8 tile_draw(tilemap_t *tmap, const UINT8 *pendata, UINT32 x0, UINT32 y0, UINT32 palette_base, UINT8 category, UINT8 group, UINT8 flags, UINT8 pen_mask) |
| 1362 | 1360 | { |
| 1363 | 1361 | const UINT8 *penmap = tmap->pen_to_flags + group * MAX_PEN_TO_FLAGS; |
| 1364 | bitmap_t *flagsmap = tmap->flagsmap; | |
| 1365 | bitmap_t *pixmap = tmap->pixmap; | |
| 1362 | bitmap_t &flagsmap = tmap->flagsmap; | |
| 1363 | bitmap_t &pixmap = tmap->pixmap; | |
| 1366 | 1364 | int height = tmap->tileheight; |
| 1367 | 1365 | int width = tmap->tilewidth; |
| 1368 | 1366 | UINT8 andmask = ~0, ormask = 0; |
| r13817 | r13818 | |
| 1396 | 1394 | /* iterate over rows */ |
| 1397 | 1395 | for (ty = 0; ty < height; ty++) |
| 1398 | 1396 | { |
| 1399 | UINT16 *pixptr = &pixmap->pix16(y0, x0); | |
| 1400 | UINT8 *flagsptr = &flagsmap->pix8(y0, x0); | |
| 1397 | UINT16 *pixptr = &pixmap.pix16(y0, x0); | |
| 1398 | UINT8 *flagsptr = &flagsmap.pix8(y0, x0); | |
| 1401 | 1399 | int xoffs = 0; |
| 1402 | 1400 | |
| 1403 | 1401 | /* pre-advance to the next row */ |
| r13817 | r13818 | |
| 1456 | 1454 | |
| 1457 | 1455 | static UINT8 tile_apply_bitmask(tilemap_t *tmap, const UINT8 *maskdata, UINT32 x0, UINT32 y0, UINT8 category, UINT8 flags) |
| 1458 | 1456 | { |
| 1459 | bitmap_t | |
| 1457 | bitmap_t &flagsmap = tmap->flagsmap; | |
| 1460 | 1458 | int height = tmap->tileheight; |
| 1461 | 1459 | int width = tmap->tilewidth; |
| 1462 | 1460 | UINT8 andmask = ~0, ormask = 0; |
| r13817 | r13818 | |
| 1481 | 1479 | /* iterate over rows */ |
| 1482 | 1480 | for (ty = 0; ty < height; ty++) |
| 1483 | 1481 | { |
| 1484 | UINT8 *flagsptr = &flagsmap | |
| 1482 | UINT8 *flagsptr = &flagsmap. | |
| 1485 | 1483 | int xoffs = 0; |
| 1486 | 1484 | |
| 1487 | 1485 | /* pre-advance to the next row */ |
| r13817 | r13818 | |
| 1637 | 1635 | y2 -= ypos; |
| 1638 | 1636 | |
| 1639 | 1637 | /* get tilemap pixels */ |
| 1640 | source_baseaddr = &tmap->pixmap->pix16(y1); | |
| 1641 | mask_baseaddr = &tmap->flagsmap->pix8(y1); | |
| 1638 | source_baseaddr = &tmap->pixmap.pix16(y1); | |
| 1639 | mask_baseaddr = &tmap->flagsmap.pix8(y1); | |
| 1642 | 1640 | |
| 1643 | 1641 | /* get start/stop columns, rounding outward */ |
| 1644 | 1642 | mincol = x1 / tmap->tilewidth; |
| r13817 | r13818 | |
| 1710 | 1708 | (*blit->draw_opaque)(dest0, source0, x_end - x_start, tmap->machine().pens, pmap0, blit->tilemap_priority_code, blit->alpha); |
| 1711 | 1709 | |
| 1712 | 1710 | dest0 = (UINT8 *)dest0 + dest_line_pitch_bytes; |
| 1713 | source0 += tmap->pixmap | |
| 1711 | source0 += tmap->pixmap. | |
| 1714 | 1712 | pmap0 += priority_bitmap.rowpixels(); |
| 1715 | 1713 | } |
| 1716 | 1714 | } |
| r13817 | r13818 | |
| 1724 | 1722 | (*blit->draw_masked)(dest0, source0, mask0, blit->mask, blit->value, x_end - x_start, tmap->machine().pens, pmap0, blit->tilemap_priority_code, blit->alpha); |
| 1725 | 1723 | |
| 1726 | 1724 | dest0 = (UINT8 *)dest0 + dest_line_pitch_bytes; |
| 1727 | source0 += tmap->pixmap->rowpixels(); | |
| 1728 | mask0 += tmap->flagsmap->rowpixels(); | |
| 1725 | source0 += tmap->pixmap.rowpixels(); | |
| 1726 | mask0 += tmap->flagsmap.rowpixels(); | |
| 1729 | 1727 | pmap0 += priority_bitmap.rowpixels(); |
| 1730 | 1728 | } |
| 1731 | 1729 | } |
| r13817 | r13818 | |
| 1742 | 1740 | |
| 1743 | 1741 | /* advance to the next row on all our bitmaps */ |
| 1744 | 1742 | priority_baseaddr += priority_bitmap.rowpixels() * (nexty - y); |
| 1745 | source_baseaddr += tmap->pixmap->rowpixels() * (nexty - y); | |
| 1746 | mask_baseaddr += tmap->flagsmap->rowpixels() * (nexty - y); | |
| 1743 | source_baseaddr += tmap->pixmap.rowpixels() * (nexty - y); | |
| 1744 | mask_baseaddr += tmap->flagsmap.rowpixels() * (nexty - y); | |
| 1747 | 1745 | dest_baseaddr = (UINT8 *)dest_baseaddr + dest_line_pitch_bytes * (nexty - y); |
| 1748 | 1746 | |
| 1749 | 1747 | /* increment the Y counter */ |
| r13817 | r13818 | |
| 1780 | 1778 | const pen_t *clut = &tmap->machine().pens[blit->tilemap_priority_code >> 16]; |
| 1781 | 1779 | bitmap_t &priority_bitmap = tmap->machine().priority_bitmap; |
| 1782 | 1780 | bitmap_t &destbitmap = *blit->bitmap; |
| 1783 | bitmap_t &srcbitmap = *tmap->pixmap; | |
| 1784 | bitmap_t &flagsmap = *tmap->flagsmap; | |
| 1781 | bitmap_t &srcbitmap = tmap->pixmap; | |
| 1782 | bitmap_t &flagsmap = tmap->flagsmap; | |
| 1785 | 1783 | const int xmask = srcbitmap.width()-1; |
| 1786 | 1784 | const int ymask = srcbitmap.height()-1; |
| 1787 | 1785 | const int widthshifted = srcbitmap.width() << 16; |
| r13817 | r13818 | |
|---|---|---|
| 124 | 124 | m_skipping_this_frame(false), |
| 125 | 125 | m_average_oversleep(0), |
| 126 | 126 | m_snap_target(NULL), |
| 127 | m_snap_bitmap(NULL), | |
| 128 | 127 | m_snap_native(true), |
| 129 | 128 | m_snap_width(0), |
| 130 | 129 | m_snap_height(0), |
| r13817 | r13818 | |
| 345 | 344 | |
| 346 | 345 | // now do the actual work |
| 347 | 346 | const rgb_t *palette = (machine().palette != NULL) ? palette_entry_list_adjusted(machine().palette) : NULL; |
| 348 | png_error error = png_write_bitmap(file, &pnginfo, | |
| 347 | png_error error = png_write_bitmap(file, &pnginfo, | |
| 349 | 348 | if (error != PNGERR_NONE) |
| 350 | 349 | mame_printf_error("Error generating PNG for snapshot: png_error = %d\n", error); |
| 351 | 350 | |
| r13817 | r13818 | |
| 411 | 410 | info.video_timescale = 1000 * ((machine().primary_screen != NULL) ? ATTOSECONDS_TO_HZ(machine().primary_screen->frame_period().attoseconds) : screen_device::DEFAULT_FRAME_RATE); |
| 412 | 411 | info.video_sampletime = 1000; |
| 413 | 412 | info.video_numsamples = 0; |
| 414 | info.video_width = m_snap_bitmap->width(); | |
| 415 | info.video_height = m_snap_bitmap->height(); | |
| 413 | info.video_width = m_snap_bitmap.width(); | |
| 414 | info.video_height = m_snap_bitmap.height(); | |
| 416 | 415 | info.video_depth = 24; |
| 417 | 416 | |
| 418 | 417 | info.audio_format = 0; |
| r13817 | r13818 | |
| 465 | 464 | { |
| 466 | 465 | // start the capture |
| 467 | 466 | int rate = (machine().primary_screen != NULL) ? ATTOSECONDS_TO_HZ(machine().primary_screen->frame_period().attoseconds) : screen_device::DEFAULT_FRAME_RATE; |
| 468 | png_error pngerr = mng_capture_start(*m_mngfile, | |
| 467 | png_error pngerr = mng_capture_start(*m_mngfile, | |
| 469 | 468 | if (pngerr != PNGERR_NONE) |
| 470 | 469 | return end_recording(); |
| 471 | 470 | |
| r13817 | r13818 | |
| 548 | 547 | |
| 549 | 548 | // free the snapshot target |
| 550 | 549 | machine().render().target_free(m_snap_target); |
| 551 | if (m_snap_bitmap != NULL) | |
| 552 | global_free(m_snap_bitmap); | |
| 550 | m_snap_bitmap.deallocate(); | |
| 553 | 551 | |
| 554 | 552 | // print a final result if we have at least 5 seconds' worth of data |
| 555 | 553 | if (m_overall_emutime.seconds >= 5) |
| r13817 | r13818 | |
| 1076 | 1074 | m_snap_target->set_bounds(width, height); |
| 1077 | 1075 | |
| 1078 | 1076 | // if we don't have a bitmap, or if it's not the right size, allocate a new one |
| 1079 | if (m_snap_bitmap == NULL || width != m_snap_bitmap->width() || height != m_snap_bitmap->height()) | |
| 1080 | { | |
| 1081 | if (m_snap_bitmap != NULL) | |
| 1082 | auto_free(machine(), m_snap_bitmap); | |
| 1083 | m_snap_bitmap = auto_alloc(machine(), bitmap_t(width, height, BITMAP_FORMAT_RGB32)); | |
| 1084 | } | |
| 1077 | if (!m_snap_bitmap.valid() || width != m_snap_bitmap.width() || height != m_snap_bitmap.height()) | |
| 1078 | m_snap_bitmap.allocate(width, height, BITMAP_FORMAT_RGB32); | |
| 1085 | 1079 | |
| 1086 | 1080 | // render the screen there |
| 1087 | 1081 | render_primitive_list &primlist = m_snap_target->get_primitives(); |
| 1088 | 1082 | primlist.acquire_lock(); |
| 1089 | rgb888_draw_primitives(primlist, &m_snap_bitmap | |
| 1083 | rgb888_draw_primitives(primlist, &m_snap_bitmap. | |
| 1090 | 1084 | primlist.release_lock(); |
| 1091 | 1085 | } |
| 1092 | 1086 | |
| r13817 | r13818 | |
| 1244 | 1238 | if (m_avifile != NULL) |
| 1245 | 1239 | { |
| 1246 | 1240 | // write the next frame |
| 1247 | avi_error avierr = avi_append_video_frame_rgb32(m_avifile, | |
| 1241 | avi_error avierr = avi_append_video_frame_rgb32(m_avifile, | |
| 1248 | 1242 | if (avierr != AVIERR_NONE) |
| 1249 | 1243 | { |
| 1250 | 1244 | g_profiler.stop(); |
| r13817 | r13818 | |
| 1267 | 1261 | |
| 1268 | 1262 | // write the next frame |
| 1269 | 1263 | const rgb_t *palette = (machine().palette != NULL) ? palette_entry_list_adjusted(machine().palette) : NULL; |
| 1270 | png_error error = mng_capture_frame(*m_mngfile, &pnginfo, | |
| 1264 | png_error error = mng_capture_frame(*m_mngfile, &pnginfo, | |
| 1271 | 1265 | png_free(&pnginfo); |
| 1272 | 1266 | if (error != PNGERR_NONE) |
| 1273 | 1267 | { |
| r13817 | r13818 | |
|---|---|---|
| 181 | 181 | |
| 182 | 182 | // snapshot stuff |
| 183 | 183 | render_target * m_snap_target; // screen shapshot target |
| 184 | bitmap_t | |
| 184 | bitmap_t | |
| 185 | 185 | bool m_snap_native; // are we using native per-screen layouts? |
| 186 | 186 | INT32 m_snap_width; // width of snapshots (0 == auto) |
| 187 | 187 | INT32 m_snap_height; // height of snapshots (0 == auto) |
| r13817 | r13818 | |
|---|---|---|
| 1116 | 1116 | |
| 1117 | 1117 | bool driver_device::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect) |
| 1118 | 1118 | { |
| 1119 | // if nothing provided, just copy the screen's generic bitmap | |
| 1120 | copybitmap(bitmap, screen.default_bitmap(), 0, 0, 0, 0, cliprect); | |
| 1119 | 1121 | return 0; |
| 1120 | 1122 | } |
| 1121 | 1123 |
| r13817 | r13818 | |
|---|---|---|
| 268 | 268 | generic_ptr buffered_spriteram2;// secondary buffered spriteram |
| 269 | 269 | generic_ptr paletteram; // palette RAM |
| 270 | 270 | generic_ptr paletteram2; // secondary palette RAM |
| 271 | bitmap_t * tmpbitmap; // temporary bitmap | |
| 272 | 271 | }; |
| 273 | 272 | |
| 274 | 273 |
| r13817 | r13818 | |
|---|---|---|
| 628 | 628 | return bitmap; |
| 629 | 629 | } |
| 630 | 630 | |
| 631 | void render_load_png(bitmap_t &bitmap, emu_file &file, const char *dirname, const char *filename) | |
| 632 | { | |
| 633 | png_info png; | |
| 634 | png_error result; | |
| 635 | ||
| 636 | bitmap.deallocate(); | |
| 631 | 637 | |
| 638 | /* open the file */ | |
| 639 | astring fname; | |
| 640 | if (dirname == NULL) | |
| 641 | fname.cpy(filename); | |
| 642 | else | |
| 643 | fname.cpy(dirname).cat(PATH_SEPARATOR).cat(filename); | |
| 644 | file_error filerr = file.open(fname); | |
| 645 | if (filerr != FILERR_NONE) | |
| 646 | return; | |
| 647 | ||
| 648 | /* read the PNG data */ | |
| 649 | result = png_read_file(file, &png); | |
| 650 | file.close(); | |
| 651 | if (result != PNGERR_NONE) | |
| 652 | return; | |
| 653 | ||
| 654 | /* verify we can handle this PNG */ | |
| 655 | if (png.bit_depth > 8) | |
| 656 | { | |
| 657 | logerror("%s: Unsupported bit depth %d (8 bit max)\n", filename, png.bit_depth); | |
| 658 | png_free(&png); | |
| 659 | return; | |
| 660 | } | |
| 661 | if (png.interlace_method != 0) | |
| 662 | { | |
| 663 | logerror("%s: Interlace unsupported\n", filename); | |
| 664 | png_free(&png); | |
| 665 | return; | |
| 666 | } | |
| 667 | if (png.color_type != 0 && png.color_type != 3 && png.color_type != 2 && png.color_type != 6) | |
| 668 | { | |
| 669 | logerror("%s: Unsupported color type %d\n", filename, png.color_type); | |
| 670 | png_free(&png); | |
| 671 | return; | |
| 672 | } | |
| 673 | ||
| 674 | /* if less than 8 bits, upsample */ | |
| 675 | png_expand_buffer_8bit(&png); | |
| 676 | ||
| 677 | bitmap.allocate(png.width, png.height, BITMAP_FORMAT_ARGB32); | |
| 678 | copy_png_to_bitmap(bitmap, &png, NULL); | |
| 679 | ||
| 680 | /* free PNG data */ | |
| 681 | png_free(&png); | |
| 682 | } | |
| 683 | ||
| 684 | ||
| 632 | 685 | /*------------------------------------------------- |
| 633 | 686 | copy_png_to_bitmap - copy the PNG data to a |
| 634 | 687 | bitmap |
| r13817 | r13818 | |
|---|---|---|
| 29 | 29 | int render_clip_quad(render_bounds *bounds, const render_bounds *clip, render_quad_texuv *texcoords); |
| 30 | 30 | void render_line_to_quad(const render_bounds *bounds, float width, render_bounds *bounds0, render_bounds *bounds1); |
| 31 | 31 | bitmap_t *render_load_png(emu_file &file, const char *dirname, const char *filename, bitmap_t *alphadest, bool *hasalpha); |
| 32 | void render_load_png(bitmap_t &bitmap, emu_file &file, const char *dirname, const char *filename); | |
| 32 | 33 | |
| 33 | 34 | |
| 34 | 35 |
| r13817 | r13818 | |
|---|---|---|
| 88 | 88 | m_container(NULL), |
| 89 | 89 | m_width(100), |
| 90 | 90 | m_height(100), |
| 91 | m_burnin(NULL), | |
| 92 | 91 | m_curbitmap(0), |
| 93 | 92 | m_curtexture(0), |
| 94 | 93 | m_texture_format(0), |
| 95 | 94 | m_changed(true), |
| 96 | 95 | m_last_partial_scan(0), |
| 97 | m_screen_overlay_bitmap(NULL), | |
| 98 | 96 | m_frame_period(DEFAULT_FRAME_PERIOD.as_attoseconds()), |
| 99 | 97 | m_scantime(1), |
| 100 | 98 | m_pixeltime(1), |
| r13817 | r13818 | |
| 112 | 110 | m_visarea.max_x = m_width - 1; |
| 113 | 111 | m_visarea.max_y = m_height - 1; |
| 114 | 112 | memset(m_texture, 0, sizeof(m_texture)); |
| 115 | memset(m_bitmap, 0, sizeof(m_bitmap)); | |
| 116 | 113 | } |
| 117 | 114 | |
| 118 | 115 | |
| r13817 | r13818 | |
| 352 | 349 | int width, height; |
| 353 | 350 | if (sscanf(machine().options().snap_size(), "%dx%d", &width, &height) != 2 || width == 0 || height == 0) |
| 354 | 351 | width = height = 300; |
| 355 | m_burnin = auto_alloc(machine(), bitmap_t(width, height, BITMAP_FORMAT_INDEXED64)); | |
| 356 | if (m_burnin == NULL) | |
| 357 | fatalerror("Error allocating burn-in bitmap for screen at (%dx%d)\n", width, height); | |
| 358 | m_burnin->fill(0); | |
| 352 | m_burnin.allocate(width, height, BITMAP_FORMAT_INDEXED64); | |
| 353 | m_burnin.fill(0); | |
| 359 | 354 | } |
| 360 | 355 | |
| 361 | 356 | // load the effect overlay |
| r13817 | r13818 | |
| 390 | 385 | { |
| 391 | 386 | machine().render().texture_free(m_texture[0]); |
| 392 | 387 | machine().render().texture_free(m_texture[1]); |
| 393 | if (m_burnin | |
| 388 | if (m_burnin.valid()) | |
| 394 | 389 | finalize_burnin(); |
| 395 | global_free(m_screen_overlay_bitmap); | |
| 396 | 390 | } |
| 397 | 391 | |
| 398 | 392 | |
| r13817 | r13818 | |
| 495 | 489 | if (m_type == SCREEN_TYPE_VECTOR) |
| 496 | 490 | return; |
| 497 | 491 | |
| 498 | int curwidth = 0, curheight = 0; | |
| 499 | ||
| 500 | 492 | // extract the current width/height from the bitmap |
| 501 | if (m_bitmap[0] != NULL) | |
| 493 | int curwidth = 0, curheight = 0; | |
| 494 | if (m_bitmap[0].valid()) | |
| 502 | 495 | { |
| 503 | curwidth = m_bitmap[0]->width(); | |
| 504 | curheight = m_bitmap[0]->height(); | |
| 496 | curwidth = m_bitmap[0].width(); | |
| 497 | curheight = m_bitmap[0].height(); | |
| 505 | 498 | } |
| 506 | 499 | |
| 507 | 500 | // if we're too small to contain this width/height, reallocate our bitmaps and textures |
| r13817 | r13818 | |
| 510 | 503 | // free what we have currently |
| 511 | 504 | machine().render().texture_free(m_texture[0]); |
| 512 | 505 | machine().render().texture_free(m_texture[1]); |
| 513 | auto_free(machine(), m_bitmap[0]); | |
| 514 | auto_free(machine(), m_bitmap[1]); | |
| 515 | 506 | |
| 516 | 507 | // compute new width/height |
| 517 | 508 | curwidth = MAX(m_width, curwidth); |
| r13817 | r13818 | |
| 528 | 519 | } |
| 529 | 520 | |
| 530 | 521 | // allocate bitmaps |
| 531 | m_bitmap[0] = auto_alloc(machine(), bitmap_t(curwidth, curheight, m_format)); | |
| 532 | m_bitmap[0]->set_palette(machine().palette); | |
| 533 | m_bitmap[1] = auto_alloc(machine(), bitmap_t(curwidth, curheight, m_format)); | |
| 534 | m_bitmap[1]->set_palette(machine().palette); | |
| 522 | m_bitmap[0].allocate(curwidth, curheight, m_format); | |
| 523 | m_bitmap[0].set_palette(machine().palette); | |
| 524 | m_bitmap[1].allocate(curwidth, curheight, m_format); | |
| 525 | m_bitmap[1].set_palette(machine().palette); | |
| 535 | 526 | |
| 536 | 527 | // allocate textures |
| 537 | 528 | m_texture[0] = machine().render().texture_alloc(); |
| 538 | m_texture[0]->set_bitmap(m_bitmap[0], &m_visarea, m_texture_format, palette); | |
| 529 | m_texture[0]->set_bitmap(&m_bitmap[0], &m_visarea, m_texture_format, palette); | |
| 539 | 530 | m_texture[1] = machine().render().texture_alloc(); |
| 540 | m_texture[1]->set_bitmap(m_bitmap[1], &m_visarea, m_texture_format, palette); | |
| 531 | m_texture[1]->set_bitmap(&m_bitmap[1], &m_visarea, m_texture_format, palette); | |
| 532 | ||
| 533 | // allocate generic backing bitmap | |
| 534 | m_default.allocate(curwidth, curheight, m_format); | |
| 535 | m_default.set_palette(machine().palette); | |
| 541 | 536 | } |
| 542 | 537 | } |
| 543 | 538 | |
| r13817 | r13818 | |
| 618 | 613 | g_profiler.start(PROFILER_VIDEO); |
| 619 | 614 | LOG_PARTIAL_UPDATES(("updating %d-%d\n", clip.min_y, clip.max_y)); |
| 620 | 615 | |
| 621 | flags = screen_update( | |
| 616 | flags = screen_update( | |
| 622 | 617 | m_partial_updates_this_frame++; |
| 623 | 618 | g_profiler.stop(); |
| 624 | 619 | |
| r13817 | r13818 | |
| 876 | 871 | fixedvis.max_y++; |
| 877 | 872 | |
| 878 | 873 | palette_t *palette = (m_texture_format == TEXFORMAT_PALETTE16) ? machine().palette : NULL; |
| 879 | m_texture[m_curbitmap]->set_bitmap(m_bitmap[m_curbitmap], &fixedvis, m_texture_format, palette); | |
| 874 | m_texture[m_curbitmap]->set_bitmap(&m_bitmap[m_curbitmap], &fixedvis, m_texture_format, palette); | |
| 880 | 875 | |
| 881 | 876 | m_curtexture = m_curbitmap; |
| 882 | 877 | m_curbitmap = 1 - m_curbitmap; |
| r13817 | r13818 | |
| 902 | 897 | void screen_device::update_burnin() |
| 903 | 898 | { |
| 904 | 899 | #undef rand |
| 905 | if (m_burnin | |
| 900 | if (!m_burnin.valid()) | |
| 906 | 901 | return; |
| 907 | 902 | |
| 908 | bitmap_t *srcbitmap = m_bitmap[m_curtexture]; | |
| 909 | if (srcbitmap == NULL) | |
| 903 | bitmap_t &srcbitmap = m_bitmap[m_curtexture]; | |
| 904 | if (!srcbitmap.valid()) | |
| 910 | 905 | return; |
| 911 | 906 | |
| 912 | int srcwidth = srcbitmap->width(); | |
| 913 | int srcheight = srcbitmap->height(); | |
| 914 | int dstwidth = m_burnin->width(); | |
| 915 | int dstheight = m_burnin->height(); | |
| 907 | int srcwidth = srcbitmap.width(); | |
| 908 | int srcheight = srcbitmap.height(); | |
| 909 | int dstwidth = m_burnin.width(); | |
| 910 | int dstheight = m_burnin.height(); | |
| 916 | 911 | int xstep = (srcwidth << 16) / dstwidth; |
| 917 | 912 | int ystep = (srcheight << 16) / dstheight; |
| 918 | 913 | int xstart = ((UINT32)rand() % 32767) * xstep / 32767; |
| r13817 | r13818 | |
| 923 | 918 | // iterate over rows in the destination |
| 924 | 919 | for (y = 0, srcy = ystart; y < dstheight; y++, srcy += ystep) |
| 925 | 920 | { |
| 926 | UINT64 *dst = &m_burnin | |
| 921 | UINT64 *dst = &m_burnin. | |
| 927 | 922 | |
| 928 | 923 | // handle the 16-bit palettized case |
| 929 | if (srcbitmap | |
| 924 | if (srcbitmap. | |
| 930 | 925 | { |
| 931 | const UINT16 *src = &srcbitmap | |
| 926 | const UINT16 *src = &srcbitmap. | |
| 932 | 927 | const rgb_t *palette = palette_entry_list_adjusted(machine().palette); |
| 933 | 928 | for (x = 0, srcx = xstart; x < dstwidth; x++, srcx += xstep) |
| 934 | 929 | { |
| r13817 | r13818 | |
| 938 | 933 | } |
| 939 | 934 | |
| 940 | 935 | // handle the 15-bit RGB case |
| 941 | else if (srcbitmap | |
| 936 | else if (srcbitmap. | |
| 942 | 937 | { |
| 943 | const UINT16 *src = &srcbitmap | |
| 938 | const UINT16 *src = &srcbitmap. | |
| 944 | 939 | for (x = 0, srcx = xstart; x < dstwidth; x++, srcx += xstep) |
| 945 | 940 | { |
| 946 | 941 | rgb15_t pixel = src[srcx >> 16]; |
| r13817 | r13818 | |
| 949 | 944 | } |
| 950 | 945 | |
| 951 | 946 | // handle the 32-bit RGB case |
| 952 | else if (srcbitmap | |
| 947 | else if (srcbitmap. | |
| 953 | 948 | { |
| 954 | const UINT32 *src = &srcbitmap | |
| 949 | const UINT32 *src = &srcbitmap. | |
| 955 | 950 | for (x = 0, srcx = xstart; x < dstwidth; x++, srcx += xstep) |
| 956 | 951 | { |
| 957 | 952 | rgb_t pixel = src[srcx >> 16]; |
| r13817 | r13818 | |
| 968 | 963 | |
| 969 | 964 | void screen_device::finalize_burnin() |
| 970 | 965 | { |
| 971 | if (m_burnin | |
| 966 | if (!m_burnin.valid()) | |
| 972 | 967 | return; |
| 973 | 968 | |
| 974 | 969 | // compute the scaled visible region |
| 975 | 970 | rectangle scaledvis; |
| 976 | scaledvis.min_x = m_visarea.min_x * m_burnin->width() / m_width; | |
| 977 | scaledvis.max_x = m_visarea.max_x * m_burnin->width() / m_width; | |
| 978 | scaledvis.min_y = m_visarea.min_y * m_burnin->height() / m_height; | |
| 979 | scaledvis.max_y = m_visarea.max_y * m_burnin->height() / m_height; | |
| 971 | scaledvis.min_x = m_visarea.min_x * m_burnin.width() / m_width; | |
| 972 | scaledvis.max_x = m_visarea.max_x * m_burnin.width() / m_width; | |
| 973 | scaledvis.min_y = m_visarea.min_y * m_burnin.height() / m_height; | |
| 974 | scaledvis.max_y = m_visarea.max_y * m_burnin.height() / m_height; | |
| 980 | 975 | |
| 981 | 976 | // wrap a bitmap around the subregion we care about |
| 982 | 977 | bitmap_t finalmap(scaledvis.max_x + 1 - scaledvis.min_x, scaledvis.max_y + 1 - scaledvis.min_y, BITMAP_FORMAT_ARGB32); |
| 983 | int srcwidth = m_burnin->width(); | |
| 984 | int srcheight = m_burnin->height(); | |
| 978 | int srcwidth = m_burnin.width(); | |
| 979 | int srcheight = m_burnin.height(); | |
| 985 | 980 | int dstwidth = finalmap.width(); |
| 986 | 981 | int dstheight = finalmap.height(); |
| 987 | 982 | int xstep = (srcwidth << 16) / dstwidth; |
| r13817 | r13818 | |
| 992 | 987 | UINT64 maxval = 0; |
| 993 | 988 | for (int y = 0; y < srcheight; y++) |
| 994 | 989 | { |
| 995 | UINT64 *src = &m_burnin | |
| 990 | UINT64 *src = &m_burnin. | |
| 996 | 991 | for (int x = 0; x < srcwidth; x++) |
| 997 | 992 | { |
| 998 | 993 | minval = MIN(minval, src[x]); |
| r13817 | r13818 | |
| 1006 | 1001 | // now normalize and convert to RGB |
| 1007 | 1002 | for (int y = 0, srcy = 0; y < dstheight; y++, srcy += ystep) |
| 1008 | 1003 | { |
| 1009 | UINT64 *src = &m_burnin | |
| 1004 | UINT64 *src = &m_burnin. | |
| 1010 | 1005 | UINT32 *dst = &finalmap.pix32(y); |
| 1011 | 1006 | for (int x = 0, srcx = 0; x < dstwidth; x++, srcx += xstep) |
| 1012 | 1007 | { |
| r13817 | r13818 | |
| 1056 | 1051 | |
| 1057 | 1052 | // load the file |
| 1058 | 1053 | emu_file file(machine().options().art_path(), OPEN_FLAG_READ); |
| 1059 | m_screen_overlay_bitmap = render_load_png(file, NULL, fullname, NULL, NULL); | |
| 1060 | if (m_screen_overlay_bitmap != NULL) | |
| 1061 | m_container->set_overlay(m_screen_overlay_bitmap); | |
| 1054 | render_load_png(m_screen_overlay_bitmap, file, NULL, fullname); | |
| 1055 | if (m_screen_overlay_bitmap.valid()) | |
| 1056 | m_container->set_overlay(&m_screen_overlay_bitmap); | |
| 1062 | 1057 | else |
| 1063 | 1058 | mame_printf_warning("Unable to load effect PNG file '%s'\n", fullname.cstr()); |
| 1064 | 1059 | } |
| 1065 | 1060 | |
| 1061 | ||
| 1066 | 1062 | //------------------------------------------------- |
| 1067 | 1063 | // screen_update - default implementation which |
| 1068 | 1064 | // calls to the legacy screen_update function |
| r13817 | r13818 | |
| 1070 | 1066 | |
| 1071 | 1067 | bool screen_device::screen_update(bitmap_t &bitmap, const rectangle &cliprect) |
| 1072 | 1068 | { |
| 1073 | if (m_screen_update != NULL) | |
| 1069 | if (m_screen_update != NULL) | |
| 1074 | 1070 | return (*m_screen_update)(*this, bitmap, cliprect); |
| 1075 | | |
| 1071 | | |
| 1076 | 1072 | return machine().driver_data<driver_device>()->screen_update(*this, bitmap, cliprect); |
| 1077 | } | |
| 1078 | 1073 | } |
| 1079 | 1074 | |
| 1075 | ||
| 1080 | 1076 | //------------------------------------------------- |
| 1081 | 1077 | // screen_eof - default implementation which |
| 1082 | 1078 | // calls to the legacy screen_update function |
| r13817 | r13818 | |
|---|---|---|
| 150 | 150 | // additional helpers |
| 151 | 151 | void register_vblank_callback(vblank_state_delegate vblank_callback); |
| 152 | 152 | bitmap_t *alloc_compatible_bitmap(int width = 0, int height = 0) { return auto_bitmap_alloc(machine(), (width == 0) ? m_width : width, (height == 0) ? m_height : height, format()); } |
| 153 | bitmap_t &default_bitmap() { return m_default; } | |
| 153 | 154 | |
| 154 | 155 | // internal to the video system |
| 155 | 156 | bool update_quads(); |
| r13817 | r13818 | |
| 208 | 209 | |
| 209 | 210 | // textures and bitmaps |
| 210 | 211 | render_texture * m_texture[2]; // 2x textures for the screen bitmap |
| 211 | bitmap_t * m_bitmap[2]; // 2x bitmaps for rendering | |
| 212 | bitmap_t * m_burnin; // burn-in bitmap | |
| 212 | bitmap_t m_bitmap[2]; // 2x bitmaps for rendering | |
| 213 | bitmap_t m_default; // default backing bitmap (copied by default) | |
| 214 | bitmap_t m_burnin; // burn-in bitmap | |
| 213 | 215 | UINT8 m_curbitmap; // current bitmap index |
| 214 | 216 | UINT8 m_curtexture; // current texture index |
| 215 | 217 | INT32 m_texture_format; // texture format of bitmap for this screen |
| 216 | 218 | bool m_changed; // has this bitmap changed? |
| 217 | 219 | INT32 m_last_partial_scan; // scanline of last partial update |
| 218 | bitmap_t | |
| 220 | bitmap_t | |
| 219 | 221 | |
| 220 | 222 | // screen timing |
| 221 | 223 | attoseconds_t m_frame_period; // attoseconds per frame |
| r13817 | r13818 | |
|---|---|---|
| 804 | 804 | /* |
| 805 | 805 | Assumed input parameters or local variables: |
| 806 | 806 | |
| 807 | bitmap_t *dest - the bitmap to copy to | |
| 808 | bitmap_t *src - the bitmap to copy from (must be same bpp as dest) | |
| 807 | bitmap_t &dest - the bitmap to copy to | |
| 808 | bitmap_t &src - the bitmap to copy from (must be same bpp as dest) | |
| 809 | 809 | const rectangle &cliprect - a clipping rectangle (assumed to be clipped to the size of 'dest') |
| 810 | 810 | int flipx - non-zero means render right-to-left instead of left-to-right |
| 811 | 811 | int flipy - non-zero means render bottom-to-top instead of top-to-bottom |
| 812 | 812 | INT32 destx - the top-left X coordinate to copy to |
| 813 | 813 | INT32 desty - the top-left Y coordinate to copy to |
| 814 | bitmap_t | |
| 814 | bitmap_t &priority - the priority bitmap (even if PRIORITY_TYPE is NO_PRIORITY, at least needs a dummy) | |
| 815 | 815 | */ |
| 816 | 816 | |
| 817 | 817 | #define COPYBITMAP_CORE(PIXEL_TYPE, PIXEL_OP, PRIORITY_TYPE) \ |
| r13817 | r13818 | |
| 978 | 978 | /* |
| 979 | 979 | Assumed input parameters or local variables: |
| 980 | 980 | |
| 981 | bitmap_t *dest - the bitmap to copy to | |
| 982 | bitmap_t *src - the bitmap to copy from (must be same bpp as dest) | |
| 981 | bitmap_t &dest - the bitmap to copy to | |
| 982 | bitmap_t &src - the bitmap to copy from (must be same bpp as dest) | |
| 983 | 983 | const rectangle &cliprect - a clipping rectangle (assumed to be clipped to the size of 'dest') |
| 984 | 984 | INT32 destx - the 16.16 source X position at destination pixel (0,0) |
| 985 | 985 | INT32 desty - the 16.16 source Y position at destination pixel (0,0) |
| r13817 | r13818 | |
| 988 | 988 | INT32 incxy - the 16.16 amount to increment in source X for each destination Y pixel |
| 989 | 989 | INT32 incyy - the 16.16 amount to increment in source Y for each destination Y pixel |
| 990 | 990 | int wraparound - non-zero means wrap when hitting the edges of the source |
| 991 | bitmap_t | |
| 991 | bitmap_t &priority - the priority bitmap (even if PRIORITY_TYPE is NO_PRIORITY, at least needs a dummy) | |
| 992 | 992 | */ |
| 993 | 993 | |
| 994 | 994 | #define COPYROZBITMAP_CORE(PIXEL_TYPE, PIXEL_OP, PRIORITY_TYPE) \ |
| r13817 | r13818 | |
| 1284 | 1284 | INT32 desty - the Y coordinate to copy to |
| 1285 | 1285 | INT32 length - the total number of pixels to copy |
| 1286 | 1286 | const UINTx *srcptr - pointer to memory containing the source pixels |
| 1287 | bitmap_t | |
| 1287 | bitmap_t &priority - the priority bitmap (even if PRIORITY_TYPE is NO_PRIORITY, at least needs a dummy) | |
| 1288 | 1288 | */ |
| 1289 | 1289 | |
| 1290 | 1290 | #define DRAWSCANLINE_CORE(PIXEL_TYPE, PIXEL_OP, PRIORITY_TYPE) \ |
| r13817 | r13818 | |
|---|---|---|
| 1533 | 1533 | for( x = 0; x < 96; x++ ) { |
| 1534 | 1534 | UINT8 data = state->m_p_ram[ ( y * 12 ) + x ]; |
| 1535 | 1535 | |
| 1536 | machine.generic.tmpbitmap->pix16(y + 0, x) = ( data & 0x01 ) ? 3 : 0; | |
| 1537 | machine.generic.tmpbitmap->pix16(y + 1, x) = ( data & 0x02 ) ? 3 : 0; | |
| 1538 | machine.generic.tmpbitmap->pix16(y + 2, x) = ( data & 0x04 ) ? 3 : 0; | |
| 1539 | machine.generic.tmpbitmap->pix16(y + 3, x) = ( data & 0x08 ) ? 3 : 0; | |
| 1540 | machine.generic.tmpbitmap->pix16(y + 4, x) = ( data & 0x10 ) ? 3 : 0; | |
| 1541 | machine.generic.tmpbitmap->pix16(y + 5, x) = ( data & 0x20 ) ? 3 : 0; | |
| 1542 | machine.generic.tmpbitmap->pix16(y + 6, x) = ( data & 0x40 ) ? 3 : 0; | |
| 1543 | machine.generic.tmpbitmap->pix16(y + 7, x) = ( data & 0x80 ) ? 3 : 0; | |
| 1536 | machine.primary_screen->default_bitmap().pix16(y + 0, x) = ( data & 0x01 ) ? 3 : 0; | |
| 1537 | machine.primary_screen->default_bitmap().pix16(y + 1, x) = ( data & 0x02 ) ? 3 : 0; | |
| 1538 | machine.primary_screen->default_bitmap().pix16(y + 2, x) = ( data & 0x04 ) ? 3 : 0; | |
| 1539 | machine.primary_screen->default_bitmap().pix16(y + 3, x) = ( data & 0x08 ) ? 3 : 0; | |
| 1540 | machine.primary_screen->default_bitmap().pix16(y + 4, x) = ( data & 0x10 ) ? 3 : 0; | |
| 1541 | machine.primary_screen->default_bitmap().pix16(y + 5, x) = ( data & 0x20 ) ? 3 : 0; | |
| 1542 | machine.primary_screen->default_bitmap().pix16(y + 6, x) = ( data & 0x40 ) ? 3 : 0; | |
| 1543 | machine.primary_screen->default_bitmap().pix16(y + 7, x) = ( data & 0x80 ) ? 3 : 0; | |
| 1544 | 1544 | } |
| 1545 | 1545 | } |
| 1546 | 1546 |
| r13817 | r13818 | |
|---|---|---|
| 244 | 244 | video->cpu = device->machine().device("maincpu"); |
| 245 | 245 | video->space = device->machine().device("maincpu")->memory().space(AS_PROGRAM); |
| 246 | 246 | video->chip = conf->chip; |
| 247 | ||
| 248 | if (video->chip!=TI_TMS991X) | |
| 249 | { | |
| 250 | running_machine &machine = device->machine(); | |
| 251 | VIDEO_START_CALL(generic_bitmapped); | |
| 252 | } | |
| 253 | 247 | } |
| 254 | 248 | |
| 255 | 249 | static DEVICE_STOP( ti99_video ) |
| r13817 | r13818 | |
| 264 | 258 | running_machine &machine = device->machine(); |
| 265 | 259 | int memsize = (input_port_read(machine, "V9938-MEM")==0)? 0x20000 : 0x30000; |
| 266 | 260 | |
| 267 | v9938_init(machine, 0, *machine.primary_screen, | |
| 261 | v9938_init(machine, 0, *machine.primary_screen, | |
| 268 | 262 | MODEL_V9938, memsize, conf->callback); |
| 269 | 263 | v9938_reset(0); |
| 270 | 264 | } |
| r13817 | r13818 | |
|---|---|---|
| 64 | 64 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(_blank)) \ |
| 65 | 65 | MCFG_SCREEN_SIZE(_x, _y) \ |
| 66 | 66 | MCFG_SCREEN_VISIBLE_AREA(0, _x - 1, 0, _y - 1) \ |
| 67 | MCFG_SCREEN_UPDATE(generic_bitmapped) \ | |
| 68 | 67 | MCFG_PALETTE_LENGTH(512) \ |
| 69 | 68 | MCFG_PALETTE_INIT(v9938) |
| 70 | 69 |
| r13817 | r13818 | |
|---|---|---|
| 302 | 302 | ra = y % 10; |
| 303 | 303 | /* Draw a line of the display */ |
| 304 | 304 | ma = (state->m_new_start_y + (y/10)) * 128 + state->m_new_start_x; |
| 305 | UINT16 *p = &machine. | |
| 305 | UINT16 *p = &machine.p | |
| 306 | 306 | |
| 307 | 307 | for ( x = 0; x < 52; x++ ) |
| 308 | 308 | { |
| r13817 | r13818 | |
|---|---|---|
| 1372 | 1372 | j -= 160 * 102 / 2 - 1; |
| 1373 | 1373 | for ( ; state->m_line_y < yend; state->m_line_y++) |
| 1374 | 1374 | { |
| 1375 | line = &machine. | |
| 1375 | line = &machine.p | |
| 1376 | 1376 | for (x = 160 - 2; x >= 0; j++, x -= 2) |
| 1377 | 1377 | { |
| 1378 | 1378 | byte = lynx_read_vram(state, j); |
| r13817 | r13818 | |
| 1385 | 1385 | { |
| 1386 | 1386 | for ( ; state->m_line_y < yend; state->m_line_y++) |
| 1387 | 1387 | { |
| 1388 | line = &machine. | |
| 1388 | line = &machine.p | |
| 1389 | 1389 | for (x = 0; x < 160; j++, x += 2) |
| 1390 | 1390 | { |
| 1391 | 1391 | byte = lynx_read_vram(state, j); |
| r13817 | r13818 | |
|---|---|---|
| 16 | 16 | wswan_state *state = machine.driver_data<wswan_state>(); |
| 17 | 17 | y += 5*8; |
| 18 | 18 | if ( state->m_vdp.display_vertical ) { |
| 19 | machine. | |
| 19 | machine.p | |
| 20 | 20 | } else { |
| 21 | machine. | |
| 21 | machine.p | |
| 22 | 22 | } |
| 23 | 23 | } |
| 24 | 24 | |
| r13817 | r13818 | |
| 42 | 42 | rec2.max_y = 28*8 - 1 - rec->min_x; |
| 43 | 43 | rec2.min_x = rec->min_y; |
| 44 | 44 | rec2.max_x = rec->max_y; |
| 45 | machine. | |
| 45 | machine.p | |
| 46 | 46 | } else { |
| 47 | machine. | |
| 47 | machine.p | |
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | 50 |
| r13817 | r13818 | |
|---|---|---|
| 44 | 44 | { |
| 45 | 45 | int y, new_x, new_y; |
| 46 | 46 | rectangle r; |
| 47 | bitmap_t &bitmap = | |
| 47 | bitmap_t &bitmap = | |
| 48 | 48 | |
| 49 | 49 | new_y = machine().primary_screen->vpos(); |
| 50 | 50 | new_x = machine().primary_screen->hpos(); |
| r13817 | r13818 | |
| 100 | 100 | const rectangle r1 = screen->visible_area(); |
| 101 | 101 | rectangle r; |
| 102 | 102 | |
| 103 | bitmap_t &bitmap = | |
| 103 | bitmap_t &bitmap = | |
| 104 | 104 | r.min_x = r1.min_x; |
| 105 | 105 | r.max_x = r1.max_x; |
| 106 | 106 | r.min_y = r.max_y = state->m_ula_scanline_count; |
| r13817 | r13818 | |
| 139 | 139 | |
| 140 | 140 | if ((!state->m_ula_irq_active) && (chr == 0x76)) |
| 141 | 141 | { |
| 142 | bitmap_t &bitmap = | |
| 142 | bitmap_t &bitmap = | |
| 143 | 143 | UINT16 y, *scanline; |
| 144 | 144 | UINT16 ireg = cpu_get_reg(machine.device("maincpu"), Z80_I) << 8; |
| 145 | 145 | UINT8 data, *chrgen, creg; |
| r13817 | r13818 | |
| 201 | 201 | zx_state *state = machine.driver_data<zx_state>(); |
| 202 | 202 | state->m_ula_nmi = machine.scheduler().timer_alloc(FUNC(zx_ula_nmi)); |
| 203 | 203 | state->m_ula_irq_active = 0; |
| 204 | VIDEO_START_CALL(generic_bitmapped); | |
| 205 | 204 | } |
| 206 | 205 | |
| 207 | 206 | SCREEN_EOF( zx ) |
| r13817 | r13818 | |
|---|---|---|
| 202 | 202 | INLINE void gb_update_sprites ( running_machine &machine ) |
| 203 | 203 | { |
| 204 | 204 | gb_state *state = machine.driver_data<gb_state>(); |
| 205 | bitmap_t &bitmap = | |
| 205 | bitmap_t &bitmap = | |
| 206 | 206 | UINT8 height, tilemask, line, *oam, *vram; |
| 207 | 207 | int i, yindex; |
| 208 | 208 | |
| r13817 | r13818 | |
| 290 | 290 | static void gb_update_scanline( running_machine &machine ) |
| 291 | 291 | { |
| 292 | 292 | gb_state *state = machine.driver_data<gb_state>(); |
| 293 | bitmap_t &bitmap = | |
| 293 | bitmap_t &bitmap = | |
| 294 | 294 | |
| 295 | 295 | g_profiler.start(PROFILER_VIDEO); |
| 296 | 296 | |
| r13817 | r13818 | |
| 446 | 446 | INLINE void sgb_update_sprites (running_machine &machine) |
| 447 | 447 | { |
| 448 | 448 | gb_state *state = machine.driver_data<gb_state>(); |
| 449 | bitmap_t &bitmap = | |
| 449 | bitmap_t &bitmap = | |
| 450 | 450 | UINT8 height, tilemask, line, *oam, *vram, pal; |
| 451 | 451 | INT16 i, yindex; |
| 452 | 452 | |
| r13817 | r13818 | |
| 546 | 546 | UINT16 yidx, xidx, xindex; |
| 547 | 547 | UINT8 *map, *tiles, *tiles2; |
| 548 | 548 | UINT8 pal, i; |
| 549 | bitmap_t &bitmap = | |
| 549 | bitmap_t &bitmap = | |
| 550 | 550 | |
| 551 | 551 | map = state->m_sgb_tile_map - 64; |
| 552 | 552 | |
| r13817 | r13818 | |
| 616 | 616 | static void sgb_update_scanline( running_machine &machine ) |
| 617 | 617 | { |
| 618 | 618 | gb_state *state = machine.driver_data<gb_state>(); |
| 619 | bitmap_t &bitmap = | |
| 619 | bitmap_t &bitmap = | |
| 620 | 620 | |
| 621 | 621 | g_profiler.start(PROFILER_VIDEO); |
| 622 | 622 | |
| r13817 | r13818 | |
| 811 | 811 | INLINE void cgb_update_sprites ( running_machine &machine ) |
| 812 | 812 | { |
| 813 | 813 | gb_state *state = machine.driver_data<gb_state>(); |
| 814 | bitmap_t &bitmap = | |
| 814 | bitmap_t &bitmap = | |
| 815 | 815 | UINT8 height, tilemask, line, *oam; |
| 816 | 816 | int i, xindex, yindex; |
| 817 | 817 | |
| r13817 | r13818 | |
| 924 | 924 | static void cgb_update_scanline ( running_machine &machine ) |
| 925 | 925 | { |
| 926 | 926 | gb_state *state = machine.driver_data<gb_state>(); |
| 927 | bitmap_t &bitmap = | |
| 927 | bitmap_t &bitmap = | |
| 928 | 928 | |
| 929 | 929 | g_profiler.start(PROFILER_VIDEO); |
| 930 | 930 |
| r13817 | r13818 | |
|---|---|---|
| 17 | 17 | rec.min_x = 0; |
| 18 | 18 | rec.max_x = Y_PIXELS - 1; |
| 19 | 19 | rec.min_y = rec.max_y = state->m_scanline; |
| 20 | machine. | |
| 20 | machine.p | |
| 21 | 21 | return; |
| 22 | 22 | } |
| 23 | 23 | else |
| r13817 | r13818 | |
| 56 | 56 | for( i = 0; i < 40; i++ ) |
| 57 | 57 | { |
| 58 | 58 | UINT8 p = line[i]; |
| 59 | machine.generic.tmpbitmap->pix16(i * 4 + 0, state->m_scanline) = pal[ ( p >> 6 ) & 3 ]; | |
| 60 | machine.generic.tmpbitmap->pix16(i * 4 + 1, state->m_scanline) = pal[ ( p >> 4 ) & 3 ]; | |
| 61 | machine.generic.tmpbitmap->pix16(i * 4 + 2, state->m_scanline) = pal[ ( p >> 2 ) & 3 ]; | |
| 62 | machine.generic.tmpbitmap->pix16(i * 4 + 3, state->m_scanline) = pal[ ( p ) & 3 ]; | |
| 59 | machine.primary_screen->default_bitmap().pix16(i * 4 + 0, state->m_scanline) = pal[ ( p >> 6 ) & 3 ]; | |
| 60 | machine.primary_screen->default_bitmap().pix16(i * 4 + 1, state->m_scanline) = pal[ ( p >> 4 ) & 3 ]; | |
| 61 | machine.primary_screen->default_bitmap().pix16(i * 4 + 2, state->m_scanline) = pal[ ( p >> 2 ) & 3 ]; | |
| 62 | machine.primary_screen->default_bitmap().pix16(i * 4 + 3, state->m_scanline) = pal[ ( p ) & 3 ]; | |
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | 65 | |
| r13817 | r13818 | |
| 69 | 69 | VIDEO_START( gamecom ) |
| 70 | 70 | { |
| 71 | 71 | gamecom_state *state = machine.driver_data<gamecom_state>(); |
| 72 | VIDEO_START_CALL( generic_bitmapped ); | |
| 73 | 72 | state->m_scanline_timer = machine.scheduler().timer_alloc(FUNC(gamecom_scanline)); |
| 74 | 73 | state->m_scanline_timer->adjust( machine.primary_screen->time_until_pos(0 ), 0, machine.primary_screen->scan_period() ); |
| 75 | 74 |
| r13817 | r13818 | |
|---|---|---|
| 1001 | 1001 | } |
| 1002 | 1002 | } |
| 1003 | 1003 | |
| 1004 | static void Nick_DoScreen(NICK_STATE *nick, bitmap_t | |
| 1004 | static void Nick_DoScreen(NICK_STATE *nick, bitmap_t &bm) | |
| 1005 | 1005 | { |
| 1006 | 1006 | int line = 0; |
| 1007 | 1007 | |
| r13817 | r13818 | |
| 1009 | 1009 | { |
| 1010 | 1010 | |
| 1011 | 1011 | /* set write address for line */ |
| 1012 | nick->dest = &bm | |
| 1012 | nick->dest = &bm. | |
| 1013 | 1013 | nick->dest_pos = 0; |
| 1014 | nick->dest_max_pos = bm | |
| 1014 | nick->dest_max_pos = bm. | |
| 1015 | 1015 | |
| 1016 | 1016 | /* write line */ |
| 1017 | 1017 | Nick_DoLine(nick); |
| r13817 | r13818 | |
| 1031 | 1031 | |
| 1032 | 1032 | state->nick->videoram = machine.device<ram_device>(RAM_TAG)->pointer(); |
| 1033 | 1033 | Nick_Init(state->nick); |
| 1034 | VIDEO_START_CALL(generic_bitmapped); | |
| 1035 | 1034 | } |
| 1036 | 1035 | |
| 1037 | 1036 | |
| 1038 | 1037 | SCREEN_UPDATE( epnick ) |
| 1039 | 1038 | { |
| 1040 | 1039 | ep_state *state = screen.machine().driver_data<ep_state>(); |
| 1041 | Nick_DoScreen(state->nick,screen.machine().generic.tmpbitmap); | |
| 1042 | return SCREEN_UPDATE_CALL(generic_bitmapped); | |
| 1040 | Nick_DoScreen(state->nick,screen.default_bitmap()); | |
| 1041 | copybitmap(bitmap, screen.default_bitmap(), 0, 0, 0, 0, cliprect); | |
| 1042 | return 0; | |
| 1043 | 1043 | } |
| r13817 | r13818 | |
|---|---|---|
| 14 | 14 | I8275_DISPLAY_PIXELS(radio86_display_pixels) |
| 15 | 15 | { |
| 16 | 16 | int i; |
| 17 | bitmap_t &bitmap = | |
| 17 | bitmap_t &bitmap = | |
| 18 | 18 | UINT8 *charmap = device->machine().region("gfx1")->base(); |
| 19 | 19 | UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff; |
| 20 | 20 | if (vsp) { |
| r13817 | r13818 | |
| 36 | 36 | { |
| 37 | 37 | radio86_state *state = device->machine().driver_data<radio86_state>(); |
| 38 | 38 | int i; |
| 39 | bitmap_t &bitmap = | |
| 39 | bitmap_t &bitmap = | |
| 40 | 40 | UINT8 *charmap = device->machine().region("gfx1")->base() + (state->m_mikrosha_font_page & 1) * 0x400; |
| 41 | 41 | UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff; |
| 42 | 42 | if (vsp) { |
| r13817 | r13818 | |
| 56 | 56 | I8275_DISPLAY_PIXELS(apogee_display_pixels) |
| 57 | 57 | { |
| 58 | 58 | int i; |
| 59 | bitmap_t &bitmap = | |
| 59 | bitmap_t &bitmap = | |
| 60 | 60 | UINT8 *charmap = device->machine().region("gfx1")->base() + (gpa & 1) * 0x400; |
| 61 | 61 | UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff; |
| 62 | 62 | if (vsp) { |
| r13817 | r13818 | |
| 76 | 76 | I8275_DISPLAY_PIXELS(partner_display_pixels) |
| 77 | 77 | { |
| 78 | 78 | int i; |
| 79 | bitmap_t &bitmap = | |
| 79 | bitmap_t &bitmap = | |
| 80 | 80 | UINT8 *charmap = device->machine().region("gfx1")->base() + 0x400 * (gpa * 2 + hlgt); |
| 81 | 81 | UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff; |
| 82 | 82 | if (vsp) { |
| r13817 | r13818 | |
| 97 | 97 | { |
| 98 | 98 | device_t *devconf = screen.machine().device("i8275"); |
| 99 | 99 | i8275_update( devconf, bitmap, cliprect); |
| 100 | | |
| 100 | copybitmap | |
| 101 | 101 | return 0; |
| 102 | 102 | } |
| 103 | 103 |
| r13817 | r13818 | |
|---|---|---|
| 25 | 25 | int width = screen->width(); |
| 26 | 26 | int height = screen->height(); |
| 27 | 27 | |
| 28 | VIDEO_START_CALL(generic_bitmapped); | |
| 29 | ||
| 30 | 28 | state->m_dlybitmap.allocate(width, height, BITMAP_FORMAT_INDEXED16); |
| 31 | 29 | } |
| 32 | 30 | |
| r13817 | r13818 | |
| 327 | 325 | int i, address, offset, cursor, size, code, x, y; |
| 328 | 326 | rectangle r; |
| 329 | 327 | |
| 330 | machine. | |
| 328 | machine.p | |
| 331 | 329 | state->m_dlybitmap.fill(get_black_pen(machine), cliprect); |
| 332 | 330 | |
| 333 | 331 | if(state->m_crt.vertical_displayed || state->m_crt.horizontal_displayed) |
| r13817 | r13818 | |
| 355 | 353 | { |
| 356 | 354 | /* get graphics code */ |
| 357 | 355 | code = videoram[i]; |
| 358 | drawgfx_opaque( | |
| 356 | drawgfx_opaque( | |
| 359 | 357 | 0, 0, r.min_x, r.min_y); |
| 360 | 358 | drawgfx_opaque(state->m_dlybitmap, r, machine.gfx[1], code, 2, |
| 361 | 359 | 0, 0, r.min_x, r.min_y); |
| r13817 | r13818 | |
| 367 | 365 | |
| 368 | 366 | /* translate defined character sets */ |
| 369 | 367 | code += state->m_font_offset[(code >> 6) & 3]; |
| 370 | drawgfx_opaque( | |
| 368 | drawgfx_opaque( | |
| 371 | 369 | 0, 0, r.min_x, r.min_y); |
| 372 | 370 | drawgfx_opaque(state->m_dlybitmap, r, machine.gfx[0], code, state->m_colorram[i&0x3ff] + 32, |
| 373 | 371 | 0, 0, r.min_x, r.min_y); |
| r13817 | r13818 | |
| 399 | 397 | rc.min_y = r.min_y + (state->m_crt.cursor_top & 15); |
| 400 | 398 | rc.max_y = r.min_y + (state->m_crt.cursor_bottom & 15); |
| 401 | 399 | |
| 402 | drawgfx_opaque( | |
| 400 | drawgfx_opaque( | |
| 403 | 401 | 0, 0, rc.min_x, rc.min_y); |
| 404 | 402 | drawgfx_opaque(state->m_dlybitmap, rc, machine.gfx[0], 0x7f, state->m_colorram[i&0x3ff] + 32, |
| 405 | 403 | 0, 0, rc.min_x, rc.min_y); |
| r13817 | r13818 | |
| 407 | 405 | } |
| 408 | 406 | } |
| 409 | 407 | |
| 410 | copybitmap(bitmap, | |
| 408 | copybitmap(bitmap, | |
| 411 | 409 | copybitmap_trans(bitmap, state->m_dlybitmap, 0, 0, 1, 0, cliprect, 0); |
| 412 | 410 | } |
| 413 | 411 |
| r13817 | r13818 | |
|---|---|---|
| 158 | 158 | break; |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | machine(). | |
| 161 | machine().p | |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | |
| r13817 | r13818 | |
| 251 | 251 | { |
| 252 | 252 | case 0: |
| 253 | 253 | pen = shift_mode_0(); |
| 254 | machine().generic.tmpbitmap->pix32(y, x) = pen; | |
| 255 | machine().generic.tmpbitmap->pix32(y, x+1) = pen; | |
| 254 | machine().primary_screen->default_bitmap().pix32(y, x) = pen; | |
| 255 | machine().primary_screen->default_bitmap().pix32(y, x+1) = pen; | |
| 256 | 256 | pen = shift_mode_0(); |
| 257 | machine().generic.tmpbitmap->pix32(y, x+2) = pen; | |
| 258 | machine().generic.tmpbitmap->pix32(y, x+3) = pen; | |
| 257 | machine().primary_screen->default_bitmap().pix32(y, x+2) = pen; | |
| 258 | machine().primary_screen->default_bitmap().pix32(y, x+3) = pen; | |
| 259 | 259 | pen = shift_mode_0(); |
| 260 | machine().generic.tmpbitmap->pix32(y, x+4) = pen; | |
| 261 | machine().generic.tmpbitmap->pix32(y, x+5) = pen; | |
| 260 | machine().primary_screen->default_bitmap().pix32(y, x+4) = pen; | |
| 261 | machine().primary_screen->default_bitmap().pix32(y, x+5) = pen; | |
| 262 | 262 | pen = shift_mode_0(); |
| 263 | machine().generic.tmpbitmap->pix32(y, x+6) = pen; | |
| 264 | machine().generic.tmpbitmap->pix32(y, x+7) = pen; | |
| 263 | machine().primary_screen->default_bitmap().pix32(y, x+6) = pen; | |
| 264 | machine().primary_screen->default_bitmap().pix32(y, x+7) = pen; | |
| 265 | 265 | break; |
| 266 | 266 | |
| 267 | 267 | case 1: |
| 268 | 268 | pen = shift_mode_1(); |
| 269 | machine(). | |
| 269 | machine().p | |
| 270 | 270 | pen = shift_mode_1(); |
| 271 | machine(). | |
| 271 | machine().p | |
| 272 | 272 | pen = shift_mode_1(); |
| 273 | machine(). | |
| 273 | machine().p | |
| 274 | 274 | pen = shift_mode_1(); |
| 275 | machine(). | |
| 275 | machine().p | |
| 276 | 276 | pen = shift_mode_1(); |
| 277 | machine(). | |
| 277 | machine().p | |
| 278 | 278 | pen = shift_mode_1(); |
| 279 | machine(). | |
| 279 | machine().p | |
| 280 | 280 | pen = shift_mode_1(); |
| 281 | machine(). | |
| 281 | machine().p | |
| 282 | 282 | pen = shift_mode_1(); |
| 283 | machine(). | |
| 283 | machine().p | |
| 284 | 284 | break; |
| 285 | 285 | |
| 286 | 286 | case 2: |
| r13817 | r13818 | |
| 1147 | 1147 | save_item(NAME(m_blitter_skew)); |
| 1148 | 1148 | |
| 1149 | 1149 | set_screen_parameters(); |
| 1150 | ||
| 1151 | VIDEO_START_NAME(generic_bitmapped)(machine()); | |
| 1152 | 1150 | } |
| 1153 | 1151 | |
| 1154 | 1152 | |
| r13817 | r13818 | |
| 1171 | 1169 | |
| 1172 | 1170 | void stbook_state::video_start() |
| 1173 | 1171 | { |
| 1174 | VIDEO_START_NAME(generic_bitmapped)(machine()); | |
| 1175 | 1172 | } |
| r13817 | r13818 | |
|---|---|---|
| 41 | 41 | |
| 42 | 42 | int color = hlt_in ? 2 : (video_in ^ compl_in); |
| 43 | 43 | |
| 44 | device->machine(). | |
| 44 | device->machine().p | |
| 45 | 45 | } |
| 46 | 46 | } |
| 47 | 47 | |
| r13817 | r13818 | |
| 100 | 100 | { |
| 101 | 101 | // find memory regions |
| 102 | 102 | m_char_rom = machine().region("chargen")->base(); |
| 103 | ||
| 104 | VIDEO_START_NAME(generic_bitmapped)(machine()); | |
| 105 | 103 | } |
| 106 | 104 | |
| 107 | 105 | |
| r13817 | r13818 | |
| 113 | 111 | { |
| 114 | 112 | /* text */ |
| 115 | 113 | i8275_update(m_crtc, bitmap, cliprect); |
| 116 | copybitmap(bitmap, | |
| 114 | copybitmap(bitmap, | |
| 117 | 115 | |
| 118 | 116 | /* graphics */ |
| 119 | 117 | m_hgdc->update_screen(bitmap, cliprect); |
| r13817 | r13818 | |
|---|---|---|
| 160 | 160 | VIDEO_START( gf4500 ) |
| 161 | 161 | { |
| 162 | 162 | gf4500_init( machine); |
| 163 | return VIDEO_START_CALL(generic_bitmapped); | |
| 164 | 163 | } |
| 165 | 164 | |
| 166 | 165 | SCREEN_UPDATE( gf4500 ) |
| 167 | 166 | { |
| 168 | gf4500_render_screen( screen.machine(), *screen.machine().generic.tmpbitmap); | |
| 169 | return SCREEN_UPDATE_CALL(generic_bitmapped); | |
| 167 | gf4500_render_screen( screen.machine(), screen.default_bitmap()); | |
| 168 | copybitmap(bitmap, screen.default_bitmap(), 0, 0, 0, 0, cliprect); | |
| 169 | return 0; | |
| 170 | 170 | } |
| r13817 | r13818 | |
|---|---|---|
| 53 | 53 | a7800_state *state = machine.driver_data<a7800_state>(); |
| 54 | 54 | int i; |
| 55 | 55 | |
| 56 | VIDEO_START_CALL(generic_bitmapped); | |
| 57 | ||
| 58 | 56 | for(i=0; i<8; i++) |
| 59 | 57 | { |
| 60 | 58 | state->m_maria_palette[i][0]=0; |
| r13817 | r13818 | |
| 96 | 94 | UINT16 *scanline; |
| 97 | 95 | |
| 98 | 96 | /* set up scanline */ |
| 99 | scanline = &machine. | |
| 97 | scanline = &machine.p | |
| 100 | 98 | for (i = 0; i < 320; i++) |
| 101 | 99 | scanline[i] = state->m_maria_backcolor; |
| 102 | 100 | |
| r13817 | r13818 | |
| 433 | 431 | { |
| 434 | 432 | a7800_state *state = screen.machine().driver_data<a7800_state>(); |
| 435 | 433 | state->m_maria_scanline = 0; |
| 436 | | |
| 434 | copybitmap | |
| 437 | 435 | return 0; |
| 438 | 436 | } |
| 439 | 437 |
| r13817 | r13818 | |
|---|---|---|
| 40 | 40 | //int i,j,k; |
| 41 | 41 | |
| 42 | 42 | state->m_tms9927_num_rows = 25; |
| 43 | VIDEO_START_CALL(generic_bitmapped); | |
| 44 | 43 | |
| 45 | 44 | #if 0 |
| 46 | 45 | for (i = 0; i < STIC_MOBS; i++) |
| r13817 | r13818 | |
| 705 | 704 | { |
| 706 | 705 | state->m_stic_handshake = 0; |
| 707 | 706 | // Render the background |
| 708 | render_background(machine, | |
| 707 | render_background(machine, | |
| 709 | 708 | // Render the sprites into their buffers |
| 710 | 709 | render_sprites(machine); |
| 711 | 710 | for (i = 0; i < STIC_MOBS; i++) state->m_sprite[i].collision = 0; |
| 712 | 711 | // Copy the sprites to the background |
| 713 | copy_sprites_to_background(machine, | |
| 712 | copy_sprites_to_background(machine, | |
| 714 | 713 | determine_sprite_collisions(state); |
| 715 | 714 | for (i = 0; i < STIC_MOBS; i++) state->m_stic_registers[STIC_MCR + i] |= state->m_sprite[i].collision; |
| 716 | 715 | /* draw the screen borders if enabled */ |
| 717 | draw_borders(machine, | |
| 716 | draw_borders(machine, | |
| 718 | 717 | } |
| 719 | 718 | else |
| 720 | 719 | { |
| 721 | 720 | /* STIC disabled, just fill with border color */ |
| 722 | machine. | |
| 721 | machine.p | |
| 723 | 722 | } |
| 724 | 723 | } |
| 725 | 724 | |
| r13817 | r13818 | |
| 783 | 782 | // char c; |
| 784 | 783 | |
| 785 | 784 | /* Draw the underlying INTV screen first */ |
| 786 | | |
| 785 | copybitmap | |
| 787 | 786 | |
| 788 | 787 | /* if the intvkbd text is not blanked, overlay it */ |
| 789 | 788 | if (!state->m_intvkbd_text_blanked) |
| r13817 | r13818 | |
|---|---|---|
| 37 | 37 | for (int i = 0; i < (SAM_BLOCK*2)/4; i++) |
| 38 | 38 | { |
| 39 | 39 | /* draw 2 pixels (doublewidth) */ |
| 40 | machine.generic.tmpbitmap->pix16(y, hpos + i * 4 + 0) = state->m_clut[(*vram >> 4) & 0x0f]; | |
| 41 | machine.generic.tmpbitmap->pix16(y, hpos + i * 4 + 1) = state->m_clut[(*vram >> 4) & 0x0f]; | |
| 42 | machine.generic.tmpbitmap->pix16(y, hpos + i * 4 + 2) = state->m_clut[(*vram >> 0) & 0x0f]; | |
| 43 | machine.generic.tmpbitmap->pix16(y, hpos + i * 4 + 3) = state->m_clut[(*vram >> 0) & 0x0f]; | |
| 40 | machine.primary_screen->default_bitmap().pix16(y, hpos + i * 4 + 0) = state->m_clut[(*vram >> 4) & 0x0f]; | |
| 41 | machine.primary_screen->default_bitmap().pix16(y, hpos + i * 4 + 1) = state->m_clut[(*vram >> 4) & 0x0f]; | |
| 42 | machine.primary_screen->default_bitmap().pix16(y, hpos + i * 4 + 2) = state->m_clut[(*vram >> 0) & 0x0f]; | |
| 43 | machine.primary_screen->default_bitmap().pix16(y, hpos + i * 4 + 3) = state->m_clut[(*vram >> 0) & 0x0f]; | |
| 44 | 44 | |
| 45 | 45 | /* move to next address */ |
| 46 | 46 | vram++; |
| r13817 | r13818 | |
| 62 | 62 | for (int i = 0; i < (SAM_BLOCK*2)/4; i++) |
| 63 | 63 | { |
| 64 | 64 | /* draw 4 pixels */ |
| 65 | machine.generic.tmpbitmap->pix16(y, hpos + i * 4 + 0) = state->m_clut[(*vram >> 6) & 0x03]; | |
| 66 | machine.generic.tmpbitmap->pix16(y, hpos + i * 4 + 1) = state->m_clut[(*vram >> 4) & 0x03]; | |
| 67 | machine.generic.tmpbitmap->pix16(y, hpos + i * 4 + 2) = state->m_clut[(*vram >> 2) & 0x03]; | |
| 68 | machine.generic.tmpbitmap->pix16(y, hpos + i * 4 + 3) = state->m_clut[(*vram >> 0) & 0x03]; | |
| 65 | machine.primary_screen->default_bitmap().pix16(y, hpos + i * 4 + 0) = state->m_clut[(*vram >> 6) & 0x03]; | |
| 66 | machine.primary_screen->default_bitmap().pix16(y, hpos + i * 4 + 1) = state->m_clut[(*vram >> 4) & 0x03]; | |
| 67 | machine.primary_screen->default_bitmap().pix16(y, hpos + i * 4 + 2) = state->m_clut[(*vram >> 2) & 0x03]; | |
| 68 | machine.primary_screen->default_bitmap().pix16(y, hpos + i * 4 + 3) = state->m_clut[(*vram >> 0) & 0x03]; | |
| 69 | 69 | |
| 70 | 70 | /* move to next address */ |
| 71 | 71 | vram++; |
| r13817 | r13818 | |
| 100 | 100 | UINT8 mask = videoram[cell]; |
| 101 | 101 | state->m_attribute = videoram[cell + 0x2000]; |
| 102 | 102 | |
| 103 | draw_mode12_block(state, | |
| 103 | draw_mode12_block(state, | |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | static void draw_mode1_line(running_machine &machine, int y, int hpos) |
| r13817 | r13818 | |
| 111 | 111 | UINT8 mask = videoram[((((y - SAM_BORDER_TOP) & 0xc0) << 5) | (((y - SAM_BORDER_TOP) & 0x07) << 8) | (((y - SAM_BORDER_TOP) & 0x38) << 2)) + (hpos - SAM_BORDER_LEFT) / SAM_BLOCK / 2]; |
| 112 | 112 | state->m_attribute = videoram[32*192 + (((y - SAM_BORDER_TOP) & 0xf8) << 2) + (hpos - SAM_BORDER_LEFT) / SAM_BLOCK / 2]; |
| 113 | 113 | |
| 114 | draw_mode12_block(state, | |
| 114 | draw_mode12_block(state, | |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | TIMER_CALLBACK( sam_video_update_callback ) |
| r13817 | r13818 | |
| 133 | 133 | /* display disabled? (only in mode 3 or 4) */ |
| 134 | 134 | if (BIT(state->m_vmpr, 6) && BIT(state->m_border, 7)) |
| 135 | 135 | { |
| 136 | machine. | |
| 136 | machine.p | |
| 137 | 137 | } |
| 138 | 138 | else |
| 139 | 139 | { |
| r13817 | r13818 | |
| 141 | 141 | if (vpos < SAM_BORDER_TOP || vpos >= SAM_BORDER_TOP + SAM_SCREEN_HEIGHT || hpos < SAM_BORDER_LEFT || hpos >= SAM_BORDER_LEFT + SAM_SCREEN_WIDTH) |
| 142 | 142 | { |
| 143 | 143 | state->m_attribute = 0xff; |
| 144 | machine. | |
| 144 | machine.p | |
| 145 | 145 | } |
| 146 | 146 | else |
| 147 | 147 | { |
| r13817 | r13818 | |
|---|---|---|
| 477 | 477 | // duplicate the line. |
| 478 | 478 | //------------------------------------------------- |
| 479 | 479 | |
| 480 | void tms3556_device::draw_line(bitmap_t | |
| 480 | void tms3556_device::draw_line(bitmap_t &bmp, int line) | |
| 481 | 481 | { |
| 482 | 482 | int double_lines = 0; |
| 483 | 483 | UINT16 *ln, *ln2 = NULL; |
| r13817 | r13818 | |
| 488 | 488 | // } |
| 489 | 489 | // else |
| 490 | 490 | { /* non-interlaced mode */ |
| 491 | ln = &bmp->pix16(line); | |
| 492 | ln2 = &bmp->pix16(line, 1); | |
| 491 | ln = &bmp.pix16(line); | |
| 492 | ln2 = &bmp.pix16(line, 1); | |
| 493 | 493 | double_lines = 1; |
| 494 | 494 | } |
| 495 | 495 | |
| r13817 | r13818 | |
| 567 | 567 | if ((m_scanline >= 0) && (m_scanline < TMS3556_TOTAL_HEIGHT)) |
| 568 | 568 | { |
| 569 | 569 | //if (!video_skip_this_frame()) |
| 570 | draw_line(machine. | |
| 570 | draw_line(machine.p | |
| 571 | 571 | } |
| 572 | 572 | |
| 573 | 573 | if (++m_scanline == 313) |
| r13817 | r13818 | |
|---|---|---|
| 77 | 77 | void draw_line_text(UINT16 *ln); |
| 78 | 78 | void draw_line_bitmap(UINT16 *ln); |
| 79 | 79 | void draw_line_mixed(UINT16 *ln); |
| 80 | void draw_line(bitmap_t | |
| 80 | void draw_line(bitmap_t &bmp, int line); | |
| 81 | 81 | void interrupt_start_vblank(void); |
| 82 | 82 | |
| 83 | 83 | private: |
| r13817 | r13818 | |
|---|---|---|
| 47 | 47 | y = state->m_gal_cnt / 48 - 2; |
| 48 | 48 | x = (state->m_gal_cnt % 48) * 8; |
| 49 | 49 | |
| 50 | machine.generic.tmpbitmap->pix16(y, x ) = (state->m_code >> 0) & 1; x++; | |
| 51 | machine.generic.tmpbitmap->pix16(y, x ) = (state->m_code >> 1) & 1; x++; | |
| 52 | machine.generic.tmpbitmap->pix16(y, x ) = (state->m_code >> 2) & 1; x++; | |
| 53 | machine.generic.tmpbitmap->pix16(y, x ) = (state->m_code >> 3) & 1; x++; | |
| 54 | machine.generic.tmpbitmap->pix16(y, x ) = (state->m_code >> 4) & 1; x++; | |
| 55 | machine.generic.tmpbitmap->pix16(y, x ) = (state->m_code >> 5) & 1; x++; | |
| 56 | machine.generic.tmpbitmap->pix16(y, x ) = (state->m_code >> 6) & 1; x++; | |
| 57 | machine.generic.tmpbitmap->pix16(y, x ) = (state->m_code >> 7) & 1; | |
| 50 | machine.primary_screen->default_bitmap().pix16(y, x ) = (state->m_code >> 0) & 1; x++; | |
| 51 | machine.primary_screen->default_bitmap().pix16(y, x ) = (state->m_code >> 1) & 1; x++; | |
| 52 | machine.primary_screen->default_bitmap().pix16(y, x ) = (state->m_code >> 2) & 1; x++; | |
| 53 | machine.primary_screen->default_bitmap().pix16(y, x ) = (state->m_code >> 3) & 1; x++; | |
| 54 | machine.primary_screen->default_bitmap().pix16(y, x ) = (state->m_code >> 4) & 1; x++; | |
| 55 | machine.primary_screen->default_bitmap().pix16(y, x ) = (state->m_code >> 5) & 1; x++; | |
| 56 | machine.primary_screen->default_bitmap().pix16(y, x ) = (state->m_code >> 6) & 1; x++; | |
| 57 | machine.primary_screen->default_bitmap().pix16(y, x ) = (state->m_code >> 7) & 1; | |
| 58 | 58 | } |
| 59 | 59 | else |
| 60 | 60 | { // Graphics mode |
| r13817 | r13818 | |
| 89 | 89 | } |
| 90 | 90 | /* end of hack */ |
| 91 | 91 | |
| 92 | machine.generic.tmpbitmap->pix16(y, x ) = (state->m_code >> 0) & 1; x++; | |
| 93 | machine.generic.tmpbitmap->pix16(y, x ) = (state->m_code >> 1) & 1; x++; | |
| 94 | machine.generic.tmpbitmap->pix16(y, x ) = (state->m_code >> 2) & 1; x++; | |
| 95 | machine.generic.tmpbitmap->pix16(y, x ) = (state->m_code >> 3) & 1; x++; | |
| 96 | machine.generic.tmpbitmap->pix16(y, x ) = (state->m_code >> 4) & 1; x++; | |
| 97 | machine.generic.tmpbitmap->pix16(y, x ) = (state->m_code >> 5) & 1; x++; | |
| 98 | machine.generic.tmpbitmap->pix16(y, x ) = (state->m_code >> 6) & 1; x++; | |
| 99 | machine.generic.tmpbitmap->pix16(y, x ) = (state->m_code >> 7) & 1; | |
| 92 | machine.primary_screen->default_bitmap().pix16(y, x ) = (state->m_code >> 0) & 1; x++; | |
| 93 | machine.primary_screen->default_bitmap().pix16(y, x ) = (state->m_code >> 1) & 1; x++; | |
| 94 | machine.primary_screen->default_bitmap().pix16(y, x ) = (state->m_code >> 2) & 1; x++; | |
| 95 | machine.primary_screen->default_bitmap().pix16(y, x ) = (state->m_code >> 3) & 1; x++; | |
| 96 | machine.primary_screen->default_bitmap().pix16(y, x ) = (state->m_code >> 4) & 1; x++; | |
| 97 | machine.primary_screen->default_bitmap().pix16(y, x ) = (state->m_code >> 5) & 1; x++; | |
| 98 | machine.primary_screen->default_bitmap().pix16(y, x ) = (state->m_code >> 6) & 1; x++; | |
| 99 | machine.primary_screen->default_bitmap().pix16(y, x ) = (state->m_code >> 7) & 1; | |
| 100 | 100 | } |
| 101 | 101 | } |
| 102 | 102 | state->m_gal_cnt++; |
| r13817 | r13818 | |
| 117 | 117 | |
| 118 | 118 | state->m_gal_video_timer = machine.scheduler().timer_alloc(FUNC(gal_video)); |
| 119 | 119 | state->m_gal_video_timer->adjust(attotime::zero, 0, attotime::never); |
| 120 | ||
| 121 | VIDEO_START_CALL( generic_bitmapped ); | |
| 122 | 120 | } |
| 123 | 121 | |
| 124 | 122 | SCREEN_UPDATE( galaxy ) |
| r13817 | r13818 | |
| 128 | 126 | if (state->m_interrupts_enabled == FALSE) |
| 129 | 127 | { |
| 130 | 128 | const rectangle black_area(0, 384 - 1, 0, 208 - 1); |
| 131 | screen. | |
| 129 | screen.d | |
| 132 | 130 | } |
| 133 | 131 | state->m_interrupts_enabled = FALSE; |
| 134 | return SCREEN_UPDATE_CALL ( generic_bitmapped ); | |
| 132 | copybitmap(bitmap, screen.default_bitmap(), 0, 0, 0, 0, cliprect); | |
| 133 | return 0; | |
| 135 | 134 | } |
| 136 | 135 |
| r13817 | r13818 | |
|---|---|---|
| 1743 | 1743 | |
| 1744 | 1744 | void gba_draw_scanline(running_machine &machine, int y) |
| 1745 | 1745 | { |
| 1746 | bitmap_t &bitmap = | |
| 1746 | bitmap_t &bitmap = | |
| 1747 | 1747 | UINT16 *scanline = &bitmap.pix16(y); |
| 1748 | 1748 | int i, x; |
| 1749 | 1749 | gba_state *state = machine.driver_data<gba_state>(); |
| r13817 | r13818 | |
|---|---|---|
| 171 | 171 | DECLARE_WRITE_LINE_MEMBER(compis_pic8259_master_set_int_line); |
| 172 | 172 | DECLARE_WRITE_LINE_MEMBER(compis_pic8259_slave_set_int_line); |
| 173 | 173 | DECLARE_READ8_MEMBER(get_slave_ack); |
| 174 | virtual void video_start(); | |
| 175 | 174 | i186_state m_i186; |
| 176 | 175 | TYP_COMPIS m_compis; |
| 177 | 176 | UINT8 *m_p_videoram; |
| r13817 | r13818 | |
|---|---|---|
| 330 | 330 | |
| 331 | 331 | // find memory regions |
| 332 | 332 | m_char_rom = machine().region("chargen")->base(); |
| 333 | ||
| 334 | VIDEO_START_NAME(generic_bitmapped)(machine()); | |
| 335 | 333 | } |
| 336 | 334 | |
| 337 | 335 | bool pc9801_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect) |
| r13817 | r13818 | |
|---|---|---|
| 551 | 551 | if ( y < 240 ) |
| 552 | 552 | { |
| 553 | 553 | UINT16 row_addr = ( y / 10 ) * 128; |
| 554 | UINT16 *p = &machine. | |
| 554 | UINT16 *p = &machine.p | |
| 555 | 555 | UINT8 char_line = y % 10; |
| 556 | 556 | |
| 557 | 557 | for ( int x = 0; x < 80; x++ ) |
| r13817 | r13818 | |
| 634 | 634 | MCFG_SCREEN_ADD("screen", RASTER) |
| 635 | 635 | MCFG_SCREEN_FORMAT( BITMAP_FORMAT_INDEXED16 ) |
| 636 | 636 | MCFG_SCREEN_RAW_PARAMS( MAIN_CLOCK/2, 768, 0, 640, 260, 0, 240 ) /* May not be correct */ |
| 637 | MCFG_SCREEN_UPDATE( generic_bitmapped ) | |
| 638 | 637 | |
| 639 | 638 | MCFG_PALETTE_LENGTH( 3 ) |
| 640 | 639 | MCFG_PALETTE_INIT( osbexec ) |
| 641 | 640 | |
| 642 | MCFG_VIDEO_START( generic_bitmapped ) | |
| 643 | ||
| 644 | 641 | MCFG_SPEAKER_STANDARD_MONO( "mono" ) |
| 645 | 642 | MCFG_SOUND_ADD(SPEAKER_TAG, SPEAKER_SOUND, 0) |
| 646 | 643 | MCFG_SOUND_ROUTE( ALL_OUTPUTS, "mono", 1.00 ) |
| r13817 | r13818 | |
|---|---|---|
| 62 | 62 | |
| 63 | 63 | MCFG_I2CMEM_ADD("i2cmem",i2cmem_interface) |
| 64 | 64 | |
| 65 | /* video hardware */ | |
| 66 | MCFG_VIDEO_START( generic_bitmapped ) | |
| 67 | ||
| 68 | 65 | /* This still needs to be improved to actually match the hardware */ |
| 69 | 66 | MCFG_SCREEN_ADD("screen", LCD) |
| 70 | 67 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 71 | 68 | MCFG_SCREEN_SIZE( 96, 64 ) |
| 72 | 69 | MCFG_SCREEN_VISIBLE_AREA( 0, 95, 0, 63 ) |
| 73 | 70 | MCFG_SCREEN_REFRESH_RATE( 72 ) |
| 74 | MCFG_SCREEN_UPDATE( generic_bitmapped ) | |
| 75 | 71 | |
| 76 | 72 | MCFG_DEFAULT_LAYOUT(layout_lcd) |
| 77 | 73 |
| r13817 | r13818 | |
|---|---|---|
| 22 | 22 | |
| 23 | 23 | required_device<upd7220_device> m_hgdc; |
| 24 | 24 | |
| 25 | virtual void video_start(); | |
| 26 | 25 | virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect); |
| 27 | 26 | |
| 28 | 27 | UINT8 *m_video_ram; |
| 29 | 28 | }; |
| 30 | 29 | |
| 31 | void if800_state::video_start() | |
| 32 | { | |
| 33 | // find memory regions | |
| 34 | // m_char_rom = machine.region("pcg")->base(); | |
| 35 | ||
| 36 | VIDEO_START_NAME(generic_bitmapped)(machine()); | |
| 37 | } | |
| 38 | ||
| 39 | 30 | bool if800_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect) |
| 40 | 31 | { |
| 41 | 32 | /* graphics */ |
| r13817 | r13818 | |
|---|---|---|
| 569 | 569 | MCFG_MACHINE_START( gb ) |
| 570 | 570 | MCFG_MACHINE_RESET( gb ) |
| 571 | 571 | |
| 572 | MCFG_VIDEO_START( generic_bitmapped ) | |
| 573 | ||
| 574 | 572 | MCFG_SCREEN_ADD("screen", LCD) |
| 575 | 573 | MCFG_SCREEN_REFRESH_RATE(DMG_FRAMES_PER_SECOND) |
| 576 | 574 | MCFG_SCREEN_VBLANK_TIME(0) |
| r13817 | r13818 | |
| 579 | 577 | // MCFG_SCREEN_SIZE(20*8, 18*8) |
| 580 | 578 | MCFG_SCREEN_SIZE( 458, 154 ) |
| 581 | 579 | MCFG_SCREEN_VISIBLE_AREA(0*8, 20*8-1, 0*8, 18*8-1) |
| 582 | MCFG_SCREEN_UPDATE( generic_bitmapped ) | |
| 583 | 580 | |
| 584 | 581 | MCFG_GFXDECODE(gb) |
| 585 | 582 | MCFG_PALETTE_LENGTH(4) |
| r13817 | r13818 | |
| 673 | 670 | MCFG_MACHINE_START( megaduck ) |
| 674 | 671 | MCFG_MACHINE_RESET( megaduck ) |
| 675 | 672 | |
| 676 | MCFG_VIDEO_START( generic_bitmapped ) | |
| 677 | ||
| 678 | 673 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 679 | 674 | MCFG_SCREEN_SIZE(20*8, 18*8) |
| 680 | 675 | MCFG_SCREEN_VISIBLE_AREA(0*8, 20*8-1, 0*8, 18*8-1) |
| 681 | MCFG_SCREEN_UPDATE( generic_bitmapped ) | |
| 682 | 676 | |
| 683 | 677 | MCFG_DEFAULT_LAYOUT(layout_lcd) |
| 684 | 678 | MCFG_GFXDECODE(gb) |
| r13817 | r13818 | |
|---|---|---|
| 111 | 111 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 112 | 112 | MCFG_SCREEN_SIZE( 200, 200 ) |
| 113 | 113 | MCFG_SCREEN_VISIBLE_AREA( 0, 199, 0, 159 ) |
| 114 | MCFG_SCREEN_UPDATE( generic_bitmapped ) | |
| 115 | 114 | |
| 116 | 115 | MCFG_DEFAULT_LAYOUT(layout_lcd) |
| 117 | 116 | MCFG_PALETTE_LENGTH(5) |
| r13817 | r13818 | |
|---|---|---|
| 369 | 369 | MCFG_PALETTE_LENGTH(3) |
| 370 | 370 | MCFG_PALETTE_INIT(radio86) |
| 371 | 371 | |
| 372 | MCFG_VIDEO_START(generic_bitmapped) | |
| 373 | ||
| 374 | 372 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 375 | 373 | MCFG_SOUND_WAVE_ADD(WAVE_TAG, CASSETTE_TAG) |
| 376 | 374 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| r13817 | r13818 | |
|---|---|---|
| 2365 | 2365 | MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) |
| 2366 | 2366 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 2367 | 2367 | MCFG_SCREEN_RAW_PARAMS(Y2/2, ATARIST_HTOT_PAL*2, ATARIST_HBEND_PAL*2, ATARIST_HBSTART_PAL*2, ATARIST_VTOT_PAL, ATARIST_VBEND_PAL, ATARIST_VBSTART_PAL) |
| 2368 | MCFG_SCREEN_UPDATE(generic_bitmapped) | |
| 2369 | 2368 | |
| 2370 | 2369 | MCFG_PALETTE_LENGTH(16) |
| 2371 | 2370 | |
| r13817 | r13818 | |
| 2418 | 2417 | MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) |
| 2419 | 2418 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 2420 | 2419 | MCFG_SCREEN_RAW_PARAMS(Y2/4, ATARIST_HTOT_PAL, ATARIST_HBEND_PAL, ATARIST_HBSTART_PAL, ATARIST_VTOT_PAL, ATARIST_VBEND_PAL, ATARIST_VBSTART_PAL) |
| 2421 | MCFG_SCREEN_UPDATE(generic_bitmapped) | |
| 2422 | 2420 | |
| 2423 | 2421 | MCFG_PALETTE_LENGTH(16) |
| 2424 | 2422 | |
| r13817 | r13818 | |
| 2469 | 2467 | // video hardware |
| 2470 | 2468 | MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) |
| 2471 | 2469 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 2472 | MCFG_SCREEN_UPDATE( generic_bitmapped ) | |
| 2473 | 2470 | MCFG_SCREEN_RAW_PARAMS(Y2/4, ATARIST_HTOT_PAL, ATARIST_HBEND_PAL, ATARIST_HBSTART_PAL, ATARIST_VTOT_PAL, ATARIST_VBEND_PAL, ATARIST_VBSTART_PAL) |
| 2474 | 2471 | |
| 2475 | 2472 | MCFG_PALETTE_LENGTH(512) |
| r13817 | r13818 | |
| 2546 | 2543 | MCFG_SCREEN_REFRESH_RATE(60) |
| 2547 | 2544 | MCFG_SCREEN_SIZE(640, 400) |
| 2548 | 2545 | MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 399) |
| 2549 | MCFG_SCREEN_UPDATE(generic_bitmapped) | |
| 2550 | 2546 | |
| 2551 | 2547 | MCFG_PALETTE_LENGTH(2) |
| 2552 | 2548 |
| r13817 | r13818 | |
|---|---|---|
| 122 | 122 | VIDEO EMULATION |
| 123 | 123 | ***************************************************************************/ |
| 124 | 124 | |
| 125 | static SCREEN_UPDATE( rt1715 ) | |
| 126 | { | |
| 127 | SCREEN_UPDATE_CALL(generic_bitmapped); | |
| 128 | return 0; | |
| 129 | } | |
| 130 | ||
| 131 | 125 | static I8275_DISPLAY_PIXELS( rt1715_display_pixels ) |
| 132 | 126 | { |
| 133 | 127 | |
| r13817 | r13818 | |
| 331 | 325 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 332 | 326 | MCFG_SCREEN_SIZE(78*6, 30*10) |
| 333 | 327 | MCFG_SCREEN_VISIBLE_AREA(0, 78*6-1, 0, 30*10-1) |
| 334 | MCFG_SCREEN_UPDATE(rt1715) | |
| 335 | 328 | |
| 336 | 329 | MCFG_GFXDECODE(rt1715) |
| 337 | 330 | MCFG_PALETTE_LENGTH(3) |
| 338 | 331 | MCFG_PALETTE_INIT(rt1715) |
| 339 | 332 | |
| 340 | MCFG_VIDEO_START(generic_bitmapped) | |
| 341 | ||
| 342 | 333 | MCFG_I8275_ADD("a26", rt1715_i8275_intf) |
| 343 | 334 | MCFG_Z80CTC_ADD("a30", XTAL_10MHz/4 /* ? */, rt1715_ctc_intf) |
| 344 | 335 | MCFG_Z80SIO_ADD("a29", XTAL_10MHz/4 /* ? */, rt1715_sio_intf) |
| r13817 | r13818 | |
|---|---|---|
| 644 | 644 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 645 | 645 | MCFG_SCREEN_SIZE(256, 280) |
| 646 | 646 | MCFG_SCREEN_VISIBLE_AREA(0, 255, 0, 279) |
| 647 | MCFG_VIDEO_START(generic_bitmapped) | |
| 648 | 647 | MCFG_SCREEN_UPDATE(ssem) |
| 649 | 648 | MCFG_PALETTE_LENGTH(2) |
| 650 | 649 | MCFG_PALETTE_INIT(black_and_white) |
| r13817 | r13818 | |
|---|---|---|
| 79 | 79 | |
| 80 | 80 | MCFG_PALETTE_LENGTH(0x1000) |
| 81 | 81 | |
| 82 | MCFG_VIDEO_START(generic_bitmapped) | |
| 83 | ||
| 84 | 82 | /* sound hardware */ |
| 85 | 83 | MCFG_SPEAKER_STANDARD_MONO("avr8") |
| 86 | 84 | MCFG_SOUND_ADD("dac", DAC, 0) |
| r13817 | r13818 | |
|---|---|---|
| 224 | 224 | MCFG_PALETTE_LENGTH(3) |
| 225 | 225 | MCFG_PALETTE_INIT(radio86) |
| 226 | 226 | |
| 227 | MCFG_VIDEO_START(generic_bitmapped) | |
| 228 | ||
| 229 | 227 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 230 | 228 | MCFG_SOUND_WAVE_ADD(WAVE_TAG, CASSETTE_TAG) |
| 231 | 229 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| r13817 | r13818 | |
|---|---|---|
| 961 | 961 | |
| 962 | 962 | // find memory regions |
| 963 | 963 | m_char_rom = machine().region("chargen")->base(); |
| 964 | ||
| 965 | VIDEO_START_NAME(generic_bitmapped)(machine()); | |
| 966 | 964 | } |
| 967 | 965 | |
| 968 | 966 | bool qx10_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect) |
| r13817 | r13818 | |
|---|---|---|
| 244 | 244 | MCFG_SCREEN_ADD("screen", RASTER) |
| 245 | 245 | MCFG_SCREEN_FORMAT( BITMAP_FORMAT_INDEXED16 ) |
| 246 | 246 | MCFG_SCREEN_RAW_PARAMS( MAIN_CLOCK/2, 512, 0, 416, 260, 0, 240 ) |
| 247 | MCFG_VIDEO_START( generic_bitmapped ) | |
| 248 | MCFG_SCREEN_UPDATE( generic_bitmapped ) | |
| 249 | 247 | MCFG_GFXDECODE(osborne1) |
| 250 | 248 | MCFG_PALETTE_LENGTH( 3 ) |
| 251 | 249 | MCFG_PALETTE_INIT( osborne1 ) |
| r13817 | r13818 | |
|---|---|---|
| 546 | 546 | MCFG_SCREEN_ADD("screen", RASTER) |
| 547 | 547 | MCFG_SCREEN_RAW_PARAMS(SAMCOUPE_XTAL_X1/2, SAM_TOTAL_WIDTH, 0, SAM_BORDER_LEFT + SAM_SCREEN_WIDTH + SAM_BORDER_RIGHT, SAM_TOTAL_HEIGHT, 0, SAM_BORDER_TOP + SAM_SCREEN_HEIGHT + SAM_BORDER_BOTTOM) |
| 548 | 548 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 549 | MCFG_SCREEN_UPDATE(generic_bitmapped) | |
| 550 | 549 | |
| 551 | 550 | MCFG_PALETTE_LENGTH(128) |
| 552 | 551 | MCFG_PALETTE_INIT(samcoupe) |
| 553 | 552 | |
| 554 | MCFG_VIDEO_START(generic_bitmapped) | |
| 555 | ||
| 556 | 553 | /* devices */ |
| 557 | 554 | MCFG_CENTRONICS_ADD("lpt1", standard_centronics) |
| 558 | 555 | MCFG_CENTRONICS_ADD("lpt2", standard_centronics) |
| r13817 | r13818 | |
|---|---|---|
| 997 | 997 | MCFG_PALETTE_LENGTH(2) |
| 998 | 998 | MCFG_PALETTE_INIT(black_and_white) |
| 999 | 999 | |
| 1000 | MCFG_VIDEO_START(generic_bitmapped) | |
| 1001 | ||
| 1002 | 1000 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1003 | 1001 | MCFG_SOUND_ADD("dac", DAC, 0) |
| 1004 | 1002 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| r13817 | r13818 | |
|---|---|---|
| 81 | 81 | { |
| 82 | 82 | device_t *devconf = screen.machine().device("i8275"); |
| 83 | 83 | i8275_update( devconf, bitmap, cliprect); |
| 84 | | |
| 84 | copybitmap | |
| 85 | 85 | return 0; |
| 86 | 86 | } |
| 87 | 87 | |
| r13817 | r13818 | |
| 95 | 95 | static I8275_DISPLAY_PIXELS(sm1800_display_pixels) |
| 96 | 96 | { |
| 97 | 97 | int i; |
| 98 | bitmap_t &bitmap = | |
| 98 | bitmap_t &bitmap = | |
| 99 | 99 | UINT8 *charmap = device->machine().region("chargen")->base(); |
| 100 | 100 | UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff; |
| 101 | 101 | if (vsp) |
| r13817 | r13818 | |
| 191 | 191 | MCFG_SCREEN_SIZE(640, 480) |
| 192 | 192 | MCFG_GFXDECODE(sm1800) |
| 193 | 193 | MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) |
| 194 | MCFG_VIDEO_START(generic_bitmapped) | |
| 195 | 194 | MCFG_SCREEN_UPDATE(sm1800) |
| 196 | 195 | MCFG_PALETTE_LENGTH(3) |
| 197 | 196 | MCFG_PALETTE_INIT(sm1800) |
| r13817 | r13818 | |
|---|---|---|
| 83 | 83 | palette_set_color(machine, 2, MAKE_RGB(0x00, 0xff, 0x00)); // highlight |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | void compis_state::video_start() | |
| 87 | { | |
| 88 | // find memory regions | |
| 89 | ||
| 90 | VIDEO_START_NAME(generic_bitmapped)(machine()); | |
| 91 | } | |
| 92 | ||
| 93 | 86 | static SCREEN_UPDATE( compis ) |
| 94 | 87 | { |
| 95 | 88 | compis_state *state = screen.machine().driver_data<compis_state>(); |
| r13817 | r13818 | |
|---|---|---|
| 134 | 134 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 135 | 135 | MCFG_SCREEN_SIZE( WSWAN_X_PIXELS, WSWAN_X_PIXELS ) |
| 136 | 136 | MCFG_SCREEN_VISIBLE_AREA(0*8, WSWAN_X_PIXELS - 1, 0, WSWAN_X_PIXELS - 1) |
| 137 | MCFG_SCREEN_UPDATE( generic_bitmapped ) | |
| 138 | 137 | |
| 139 | 138 | MCFG_QUANTUM_TIME(attotime::from_hz(60)) |
| 140 | 139 | |
| r13817 | r13818 | |
| 143 | 142 | MCFG_MACHINE_START( wswan ) |
| 144 | 143 | MCFG_MACHINE_RESET( wswan ) |
| 145 | 144 | |
| 146 | MCFG_VIDEO_START( generic_bitmapped ) | |
| 147 | ||
| 148 | 145 | MCFG_GFXDECODE(wswan) |
| 149 | 146 | MCFG_PALETTE_LENGTH(16) |
| 150 | 147 | MCFG_PALETTE_INIT(wswan) |
| r13817 | r13818 | |
|---|---|---|
| 395 | 395 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 396 | 396 | MCFG_SCREEN_SIZE(ZX81_PIXELS_PER_SCANLINE, ZX81_PAL_SCANLINES) |
| 397 | 397 | MCFG_SCREEN_VISIBLE_AREA(0, ZX81_PIXELS_PER_SCANLINE-1, 0, ZX81_PAL_SCANLINES-1) |
| 398 | MCFG_SCREEN_UPDATE(generic_bitmapped) | |
| 399 | 398 | MCFG_SCREEN_EOF(zx) |
| 400 | 399 | |
| 401 | 400 | MCFG_GFXDECODE(zx80) |
| r13817 | r13818 | |
|---|---|---|
| 507 | 507 | { |
| 508 | 508 | // find memory regions |
| 509 | 509 | m_char_rom = machine().region("pcg")->base(); |
| 510 | ||
| 511 | VIDEO_START_NAME(generic_bitmapped)(machine()); | |
| 512 | 510 | } |
| 513 | 511 | |
| 514 | 512 | SCREEN_UPDATE_MEMBER( a5105_state ) |
| r13817 | r13818 | |
|---|---|---|
| 1042 | 1042 | |
| 1043 | 1043 | static VIDEO_START( msx2 ) |
| 1044 | 1044 | { |
| 1045 | VIDEO_START_CALL(generic_bitmapped); | |
| 1046 | v9938_init(machine, 0, *machine.primary_screen, *machine.generic.tmpbitmap, MODEL_V9938, 0x20000, msx_vdp_interrupt); | |
| 1045 | v9938_init(machine, 0, *machine.primary_screen, machine.primary_screen->default_bitmap(), MODEL_V9938, 0x20000, msx_vdp_interrupt); | |
| 1047 | 1046 | } |
| 1048 | 1047 | |
| 1049 | 1048 | #define MSX_XBORDER_PIXELS 15 |
| r13817 | r13818 | |
| 1206 | 1205 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 1207 | 1206 | MCFG_SCREEN_SIZE(MSX2_TOTAL_XRES_PIXELS, MSX2_TOTAL_YRES_PIXELS) |
| 1208 | 1207 | MCFG_SCREEN_VISIBLE_AREA(MSX2_XBORDER_PIXELS - MSX2_VISIBLE_XBORDER_PIXELS, MSX2_TOTAL_XRES_PIXELS - MSX2_XBORDER_PIXELS + MSX2_VISIBLE_XBORDER_PIXELS - 1, MSX2_YBORDER_PIXELS - MSX2_VISIBLE_YBORDER_PIXELS, MSX2_TOTAL_YRES_PIXELS - MSX2_YBORDER_PIXELS + MSX2_VISIBLE_YBORDER_PIXELS - 1) |
| 1209 | MCFG_SCREEN_UPDATE(generic_bitmapped) | |
| 1210 | 1208 | |
| 1211 | 1209 | MCFG_PALETTE_LENGTH(512) |
| 1212 | 1210 | MCFG_PALETTE_INIT(v9938) |
| r13817 | r13818 | |
|---|---|---|
| 422 | 422 | MCFG_PALETTE_INIT(monochrome_green) |
| 423 | 423 | |
| 424 | 424 | MCFG_DEFAULT_LAYOUT( layout_vt100 ) |
| 425 | MCFG_VIDEO_START(generic_bitmapped) | |
| 426 | 425 | |
| 427 | 426 | MCFG_VT100_VIDEO_ADD("vt100_video", vt100_video_interface) |
| 428 | 427 |
| r13817 | r13818 | |
|---|---|---|
| 24 | 24 | #include "machine/ram.h" |
| 25 | 25 | #include "video/upd7220.h" |
| 26 | 26 | |
| 27 | #define VIDEO_START_MEMBER(name) void name::video_start() | |
| 28 | 27 | #define SCREEN_UPDATE_MEMBER(name) bool name::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect) |
| 29 | 28 | |
| 30 | 29 | class vt240_state : public driver_device |
| r13817 | r13818 | |
| 46 | 45 | //UINT8 m_pcg_internal_addr; |
| 47 | 46 | //UINT8 *m_char_rom; |
| 48 | 47 | |
| 49 | virtual void video_start(); | |
| 50 | 48 | virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect); |
| 51 | 49 | |
| 52 | 50 | UINT8 *m_video_ram; |
| r13817 | r13818 | |
| 95 | 93 | } |
| 96 | 94 | |
| 97 | 95 | |
| 98 | VIDEO_START_MEMBER( vt240_state ) | |
| 99 | { | |
| 100 | // find memory regions | |
| 101 | //m_char_rom = machine().region("pcg")->base(); | |
| 102 | ||
| 103 | VIDEO_START_NAME(generic_bitmapped)(machine()); | |
| 104 | } | |
| 105 | ||
| 106 | 96 | SCREEN_UPDATE_MEMBER( vt240_state ) |
| 107 | 97 | { |
| 108 | 98 | /* graphics */ |
| r13817 | r13818 | |
|---|---|---|
| 71 | 71 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 72 | 72 | MCFG_SCREEN_SIZE(160, 102) |
| 73 | 73 | MCFG_SCREEN_VISIBLE_AREA(0, 160-1, 0, 102-1) |
| 74 | MCFG_SCREEN_UPDATE( generic_bitmapped ) | |
| 75 | 74 | MCFG_DEFAULT_LAYOUT(layout_lynx) |
| 76 | 75 | |
| 77 | 76 | MCFG_PALETTE_LENGTH(0x1000) |
| 78 | 77 | MCFG_PALETTE_INIT( lynx ) |
| 79 | 78 | |
| 80 | MCFG_VIDEO_START( generic_bitmapped ) | |
| 81 | ||
| 82 | 79 | /* sound hardware */ |
| 83 | 80 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 84 | 81 | MCFG_SOUND_ADD("custom", LYNX, 0) |
| r13817 | r13818 | |
|---|---|---|
| 141 | 141 | static void s3c240x_lcd_render_01( running_machine &machine) |
| 142 | 142 | { |
| 143 | 143 | gp32_state *state = machine.driver_data<gp32_state>(); |
| 144 | bitmap_t &bitmap = | |
| 144 | bitmap_t &bitmap = | |
| 145 | 145 | UINT32 *scanline = &bitmap.pix32(state->m_s3c240x_lcd.vpos, state->m_s3c240x_lcd.hpos); |
| 146 | 146 | int i, j; |
| 147 | 147 | for (i = 0; i < 4; i++) |
| r13817 | r13818 | |
| 165 | 165 | static void s3c240x_lcd_render_02( running_machine &machine) |
| 166 | 166 | { |
| 167 | 167 | gp32_state *state = machine.driver_data<gp32_state>(); |
| 168 | bitmap_t &bitmap = | |
| 168 | bitmap_t &bitmap = | |
| 169 | 169 | UINT32 *scanline = &bitmap.pix32(state->m_s3c240x_lcd.vpos, state->m_s3c240x_lcd.hpos); |
| 170 | 170 | int i, j; |
| 171 | 171 | for (i = 0; i < 4; i++) |
| r13817 | r13818 | |
| 189 | 189 | static void s3c240x_lcd_render_04( running_machine &machine) |
| 190 | 190 | { |
| 191 | 191 | gp32_state *state = machine.driver_data<gp32_state>(); |
| 192 | bitmap_t &bitmap = | |
| 192 | bitmap_t &bitmap = | |
| 193 | 193 | UINT32 *scanline = &bitmap.pix32(state->m_s3c240x_lcd.vpos, state->m_s3c240x_lcd.hpos); |
| 194 | 194 | int i, j; |
| 195 | 195 | for (i = 0; i < 4; i++) |
| r13817 | r13818 | |
| 213 | 213 | static void s3c240x_lcd_render_08( running_machine &machine) |
| 214 | 214 | { |
| 215 | 215 | gp32_state *state = machine.driver_data<gp32_state>(); |
| 216 | bitmap_t &bitmap = | |
| 216 | bitmap_t &bitmap = | |
| 217 | 217 | UINT32 *scanline = &bitmap.pix32(state->m_s3c240x_lcd.vpos, state->m_s3c240x_lcd.hpos); |
| 218 | 218 | int i, j; |
| 219 | 219 | for (i = 0; i < 4; i++) |
| r13817 | r13818 | |
| 237 | 237 | static void s3c240x_lcd_render_16( running_machine &machine) |
| 238 | 238 | { |
| 239 | 239 | gp32_state *state = machine.driver_data<gp32_state>(); |
| 240 | bitmap_t &bitmap = | |
| 240 | bitmap_t &bitmap = | |
| 241 | 241 | UINT32 *scanline = &bitmap.pix32(state->m_s3c240x_lcd.vpos, state->m_s3c240x_lcd.hpos); |
| 242 | 242 | int i, j; |
| 243 | 243 | for (i = 0; i < 4; i++) |
| r13817 | r13818 | |
| 287 | 287 | state->m_s3c240x_lcd_timer->adjust( screen->time_until_pos(state->m_s3c240x_lcd.vpos, state->m_s3c240x_lcd.hpos)); |
| 288 | 288 | } |
| 289 | 289 | |
| 290 | static VIDEO_START( gp32 ) | |
| 291 | { | |
| 292 | VIDEO_START_CALL(generic_bitmapped); | |
| 293 | } | |
| 294 | ||
| 295 | 290 | static SCREEN_UPDATE( gp32 ) |
| 296 | 291 | { |
| 297 | 292 | running_machine &machine = screen.machine(); |
| 298 | | |
| 293 | copybitmap | |
| 299 | 294 | s3c240x_lcd_dma_init( machine); |
| 300 | 295 | return 0; |
| 301 | 296 | } |
| r13817 | r13818 | |
| 1852 | 1847 | /* 320x240 is 4:3 but ROT270 causes an aspect ratio of 3:4 by default */ |
| 1853 | 1848 | MCFG_DEFAULT_LAYOUT(layout_lcd_rot) |
| 1854 | 1849 | |
| 1855 | MCFG_VIDEO_START(gp32) | |
| 1856 | ||
| 1857 | 1850 | MCFG_MACHINE_START(gp32) |
| 1858 | 1851 | MCFG_MACHINE_RESET(gp32) |
| 1859 | 1852 |
| r13817 | r13818 | |
|---|---|---|
| 212 | 212 | MCFG_PALETTE_LENGTH(3) |
| 213 | 213 | MCFG_PALETTE_INIT(radio86) |
| 214 | 214 | |
| 215 | MCFG_VIDEO_START(generic_bitmapped) | |
| 216 | ||
| 217 | 215 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 218 | 216 | MCFG_SOUND_WAVE_ADD(WAVE_TAG, CASSETTE_TAG) |
| 219 | 217 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| r13817 | r13818 | |
|---|---|---|
| 1000 | 1000 | |
| 1001 | 1001 | MCFG_PALETTE_LENGTH(0x1000) |
| 1002 | 1002 | |
| 1003 | MCFG_VIDEO_START(generic_bitmapped) | |
| 1004 | ||
| 1005 | 1003 | /* sound hardware */ |
| 1006 | 1004 | MCFG_SPEAKER_STANDARD_MONO("avr8") |
| 1007 | 1005 | MCFG_SOUND_ADD("dac", DAC, 0) |
| r13817 | r13818 | |
|---|---|---|
| 186 | 186 | MCFG_PALETTE_LENGTH(3) |
| 187 | 187 | MCFG_PALETTE_INIT(radio86) |
| 188 | 188 | |
| 189 | MCFG_VIDEO_START(generic_bitmapped) | |
| 190 | ||
| 191 | 189 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 192 | 190 | MCFG_SOUND_WAVE_ADD(WAVE_TAG, CASSETTE_TAG) |
| 193 | 191 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| r13817 | r13818 | |
|---|---|---|
| 809 | 809 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 810 | 810 | MCFG_SCREEN_SIZE((STIC_OVERSCAN_LEFT_WIDTH+STIC_BACKTAB_WIDTH*STIC_CARD_WIDTH-1+STIC_OVERSCAN_RIGHT_WIDTH)*STIC_X_SCALE*INTV_X_SCALE, (STIC_OVERSCAN_TOP_HEIGHT+STIC_BACKTAB_HEIGHT*STIC_CARD_HEIGHT+STIC_OVERSCAN_BOTTOM_HEIGHT)*STIC_Y_SCALE*INTV_Y_SCALE) |
| 811 | 811 | MCFG_SCREEN_VISIBLE_AREA(0, (STIC_OVERSCAN_LEFT_WIDTH+STIC_BACKTAB_WIDTH*STIC_CARD_WIDTH-1+STIC_OVERSCAN_RIGHT_WIDTH)*STIC_X_SCALE*INTV_X_SCALE-1, 0, (STIC_OVERSCAN_TOP_HEIGHT+STIC_BACKTAB_HEIGHT*STIC_CARD_HEIGHT+STIC_OVERSCAN_BOTTOM_HEIGHT)*STIC_Y_SCALE*INTV_Y_SCALE-1) |
| 812 | MCFG_SCREEN_UPDATE( generic_bitmapped ) | |
| 813 | 812 | |
| 814 | 813 | MCFG_GFXDECODE( intv ) |
| 815 | 814 | MCFG_PALETTE_LENGTH(0x400) |
| r13817 | r13818 | |
|---|---|---|
| 77 | 77 | virtual void machine_start(); |
| 78 | 78 | virtual void machine_reset(); |
| 79 | 79 | |
| 80 | virtual void video_start(); | |
| 81 | ||
| 82 | 80 | DECLARE_READ8_MEMBER( mailbox_wx319_r ); |
| 83 | 81 | DECLARE_WRITE8_MEMBER( mailbox_wx318_w ); |
| 84 | 82 | DECLARE_READ8_MEMBER( tms7020_porta_r ); |
| r13817 | r13818 | |
| 502 | 500 | } |
| 503 | 501 | |
| 504 | 502 | |
| 505 | /* Video Initialization */ | |
| 506 | ||
| 507 | void exelv_state::video_start() | |
| 508 | { | |
| 509 | video_start_generic_bitmapped(machine()); | |
| 510 | } | |
| 511 | ||
| 512 | ||
| 513 | 503 | /* Machine Initialization */ |
| 514 | 504 | |
| 515 | 505 | void exelv_state::machine_start() |
| r13817 | r13818 | |
| 562 | 552 | MCFG_SCREEN_SIZE(TMS3556_TOTAL_WIDTH, TMS3556_TOTAL_HEIGHT*2) |
| 563 | 553 | MCFG_SCREEN_VISIBLE_AREA(0, TMS3556_TOTAL_WIDTH-1, 0, TMS3556_TOTAL_HEIGHT*2-1) |
| 564 | 554 | #endif |
| 565 | MCFG_SCREEN_UPDATE(generic_bitmapped) | |
| 566 | 555 | MCFG_PALETTE_LENGTH(8) |
| 567 | 556 | MCFG_PALETTE_INIT(exelv) |
| 568 | 557 | |
| r13817 | r13818 | |
| 604 | 593 | MCFG_SCREEN_SIZE(TMS3556_TOTAL_WIDTH, TMS3556_TOTAL_HEIGHT*2) |
| 605 | 594 | MCFG_SCREEN_VISIBLE_AREA(0, TMS3556_TOTAL_WIDTH-1, 0, TMS3556_TOTAL_HEIGHT*2-1) |
| 606 | 595 | #endif |
| 607 | MCFG_SCREEN_UPDATE(generic_bitmapped) | |
| 608 | 596 | MCFG_PALETTE_LENGTH(8) |
| 609 | 597 | MCFG_PALETTE_INIT(exelv) |
| 610 | 598 |
| r13817 | r13818 | |
|---|---|---|
| 83 | 83 | static I8275_DISPLAY_PIXELS(ipds_display_pixels) |
| 84 | 84 | { |
| 85 | 85 | int i; |
| 86 | bitmap_t &bitmap = | |
| 86 | bitmap_t &bitmap = | |
| 87 | 87 | UINT8 *charmap = device->machine().region("chargen")->base(); |
| 88 | 88 | UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff; |
| 89 | 89 | |
| r13817 | r13818 | |
| 113 | 113 | { |
| 114 | 114 | device_t *devconf = screen.machine().device("i8275"); |
| 115 | 115 | i8275_update( devconf, bitmap, cliprect); |
| 116 | | |
| 116 | copybitmap | |
| 117 | 117 | return 0; |
| 118 | 118 | } |
| 119 | 119 | |
| r13817 | r13818 | |
| 160 | 160 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 161 | 161 | MCFG_SCREEN_SIZE(640, 480) |
| 162 | 162 | MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) |
| 163 | MCFG_VIDEO_START(generic_bitmapped) | |
| 164 | 163 | MCFG_SCREEN_UPDATE(ipds) |
| 165 | 164 | MCFG_GFXDECODE(ipds) |
| 166 | 165 | MCFG_PALETTE_LENGTH(2) |
| r13817 | r13818 | |
|---|---|---|
| 67 | 67 | { |
| 68 | 68 | // find memory regions |
| 69 | 69 | m_char_rom = machine().region("pcg")->base(); |
| 70 | ||
| 71 | VIDEO_START_NAME(generic_bitmapped)(machine()); | |
| 72 | 70 | } |
| 73 | 71 | |
| 74 | 72 |
| r13817 | r13818 | |
|---|---|---|
| 3188 | 3188 | MCFG_SCREEN_ADD("gbalcd", RASTER) // htot hst vwid vtot vst vis |
| 3189 | 3189 | MCFG_SCREEN_RAW_PARAMS(16777216/4, 308, 0, 240, 228, 0, 160) |
| 3190 | 3190 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 3191 | MCFG_SCREEN_UPDATE(generic_bitmapped) | |
| 3192 | 3191 | |
| 3193 | 3192 | MCFG_DEFAULT_LAYOUT(layout_lcd) |
| 3194 | 3193 | MCFG_PALETTE_LENGTH(32768) |
| 3195 | 3194 | MCFG_PALETTE_INIT( gba ) |
| 3196 | 3195 | |
| 3197 | MCFG_VIDEO_START(generic_bitmapped) | |
| 3198 | ||
| 3199 | 3196 | MCFG_SPEAKER_STANDARD_STEREO("spkleft", "spkright") |
| 3200 | 3197 | MCFG_SOUND_ADD("custom", GAMEBOY, 0) |
| 3201 | 3198 | MCFG_SOUND_ROUTE(0, "spkleft", 0.50) |
| Previous | 15994 Revisions | Next |