| Previous | 15994 Revisions | Next |
| r14035 Sunday 15th January, 2012 at 07:52:21 UTC by Miodrag Milanović |
|---|
| Sync with MAME r15033 (nw) |
| [src/emu] | machine.c screen.c screen.h tilemap.c |
| [src/emu/cpu/h6280] | h6280ops.h |
| [src/emu/machine] | laserdsc.c |
| [src/emu/sound] | cdp1864.c |
| [src/emu/video] | 315_5124.c cdp1861.c cdp1862.c v9938.c |
| [src/lib/util] | bitmap.c bitmap.h |
| [src/mame/drivers] | aleck64.c astrocorp.c coolridr.c gei.c lastfght.c mazerbla.c sliver.c sms.c taitotz.c tmaster.c |
| [src/mame/video] | airbustr.c argus.c bigevglf.c bking.c blockout.c buggychl.c cave.c ccastles.c changela.c cloud9.c cvs.c dday.c decospr.c dkong.c dogfgt.c exidy.c fgoal.c firetrk.c gaiden.c galastrm.c galpanic.c gomoku.c hyhoo.c ikki.c kaneko16.c magmax.c mappy.c mcd212.c mermaid.c model3.c ms32.c nbmj8891.c nbmj8900.c nbmj8991.c nbmj9195.c ninjakd2.c niyanpai.c ojankohs.c pacland.c paradise.c psikyosh.c quasar.c shangha3.c spbactn.c sprint2.c sprint4.c sprint8.c starfire.c starshp1.c taito_f3.c taitojc.c taitosj.c tank8.c tceptor.c tecmo16.c toaplan2.c toobin.c triplhnt.c ultratnk.c wolfpack.c zac2650.c |
| r14034 | r14035 | |
|---|---|---|
| 32 | 32 | VIDEO_START( fgoal ) |
| 33 | 33 | { |
| 34 | 34 | fgoal_state *state = machine.driver_data<fgoal_state>(); |
| 35 | state->m_fgbitmap.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 36 | state->m_bgbitmap.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 35 | machine.primary_screen->register_screen_bitmap(state->m_fgbitmap); | |
| 36 | machine.primary_screen->register_screen_bitmap(state->m_bgbitmap); | |
| 37 | 37 | |
| 38 | 38 | state->save_item(NAME(state->m_fgbitmap)); |
| 39 | 39 | state->save_item(NAME(state->m_bgbitmap)); |
| r14034 | r14035 | |
|---|---|---|
| 1511 | 1511 | void mcd212_init(running_machine &machine, mcd212_regs_t *mcd212) |
| 1512 | 1512 | { |
| 1513 | 1513 | mcd212->m_machine = &machine; |
| 1514 | m | |
| 1514 | m | |
| 1515 | 1515 | |
| 1516 | 1516 | int index = 0; |
| 1517 | 1517 | for(index = 0; index < 2; index++) |
| r14034 | r14035 | |
| 1658 | 1658 | state->m_mcd212_regs.scan_timer->adjust(machine.primary_screen->time_until_pos(0, 0)); |
| 1659 | 1659 | |
| 1660 | 1660 | screen_device *screen = downcast<screen_device *>(machine.device("lcd")); |
| 1661 | s | |
| 1661 | scr | |
| 1662 | 1662 | } |
| 1663 | 1663 | |
| 1664 | 1664 | SCREEN_UPDATE_RGB32( cdimono1 ) |
| r14034 | r14035 | |
|---|---|---|
| 394 | 394 | int width = machine.primary_screen->width(); |
| 395 | 395 | int height = machine.primary_screen->height(); |
| 396 | 396 | |
| 397 | | |
| 397 | | |
| 398 | 398 | state->m_videoram[0] = auto_alloc_array_clear(machine, UINT16, width * height); |
| 399 | 399 | state->m_palette = auto_alloc_array(machine, UINT8, 0x200); |
| 400 | 400 | state->m_clut[0] = auto_alloc_array(machine, UINT8, 0x1000); |
| r14034 | r14035 | |
| 409 | 409 | int width = machine.primary_screen->width(); |
| 410 | 410 | int height = machine.primary_screen->height(); |
| 411 | 411 | |
| 412 | state->m_tmpbitmap[0].allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 413 | state->m_tmpbitmap[1].allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 412 | machine.primary_screen->register_screen_bitmap(state->m_tmpbitmap[0]); | |
| 413 | machine.primary_screen->register_screen_bitmap(state->m_tmpbitmap[1]); | |
| 414 | 414 | state->m_videoram[0] = auto_alloc_array_clear(machine, UINT16, width * height); |
| 415 | 415 | state->m_videoram[1] = auto_alloc_array_clear(machine, UINT16, width * height); |
| 416 | 416 | state->m_palette = auto_alloc_array(machine, UINT8, 0x200); |
| r14034 | r14035 | |
| 427 | 427 | int width = machine.primary_screen->width(); |
| 428 | 428 | int height = machine.primary_screen->height(); |
| 429 | 429 | |
| 430 | state->m_tmpbitmap[0].allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 431 | state->m_tmpbitmap[1].allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 430 | machine.primary_screen->register_screen_bitmap(state->m_tmpbitmap[0]); | |
| 431 | machine.primary_screen->register_screen_bitmap(state->m_tmpbitmap[1]); | |
| 432 | 432 | state->m_videoram[0] = auto_alloc_array_clear(machine, UINT16, width * height); |
| 433 | 433 | state->m_videoram[1] = auto_alloc_array_clear(machine, UINT16, width * height); |
| 434 | 434 | state->m_videoworkram[0] = auto_alloc_array_clear(machine, UINT16, width * height); |
| r14034 | r14035 | |
|---|---|---|
| 241 | 241 | { |
| 242 | 242 | bking_state *state = machine.driver_data<bking_state>(); |
| 243 | 243 | state->m_bg_tilemap = tilemap_create(machine, get_tile_info, tilemap_scan_rows, 8, 8, 32, 32); |
| 244 | state->m_tmp_bitmap1.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 245 | state->m_tmp_bitmap2.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 244 | machine.primary_screen->register_screen_bitmap(state->m_tmp_bitmap1); | |
| 245 | machine.primary_screen->register_screen_bitmap(state->m_tmp_bitmap2); | |
| 246 | 246 | |
| 247 | 247 | state->save_item(NAME(state->m_tmp_bitmap1)); |
| 248 | 248 | state->save_item(NAME(state->m_tmp_bitmap2)); |
| r14034 | r14035 | |
|---|---|---|
| 32 | 32 | 3, resistances, state->m_bweights, 1000, 0); |
| 33 | 33 | |
| 34 | 34 | /* allocate a bitmap for drawing sprites */ |
| 35 | | |
| 35 | | |
| 36 | 36 | |
| 37 | 37 | /* register for savestates */ |
| 38 | 38 | state->save_item(NAME(state->m_video_control)); |
| r14034 | r14035 | |
|---|---|---|
| 46 | 46 | VIDEO_START( sprint2 ) |
| 47 | 47 | { |
| 48 | 48 | sprint2_state *state = machine.driver_data<sprint2_state>(); |
| 49 | | |
| 49 | | |
| 50 | 50 | |
| 51 | 51 | state->m_bg_tilemap = tilemap_create(machine, get_tile_info, tilemap_scan_rows, 16, 8, 32, 32); |
| 52 | 52 | } |
| r14034 | r14035 | |
|---|---|---|
| 365 | 365 | int width = machine.primary_screen->width(); |
| 366 | 366 | int height = machine.primary_screen->height(); |
| 367 | 367 | |
| 368 | state->m_tmpbitmap[0].allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 369 | state->m_tmpbitmap[1].allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 370 | state->m_tmpbitmap[2].allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 368 | machine.primary_screen->register_screen_bitmap(state->m_tmpbitmap[0]); | |
| 369 | machine.primary_screen->register_screen_bitmap(state->m_tmpbitmap[1]); | |
| 370 | machine.primary_screen->register_screen_bitmap(state->m_tmpbitmap[2]); | |
| 371 | 371 | state->m_videoram[0] = auto_alloc_array_clear(machine, UINT16, width * height); |
| 372 | 372 | state->m_videoram[1] = auto_alloc_array_clear(machine, UINT16, width * height); |
| 373 | 373 | state->m_videoram[2] = auto_alloc_array_clear(machine, UINT16, width * height); |
| r14034 | r14035 | |
|---|---|---|
| 169 | 169 | state->m_tilemap_2 = tilemap_create(machine, get_tile_info_2, tilemap_scan_rows, 8, 8, 0x20, 0x20); |
| 170 | 170 | |
| 171 | 171 | /* pixmap */ |
| 172 | | |
| 172 | | |
| 173 | 173 | |
| 174 | 174 | tilemap_set_transparent_pen(state->m_tilemap_0, 0x0f); |
| 175 | 175 | tilemap_set_transparent_pen(state->m_tilemap_1, 0xff); |
| r14034 | r14035 | |
|---|---|---|
| 312 | 312 | |
| 313 | 313 | tilemap_set_transparent_pen(state->m_tx_tilemap, 15); |
| 314 | 314 | |
| 315 | | |
| 315 | | |
| 316 | 316 | |
| 317 | 317 | jal_blend_init(machine, 1); |
| 318 | 318 | } |
| r14034 | r14035 | |
|---|---|---|
| 75 | 75 | VIDEO_START( gaiden ) |
| 76 | 76 | { |
| 77 | 77 | gaiden_state *state = machine.driver_data<gaiden_state>(); |
| 78 | int width = machine.primary_screen->width(); | |
| 79 | int height = machine.primary_screen->height(); | |
| 80 | 78 | |
| 81 | 79 | /* set up tile layers */ |
| 82 | state->m_tile_bitmap_bg.allocate(width, height); | |
| 83 | state->m_tile_bitmap_fg.allocate(width, height); | |
| 80 | machine.primary_screen->register_screen_bitmap(state->m_tile_bitmap_bg); | |
| 81 | machine.primary_screen->register_screen_bitmap(state->m_tile_bitmap_fg); | |
| 84 | 82 | |
| 85 | 83 | state->m_background = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows, 16, 16, 64, 32); |
| 86 | 84 | state->m_foreground = tilemap_create(machine, get_fg_tile_info_raiga, tilemap_scan_rows, 16, 16, 64, 32); |
| r14034 | r14035 | |
| 99 | 97 | tilemap_set_scrolldx(state->m_text_layer, 0, -1); |
| 100 | 98 | |
| 101 | 99 | /* set up sprites */ |
| 102 | | |
| 100 | m | |
| 103 | 101 | } |
| 104 | 102 | |
| 105 | 103 | VIDEO_START( mastninj ) |
| 106 | 104 | { |
| 107 | 105 | |
| 108 | 106 | gaiden_state *state = machine.driver_data<gaiden_state>(); |
| 109 | int width = machine.primary_screen->width(); | |
| 110 | int height = machine.primary_screen->height(); | |
| 111 | 107 | |
| 112 | 108 | /* set up tile layers */ |
| 113 | state->m_tile_bitmap_bg.allocate(width, height); | |
| 114 | state->m_tile_bitmap_fg.allocate(width, height); | |
| 109 | machine.primary_screen->register_screen_bitmap(state->m_tile_bitmap_bg); | |
| 110 | machine.primary_screen->register_screen_bitmap(state->m_tile_bitmap_fg); | |
| 115 | 111 | |
| 116 | 112 | state->m_background = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows, 16, 16, 64, 32); |
| 117 | 113 | state->m_foreground = tilemap_create(machine, get_fg_tile_info_raiga, tilemap_scan_rows, 16, 16, 64, 32); |
| r14034 | r14035 | |
| 122 | 118 | tilemap_set_transparent_pen(state->m_text_layer, 15); |
| 123 | 119 | |
| 124 | 120 | /* set up sprites */ |
| 125 | | |
| 121 | m | |
| 126 | 122 | |
| 127 | 123 | tilemap_set_scrolldx(state->m_background, -248, 248); |
| 128 | 124 | tilemap_set_scrolldx(state->m_foreground, -252, 252); |
| r14034 | r14035 | |
| 131 | 127 | VIDEO_START( raiga ) |
| 132 | 128 | { |
| 133 | 129 | gaiden_state *state = machine.driver_data<gaiden_state>(); |
| 134 | int width = machine.primary_screen->width(); | |
| 135 | int height = machine.primary_screen->height(); | |
| 136 | 130 | |
| 137 | 131 | /* set up tile layers */ |
| 138 | state->m_tile_bitmap_bg.allocate(width, height); | |
| 139 | state->m_tile_bitmap_fg.allocate(width, height); | |
| 132 | machine.primary_screen->register_screen_bitmap(state->m_tile_bitmap_bg); | |
| 133 | machine.primary_screen->register_screen_bitmap(state->m_tile_bitmap_fg); | |
| 140 | 134 | |
| 141 | 135 | state->m_background = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows, 16, 16, 64, 32); |
| 142 | 136 | state->m_foreground = tilemap_create(machine, get_fg_tile_info_raiga, tilemap_scan_rows, 16, 16, 64, 32); |
| r14034 | r14035 | |
| 147 | 141 | tilemap_set_transparent_pen(state->m_text_layer, 0); |
| 148 | 142 | |
| 149 | 143 | /* set up sprites */ |
| 150 | | |
| 144 | m | |
| 151 | 145 | } |
| 152 | 146 | |
| 153 | 147 | VIDEO_START( drgnbowl ) |
| r14034 | r14035 | |
|---|---|---|
| 6 | 6 | VIDEO_START( galpanic ) |
| 7 | 7 | { |
| 8 | 8 | galpanic_state *state = machine.driver_data<galpanic_state>(); |
| 9 | state->m_bitmap.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 10 | state->m_sprites_bitmap.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 9 | machine.primary_screen->register_screen_bitmap(state->m_bitmap); | |
| 10 | machine.primary_screen->register_screen_bitmap(state->m_sprites_bitmap); | |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | PALETTE_INIT( galpanic ) |
| r14034 | r14035 | |
|---|---|---|
| 947 | 947 | switch (state->m_hardware_type) |
| 948 | 948 | { |
| 949 | 949 | case HARDWARE_TRS02: |
| 950 | | |
| 950 | | |
| 951 | 951 | state->m_gfx3 = machine.region("gfx3")->base(); |
| 952 | 952 | state->m_gfx3_len = machine.region("gfx3")->bytes(); |
| 953 | 953 | /* fall through */ |
| r14034 | r14035 | |
| 960 | 960 | state->m_bg_tilemap = tilemap_create(machine, radarscp1_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); |
| 961 | 961 | tilemap_set_scrolldx(state->m_bg_tilemap, 0, 128); |
| 962 | 962 | |
| 963 | | |
| 963 | | |
| 964 | 964 | state->m_gfx4 = machine.region("gfx4")->base(); |
| 965 | 965 | state->m_gfx3 = machine.region("gfx3")->base(); |
| 966 | 966 | state->m_gfx3_len = machine.region("gfx3")->bytes(); |
| r14034 | r14035 | |
|---|---|---|
| 51 | 51 | VIDEO_START( sprint4 ) |
| 52 | 52 | { |
| 53 | 53 | sprint4_state *state = machine.driver_data<sprint4_state>(); |
| 54 | | |
| 54 | | |
| 55 | 55 | |
| 56 | 56 | state->m_playfield = tilemap_create(machine, sprint4_tile_info, tilemap_scan_rows, 8, 8, 32, 32); |
| 57 | 57 | } |
| r14034 | r14035 | |
|---|---|---|
| 122 | 122 | |
| 123 | 123 | state->m_tmap[3] = 0; |
| 124 | 124 | |
| 125 | | |
| 125 | | |
| 126 | 126 | |
| 127 | 127 | { |
| 128 | 128 | int dx, dy; |
| r14034 | r14035 | |
| 294 | 294 | |
| 295 | 295 | state->m_tmap[3] = 0; |
| 296 | 296 | |
| 297 | | |
| 297 | | |
| 298 | 298 | |
| 299 | 299 | { |
| 300 | 300 | int dx = 0x5b, dy = 8; |
| r14034 | r14035 | |
|---|---|---|
| 69 | 69 | VIDEO_START( ms32 ) |
| 70 | 70 | { |
| 71 | 71 | ms32_state *state = machine.driver_data<ms32_state>(); |
| 72 | int width = machine.primary_screen->width(); | |
| 73 | int height = machine.primary_screen->height(); | |
| 74 | 72 | |
| 75 | 73 | state->m_priram_8 = auto_alloc_array_clear(machine, UINT8, 0x2000); |
| 76 | 74 | state->m_palram_16 = auto_alloc_array_clear(machine, UINT16, 0x20000); |
| r14034 | r14035 | |
| 87 | 85 | |
| 88 | 86 | |
| 89 | 87 | /* set up tile layers */ |
| 90 | state->m_temp_bitmap_tilemaps.allocate(width, height); | |
| 91 | state->m_temp_bitmap_sprites.allocate(width, height); | |
| 92 | state->m_temp_bitmap_sprites_pri.allocate(width, height); // not actually being used for rendering, we embed pri info in the raw colour bitmap | |
| 88 | machine.primary_screen->register_screen_bitmap(state->m_temp_bitmap_tilemaps); | |
| 89 | machine.primary_screen->register_screen_bitmap(state->m_temp_bitmap_sprites); | |
| 90 | machine.primary_screen->register_screen_bitmap(state->m_temp_bitmap_sprites_pri); // not actually being used for rendering, we embed pri info in the raw colour bitmap | |
| 93 | 91 | |
| 94 | 92 | state->m_temp_bitmap_tilemaps.fill(0); |
| 95 | 93 | state->m_temp_bitmap_sprites.fill(0); |
| r14034 | r14035 | |
|---|---|---|
| 111 | 111 | spbactn_state *state = machine.driver_data<spbactn_state>(); |
| 112 | 112 | |
| 113 | 113 | /* allocate bitmaps */ |
| 114 | int width = machine.primary_screen->width(); | |
| 115 | int height = machine.primary_screen->height(); | |
| 116 | ||
| 117 | state->m_tile_bitmap_bg.allocate(width, height); | |
| 118 | state->m_tile_bitmap_fg.allocate(width, height); | |
| 114 | machine.primary_screen->register_screen_bitmap(state->m_tile_bitmap_bg); | |
| 115 | machine.primary_screen->register_screen_bitmap(state->m_tile_bitmap_fg); | |
| 119 | 116 | } |
| 120 | 117 | |
| 121 | 118 | SCREEN_UPDATE_RGB32( spbactn ) |
| r14034 | r14035 | |
|---|---|---|
| 104 | 104 | VIDEO_START( tank8 ) |
| 105 | 105 | { |
| 106 | 106 | tank8_state *state = machine.driver_data<tank8_state>(); |
| 107 | state->m_helper1.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 108 | state->m_helper2.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 109 | state->m_helper3.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 107 | machine.primary_screen->register_screen_bitmap(state->m_helper1); | |
| 108 | machine.primary_screen->register_screen_bitmap(state->m_helper2); | |
| 109 | machine.primary_screen->register_screen_bitmap(state->m_helper3); | |
| 110 | 110 | |
| 111 | 111 | state->m_tilemap = tilemap_create(machine, tank8_get_tile_info, tilemap_scan_rows, 16, 16, 32, 32); |
| 112 | 112 |
| r14034 | r14035 | |
|---|---|---|
| 184 | 184 | tilemap_set_scroll_cols(state->m_fg_tilemap, 32); |
| 185 | 185 | tilemap_set_transparent_pen(state->m_fg_tilemap, 0); |
| 186 | 186 | |
| 187 | state->m_helper.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 188 | state->m_helper2.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 187 | machine.primary_screen->register_screen_bitmap(state->m_helper); | |
| 188 | machine.primary_screen->register_screen_bitmap(state->m_helper2); | |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect ) |
| r14034 | r14035 | |
|---|---|---|
| 165 | 165 | |
| 166 | 166 | void decospr_device::alloc_sprite_bitmap() |
| 167 | 167 | { |
| 168 | m | |
| 168 | m | |
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | void decospr_device::set_pri_callback(decospr_priority_callback_func callback) |
| r14034 | r14035 | |
|---|---|---|
| 261 | 261 | VIDEO_START( taitojc ) |
| 262 | 262 | { |
| 263 | 263 | taitojc_state *state = machine.driver_data<taitojc_state>(); |
| 264 | int width, height; | |
| 265 | 264 | |
| 266 | 265 | state->m_poly = poly_alloc(machine, 4000, sizeof(poly_extra_data), POLYFLAG_ALLOW_QUADS); |
| 267 | 266 | machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(taitojc_exit), &machine)); |
| r14034 | r14035 | |
| 285 | 284 | |
| 286 | 285 | state->m_texture = auto_alloc_array(machine, UINT8, 0x400000); |
| 287 | 286 | |
| 288 | state->m_framebuffer.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 289 | ||
| 290 | width = machine.primary_screen->width(); | |
| 291 | height = machine.primary_screen->height(); | |
| 292 | state->m_zbuffer.allocate(width, height); | |
| 287 | machine.primary_screen->register_screen_bitmap(state->m_framebuffer); | |
| 288 | machine.primary_screen->register_screen_bitmap(state->m_zbuffer); | |
| 293 | 289 | } |
| 294 | 290 | |
| 295 | 291 | static void draw_object_bank(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT8 bank_type, UINT8 pri) |
| r14034 | r14035 | |
|---|---|---|
| 117 | 117 | VIDEO_START( model3 ) |
| 118 | 118 | { |
| 119 | 119 | model3_state *state = machine.driver_data<model3_state>(); |
| 120 | int width, height; | |
| 121 | 120 | |
| 122 | 121 | state->m_poly = poly_alloc(machine, 4000, sizeof(poly_extra_data), 0); |
| 123 | 122 | machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(model3_exit), &machine)); |
| 124 | 123 | |
| 125 | width = machine.primary_screen->width(); | |
| 126 | height = machine.primary_screen->height(); | |
| 127 | state->m_bitmap3d.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 128 | state->m_zbuffer.allocate(width, height); | |
| 124 | machine.primary_screen->register_screen_bitmap(state->m_bitmap3d); | |
| 125 | machine.primary_screen->register_screen_bitmap(state->m_zbuffer); | |
| 129 | 126 | |
| 130 | 127 | state->m_m3_char_ram = auto_alloc_array_clear(machine, UINT64, 0x100000/8); |
| 131 | 128 | state->m_m3_tile_ram = auto_alloc_array_clear(machine, UINT64, 0x8000/8); |
| r14034 | r14035 | |
|---|---|---|
| 119 | 119 | VIDEO_START( ikki ) |
| 120 | 120 | { |
| 121 | 121 | ikki_state *state = machine.driver_data<ikki_state>(); |
| 122 | | |
| 122 | | |
| 123 | 123 | state->save_item(NAME(state->m_sprite_bitmap)); |
| 124 | 124 | } |
| 125 | 125 |
| r14034 | r14035 | |
|---|---|---|
| 82 | 82 | VIDEO_START( toaplan2 ) |
| 83 | 83 | { |
| 84 | 84 | toaplan2_state *state = machine.driver_data<toaplan2_state>(); |
| 85 | int width = machine.primary_screen->width(); | |
| 86 | int height = machine.primary_screen->height(); | |
| 87 | 85 | |
| 88 | 86 | /* cache the VDP device */ |
| 89 | 87 | state->m_vdp0 = machine.device<gp9001vdp_device>("gp9001vdp0"); |
| 90 | 88 | state->m_vdp1 = machine.device<gp9001vdp_device>("gp9001vdp1"); |
| 91 | 89 | |
| 92 | 90 | /* our current VDP implementation needs this bitmap to work with */ |
| 93 | state->m_custom_priority_bitmap | |
| 91 | machine.primary_screen->register_screen_bitmap(state->m_custom_priority_bitmap | |
| 94 | 92 | |
| 95 | 93 | if (state->m_vdp0 != NULL) |
| 96 | 94 | { |
| r14034 | r14035 | |
| 100 | 98 | |
| 101 | 99 | if (state->m_vdp1 != NULL) |
| 102 | 100 | { |
| 103 | state->m_secondary_render_bitmap | |
| 101 | machine.primary_screen->register_screen_bitmap(state->m_secondary_render_bitmap | |
| 104 | 102 | state->m_vdp1->custom_priority_bitmap = &state->m_custom_priority_bitmap; |
| 105 | 103 | } |
| 106 | 104 |
| r14034 | r14035 | |
|---|---|---|
| 33 | 33 | galastrm_state *state = machine.driver_data<galastrm_state>(); |
| 34 | 34 | state->m_spritelist = auto_alloc_array(machine, struct tempsprite, 0x4000); |
| 35 | 35 | |
| 36 | state->m_tmpbitmaps.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 37 | state->m_polybitmap.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 36 | machine.primary_screen->register_screen_bitmap(state->m_tmpbitmaps); | |
| 37 | machine.primary_screen->register_screen_bitmap(state->m_polybitmap); | |
| 38 | 38 | |
| 39 | 39 | state->m_poly = poly_alloc(machine, 16, sizeof(poly_extra_data), POLYFLAG_ALLOW_QUADS); |
| 40 | 40 | machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(galastrm_exit), &machine)); |
| r14034 | r14035 | |
|---|---|---|
| 19 | 19 | { |
| 20 | 20 | starfire_state *state = machine.driver_data<starfire_state>(); |
| 21 | 21 | |
| 22 | | |
| 22 | | |
| 23 | 23 | state->m_scanline_timer = machine.scheduler().timer_alloc(FUNC(starfire_scanline_callback)); |
| 24 | 24 | state->m_scanline_timer->adjust(machine.primary_screen->time_until_pos(STARFIRE_VBEND), STARFIRE_VBEND); |
| 25 | 25 |
| r14034 | r14035 | |
|---|---|---|
| 117 | 117 | VIDEO_START( sprint8 ) |
| 118 | 118 | { |
| 119 | 119 | sprint8_state *state = machine.driver_data<sprint8_state>(); |
| 120 | state->m_helper1.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 121 | state->m_helper2.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 120 | machine.primary_screen->register_screen_bitmap(state->m_helper1); | |
| 121 | machine.primary_screen->register_screen_bitmap(state->m_helper2); | |
| 122 | 122 | |
| 123 | 123 | state->m_tilemap1 = tilemap_create(machine, get_tile_info1, tilemap_scan_rows, 16, 8, 32, 32); |
| 124 | 124 | state->m_tilemap2 = tilemap_create(machine, get_tile_info2, tilemap_scan_rows, 16, 8, 32, 32); |
| r14034 | r14035 | |
|---|---|---|
| 394 | 394 | decode_sprite32(machine, "gfx4"); |
| 395 | 395 | |
| 396 | 396 | /* allocate temp bitmaps */ |
| 397 | | |
| 397 | | |
| 398 | 398 | |
| 399 | 399 | namco_road_init(machine, gfx_index); |
| 400 | 400 |
| r14034 | r14035 | |
|---|---|---|
| 58 | 58 | { |
| 59 | 59 | bigevglf_state *state = machine.driver_data<bigevglf_state>(); |
| 60 | 60 | |
| 61 | state->m_tmp_bitmap[0].allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 62 | state->m_tmp_bitmap[1].allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 63 | state->m_tmp_bitmap[2].allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 64 | state->m_tmp_bitmap[3].allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 61 | machine.primary_screen->register_screen_bitmap(state->m_tmp_bitmap[0]); | |
| 62 | machine.primary_screen->register_screen_bitmap(state->m_tmp_bitmap[1]); | |
| 63 | machine.primary_screen->register_screen_bitmap(state->m_tmp_bitmap[2]); | |
| 64 | machine.primary_screen->register_screen_bitmap(state->m_tmp_bitmap[3]); | |
| 65 | 65 | state->save_item(NAME(state->m_tmp_bitmap[0])); |
| 66 | 66 | state->save_item(NAME(state->m_tmp_bitmap[1])); |
| 67 | 67 | state->save_item(NAME(state->m_tmp_bitmap[2])); |
| r14034 | r14035 | |
|---|---|---|
| 121 | 121 | state->m_robokid_bg2_videoram = auto_alloc_array_clear(machine, UINT8, size); |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | | |
| 124 | | |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | static int stencil_ninjakd2( UINT16 pal ); |
| r14034 | r14035 | |
|---|---|---|
| 296 | 296 | { |
| 297 | 297 | ojankohs_state *state = machine.driver_data<ojankohs_state>(); |
| 298 | 298 | |
| 299 | | |
| 299 | | |
| 300 | 300 | state->m_videoram = auto_alloc_array(machine, UINT8, 0x8000); |
| 301 | 301 | state->m_paletteram = auto_alloc_array(machine, UINT8, 0x20); |
| 302 | 302 |
| r14034 | r14035 | |
|---|---|---|
| 499 | 499 | int width = machine.primary_screen->width(); |
| 500 | 500 | int height = machine.primary_screen->height(); |
| 501 | 501 | |
| 502 | | |
| 502 | | |
| 503 | 503 | state->m_videoram0 = auto_alloc_array(machine, UINT8, width * height); |
| 504 | 504 | state->m_palette = auto_alloc_array(machine, UINT8, 0x200); |
| 505 | 505 | state->m_clut = auto_alloc_array(machine, UINT8, 0x800); |
| r14034 | r14035 | |
| 516 | 516 | int width = machine.primary_screen->width(); |
| 517 | 517 | int height = machine.primary_screen->height(); |
| 518 | 518 | |
| 519 | state->m_tmpbitmap0.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 520 | state->m_tmpbitmap1.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 519 | machine.primary_screen->register_screen_bitmap(state->m_tmpbitmap0); | |
| 520 | machine.primary_screen->register_screen_bitmap(state->m_tmpbitmap1); | |
| 521 | 521 | state->m_videoram0 = auto_alloc_array(machine, UINT8, width * height); |
| 522 | 522 | state->m_videoram1 = auto_alloc_array(machine, UINT8, width * height); |
| 523 | 523 | state->m_palette = auto_alloc_array(machine, UINT8, 0x200); |
| r14034 | r14035 | |
|---|---|---|
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | /* create helper bitmaps */ |
| 172 | state->m_background_bitmap.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 173 | state->m_collision_background.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 174 | state->m_scrolled_collision_background.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 172 | machine.primary_screen->register_screen_bitmap(state->m_background_bitmap); | |
| 173 | machine.primary_screen->register_screen_bitmap(state->m_collision_background); | |
| 174 | machine.primary_screen->register_screen_bitmap(state->m_scrolled_collision_background); | |
| 175 | 175 | |
| 176 | 176 | /* register save */ |
| 177 | 177 | state->save_item(NAME(state->m_background_bitmap)); |
| r14034 | r14035 | |
|---|---|---|
| 72 | 72 | |
| 73 | 73 | state->m_prom_tab = auto_alloc_array(machine, UINT32, 256); |
| 74 | 74 | |
| 75 | | |
| 75 | | |
| 76 | 76 | |
| 77 | 77 | /* Allocate temporary bitmap */ |
| 78 | 78 | for (i=0; i<256; i++) |
| r14034 | r14035 | |
|---|---|---|
| 96 | 96 | state->m_effectram = auto_alloc_array(machine, UINT8, 0x400); |
| 97 | 97 | |
| 98 | 98 | /* create helper bitmap */ |
| 99 | | |
| 99 | | |
| 100 | 100 | |
| 101 | 101 | /* register save */ |
| 102 | 102 | state->save_item(NAME(state->m_collision_background)); |
| r14034 | r14035 | |
|---|---|---|
| 196 | 196 | pacland_state *state = machine.driver_data<pacland_state>(); |
| 197 | 197 | int color; |
| 198 | 198 | |
| 199 | | |
| 199 | | |
| 200 | 200 | state->m_fg_bitmap.fill(0xffff); |
| 201 | 201 | |
| 202 | 202 | state->m_bg_tilemap = tilemap_create(machine, get_bg_tile_info,tilemap_scan_rows,8,8,64,32); |
| r14034 | r14035 | |
|---|---|---|
| 73 | 73 | state->m_bitmapram = auto_alloc_array(machine, UINT8, BITMAPRAM_SIZE); |
| 74 | 74 | state->save_pointer(NAME(state->m_bitmapram), BITMAPRAM_SIZE); |
| 75 | 75 | |
| 76 | | |
| 76 | | |
| 77 | 77 | state->save_item(NAME(state->m_pixbitmap)); |
| 78 | 78 | } |
| 79 | 79 |
| r14034 | r14035 | |
|---|---|---|
| 180 | 180 | |
| 181 | 181 | for (i = 0; i < 3; i++) |
| 182 | 182 | { |
| 183 | state->m_layer_bitmap[i].allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 184 | state->m_sprite_layer_collbitmap2[i].allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 183 | machine.primary_screen->register_screen_bitmap(state->m_layer_bitmap[i]); | |
| 184 | machine.primary_screen->register_screen_bitmap(state->m_sprite_layer_collbitmap2[i]); | |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | state->m_sprite_sprite_collbitmap1.allocate(32,32); |
| r14034 | r14035 | |
|---|---|---|
| 296 | 296 | int width = machine.primary_screen->width(); |
| 297 | 297 | int height = machine.primary_screen->height(); |
| 298 | 298 | |
| 299 | | |
| 299 | | |
| 300 | 300 | state->m_videoram = auto_alloc_array(machine, UINT8, width * height); |
| 301 | 301 | state->m_clut = auto_alloc_array(machine, UINT8, 0x800); |
| 302 | 302 | memset(state->m_videoram, 0x00, (width * height * sizeof(UINT8))); |
| r14034 | r14035 | |
|---|---|---|
| 66 | 66 | blockout_state *state = machine.driver_data<blockout_state>(); |
| 67 | 67 | |
| 68 | 68 | /* Allocate temporary bitmaps */ |
| 69 | | |
| 69 | | |
| 70 | 70 | state->save_item(NAME(state->m_tmpbitmap)); |
| 71 | 71 | } |
| 72 | 72 |
| r14034 | r14035 | |
|---|---|---|
| 97 | 97 | tilemap_set_transparent_pen(state->m_alpha_tilemap, 0); |
| 98 | 98 | |
| 99 | 99 | /* allocate a playfield bitmap for rendering */ |
| 100 | | |
| 100 | | |
| 101 | 101 | |
| 102 | 102 | state->save_item(NAME(state->m_brightness)); |
| 103 | 103 | } |
| r14034 | r14035 | |
|---|---|---|
| 383 | 383 | state->m_screen_width = machine.primary_screen->width(); |
| 384 | 384 | state->m_screen_height = machine.primary_screen->height(); |
| 385 | 385 | |
| 386 | state->m_tmpbitmap0.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 387 | state->m_tmpbitmap1.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 386 | machine.primary_screen->register_screen_bitmap(state->m_tmpbitmap0); | |
| 387 | machine.primary_screen->register_screen_bitmap(state->m_tmpbitmap1); | |
| 388 | 388 | state->m_videoram0 = auto_alloc_array(machine, UINT8, state->m_screen_width * state->m_screen_height); |
| 389 | 389 | state->m_videoram1 = auto_alloc_array(machine, UINT8, state->m_screen_width * state->m_screen_height); |
| 390 | 390 | state->m_palette = auto_alloc_array(machine, UINT8, 0x200); |
| r14034 | r14035 | |
|---|---|---|
| 59 | 59 | VIDEO_START( fstarfrc ) |
| 60 | 60 | { |
| 61 | 61 | tecmo16_state *state = machine.driver_data<tecmo16_state>(); |
| 62 | int width = machine.primary_screen->width(); | |
| 63 | int height = machine.primary_screen->height(); | |
| 64 | 62 | |
| 65 | 63 | /* set up tile layers */ |
| 66 | state->m_tile_bitmap_bg.allocate(width, height); | |
| 67 | state->m_tile_bitmap_fg.allocate(width, height); | |
| 64 | machine.primary_screen->register_screen_bitmap(state->m_tile_bitmap_bg); | |
| 65 | machine.primary_screen->register_screen_bitmap(state->m_tile_bitmap_fg); | |
| 68 | 66 | |
| 69 | 67 | /* set up sprites */ |
| 70 | | |
| 68 | m | |
| 71 | 69 | |
| 72 | 70 | state->m_fg_tilemap = tilemap_create(machine, fg_get_tile_info,tilemap_scan_rows,16,16,32,32); |
| 73 | 71 | state->m_bg_tilemap = tilemap_create(machine, bg_get_tile_info,tilemap_scan_rows,16,16,32,32); |
| r14034 | r14035 | |
| 85 | 83 | VIDEO_START( ginkun ) |
| 86 | 84 | { |
| 87 | 85 | tecmo16_state *state = machine.driver_data<tecmo16_state>(); |
| 88 | int width = machine.primary_screen->width(); | |
| 89 | int height = machine.primary_screen->height(); | |
| 90 | 86 | |
| 91 | 87 | /* set up tile layers */ |
| 92 | state->m_tile_bitmap_bg.allocate(width, height); | |
| 93 | state->m_tile_bitmap_fg.allocate(width, height); | |
| 88 | machine.primary_screen->register_screen_bitmap(state->m_tile_bitmap_bg); | |
| 89 | machine.primary_screen->register_screen_bitmap(state->m_tile_bitmap_fg); | |
| 94 | 90 | |
| 95 | 91 | /* set up sprites */ |
| 96 | | |
| 92 | m | |
| 97 | 93 | |
| 98 | 94 | state->m_fg_tilemap = tilemap_create(machine, fg_get_tile_info,tilemap_scan_rows,16,16,64,32); |
| 99 | 95 | state->m_bg_tilemap = tilemap_create(machine, bg_get_tile_info,tilemap_scan_rows,16,16,64,32); |
| r14034 | r14035 | |
| 109 | 105 | VIDEO_START( riot ) |
| 110 | 106 | { |
| 111 | 107 | tecmo16_state *state = machine.driver_data<tecmo16_state>(); |
| 112 | int width = machine.primary_screen->width(); | |
| 113 | int height = machine.primary_screen->height(); | |
| 114 | 108 | |
| 115 | 109 | /* set up tile layers */ |
| 116 | state->m_tile_bitmap_bg.allocate(width, height); | |
| 117 | state->m_tile_bitmap_fg.allocate(width, height); | |
| 110 | machine.primary_screen->register_screen_bitmap(state->m_tile_bitmap_bg); | |
| 111 | machine.primary_screen->register_screen_bitmap(state->m_tile_bitmap_fg); | |
| 118 | 112 | |
| 119 | 113 | /* set up sprites */ |
| 120 | | |
| 114 | m | |
| 121 | 115 | |
| 122 | 116 | state->m_fg_tilemap = tilemap_create(machine, fg_get_tile_info,tilemap_scan_rows,16,16,64,32); |
| 123 | 117 | state->m_bg_tilemap = tilemap_create(machine, bg_get_tile_info,tilemap_scan_rows,16,16,64,32); |
| r14034 | r14035 | |
|---|---|---|
| 49 | 49 | VIDEO_START( ultratnk ) |
| 50 | 50 | { |
| 51 | 51 | ultratnk_state *state = machine.driver_data<ultratnk_state>(); |
| 52 | | |
| 52 | | |
| 53 | 53 | |
| 54 | 54 | state->m_playfield = tilemap_create(machine, ultratnk_tile_info, tilemap_scan_rows, 8, 8, 32, 32); |
| 55 | 55 | } |
| r14034 | r14035 | |
|---|---|---|
| 219 | 219 | state->m_text_tilemap = tilemap_create(machine, get_text_tile_info, tilemap_scan_rows, 8, 8, 32, 32); |
| 220 | 220 | state->m_sl_tilemap = tilemap_create(machine, get_sl_tile_info, tilemap_scan_rows, 8, 8, 32, 32); |
| 221 | 221 | |
| 222 | | |
| 222 | | |
| 223 | 223 | |
| 224 | 224 | tilemap_set_transmask(state->m_bg_tilemap, 0, 0x00f0, 0xff0f); /* pens 0-3 have priority over the foreground layer */ |
| 225 | 225 | tilemap_set_transparent_pen(state->m_fg_tilemap, 0); |
| r14034 | r14035 | |
|---|---|---|
| 323 | 323 | mappy_state *state = machine.driver_data<mappy_state>(); |
| 324 | 324 | |
| 325 | 325 | state->m_bg_tilemap = tilemap_create(machine, superpac_get_tile_info,superpac_tilemap_scan,8,8,36,28); |
| 326 | | |
| 326 | | |
| 327 | 327 | |
| 328 | 328 | colortable_configure_tilemap_groups(machine.colortable, state->m_bg_tilemap, machine.gfx[0], 31); |
| 329 | 329 | } |
| r14034 | r14035 | |
|---|---|---|
| 1227 | 1227 | { |
| 1228 | 1228 | psikyosh_state *state = machine.driver_data<psikyosh_state>(); |
| 1229 | 1229 | UINT8 *alphatable = state->m_alphatable; |
| 1230 | int width = machine.primary_screen->width(); | |
| 1231 | int height = machine.primary_screen->height(); | |
| 1232 | 1230 | |
| 1233 | | |
| 1231 | m | |
| 1234 | 1232 | state->m_zoom_bitmap.allocate(16*16, 16*16); /* temp buffer for assembling sprites */ |
| 1235 | 1233 | state->m_bg_bitmap.allocate(32*16, 32*16); /* temp buffer for assembling tilemaps */ |
| 1236 | 1234 | state->m_bg_zoom = auto_alloc_array(machine, UINT16, 256); |
| r14034 | r14035 | |
|---|---|---|
| 117 | 117 | int bgdata; |
| 118 | 118 | int color; |
| 119 | 119 | |
| 120 | | |
| 120 | | |
| 121 | 121 | |
| 122 | 122 | state->m_fg_tilemap = tilemap_create(machine, get_fg_tile_info,tilemap_scan_rows,8,8,32, 32); |
| 123 | 123 |
| r14034 | r14035 | |
|---|---|---|
| 225 | 225 | VIDEO_START( firetrk ) |
| 226 | 226 | { |
| 227 | 227 | firetrk_state *state = machine.driver_data<firetrk_state>(); |
| 228 | state->m_helper1.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 229 | state->m_helper2.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 228 | machine.primary_screen->register_screen_bitmap(state->m_helper1); | |
| 229 | machine.primary_screen->register_screen_bitmap(state->m_helper2); | |
| 230 | 230 | |
| 231 | 231 | state->m_tilemap1 = tilemap_create(machine, firetrk_get_tile_info1, tilemap_scan_rows, 16, 16, 16, 16); |
| 232 | 232 | state->m_tilemap2 = tilemap_create(machine, firetrk_get_tile_info2, tilemap_scan_rows, 16, 16, 16, 16); |
| r14034 | r14035 | |
| 236 | 236 | VIDEO_START( superbug ) |
| 237 | 237 | { |
| 238 | 238 | firetrk_state *state = machine.driver_data<firetrk_state>(); |
| 239 | state->m_helper1.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 240 | state->m_helper2.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 239 | machine.primary_screen->register_screen_bitmap(state->m_helper1); | |
| 240 | machine.primary_screen->register_screen_bitmap(state->m_helper2); | |
| 241 | 241 | |
| 242 | 242 | state->m_tilemap1 = tilemap_create(machine, superbug_get_tile_info1, tilemap_scan_rows, 16, 16, 16, 16); |
| 243 | 243 | state->m_tilemap2 = tilemap_create(machine, superbug_get_tile_info2, tilemap_scan_rows, 16, 16, 16, 16); |
| r14034 | r14035 | |
| 247 | 247 | VIDEO_START( montecar ) |
| 248 | 248 | { |
| 249 | 249 | firetrk_state *state = machine.driver_data<firetrk_state>(); |
| 250 | state->m_helper1.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 251 | state->m_helper2.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 250 | machine.primary_screen->register_screen_bitmap(state->m_helper1); | |
| 251 | machine.primary_screen->register_screen_bitmap(state->m_helper2); | |
| 252 | 252 | |
| 253 | 253 | state->m_tilemap1 = tilemap_create(machine, montecar_get_tile_info1, tilemap_scan_rows, 16, 16, 16, 16); |
| 254 | 254 | state->m_tilemap2 = tilemap_create(machine, montecar_get_tile_info2, tilemap_scan_rows, 16, 16, 16, 16); |
| r14034 | r14035 | |
|---|---|---|
| 15 | 15 | VIDEO_START( buggychl ) |
| 16 | 16 | { |
| 17 | 17 | buggychl_state *state = machine.driver_data<buggychl_state>(); |
| 18 | state->m_tmp_bitmap1.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 19 | state->m_tmp_bitmap2.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 18 | machine.primary_screen->register_screen_bitmap(state->m_tmp_bitmap1); | |
| 19 | machine.primary_screen->register_screen_bitmap(state->m_tmp_bitmap2); | |
| 20 | 20 | |
| 21 | 21 | state->save_item(NAME(state->m_tmp_bitmap1)); |
| 22 | 22 | state->save_item(NAME(state->m_tmp_bitmap2)); |
| r14034 | r14035 | |
|---|---|---|
| 81 | 81 | val = (val << 1) | (bit & 1); |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | | |
| 84 | | |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 |
| r14034 | r14035 | |
|---|---|---|
| 35 | 35 | { |
| 36 | 36 | exidy_state *state = machine.driver_data<exidy_state>(); |
| 37 | 37 | |
| 38 | | |
| 38 | | |
| 39 | 39 | state->m_motion_object_1_vid.allocate(16, 16); |
| 40 | 40 | state->m_motion_object_2_vid.allocate(16, 16); |
| 41 | 41 | state->m_motion_object_2_clip.allocate(16, 16); |
| r14034 | r14035 | |
|---|---|---|
| 227 | 227 | VIDEO_START( hyhoo ) |
| 228 | 228 | { |
| 229 | 229 | hyhoo_state *state = machine.driver_data<hyhoo_state>(); |
| 230 | | |
| 230 | | |
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 |
| r14034 | r14035 | |
|---|---|---|
| 144 | 144 | state->m_bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows, |
| 145 | 145 | 24, 24, 32, 32); |
| 146 | 146 | |
| 147 | state->m_bitmap.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 148 | state->m_spritebitmap.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 147 | machine.primary_screen->register_screen_bitmap(state->m_bitmap); | |
| 148 | machine.primary_screen->register_screen_bitmap(state->m_spritebitmap); | |
| 149 | 149 | |
| 150 | 150 | gfx_element_set_source(machine.gfx[1], state->m_s2636_0_ram); |
| 151 | 151 | gfx_element_set_source(machine.gfx[2], state->m_s2636_0_ram); |
| r14034 | r14035 | |
|---|---|---|
| 69 | 69 | shangha3_state *state = machine.driver_data<shangha3_state>(); |
| 70 | 70 | int i; |
| 71 | 71 | |
| 72 | | |
| 72 | | |
| 73 | 73 | |
| 74 | 74 | for (i = 0;i < 14;i++) |
| 75 | 75 | state->m_drawmode_table[i] = DRAWMODE_SOURCE; |
| r14034 | r14035 | |
|---|---|---|
| 542 | 542 | { |
| 543 | 543 | taito_f3_state *state = machine.driver_data<taito_f3_state>(); |
| 544 | 544 | const struct F3config *pCFG=&f3_config_table[0]; |
| 545 | int | |
| 545 | int | |
| 546 | 546 | |
| 547 | 547 | state->m_f3_alpha_level_2as=127; |
| 548 | 548 | state->m_f3_alpha_level_2ad=127; |
| r14034 | r14035 | |
| 647 | 647 | state->m_pixel_layer = tilemap_create(machine, get_tile_info_pixel,tilemap_scan_cols,8,8,64,32); |
| 648 | 648 | state->m_pf_line_inf = auto_alloc_array(machine, struct f3_playfield_line_inf, 5); |
| 649 | 649 | state->m_sa_line_inf = auto_alloc_array(machine, struct f3_spritealpha_line_inf, 1); |
| 650 | width = machine.primary_screen->width(); | |
| 651 | height = machine.primary_screen->height(); | |
| 652 | state->m_pri_alp_bitmap.allocate(width, height); | |
| 650 | machine.primary_screen->register_screen_bitmap(state->m_pri_alp_bitmap); | |
| 653 | 651 | state->m_tile_opaque_sp = auto_alloc_array(machine, UINT8, machine.gfx[2]->total_elements); |
| 654 | 652 | for (i=0; i<8; i++) |
| 655 | 653 | state->m_tile_opaque_pf[i] = auto_alloc_array(machine, UINT8, machine.gfx[1]->total_elements); |
| r14034 | r14035 | |
|---|---|---|
| 121 | 121 | state->m_bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows, 16, 16, 32, 32); |
| 122 | 122 | state->m_fg_tilemap = tilemap_create(machine, get_fg_tile_info, tilemap_scan_rows, 16, 16, 32, 32); |
| 123 | 123 | |
| 124 | | |
| 124 | | |
| 125 | 125 | tilemap_set_transparent_pen(state->m_fg_tilemap, 0); |
| 126 | 126 | |
| 127 | 127 | tilemap_set_scrolldx(state->m_bg_tilemap, 0x094, 0x06a); |
| r14034 | r14035 | |
|---|---|---|
| 730 | 730 | static void sprite_init_cave( running_machine &machine ) |
| 731 | 731 | { |
| 732 | 732 | cave_state *state = machine.driver_data<cave_state>(); |
| 733 | int screen_width = machine.primary_screen->width(); | |
| 734 | int screen_height = machine.primary_screen->height(); | |
| 735 | 733 | |
| 736 | 734 | if (state->m_spritetype[0] == 0 || state->m_spritetype[0] == 2) // most of the games |
| 737 | 735 | { |
| r14034 | r14035 | |
| 745 | 743 | } |
| 746 | 744 | |
| 747 | 745 | state->m_sprite_zbuf_baseval = 0x10000 - MAX_SPRITE_NUM; |
| 748 | | |
| 746 | m | |
| 749 | 747 | state->m_blit.baseaddr_zbuf = &state->m_sprite_zbuf.pix8(0); |
| 750 | 748 | state->m_blit.line_offset_zbuf = state->m_sprite_zbuf.rowpixels() * state->m_sprite_zbuf.bpp() / 8; |
| 751 | 749 |
| r14034 | r14035 | |
|---|---|---|
| 36 | 36 | 3, resistances, state->m_bweights, 1000, 0); |
| 37 | 37 | |
| 38 | 38 | /* allocate a bitmap for drawing sprites */ |
| 39 | | |
| 39 | | |
| 40 | 40 | |
| 41 | 41 | /* register for savestates */ |
| 42 | 42 | state->save_pointer(NAME(state->m_videoram), 0x8000); |
| r14034 | r14035 | |
|---|---|---|
| 24 | 24 | state->m_memory_devices = auto_alloc_array(machine, UINT8, 4 * 0x800); /* 0 - not connected, 1,2,3 - RAMs*/ |
| 25 | 25 | state->m_tree_ram = auto_alloc_array(machine, UINT8, 2 * 0x20); |
| 26 | 26 | |
| 27 | state->m_obj0_bitmap.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 28 | state->m_river_bitmap.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 29 | state->m_tree0_bitmap.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 30 | state->m_tree1_bitmap.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 27 | machine.primary_screen->register_screen_bitmap(state->m_obj0_bitmap); | |
| 28 | machine.primary_screen->register_screen_bitmap(state->m_river_bitmap); | |
| 29 | machine.primary_screen->register_screen_bitmap(state->m_tree0_bitmap); | |
| 30 | machine.primary_screen->register_screen_bitmap(state->m_tree1_bitmap); | |
| 31 | 31 | |
| 32 | 32 | state->m_scanline_timer = machine.scheduler().timer_alloc(FUNC(changela_scanline_callback)); |
| 33 | 33 | state->m_scanline_timer->adjust(machine.primary_screen->time_until_pos(30), 30); |
| r14034 | r14035 | |
|---|---|---|
| 20 | 20 | VIDEO_START( triplhnt ) |
| 21 | 21 | { |
| 22 | 22 | triplhnt_state *state = machine.driver_data<triplhnt_state>(); |
| 23 | | |
| 23 | | |
| 24 | 24 | |
| 25 | 25 | state->m_bg_tilemap = tilemap_create(machine, get_tile_info, tilemap_scan_rows, 16, 16, 16, 16); |
| 26 | 26 | } |
| r14034 | r14035 | |
|---|---|---|
| 116 | 116 | |
| 117 | 117 | state->m_LFSR = auto_alloc_array(machine, UINT8, 0x8000); |
| 118 | 118 | |
| 119 | | |
| 119 | | |
| 120 | 120 | |
| 121 | 121 | for (i = 0; i < 0x8000; i++) |
| 122 | 122 | { |
| r14034 | r14035 | |
|---|---|---|
| 107 | 107 | { |
| 108 | 108 | taitotz_state *state = machine.driver_data<taitotz_state>(); |
| 109 | 109 | |
| 110 | | |
| 110 | | |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | static SCREEN_UPDATE_RGB32( taitotz ) |
| r14034 | r14035 | |
|---|---|---|
| 114 | 114 | lastfght_state *state = machine.driver_data<lastfght_state>(); |
| 115 | 115 | int i; |
| 116 | 116 | for (i = 0; i < 2; i++) |
| 117 | | |
| 117 | | |
| 118 | 118 | |
| 119 | 119 | state->save_item(NAME(state->m_bitmap[0])); |
| 120 | 120 | state->save_item(NAME(state->m_bitmap[1])); |
| r14034 | r14035 | |
|---|---|---|
| 147 | 147 | |
| 148 | 148 | void gei_state::video_start() |
| 149 | 149 | { |
| 150 | m | |
| 150 | m | |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | UINT32 gei_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| r14034 | r14035 | |
|---|---|---|
| 61 | 61 | { |
| 62 | 62 | astrocorp_state *state = machine.driver_data<astrocorp_state>(); |
| 63 | 63 | |
| 64 | | |
| 64 | | |
| 65 | 65 | |
| 66 | 66 | state->save_item(NAME(state->m_bitmap)); |
| 67 | 67 | state->save_item (NAME(state->m_screen_enable)); |
| r14034 | r14035 | |
|---|---|---|
| 293 | 293 | static VIDEO_START(coolridr) |
| 294 | 294 | { |
| 295 | 295 | coolridr_state *state = machine.driver_data<coolridr_state>(); |
| 296 | int width = machine.primary_screen->width(); | |
| 297 | int height = machine.primary_screen->height(); | |
| 298 | ||
| 299 | state->m_temp_bitmap_sprites.allocate(width, height); | |
| 296 | machine.primary_screen->register_screen_bitmap(state->m_temp_bitmap_sprites); | |
| 300 | 297 | state->m_test_offs = 0x2000; |
| 301 | 298 | } |
| 302 | 299 |
| r14034 | r14035 | |
|---|---|---|
| 277 | 277 | |
| 278 | 278 | static ADDRESS_MAP_START( n64_map, AS_PROGRAM, 32 ) |
| 279 | 279 | AM_RANGE(0x00000000, 0x007fffff) AM_RAM /*AM_MIRROR(0xc0000000)*/ AM_BASE(&rdram) // RDRAM |
| 280 | ||
| 281 | AM_RANGE(0x03f00000, 0x03f00027) AM_DEVREADWRITE_MODERN("rcp", n64_periphs, rdram_reg_r, rdram_reg_w) | |
| 280 | 282 | AM_RANGE(0x04000000, 0x04000fff) AM_RAM AM_SHARE("dmem") // RSP DMEM |
| 281 | 283 | AM_RANGE(0x04001000, 0x04001fff) AM_RAM AM_SHARE("imem") // RSP IMEM |
| 282 | 284 | AM_RANGE(0x04040000, 0x040fffff) AM_DEVREADWRITE("rsp", n64_sp_reg_r, n64_sp_reg_w) // RSP |
| 283 | 285 | AM_RANGE(0x04100000, 0x041fffff) AM_DEVREADWRITE("rsp", n64_dp_reg_r, n64_dp_reg_w) // RDP |
| 284 | AM_RANGE(0x04300000, 0x043fffff) AM_READWRITE(n64_mi_reg_r, n64_mi_reg_w) // MIPS Interface | |
| 285 | AM_RANGE(0x04400000, 0x044fffff) AM_READWRITE(n64_vi_reg_r, n64_vi_reg_w) // Video Interface | |
| 286 | AM_RANGE(0x04500000, 0x045fffff) AM_READWRITE(n64_ai_reg_r, n64_ai_reg_w) // Audio Interface | |
| 287 | AM_RANGE(0x04600000, 0x046fffff) AM_READWRITE(n64_pi_reg_r, n64_pi_reg_w) // Peripheral Interface | |
| 288 | AM_RANGE(0x04700000, 0x047fffff) AM_READWRITE(n64_ri_reg_r, n64_ri_reg_w) // RDRAM Interface | |
| 289 | AM_RANGE(0x04800000, 0x048fffff) AM_READWRITE(n64_si_reg_r, n64_si_reg_w) // Serial Interface | |
| 286 | AM_RANGE(0x04300000, 0x043fffff) AM_DEVREADWRITE_MODERN("rcp", n64_periphs, mi_reg_r, mi_reg_w) // MIPS Interface | |
| 287 | AM_RANGE(0x04400000, 0x044fffff) AM_DEVREADWRITE_MODERN("rcp", n64_periphs, vi_reg_r, vi_reg_w) // Video Interface | |
| 288 | AM_RANGE(0x04500000, 0x045fffff) AM_DEVREADWRITE_MODERN("rcp", n64_periphs, ai_reg_r, ai_reg_w) // Audio Interface | |
| 289 | AM_RANGE(0x04600000, 0x046fffff) AM_DEVREADWRITE_MODERN("rcp", n64_periphs, pi_reg_r, pi_reg_w) // Peripheral Interface | |
| 290 | AM_RANGE(0x04700000, 0x047fffff) AM_DEVREADWRITE_MODERN("rcp", n64_periphs, ri_reg_r, ri_reg_w) // RDRAM Interface | |
| 291 | AM_RANGE(0x04800000, 0x048fffff) AM_DEVREADWRITE_MODERN("rcp", n64_periphs, si_reg_r, si_reg_w) // Serial Interface | |
| 290 | 292 | AM_RANGE(0x10000000, 0x13ffffff) AM_ROM AM_REGION("user2", 0) // Cartridge |
| 291 | 293 | AM_RANGE(0x1fc00000, 0x1fc007bf) AM_ROM AM_REGION("user1", 0) // PIF ROM |
| 292 | AM_RANGE(0x1fc007c0, 0x1fc007ff) AM_READWRITE(n64_pif_ram_r, | |
| 294 | AM_RANGE(0x1fc007c0, 0x1fc007ff) AM_DEVREADWRITE_MODERN("rcp", n64_periphs, pif_ram_r, | |
| 293 | 295 | |
| 294 | 296 | /* |
| 295 | 297 | Surely this should mirror main ram? srmvs crashes, and |
| r14034 | r14035 | |
|---|---|---|
| 158 | 158 | state->m_dbg_lookup = 4; |
| 159 | 159 | #endif |
| 160 | 160 | |
| 161 | state->m_tmpbitmaps[0].allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 162 | state->m_tmpbitmaps[1].allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 163 | state->m_tmpbitmaps[2].allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 164 | state->m_tmpbitmaps[3].allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 161 | machine.primary_screen->register_screen_bitmap(state->m_tmpbitmaps[0]); | |
| 162 | machine.primary_screen->register_screen_bitmap(state->m_tmpbitmaps[1]); | |
| 163 | machine.primary_screen->register_screen_bitmap(state->m_tmpbitmaps[2]); | |
| 164 | machine.primary_screen->register_screen_bitmap(state->m_tmpbitmaps[3]); | |
| 165 | 165 | |
| 166 | 166 | state->save_item(NAME(state->m_tmpbitmaps[0])); |
| 167 | 167 | state->save_item(NAME(state->m_tmpbitmaps[1])); |
| r14034 | r14035 | |
|---|---|---|
| 441 | 441 | { |
| 442 | 442 | sliver_state *state = machine.driver_data<sliver_state>(); |
| 443 | 443 | |
| 444 | state->m_bitmap_bg.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 445 | state->m_bitmap_fg.allocate(machine.primary_screen->width(), machine.primary_screen->height()); | |
| 444 | machine.primary_screen->register_screen_bitmap(state->m_bitmap_bg); | |
| 445 | machine.primary_screen->register_screen_bitmap(state->m_bitmap_fg); | |
| 446 | 446 | } |
| 447 | 447 | |
| 448 | 448 | static SCREEN_UPDATE_RGB32(sliver) |
| r14034 | r14035 | |
|---|---|---|
| 299 | 299 | { |
| 300 | 300 | for (buffer = 0; buffer < 2; buffer++) |
| 301 | 301 | { |
| 302 | | |
| 302 | | |
| 303 | 303 | state->m_bitmap[layer][buffer].fill(0xff); |
| 304 | 304 | } |
| 305 | 305 | } |
| r14034 | r14035 | |
|---|---|---|
| 465 | 465 | static VIDEO_START( sms ) |
| 466 | 466 | { |
| 467 | 467 | sms_state *state = machine.driver_data<sms_state>(); |
| 468 | | |
| 468 | | |
| 469 | 469 | |
| 470 | 470 | state_save_register_global_array(machine, state->m_vid_regs); |
| 471 | 471 | state_save_register_global_bitmap(machine, &state->m_bitmap); |
| r14034 | r14035 | |
|---|---|---|
| 27 | 27 | #define P cpustate->p |
| 28 | 28 | #define S cpustate->sp.b.l |
| 29 | 29 | |
| 30 | #define TRANSLATED(addr) ((cpustate->mmr[(addr)>>13] << 13) | ((addr)&0x1fff)) | |
| 30 | #define TRANSLATED(addr) ((cpustate->mmr[(addr)>>13&7] << 13) | ((addr)&0x1fff)) | |
| 31 | 31 | #define H6280_CYCLES(cyc) \ |
| 32 | 32 | { \ |
| 33 | 33 | cpustate->ICount -= ((cyc) * cpustate->clocks_per_cycle); \ |
| r14034 | r14035 | |
|---|---|---|
| 122 | 122 | |
| 123 | 123 | // find devices |
| 124 | 124 | m_screen = machine().device<screen_device>(m_screen_tag); |
| 125 | m_ | |
| 125 | m_ | |
| 126 | 126 | |
| 127 | 127 | // init palette |
| 128 | 128 | initialize_palette(); |
| r14034 | r14035 | |
|---|---|---|
| 596 | 596 | m_vdp_ops_count = 1; |
| 597 | 597 | m_vdp_engine = NULL; |
| 598 | 598 | |
| 599 | m_ | |
| 599 | m_ | |
| 600 | 600 | m_size_old = -1; |
| 601 | 601 | |
| 602 | 602 | // allocate VRAM |
| r14034 | r14035 | |
| 2212 | 2212 | else |
| 2213 | 2213 | m_screen->set_visible_area (0, 256 + 16 - 1, 0, 212 + 28 - 1); |
| 2214 | 2214 | |
| 2215 | m_bitmap.allocate(m_screen->width(), m_screen->height()); | |
| 2216 | 2215 | m_size_old = m_size; |
| 2217 | 2216 | } |
| 2218 | 2217 |
| r14034 | r14035 | |
|---|---|---|
| 1609 | 1609 | void sega315_5124_device::device_start() |
| 1610 | 1610 | { |
| 1611 | 1611 | m_screen = machine().device<screen_device>( m_screen_tag ); |
| 1612 | int width = m_screen->width(); | |
| 1613 | int height = m_screen->height(); | |
| 1614 | 1612 | |
| 1615 | 1613 | /* Resolve callbacks */ |
| 1616 | 1614 | m_cb_int.resolve( m_int_callback, *this ); |
| r14034 | r14035 | |
| 1624 | 1622 | m_frame_timing = (m_is_pal) ? pal_192 : ntsc_192; |
| 1625 | 1623 | |
| 1626 | 1624 | /* Make temp bitmap for rendering */ |
| 1627 | m_tmpbitmap.allocate(width, height); | |
| 1628 | m_y1_bitmap.allocate(width, height); | |
| 1625 | m_screen->register_screen_bitmap(m_tmpbitmap); | |
| 1626 | m_screen->register_screen_bitmap(m_y1_bitmap); | |
| 1629 | 1627 | |
| 1630 | 1628 | m_display_timer = timer_alloc(TIMER_LINE); |
| 1631 | 1629 | m_display_timer->adjust(m_screen->time_until_pos(0, DISPLAY_CB_HPOS), 0, m_screen->scan_period()); |
| r14034 | r14035 | |
|---|---|---|
| 82 | 82 | // find devices |
| 83 | 83 | m_cpu = machine().device<cpu_device>(m_cpu_tag); |
| 84 | 84 | m_screen = machine().device<screen_device>(m_screen_tag); |
| 85 | m_ | |
| 85 | m_ | |
| 86 | 86 | |
| 87 | 87 | // register for state saving |
| 88 | 88 | save_item(NAME(m_disp)); |
| r14034 | r14035 | |
|---|---|---|
| 291 | 291 | |
| 292 | 292 | void tilemap_init(running_machine &machine) |
| 293 | 293 | { |
| 294 | UINT32 screen_width, screen_height; | |
| 295 | ||
| 296 | if (machine.primary_screen == NULL) | |
| 294 | if (machine.primary_screen == NULL || machine.primary_screen->width() == 0) | |
| 297 | 295 | return; |
| 298 | 296 | |
| 299 | screen_width = machine.primary_screen->width(); | |
| 300 | screen_height = machine.primary_screen->height(); | |
| 301 | ||
| 302 | if (screen_width != 0 && screen_height != 0) | |
| 303 | { | |
| 304 | machine.priority_bitmap.allocate(screen_width, screen_height); | |
| 305 | machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(tilemap_exit), &machine)); | |
| 306 | } | |
| 297 | machine.primary_screen->register_screen_bitmap(machine.priority_bitmap); | |
| 298 | machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(tilemap_exit), &machine)); | |
| 307 | 299 | } |
| 308 | 300 | |
| 309 | 301 |
| r14034 | r14035 | |
|---|---|---|
| 450 | 450 | error = MAMERR_FATALERROR; |
| 451 | 451 | } |
| 452 | 452 | |
| 453 | // make sure our phase is set properly before cleaning up, | |
| 454 | // in case we got here via exception | |
| 455 | m_current_phase = MACHINE_PHASE_EXIT; | |
| 456 | ||
| 453 | 457 | // call all exit callbacks registered |
| 454 | 458 | call_notifiers(MACHINE_NOTIFY_EXIT); |
| 455 | 459 | zip_file_cache_clear(); |
| r14034 | r14035 | |
|---|---|---|
| 169 | 169 | // find devices |
| 170 | 170 | m_cpu = machine().device<cpu_device>(m_cpu_tag); |
| 171 | 171 | m_screen = machine().device<screen_device>(m_screen_tag); |
| 172 | m_ | |
| 172 | m_ | |
| 173 | 173 | |
| 174 | 174 | // register for state saving |
| 175 | 175 | save_item(NAME(m_disp)); |
| r14034 | r14035 | |
|---|---|---|
| 864 | 864 | for (int index = 0; index < ARRAY_LENGTH(m_overbitmap); index++) |
| 865 | 865 | { |
| 866 | 866 | m_overbitmap[index].set_format(format, texformat); |
| 867 | m_overbitmap[index].allocate(m_overwidth, m_overheight); | |
| 868 | 867 | m_overbitmap[index].set_palette(machine().palette); |
| 868 | m_overbitmap[index].resize(m_overwidth, m_overheight); | |
| 869 | 869 | } |
| 870 | 870 | |
| 871 | 871 | // allocate overlay texture |
| r14034 | r14035 | |
|---|---|---|
| 300 | 300 | m_screen_update_rgb32.bind_relative_to(*owner()); |
| 301 | 301 | m_screen_vblank.bind_relative_to(*owner()); |
| 302 | 302 | |
| 303 | // configure bitmap formats | |
| 303 | // configure bitmap formats and allocate screen bitmaps | |
| 304 | 304 | texture_format texformat = !m_screen_update_ind16.isnull() ? TEXFORMAT_PALETTE16 : TEXFORMAT_RGB32; |
| 305 | 305 | for (int index = 0; index < ARRAY_LENGTH(m_bitmap); index++) |
| 306 | { | |
| 306 | 307 | m_bitmap[index].set_format(format(), texformat); |
| 308 | register_screen_bitmap(m_bitmap[index]); | |
| 309 | } | |
| 307 | 310 | |
| 311 | // allocate raw textures | |
| 312 | m_texture[0] = machine().render().texture_alloc(); | |
| 313 | m_texture[1] = machine().render().texture_alloc(); | |
| 314 | ||
| 308 | 315 | // configure the default cliparea |
| 309 | 316 | render_container::user_settings settings; |
| 310 | 317 | m_container->get_user_settings(settings); |
| r14034 | r14035 | |
| 522 | 529 | if (m_type == SCREEN_TYPE_VECTOR) |
| 523 | 530 | return; |
| 524 | 531 | |
| 525 | // extract the current width/height from the bitmap | |
| 526 | int curwidth = 0, curheight = 0; | |
| 527 | if (m_bitmap[0].valid()) | |
| 528 | { | |
| 529 | curwidth = m_bitmap[0].width(); | |
| 530 | curheight = m_bitmap[0].height(); | |
| 531 | } | |
| 532 | // reize all registered screen bitmaps | |
| 533 | for (auto_bitmap_item *item = m_auto_bitmap_list.first(); item != NULL; item = item->next()) | |
| 534 | item->m_bitmap.resize(m_width, m_height); | |
| 532 | 535 | |
| 533 | // if we're too small to contain this width/height, reallocate our bitmaps and textures | |
| 534 | if (m_width > curwidth || m_height > curheight) | |
| 535 | { | |
| 536 | // free what we have currently | |
| 537 | machine().render().texture_free(m_texture[0]); | |
| 538 | machine().render().texture_free(m_texture[1]); | |
| 539 | ||
| 540 | // compute new width/height | |
| 541 | curwidth = MAX(m_width, curwidth); | |
| 542 | curheight = MAX(m_height, curheight); | |
| 543 | ||
| 544 | // allocate raw textures | |
| 545 | m_texture[0] = machine().render().texture_alloc(); | |
| 546 | m_texture[1] = machine().render().texture_alloc(); | |
| 547 | ||
| 548 | // allocate bitmaps | |
| 549 | m_bitmap[0].allocate(curwidth, curheight); | |
| 550 | m_bitmap[0].set_palette(machine().palette); | |
| 551 | m_bitmap[1].allocate(curwidth, curheight); | |
| 552 | m_bitmap[1].set_palette(machine().palette); | |
| 553 | ||
| 554 | // set up textures | |
| 555 | m_texture[0]->set_bitmap(m_bitmap[0], m_visarea, m_bitmap[0].texformat()); | |
| 556 | m_texture[1]->set_bitmap(m_bitmap[1], m_visarea, m_bitmap[1].texformat()); | |
| 557 | } | |
| 536 | // re-set up textures | |
| 537 | m_texture[0]->set_bitmap(m_bitmap[0], m_visarea, m_bitmap[0].texformat()); | |
| 538 | m_texture[1]->set_bitmap(m_bitmap[1], m_visarea, m_bitmap[1].texformat()); | |
| 558 | 539 | } |
| 559 | 540 | |
| 560 | 541 | |
| r14034 | r14035 | |
| 564 | 545 | |
| 565 | 546 | void screen_device::set_visible_area(int min_x, int max_x, int min_y, int max_y) |
| 566 | 547 | { |
| 567 | // validate arguments | |
| 568 | assert(min_x >= 0); | |
| 569 | assert(min_y >= 0); | |
| 570 | assert(min_x < max_x); | |
| 571 | assert(min_y < max_y); | |
| 572 | ||
| 573 | rectangle visarea; | |
| 574 | visarea.min_x = min_x; | |
| 575 | visarea.max_x = max_x; | |
| 576 | visarea.min_y = min_y; | |
| 577 | visarea.max_y = max_y; | |
| 578 | ||
| 548 | rectangle visarea(min_x, max_x, min_y, max_y); | |
| 549 | assert(!visarea.empty()); | |
| 579 | 550 | configure(m_width, m_height, visarea, m_frame_period); |
| 580 | 551 | } |
| 581 | 552 | |
| r14034 | r14035 | |
| 810 | 781 | |
| 811 | 782 | |
| 812 | 783 | //------------------------------------------------- |
| 784 | // register_screen_bitmap - registers a bitmap | |
| 785 | // that should track the screen size | |
| 786 | //------------------------------------------------- | |
| 787 | ||
| 788 | void screen_device::register_screen_bitmap(bitmap_t &bitmap) | |
| 789 | { | |
| 790 | // append to the list | |
| 791 | m_auto_bitmap_list.append(*global_alloc(auto_bitmap_item(bitmap))); | |
| 792 | ||
| 793 | // if allocating now, just do it | |
| 794 | bitmap.allocate(width(), height()); | |
| 795 | bitmap.set_palette(machine().palette); | |
| 796 | } | |
| 797 | ||
| 798 | ||
| 799 | //------------------------------------------------- | |
| 813 | 800 | // vblank_begin - call any external callbacks to |
| 814 | 801 | // signal the VBLANK period has begun |
| 815 | 802 | //------------------------------------------------- |
| r14034 | r14035 | |
|---|---|---|
| 77 | 77 | { |
| 78 | 78 | private: |
| 79 | 79 | // internal helpers |
| 80 | bitmap_t &appropriate_bitmap() | |
| 81 | { | |
| 82 | switch (m_format) | |
| 83 | { | |
| 84 | case BITMAP_FORMAT_IND16: return m_ind16; | |
| 85 | case BITMAP_FORMAT_RGB32: return m_rgb32; | |
| 86 | default: throw emu_fatalerror("Invalid screen_bitmap format"); | |
| 87 | } | |
| 88 | } | |
| 80 | bitmap_t &live() { assert(m_live != NULL); return *m_live; } | |
| 81 | const bitmap_t &live() const { assert(m_live != NULL); return *m_live; } | |
| 89 | 82 | |
| 90 | const bitmap_t &appropriate_bitmap() const | |
| 91 | { | |
| 92 | switch (m_format) | |
| 93 | { | |
| 94 | case BITMAP_FORMAT_IND16: return m_ind16; | |
| 95 | case BITMAP_FORMAT_RGB32: return m_rgb32; | |
| 96 | default: throw emu_fatalerror("Invalid screen_bitmap format"); | |
| 97 | } | |
| 98 | } | |
| 99 | ||
| 100 | 83 | public: |
| 101 | 84 | // construction/destruction |
| 102 | 85 | screen_bitmap() |
| 103 | 86 | : m_format(BITMAP_FORMAT_INVALID), |
| 104 | m_texformat(TEXFORMAT_UNDEFINED) { } | |
| 87 | m_texformat(TEXFORMAT_UNDEFINED), | |
| 88 | m_live(NULL) { } | |
| 105 | 89 | screen_bitmap(bitmap_ind16 &orig) |
| 106 | 90 | : m_format(BITMAP_FORMAT_IND16), |
| 107 | 91 | m_texformat(TEXFORMAT_PALETTE16), |
| 92 | m_live(&m_ind16), | |
| 108 | 93 | m_ind16(orig, orig.cliprect()) { } |
| 109 | 94 | screen_bitmap(bitmap_rgb32 &orig) |
| 110 | 95 | : m_format(BITMAP_FORMAT_RGB32), |
| 111 | 96 | m_texformat(TEXFORMAT_RGB32), |
| 97 | m_live(&m_rgb32), | |
| 112 | 98 | m_rgb32(orig, orig.cliprect()) { } |
| 113 | 99 | |
| 114 | // allocation | |
| 115 | void allocate(int width, int height) | |
| 116 | { | |
| 117 | switch (m_format) | |
| 118 | { | |
| 119 | case BITMAP_FORMAT_IND16: m_ind16.allocate(width, height); break; | |
| 120 | case BITMAP_FORMAT_RGB32: m_rgb32.allocate(width, height); break; | |
| 121 | default: throw emu_fatalerror("Invalid screen_bitmap format"); | |
| 122 | } | |
| 123 | } | |
| 100 | // resizing | |
| 101 | void resize(int width, int height) { live().resize(width, height); } | |
| 124 | 102 | |
| 125 | 103 | // conversion |
| 126 | operator bitmap_t &() { return | |
| 104 | operator bitmap_t &() { return l | |
| 127 | 105 | bitmap_ind16 &as_ind16() { assert(m_format == BITMAP_FORMAT_IND16); return m_ind16; } |
| 128 | 106 | bitmap_rgb32 &as_rgb32() { assert(m_format == BITMAP_FORMAT_RGB32); return m_rgb32; } |
| 129 | 107 | |
| 130 | 108 | // getters |
| 131 | INT32 width() const { return appropriate_bitmap().width(); } | |
| 132 | INT32 height() const { return appropriate_bitmap().height(); } | |
| 133 | INT32 rowpixels() const { return appropriate_bitmap().rowpixels(); } | |
| 134 | INT32 rowbytes() const { return appropriate_bitmap().rowbytes(); } | |
| 135 | UINT8 bpp() const { return appropriate_bitmap().bpp(); } | |
| 109 | INT32 width() const { return live().width(); } | |
| 110 | INT32 height() const { return live().height(); } | |
| 111 | INT32 rowpixels() const { return live().rowpixels(); } | |
| 112 | INT32 rowbytes() const { return live().rowbytes(); } | |
| 113 | UINT8 bpp() const { return live().bpp(); } | |
| 136 | 114 | bitmap_format format() const { return m_format; } |
| 137 | 115 | texture_format texformat() const { return m_texformat; } |
| 138 | bool valid() const { return appropriate_bitmap().valid(); } | |
| 139 | palette_t *palette() const { return appropriate_bitmap().palette(); } | |
| 140 | const rectangle &cliprect() const { return appropriate_bitmap().cliprect(); } | |
| 116 | bool valid() const { return live().valid(); } | |
| 117 | palette_t *palette() const { return live().palette(); } | |
| 118 | const rectangle &cliprect() const { return live().cliprect(); } | |
| 141 | 119 | |
| 142 | 120 | // operations |
| 143 | void set_palette(palette_t *palette) { | |
| 121 | void set_palette(palette_t *palette) { l | |
| 144 | 122 | void set_format(bitmap_format format, texture_format texformat) |
| 145 | 123 | { |
| 146 | 124 | m_format = format; |
| 147 | 125 | m_texformat = texformat; |
| 126 | switch (format) | |
| 127 | { | |
| 128 | case BITMAP_FORMAT_IND16: m_live = &m_ind16; break; | |
| 129 | case BITMAP_FORMAT_RGB32: m_live = &m_rgb32; break; | |
| 130 | default: m_live = NULL; break; | |
| 131 | } | |
| 148 | 132 | m_ind16.reset(); |
| 149 | 133 | m_rgb32.reset(); |
| 150 | 134 | } |
| r14034 | r14035 | |
| 153 | 137 | // internal state |
| 154 | 138 | bitmap_format m_format; |
| 155 | 139 | texture_format m_texformat; |
| 140 | bitmap_t * m_live; | |
| 156 | 141 | bitmap_ind16 m_ind16; |
| 157 | 142 | bitmap_rgb32 m_rgb32; |
| 158 | 143 | }; |
| r14034 | r14035 | |
| 237 | 222 | |
| 238 | 223 | // additional helpers |
| 239 | 224 | void register_vblank_callback(vblank_state_delegate vblank_callback); |
| 225 | void register_screen_bitmap(bitmap_t &bitmap); | |
| 240 | 226 | |
| 241 | 227 | // internal to the video system |
| 242 | 228 | bool update_quads(); |
| r14034 | r14035 | |
| 315 | 301 | UINT64 m_frame_number; // the current frame number |
| 316 | 302 | UINT32 m_partial_updates_this_frame;// partial update counter this frame |
| 317 | 303 | |
| 304 | // VBLANK callbacks | |
| 318 | 305 | class callback_item |
| 319 | 306 | { |
| 320 | 307 | public: |
| r14034 | r14035 | |
| 327 | 314 | vblank_state_delegate m_callback; |
| 328 | 315 | }; |
| 329 | 316 | simple_list<callback_item> m_callback_list; // list of VBLANK callbacks |
| 317 | ||
| 318 | // auto-sizing bitmaps | |
| 319 | class auto_bitmap_item | |
| 320 | { | |
| 321 | public: | |
| 322 | auto_bitmap_item(bitmap_t &bitmap) | |
| 323 | : m_next(NULL), | |
| 324 | m_bitmap(bitmap) { } | |
| 325 | auto_bitmap_item *next() const { return m_next; } | |
| 326 | ||
| 327 | auto_bitmap_item * m_next; | |
| 328 | bitmap_t & m_bitmap; | |
| 329 | }; | |
| 330 | simple_list<auto_bitmap_item> m_auto_bitmap_list; // list of registered bitmaps | |
| 330 | 331 | }; |
| 331 | 332 | |
| 332 | 333 | // device type definition |
| r14034 | r14035 | |
|---|---|---|
| 39 | 39 | |
| 40 | 40 | #include "bitmap.h" |
| 41 | 41 | |
| 42 | #include <stdlib.h> | |
| 43 | ||
| 44 | #ifdef __cplusplus | |
| 45 | 42 | #include <new> |
| 46 | #endif | |
| 47 | 43 | |
| 48 | 44 | |
| 45 | ||
| 49 | 46 | //************************************************************************** |
| 50 | // | |
| 47 | // | |
| 51 | 48 | //************************************************************************** |
| 52 | 49 | |
| 50 | // alignment values; 128 bytes is the largest cache line on typical | |
| 51 | // architectures today | |
| 52 | const UINT32 BITMAP_OVERALL_ALIGN = 128; | |
| 53 | const UINT32 BITMAP_ROWBYTES_ALIGN = 128; | |
| 54 | ||
| 55 | ||
| 56 | ||
| 57 | //************************************************************************** | |
| 58 | // INLINE HELPERS | |
| 59 | //************************************************************************** | |
| 60 | ||
| 53 | 61 | //------------------------------------------------- |
| 54 | // bitmap_t - basic constructor | |
| 62 | // compute_rowpixels - compute an aligned | |
| 63 | // rowpixels value | |
| 55 | 64 | //------------------------------------------------- |
| 56 | 65 | |
| 57 | bitmap_t::bitmap_t() | |
| 58 | : m_alloc(NULL), | |
| 59 | m_palette(NULL) | |
| 66 | inline INT32 bitmap_t::compute_rowpixels(int width, int xslop) | |
| 60 | 67 | { |
| 61 | // deallocate intializes all other fields | |
| 62 | reset(); | |
| 68 | int rowpixels_align = BITMAP_ROWBYTES_ALIGN / (m_bpp / 8); | |
| 69 | return ((width + 2 * xslop + (rowpixels_align - 1)) / rowpixels_align) * rowpixels_align; | |
| 63 | 70 | } |
| 64 | 71 | |
| 65 | 72 | |
| 66 | bitmap_t::bitmap_t(int width, int height, bitmap_format format, int xslop, int yslop) | |
| 73 | //------------------------------------------------- | |
| 74 | // compute_base - compute an aligned bitmap base | |
| 75 | // address with the given slop values | |
| 76 | //------------------------------------------------- | |
| 77 | ||
| 78 | inline void bitmap_t::compute_base(int xslop, int yslop) | |
| 79 | { | |
| 80 | m_base = m_alloc + (m_rowpixels * yslop + xslop) * (m_bpp / 8); | |
| 81 | UINT64 aligned_base = ((reinterpret_cast<UINT64>(m_base) + (BITMAP_OVERALL_ALIGN - 1)) / BITMAP_OVERALL_ALIGN) * BITMAP_OVERALL_ALIGN; | |
| 82 | m_base = reinterpret_cast<void *>(aligned_base); | |
| 83 | } | |
| 84 | ||
| 85 | ||
| 86 | ||
| 87 | //************************************************************************** | |
| 88 | // BITMAP ALLOCATION/CONFIGURATION | |
| 89 | //************************************************************************** | |
| 90 | ||
| 91 | //------------------------------------------------- | |
| 92 | // bitmap_t - basic constructor | |
| 93 | //------------------------------------------------- | |
| 94 | ||
| 95 | bitmap_t::bitmap_t(bitmap_format format, int bpp, int width, int height, int xslop, int yslop) | |
| 67 | 96 | : m_alloc(NULL), |
| 97 | m_allocbytes(0), | |
| 98 | m_format(format), | |
| 99 | m_bpp(bpp), | |
| 68 | 100 | m_palette(NULL) |
| 69 | 101 | { |
| 70 | 102 | // allocate intializes all other fields |
| 71 | allocate(width, height, | |
| 103 | allocate(width, height, | |
| 72 | 104 | } |
| 73 | 105 | |
| 74 | 106 | |
| 75 | bitmap_t::bitmap_t(void *base, int width, int height, int rowpixels | |
| 107 | bitmap_t::bitmap_t(bitmap_format format, int bpp, void *base, int width, int height, int rowpixels | |
| 76 | 108 | : m_alloc(NULL), |
| 109 | m_allocbytes(0), | |
| 77 | 110 | m_base(base), |
| 78 | 111 | m_rowpixels(rowpixels), |
| 79 | 112 | m_width(width), |
| 80 | 113 | m_height(height), |
| 81 | 114 | m_format(format), |
| 82 | m_bpp( | |
| 115 | m_bpp( | |
| 83 | 116 | m_palette(NULL), |
| 84 | 117 | m_cliprect(0, width - 1, 0, height - 1) |
| 85 | 118 | { |
| 86 | // fail if invalid format | |
| 87 | if (m_bpp == 0) | |
| 88 | throw std::bad_alloc(); | |
| 89 | 119 | } |
| 90 | 120 | |
| 91 | 121 | |
| 92 | bitmap_t::bitmap_t(bitmap_t &source, const rectangle &subrect) | |
| 122 | bitmap_t::bitmap_t(bitmap_format format, int bpp, bitmap_t &source, const rectangle &subrect) | |
| 93 | 123 | : m_alloc(NULL), |
| 124 | m_allocbytes(0), | |
| 94 | 125 | m_base(source.raw_pixptr(subrect.min_y, subrect.min_x)), |
| 95 | 126 | m_rowpixels(source.m_rowpixels), |
| 96 | 127 | m_width(subrect.width()), |
| 97 | 128 | m_height(subrect.height()), |
| 98 | m_format(source.m_format), | |
| 99 | m_bpp(source.m_bpp), | |
| 129 | m_format(format), | |
| 130 | m_bpp(bpp), | |
| 100 | 131 | m_palette(NULL), |
| 101 | 132 | m_cliprect(0, subrect.width() - 1, 0, subrect.height() - 1) |
| 102 | 133 | { |
| 134 | assert(format == source.m_format); | |
| 135 | assert(bpp == source.m_bpp); | |
| 103 | 136 | assert(source.cliprect().contains(subrect)); |
| 104 | 137 | } |
| 105 | 138 | |
| r14034 | r14035 | |
| 121 | 154 | // already exists |
| 122 | 155 | //------------------------------------------------- |
| 123 | 156 | |
| 124 | void bitmap_t::allocate(int width, int height, | |
| 157 | void bitmap_t::allocate(int width, int height, | |
| 125 | 158 | { |
| 159 | assert(m_format != BITMAP_FORMAT_INVALID); | |
| 160 | assert(m_bpp == 8 || m_bpp == 16 || m_bpp == 32 || m_bpp == 64); | |
| 161 | ||
| 126 | 162 | // delete any existing stuff |
| 127 | 163 | reset(); |
| 164 | ||
| 165 | // handle empty requests cleanly | |
| 166 | if (width <= 0 || height <= 0) | |
| 167 | return; | |
| 128 | 168 | |
| 129 | 169 | // initialize fields |
| 130 | m_rowpixels = (width | |
| 170 | m_rowpixels = compute_rowpixels(width, | |
| 131 | 171 | m_width = width; |
| 132 | 172 | m_height = height; |
| 133 | m_format = format; | |
| 134 | m_bpp = format_to_bpp(format); | |
| 135 | if (m_bpp == 0) | |
| 136 | throw std::bad_alloc(); | |
| 137 | 173 | m_cliprect.set(0, width - 1, 0, height - 1); |
| 138 | 174 | |
| 139 | 175 | // allocate memory for the bitmap itself |
| 140 | size_t allocbytes = m_rowpixels * (m_height + 2 * yslop) * m_bpp / 8; | |
| 141 | m_alloc = new UINT8[allocbytes]; | |
| 176 | m_allocbytes = m_rowpixels * (m_height + 2 * yslop) * m_bpp / 8; | |
| 177 | m_allocbytes += BITMAP_OVERALL_ALIGN - 1; | |
| 178 | m_alloc = new UINT8[m_allocbytes]; | |
| 142 | 179 | |
| 143 | 180 | // clear to 0 by default |
| 144 | memset(m_alloc, 0, allocbytes); | |
| 181 | memset(m_alloc, 0, m_allocbytes); | |
| 145 | 182 | |
| 146 | 183 | // compute the base |
| 147 | m_base | |
| 184 | compute_base | |
| 148 | 185 | } |
| 149 | 186 | |
| 150 | 187 | |
| 151 | 188 | //------------------------------------------------- |
| 189 | // resize -- resize a bitmap, reusing existing | |
| 190 | // memory if the new size is smaller than the | |
| 191 | // current size | |
| 192 | //------------------------------------------------- | |
| 193 | ||
| 194 | void bitmap_t::resize(int width, int height, int xslop, int yslop) | |
| 195 | { | |
| 196 | assert(m_format != BITMAP_FORMAT_INVALID); | |
| 197 | assert(m_bpp == 8 || m_bpp == 16 || m_bpp == 32 || m_bpp == 64); | |
| 198 | ||
| 199 | // handle empty requests cleanly | |
| 200 | if (width <= 0 || height <= 0) | |
| 201 | width = height = 0; | |
| 202 | ||
| 203 | // determine how much memory we need for the new bitmap | |
| 204 | int new_rowpixels = compute_rowpixels(width, xslop); | |
| 205 | UINT32 new_allocbytes = new_rowpixels * (height + 2 * yslop) * m_bpp / 8; | |
| 206 | new_allocbytes += BITMAP_OVERALL_ALIGN - 1; | |
| 207 | ||
| 208 | // if we need more memory, just realloc | |
| 209 | if (new_allocbytes > m_allocbytes) | |
| 210 | { | |
| 211 | palette_t *palette = m_palette; | |
| 212 | allocate(width, height, xslop, yslop); | |
| 213 | set_palette(palette); | |
| 214 | return; | |
| 215 | } | |
| 216 | ||
| 217 | // otherwise, reconfigure | |
| 218 | m_rowpixels = new_rowpixels; | |
| 219 | m_width = width; | |
| 220 | m_height = height; | |
| 221 | m_cliprect.set(0, width - 1, 0, height - 1); | |
| 222 | ||
| 223 | // re-compute the base | |
| 224 | compute_base(xslop, yslop); | |
| 225 | } | |
| 226 | ||
| 227 | ||
| 228 | //------------------------------------------------- | |
| 152 | 229 | // reset -- reset to an invalid bitmap, deleting |
| 153 | 230 | // all allocated stuff |
| 154 | 231 | //------------------------------------------------- |
| r14034 | r14035 | |
| 165 | 242 | m_rowpixels = 0; |
| 166 | 243 | m_width = 0; |
| 167 | 244 | m_height = 0; |
| 168 | m_format = BITMAP_FORMAT_INVALID; | |
| 169 | m_bpp = 0; | |
| 170 | 245 | m_cliprect.set(0, -1, 0, -1); |
| 171 | 246 | } |
| 172 | 247 | |
| r14034 | r14035 | |
| 176 | 251 | // bitmap does not own the memory |
| 177 | 252 | //------------------------------------------------- |
| 178 | 253 | |
| 179 | void bitmap_t::wrap(void *base, int width, int height, int rowpixels | |
| 254 | void bitmap_t::wrap(void *base, int width, int height, int rowpixels | |
| 180 | 255 | { |
| 181 | 256 | // delete any existing stuff |
| 182 | 257 | reset(); |
| r14034 | r14035 | |
| 186 | 261 | m_rowpixels = rowpixels; |
| 187 | 262 | m_width = width; |
| 188 | 263 | m_height = height; |
| 189 | m_format = format; | |
| 190 | m_bpp = format_to_bpp(format); | |
| 191 | 264 | m_cliprect.set(0, m_width - 1, 0, m_height - 1); |
| 192 | 265 | } |
| 193 | 266 | |
| r14034 | r14035 | |
| 200 | 273 | |
| 201 | 274 | void bitmap_t::wrap(bitmap_t &source, const rectangle &subrect) |
| 202 | 275 | { |
| 276 | assert(m_format == source.m_format); | |
| 277 | assert(m_bpp == source.m_bpp); | |
| 278 | assert(source.cliprect().contains(subrect)); | |
| 279 | ||
| 203 | 280 | // delete any existing stuff |
| 204 | 281 | reset(); |
| 205 | 282 | |
| 206 | 283 | // copy relevant fields |
| 207 | assert(source.cliprect().contains(subrect)); | |
| 208 | 284 | m_base = source.raw_pixptr(subrect.min_y, subrect.min_x); |
| 209 | 285 | m_rowpixels = source.m_rowpixels; |
| 210 | 286 | m_width = subrect.width(); |
| 211 | 287 | m_height = subrect.height(); |
| 212 | m_format = source.m_format; | |
| 213 | m_bpp = source.m_bpp; | |
| 214 | 288 | set_palette(source.m_palette); |
| 215 | 289 | m_cliprect.set(0, m_width - 1, 0, m_height - 1); |
| 216 | 290 | } |
| r14034 | r14035 | |
| 333 | 407 | break; |
| 334 | 408 | } |
| 335 | 409 | } |
| 336 | ||
| 337 | ||
| 338 | //------------------------------------------------- | |
| 339 | // format_to_bpp - given a format, return the bpp | |
| 340 | //------------------------------------------------- | |
| 341 | ||
| 342 | UINT8 bitmap_t::format_to_bpp(bitmap_format format) | |
| 343 | { | |
| 344 | // choose a depth for the format | |
| 345 | switch (format) | |
| 346 | { | |
| 347 | case BITMAP_FORMAT_IND8: | |
| 348 | return 8; | |
| 349 | ||
| 350 | case BITMAP_FORMAT_IND16: | |
| 351 | case BITMAP_FORMAT_YUY16: | |
| 352 | return 16; | |
| 353 | ||
| 354 | case BITMAP_FORMAT_IND32: | |
| 355 | case BITMAP_FORMAT_RGB32: | |
| 356 | case BITMAP_FORMAT_ARGB32: | |
| 357 | return 32; | |
| 358 | ||
| 359 | case BITMAP_FORMAT_IND64: | |
| 360 | return 64; | |
| 361 | ||
| 362 | default: | |
| 363 | break; | |
| 364 | } | |
| 365 | return 0; | |
| 366 | } |
| r14034 | r14035 | |
|---|---|---|
| 129 | 129 | bitmap_t &operator=(const bitmap_t &); |
| 130 | 130 | |
| 131 | 131 | protected: |
| 132 | // construction/destruction -- subclasses only | |
| 133 | bitmap_t(); | |
| 134 | bitmap_t(int width, int height, bitmap_format format, int xslop = 0, int yslop = 0); | |
| 135 | bitmap_t(void *base, int width, int height, int rowpixels, bitmap_format format); | |
| 136 | bitmap_t(bitmap_t &source, const rectangle &subrect); | |
| 132 | // construction/destruction -- subclasses only to ensure type correctness | |
| 133 | bitmap_t(bitmap_format format, int bpp, int width = 0, int height = 0, int xslop = 0, int yslop = 0); | |
| 134 | bitmap_t(bitmap_format format, int bpp, void *base, int width, int height, int rowpixels); | |
| 135 | bitmap_t(bitmap_format format, int bpp, bitmap_t &source, const rectangle &subrect); | |
| 137 | 136 | virtual ~bitmap_t(); |
| 138 | 137 | |
| 139 | 138 | public: |
| r14034 | r14035 | |
| 151 | 150 | palette_t *palette() const { return m_palette; } |
| 152 | 151 | const rectangle &cliprect() const { return m_cliprect; } |
| 153 | 152 | |
| 153 | // allocation/sizing | |
| 154 | void allocate(int width, int height, int xslop = 0, int yslop = 0); | |
| 155 | void resize(int width, int height, int xslop = 0, int yslop = 0); | |
| 156 | ||
| 154 | 157 | // operations |
| 155 | 158 | void set_palette(palette_t *palette); |
| 156 | 159 | void fill(rgb_t color) { fill(color, m_cliprect); } |
| r14034 | r14035 | |
| 166 | 169 | _PixelType &pixt(INT32 y, INT32 x = 0) const { return *(reinterpret_cast<_PixelType *>(m_base) + y * m_rowpixels + x); } |
| 167 | 170 | void *raw_pixptr(INT32 y, INT32 x = 0) const { return reinterpret_cast<UINT8 *>(m_base) + (y * m_rowpixels + x) * m_bpp / 8; } |
| 168 | 171 | |
| 169 | // static helpers | |
| 170 | static UINT8 format_to_bpp(bitmap_format format); | |
| 171 | ||
| 172 | 172 | protected: |
| 173 | // for use by subclasses only | |
| 174 | void allocate(int width, int height, bitmap_format format, int xslop = 0, int yslop = 0); | |
| 175 | void wrap(void *base, int width, int height, int rowpixels, bitmap_format format); | |
| 173 | // for use by subclasses only to ensure type correctness | |
| 174 | void wrap(void *base, int width, int height, int rowpixels); | |
| 176 | 175 | void wrap(bitmap_t &source, const rectangle &subrect); |
| 177 | 176 | |
| 178 | 177 | private: |
| 178 | // internal helpers | |
| 179 | INT32 compute_rowpixels(int width, int xslop); | |
| 180 | void compute_base(int xslop, int yslop); | |
| 181 | ||
| 179 | 182 | // internal state |
| 180 | 183 | UINT8 * m_alloc; // pointer to allocated pixel memory |
| 184 | UINT32 m_allocbytes; // size of our allocation | |
| 181 | 185 | void * m_base; // pointer to pixel (0,0) (adjusted for padding) |
| 182 | 186 | INT32 m_rowpixels; // pixels per row (including padding) |
| 183 | 187 | INT32 m_width; // width of the bitmap |
| r14034 | r14035 | |
| 200 | 204 | |
| 201 | 205 | protected: |
| 202 | 206 | // construction/destruction -- subclasses only |
| 203 | bitmap8_t() : bitmap_t() { } | |
| 204 | bitmap8_t(int width, int height, bitmap_format format, int xslop = 0, int yslop = 0) : bitmap_t(width, height, format, xslop, yslop) { assert(valid_format(format)); } | |
| 205 | bitmap8_t(void *base, int width, int height, int rowpixels, bitmap_format format): bitmap_t(base, width, height, rowpixels, format) { assert(valid_format(format)); } | |
| 206 | bitmap8_t(bitmap8_t &source, const rectangle &subrect) : bitmap_t(source, subrect) { } | |
| 207 | bitmap8_t(bitmap_format format, int width = 0, int height = 0, int xslop = 0, int yslop = 0) : bitmap_t(format, 8, width, height, xslop, yslop) { } | |
| 208 | bitmap8_t(bitmap_format format, void *base, int width, int height, int rowpixels) : bitmap_t(format, 8, base, width, height, rowpixels) { assert(valid_format(format)); } | |
| 209 | bitmap8_t(bitmap_format format, bitmap8_t &source, const rectangle &subrect) : bitmap_t(format, 8, source, subrect) { } | |
| 207 | 210 | |
| 208 | 211 | public: |
| 209 | 212 | // getters |
| r14034 | r14035 | |
| 224 | 227 | |
| 225 | 228 | protected: |
| 226 | 229 | // construction/destruction -- subclasses only |
| 227 | bitmap16_t() : bitmap_t() { } | |
| 228 | bitmap16_t(int width, int height, bitmap_format format, int xslop = 0, int yslop = 0) : bitmap_t(width, height, format, xslop, yslop) { assert(valid_format(format)); } | |
| 229 | bitmap16_t(void *base, int width, int height, int rowpixels, bitmap_format format): bitmap_t(base, width, height, rowpixels, format) { assert(valid_format(format)); } | |
| 230 | bitmap16_t(bitmap16_t &source, const rectangle &subrect) : bitmap_t(source, subrect) { } | |
| 230 | bitmap16_t(bitmap_format format, int width = 0, int height = 0, int xslop = 0, int yslop = 0) : bitmap_t(format, 16, width, height, xslop, yslop) { assert(valid_format(format)); } | |
| 231 | bitmap16_t(bitmap_format format, void *base, int width, int height, int rowpixels) : bitmap_t(format, 16, base, width, height, rowpixels) { assert(valid_format(format)); } | |
| 232 | bitmap16_t(bitmap_format format, bitmap16_t &source, const rectangle &subrect) : bitmap_t(format, 16, source, subrect) { } | |
| 231 | 233 | |
| 232 | 234 | public: |
| 233 | 235 | // getters |
| r14034 | r14035 | |
| 248 | 250 | |
| 249 | 251 | protected: |
| 250 | 252 | // construction/destruction -- subclasses only |
| 251 | bitmap32_t() : bitmap_t() { } | |
| 252 | bitmap32_t(int width, int height, bitmap_format format, int xslop = 0, int yslop = 0) : bitmap_t(width, height, format, xslop, yslop) { assert(valid_format(format)); } | |
| 253 | bitmap32_t(void *base, int width, int height, int rowpixels, bitmap_format format): bitmap_t(base, width, height, rowpixels, format) { assert(valid_format(format)); } | |
| 254 | bitmap32_t(bitmap32_t &source, const rectangle &subrect) : bitmap_t(source, subrect) { } | |
| 253 | bitmap32_t(bitmap_format format, int width = 0, int height = 0, int xslop = 0, int yslop = 0) : bitmap_t(format, 32, width, height, xslop, yslop) { assert(valid_format(format)); } | |
| 254 | bitmap32_t(bitmap_format format, void *base, int width, int height, int rowpixels) : bitmap_t(format, 32, base, width, height, rowpixels) { assert(valid_format(format)); } | |
| 255 | bitmap32_t(bitmap_format format, bitmap32_t &source, const rectangle &subrect) : bitmap_t(format, 32, source, subrect) { } | |
| 255 | 256 | |
| 256 | 257 | public: |
| 257 | 258 | // getters |
| r14034 | r14035 | |
| 272 | 273 | |
| 273 | 274 | protected: |
| 274 | 275 | // construction/destruction -- subclasses only |
| 275 | bitmap64_t() : bitmap_t() { } | |
| 276 | bitmap64_t(int width, int height, bitmap_format format, int xslop = 0, int yslop = 0) : bitmap_t(width, height, format, xslop, yslop) { assert(valid_format(format)); } | |
| 277 | bitmap64_t(void *base, int width, int height, int rowpixels, bitmap_format format): bitmap_t(base, width, height, rowpixels, format) { assert(valid_format(format)); } | |
| 278 | bitmap64_t(bitmap64_t &source, const rectangle &subrect) : bitmap_t(source, subrect) { } | |
| 276 | bitmap64_t(bitmap_format format, int width = 0, int height = 0, int xslop = 0, int yslop = 0) : bitmap_t(format, 64, width, height, xslop, yslop) { assert(valid_format(format)); } | |
| 277 | bitmap64_t(bitmap_format format, void *base, int width, int height, int rowpixels) : bitmap_t(format, 64, base, width, height, rowpixels) { assert(valid_format(format)); } | |
| 278 | bitmap64_t(bitmap_format format, bitmap64_t &source, const rectangle &subrect) : bitmap_t(format, 64, source, subrect) { } | |
| 279 | 279 | |
| 280 | 280 | public: |
| 281 | 281 | // getters |
| r14034 | r14035 | |
| 297 | 297 | |
| 298 | 298 | public: |
| 299 | 299 | // construction/destruction |
| 300 | bitmap_ind8() : bitmap8_t() { } | |
| 301 | bitmap_ind8(int width, int height, int xslop = 0, int yslop = 0) : bitmap8_t(width, height, k_bitmap_format, xslop, yslop) { } | |
| 302 | bitmap_ind8(void *base, int width, int height, int rowpixels) : bitmap8_t(base, width, height, rowpixels, k_bitmap_format) { } | |
| 303 | bitmap_ind8(bitmap_ind8 &source, const rectangle &subrect) : bitmap8_t(source, subrect) { } | |
| 304 | void allocate(int width, int height, int xslop = 0, int yslop = 0) { bitmap_t::allocate(width, height, k_bitmap_format, xslop, yslop); } | |
| 305 | void wrap(UINT8 *base, int width, int height, int rowpixels) { bitmap_t::wrap(base, width, height, rowpixels, k_bitmap_format); } | |
| 300 | bitmap_ind8(int width = 0, int height = 0, int xslop = 0, int yslop = 0) : bitmap8_t(k_bitmap_format, width, height, xslop, yslop) { } | |
| 301 | bitmap_ind8(void *base, int width, int height, int rowpixels) : bitmap8_t(k_bitmap_format, base, width, height, rowpixels) { } | |
| 302 | bitmap_ind8(bitmap_ind8 &source, const rectangle &subrect) : bitmap8_t(k_bitmap_format, source, subrect) { } | |
| 303 | void wrap(UINT8 *base, int width, int height, int rowpixels) { bitmap_t::wrap(base, width, height, rowpixels); } | |
| 306 | 304 | void wrap(bitmap_ind8 &source, const rectangle &subrect) { bitmap_t::wrap(static_cast<bitmap_t &>(source), subrect); } |
| 307 | 305 | |
| 308 | 306 | // getters |
| r14034 | r14035 | |
| 316 | 314 | |
| 317 | 315 | public: |
| 318 | 316 | // construction/destruction |
| 319 | bitmap_ind16() : bitmap16_t() { } | |
| 320 | bitmap_ind16(int width, int height, int xslop = 0, int yslop = 0) : bitmap16_t(width, height, k_bitmap_format, xslop, yslop) { } | |
| 321 | bitmap_ind16(void *base, int width, int height, int rowpixels) : bitmap16_t(base, width, height, rowpixels, k_bitmap_format) { } | |
| 322 | bitmap_ind16(bitmap_ind16 &source, const rectangle &subrect) : bitmap16_t(source, subrect) { } | |
| 323 | void allocate(int width, int height, int xslop = 0, int yslop = 0) { bitmap_t::allocate(width, height, k_bitmap_format, xslop, yslop); } | |
| 324 | void wrap(UINT16 *base, int width, int height, int rowpixels) { bitmap_t::wrap(base, width, height, rowpixels, k_bitmap_format); } | |
| 325 | void wrap(bitmap_ind16 &source, const rectangle &subrect) { bitmap_t::wrap(static_cast<bitmap_t &>(source), subrect); } | |
| 317 | bitmap_ind16(int width = 0, int height = 0, int xslop = 0, int yslop = 0) : bitmap16_t(k_bitmap_format, width, height, xslop, yslop) { } | |
| 318 | bitmap_ind16(void *base, int width, int height, int rowpixels) : bitmap16_t(k_bitmap_format, base, width, height, rowpixels) { } | |
| 319 | bitmap_ind16(bitmap_ind16 &source, const rectangle &subrect) : bitmap16_t(k_bitmap_format, source, subrect) { } | |
| 320 | void wrap(UINT16 *base, int width, int height, int rowpixels) { bitmap_t::wrap(base, width, height, rowpixels); } | |
| 321 | void wrap(bitmap_ind8 &source, const rectangle &subrect) { bitmap_t::wrap(static_cast<bitmap_t &>(source), subrect); } | |
| 326 | 322 | |
| 327 | 323 | // getters |
| 328 | 324 | bitmap_format format() const { return k_bitmap_format; } |
| r14034 | r14035 | |
| 335 | 331 | |
| 336 | 332 | public: |
| 337 | 333 | // construction/destruction |
| 338 | bitmap_ind32() : bitmap32_t() { } | |
| 339 | bitmap_ind32(int width, int height, int xslop = 0, int yslop = 0) : bitmap32_t(width, height, k_bitmap_format, xslop, yslop) { } | |
| 340 | bitmap_ind32(void *base, int width, int height, int rowpixels) : bitmap32_t(base, width, height, rowpixels, k_bitmap_format) { } | |
| 341 | bitmap_ind32(bitmap_ind32 &source, const rectangle &subrect) : bitmap32_t(source, subrect) { } | |
| 342 | void allocate(int width, int height, int xslop = 0, int yslop = 0) { bitmap_t::allocate(width, height, k_bitmap_format, xslop, yslop); } | |
| 343 | void wrap(UINT32 *base, int width, int height, int rowpixels) { bitmap_t::wrap(base, width, height, rowpixels, k_bitmap_format); } | |
| 344 | void wrap(bitmap_ind32 &source, const rectangle &subrect) { bitmap_t::wrap(static_cast<bitmap_t &>(source), subrect); } | |
| 334 | bitmap_ind32(int width = 0, int height = 0, int xslop = 0, int yslop = 0) : bitmap32_t(k_bitmap_format, width, height, xslop, yslop) { } | |
| 335 | bitmap_ind32(void *base, int width, int height, int rowpixels) : bitmap32_t(k_bitmap_format, base, width, height, rowpixels) { } | |
| 336 | bitmap_ind32(bitmap_ind32 &source, const rectangle &subrect) : bitmap32_t(k_bitmap_format, source, subrect) { } | |
| 337 | void wrap(UINT32 *base, int width, int height, int rowpixels) { bitmap_t::wrap(base, width, height, rowpixels); } | |
| 338 | void wrap(bitmap_ind8 &source, const rectangle &subrect) { bitmap_t::wrap(static_cast<bitmap_t &>(source), subrect); } | |
| 345 | 339 | |
| 346 | 340 | // getters |
| 347 | 341 | bitmap_format format() const { return k_bitmap_format; } |
| r14034 | r14035 | |
| 354 | 348 | |
| 355 | 349 | public: |
| 356 | 350 | // construction/destruction |
| 357 | bitmap_ind64() : bitmap64_t() { } | |
| 358 | bitmap_ind64(int width, int height, int xslop = 0, int yslop = 0) : bitmap64_t(width, height, k_bitmap_format, xslop, yslop) { } | |
| 359 | bitmap_ind64(void *base, int width, int height, int rowpixels) : bitmap64_t(base, width, height, rowpixels, k_bitmap_format) { } | |
| 360 | bitmap_ind64(bitmap_ind64 &source, const rectangle &subrect) : bitmap64_t(source, subrect) { } | |
| 361 | void allocate(int width, int height, int xslop = 0, int yslop = 0) { bitmap_t::allocate(width, height, k_bitmap_format, xslop, yslop); } | |
| 362 | void wrap(UINT64 *base, int width, int height, int rowpixels) { bitmap_t::wrap(base, width, height, rowpixels, k_bitmap_format); } | |
| 363 | void wrap(bitmap_ind64 &source, const rectangle &subrect) { bitmap_t::wrap(static_cast<bitmap_t &>(source), subrect); } | |
| 351 | bitmap_ind64(int width = 0, int height = 0, int xslop = 0, int yslop = 0) : bitmap64_t(k_bitmap_format, width, height, xslop, yslop) { } | |
| 352 | bitmap_ind64(void *base, int width, int height, int rowpixels) : bitmap64_t(k_bitmap_format, base, width, height, rowpixels) { } | |
| 353 | bitmap_ind64(bitmap_ind64 &source, const rectangle &subrect) : bitmap64_t(k_bitmap_format, source, subrect) { } | |
| 354 | void wrap(UINT64 *base, int width, int height, int rowpixels) { bitmap_t::wrap(base, width, height, rowpixels); } | |
| 355 | void wrap(bitmap_ind8 &source, const rectangle &subrect) { bitmap_t::wrap(static_cast<bitmap_t &>(source), subrect); } | |
| 364 | 356 | |
| 365 | 357 | // getters |
| 366 | 358 | bitmap_format format() const { return k_bitmap_format; } |
| r14034 | r14035 | |
| 376 | 368 | |
| 377 | 369 | public: |
| 378 | 370 | // construction/destruction |
| 379 | bitmap_yuy16() : bitmap16_t() { } | |
| 380 | bitmap_yuy16(int width, int height, int xslop = 0, int yslop = 0) : bitmap16_t(width, height, k_bitmap_format, xslop, yslop) { } | |
| 381 | bitmap_yuy16(void *base, int width, int height, int rowpixels) : bitmap16_t(base, width, height, rowpixels, k_bitmap_format) { } | |
| 382 | bitmap_yuy16(bitmap_yuy16 &source, const rectangle &subrect) : bitmap16_t(source, subrect) { } | |
| 383 | void allocate(int width, int height, int xslop = 0, int yslop = 0) { bitmap_t::allocate(width, height, k_bitmap_format, xslop, yslop); } | |
| 384 | void wrap(UINT16 *base, int width, int height, int rowpixels) { bitmap_t::wrap(base, width, height, rowpixels, k_bitmap_format); } | |
| 371 | bitmap_yuy16(int width = 0, int height = 0, int xslop = 0, int yslop = 0) : bitmap16_t(k_bitmap_format, width, height, xslop, yslop) { } | |
| 372 | bitmap_yuy16(void *base, int width, int height, int rowpixels) : bitmap16_t(k_bitmap_format, base, width, height, rowpixels) { } | |
| 373 | bitmap_yuy16(bitmap_yuy16 &source, const rectangle &subrect) : bitmap16_t(k_bitmap_format, source, subrect) { } | |
| 374 | void wrap(UINT16 *base, int width, int height, int rowpixels) { bitmap_t::wrap(base, width, height, rowpixels); } | |
| 385 | 375 | void wrap(bitmap_yuy16 &source, const rectangle &subrect) { bitmap_t::wrap(static_cast<bitmap_t &>(source), subrect); } |
| 386 | 376 | |
| 387 | 377 | // getters |
| r14034 | r14035 | |
| 395 | 385 | |
| 396 | 386 | public: |
| 397 | 387 | // construction/destruction |
| 398 | bitmap_rgb32() : bitmap32_t() { } | |
| 399 | bitmap_rgb32(int width, int height, int xslop = 0, int yslop = 0) : bitmap32_t(width, height, k_bitmap_format, xslop, yslop) { } | |
| 400 | bitmap_rgb32(void *base, int width, int height, int rowpixels) : bitmap32_t(base, width, height, rowpixels, k_bitmap_format) { } | |
| 401 | bitmap_rgb32(bitmap_rgb32 &source, const rectangle &subrect) : bitmap32_t(source, subrect) { } | |
| 402 | void allocate(int width, int height, int xslop = 0, int yslop = 0) { bitmap_t::allocate(width, height, k_bitmap_format, xslop, yslop); } | |
| 403 | void wrap(UINT32 *base, int width, int height, int rowpixels) { bitmap_t::wrap(base, width, height, rowpixels, k_bitmap_format); } | |
| 388 | bitmap_rgb32(int width = 0, int height = 0, int xslop = 0, int yslop = 0) : bitmap32_t(k_bitmap_format, width, height, xslop, yslop) { } | |
| 389 | bitmap_rgb32(void *base, int width, int height, int rowpixels) : bitmap32_t(k_bitmap_format, base, width, height, rowpixels) { } | |
| 390 | bitmap_rgb32(bitmap_rgb32 &source, const rectangle &subrect) : bitmap32_t(k_bitmap_format, source, subrect) { } | |
| 391 | void wrap(UINT32 *base, int width, int height, int rowpixels) { bitmap_t::wrap(base, width, height, rowpixels); } | |
| 404 | 392 | void wrap(bitmap_rgb32 &source, const rectangle &subrect) { bitmap_t::wrap(static_cast<bitmap_t &>(source), subrect); } |
| 405 | 393 | |
| 406 | 394 | // getters |
| r14034 | r14035 | |
| 414 | 402 | |
| 415 | 403 | public: |
| 416 | 404 | // construction/destruction |
| 417 | bitmap_argb32() : bitmap32_t() { } | |
| 418 | bitmap_argb32(int width, int height, int xslop = 0, int yslop = 0) : bitmap32_t(width, height, k_bitmap_format, xslop, yslop) { } | |
| 419 | bitmap_argb32(void *base, int width, int height, int rowpixels) : bitmap32_t(base, width, height, rowpixels, k_bitmap_format) { } | |
| 420 | bitmap_argb32(bitmap_argb32 &source, const rectangle &subrect) : bitmap32_t(source, subrect) { } | |
| 421 | void allocate(int width, int height, int xslop = 0, int yslop = 0) { bitmap_t::allocate(width, height, k_bitmap_format, xslop, yslop); } | |
| 422 | void wrap(UINT32 *base, int width, int height, int rowpixels) { bitmap_t::wrap(base, width, height, rowpixels, k_bitmap_format); } | |
| 405 | bitmap_argb32(int width = 0, int height = 0, int xslop = 0, int yslop = 0) : bitmap32_t(k_bitmap_format, width, height, xslop, yslop) { } | |
| 406 | bitmap_argb32(void *base, int width, int height, int rowpixels) : bitmap32_t(k_bitmap_format, base, width, height, rowpixels) { } | |
| 407 | bitmap_argb32(bitmap_argb32 &source, const rectangle &subrect) : bitmap32_t(k_bitmap_format, source, subrect) { } | |
| 408 | void wrap(UINT32 *base, int width, int height, int rowpixels) { bitmap_t::wrap(base, width, height, rowpixels); } | |
| 423 | 409 | void wrap(bitmap_argb32 &source, const rectangle &subrect) { bitmap_t::wrap(static_cast<bitmap_t &>(source), subrect); } |
| 424 | 410 | |
| 425 | 411 | // getters |
| Previous | 15994 Revisions | Next |