src/mess/video/uv201.c
| r15537 | r15538 | |
| 18 | 18 | #define LOG 1
|
| 19 | 19 | |
| 20 | 20 | |
| 21 | // screen parameters
|
| 22 | #define SCREEN_WIDTH 232
|
| 23 | #define VBLANK_WIDTH 21
|
| 24 | #define HBLANK_WIDTH 39
|
| 25 | #define HSYNC_WIDTH 18
|
| 26 | #define HFP_WIDTH 16
|
| 27 | #define HBP_WIDTH 5
|
| 28 | |
| 29 | |
| 21 | 30 | // write-only registers
|
| 22 | 31 | #define REGISTER_COMMAND 0xf7
|
| 23 | 32 | #define REGISTER_BACKGROUND 0xf5
|
| r15537 | r15538 | |
| 68 | 77 | ((_y >= cliprect.min_y) && (_y <= cliprect.max_y))
|
| 69 | 78 | |
| 70 | 79 | #define DRAW_PIXEL(_scanline, _dot) \
|
| 71 | | if (IS_VISIBLE(_scanline)) bitmap.pix16((_scanline), _dot) = pixel;
|
| 80 | if (IS_VISIBLE(_scanline)) bitmap.pix16((_scanline), HSYNC_WIDTH + HFP_WIDTH + _dot) = pixel;
|
| 72 | 81 | |
| 73 | 82 | |
| 74 | 83 | |
| r15537 | r15538 | |
| 239 | 248 | int scanline = ((m_cmd & COMMAND_YINT_H_O) << 1) | m_y_int;
|
| 240 | 249 | |
| 241 | 250 | m_timer_y_odd->adjust(m_screen->time_until_pos(scanline), 0, m_screen->frame_period());
|
| 242 | | m_timer_y_even->adjust(m_screen->time_until_pos(scanline + 262), 0, m_screen->frame_period());
|
| 251 | //m_timer_y_even->adjust(m_screen->time_until_pos(scanline + 262), 0, m_screen->frame_period());
|
| 243 | 252 | }
|
| 244 | 253 | |
| 245 | 254 | |
| r15537 | r15538 | |
| 449 | 458 | |
| 450 | 459 | UINT32 uv201_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
| 451 | 460 | {
|
| 461 | bitmap.fill(get_black_pen(machine()), cliprect);
|
| 462 | |
| 452 | 463 | if (!(m_cmd & COMMAND_ENB))
|
| 453 | 464 | {
|
| 454 | | bitmap.fill(get_black_pen(machine()), cliprect);
|
| 455 | 465 | return 0;
|
| 456 | 466 | }
|
| 457 | 467 | |
| 458 | | bitmap.fill(m_bg, cliprect);
|
| 468 | for (int y = 0; y < 262; y++)
|
| 469 | {
|
| 470 | for (int x = 0; x < 193; x++)
|
| 471 | {
|
| 472 | int pixel = m_bg;
|
| 473 | DRAW_PIXEL(y, x);
|
| 474 | }
|
| 475 | }
|
| 459 | 476 | |
| 460 | 477 | for (int i = 0; i < 16; i++)
|
| 461 | 478 | {
|
src/mess/video/uv201.h
| r15537 | r15538 | |
| 70 | 70 | MCFG_DEVICE_CONFIG(_config) \
|
| 71 | 71 | MCFG_SCREEN_ADD(_screen_tag, RASTER) \
|
| 72 | 72 | MCFG_SCREEN_UPDATE_DEVICE(_tag, uv201_device, screen_update) \
|
| 73 | | MCFG_SCREEN_RAW_PARAMS(_clock, 455, 0, 190, 525, 0, 243) \
|
| 73 | MCFG_SCREEN_RAW_PARAMS(_clock, 232, 18, 232, 262, 21, 262) \
|
| 74 | 74 | MCFG_PALETTE_LENGTH(32)
|
| 75 | 75 | |
| 76 | 76 | |
src/mess/drivers/vidbrain.c
| r15537 | r15538 | |
| 16 | 16 | |
| 17 | 17 | TODO: |
| 18 | 18 | |
| 19 | - interlaced video? |
| 20 | - pinball background colors |
| 21 | - Y-zoom starting on odd scanline only 1 line high |
| 22 | - object height 0 glitch |
| 23 | - object column 0xff glitch |
| 19 | 24 | - video interrupts |
| 20 | 25 | - R-2R ladder DAC |
| 21 | 26 | - reset on cartridge unload |
| r15537 | r15538 | |
| 28 | 33 | |
| 29 | 34 | |
| 30 | 35 | #include "includes/vidbrain.h" |
| 36 | #include "vidbrain.lh" |
| 31 | 37 | |
| 32 | 38 | |
| 33 | 39 | |
| r15537 | r15538 | |
| 543 | 549 | |
| 544 | 550 | static MACHINE_CONFIG_START( vidbrain, vidbrain_state ) |
| 545 | 551 | // basic machine hardware |
| 546 | | MCFG_CPU_ADD(F3850_TAG, F8, XTAL_14_31818MHz/8) |
| 552 | MCFG_CPU_ADD(F3850_TAG, F8, XTAL_4MHz/2) |
| 547 | 553 | MCFG_CPU_PROGRAM_MAP(vidbrain_mem) |
| 548 | 554 | MCFG_CPU_IO_MAP(vidbrain_io) |
| 549 | 555 | |
| 550 | 556 | // video hardware |
| 551 | | MCFG_UV201_ADD(UV201_TAG, SCREEN_TAG, XTAL_14_31818MHz, uv_intf) |
| 557 | MCFG_UV201_ADD(UV201_TAG, SCREEN_TAG, 3636363, uv_intf) |
| 558 | MCFG_DEFAULT_LAYOUT(layout_vidbrain) |
| 552 | 559 | |
| 553 | 560 | // sound hardware |
| 554 | 561 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| r15537 | r15538 | |
| 560 | 567 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 561 | 568 | |
| 562 | 569 | // devices |
| 563 | | MCFG_F3853_ADD(F3853_TAG, XTAL_14_31818MHz/8, smi_intf) |
| 570 | MCFG_F3853_ADD(F3853_TAG, XTAL_4MHz/2, smi_intf) |
| 564 | 571 | |
| 565 | 572 | // cartridge |
| 566 | 573 | MCFG_CARTSLOT_ADD("cart") |