src/mess/drivers/mz2500.c
| r9040 | r9041 | |
| 11 | 11 | - Add remaining missing peripherals, SIO, HDD and w1300a network; |
| 12 | 12 | - FDC loading without the IPLPRO doesn't work at all, why? |
| 13 | 13 | - reverse / blanking tvram attributes; |
| 14 | | - there's a soft reset PCG init bug now (try for example Eiyuu Densetsu Saga then Excite Bike), MAME / MESS core bug? |
| 15 | 14 | - clean-ups! ^^' |
| 16 | 15 | |
| 17 | 16 | per-game/program specific TODO: |
| 18 | | - Basic: vertical scrolling returns wrap-around that shouldn't wrap; |
| 19 | | - Dust Box vol. n: they all dies after pressing a key on the 256 color CG layer shows up; |
| 20 | | - Dust Box vol. n: three items returns "purple" text, presumably HW failures; |
| 17 | - Dust Box vol. 1-3: they die with text garbage; |
| 21 | 18 | - Dust Box vol. 4: window effect transition is bugged; |
| 19 | - Dust Box vol. n: three items returns "purple" text, presumably HW failures (DFJustin: joystick "digital", mouse "not installed", HDD "not installed"; |
| 22 | 20 | - LayDock: hangs by reading the FDC status and expecting it to become 0x81; |
| 23 | 21 | - Moon Child: needs mixed 3+3bpp tvram supported; |
| 24 | 22 | - Moon Child: appears to be a network / system link game, obviously doesn't work with current MAME / MESS framework; |
| 25 | | - Mugen no Shinzou: returns an HW error if you attempt to start a play, it seems to be a fdc writing issue; |
| 23 | - Marchen Veil I: doesn't load if you try to run it, it does if you load another game first (for example Mappy); |
| 24 | - Mugen no Shinzou: returns an HW error if you attempt to do a new game, it seems to be a fdc writing issue; |
| 26 | 25 | - Mugen no Shinzou II - The Prince of Darkness: dies on IPLPRO loading, presumably a wd17xx core bug; |
| 27 | 26 | - Multiplan: random hangs/crashes after you set the RTC, sometimes it loads properly; |
| 28 | 27 | - Murder Club: has lots of CG artifacts; |
| r9040 | r9041 | |
| 362 | 361 | UINT8 base_mask; |
| 363 | 362 | int res_x,res_y; |
| 364 | 363 | UINT8 cg_interlace; |
| 364 | UINT8 pen_mask; |
| 365 | 365 | |
| 366 | 366 | base_mask = (x_size == 640) ? 0x3f : 0x1f; |
| 367 | 367 | |
| r9040 | r9041 | |
| 370 | 370 | /* TODO: layer 2 scrolling */ |
| 371 | 371 | s_x = (cg_reg[0x0f] & 0xf); |
| 372 | 372 | cg_interlace = text_font_reg ? 1 : 2; |
| 373 | pen_mask = (cg_reg[0x18] >> ((plane & 1) * 4)) & 0x0f; |
| 373 | 374 | |
| 374 | 375 | // popmessage("%d %d %d %d",cg_hs,cg_he,cg_vs,cg_ve); |
| 375 | 376 | |
| r9040 | r9041 | |
| 386 | 387 | if(res_x < cg_hs || res_x >= cg_he || res_y < cg_vs || res_y >= cg_ve) |
| 387 | 388 | continue; |
| 388 | 389 | |
| 389 | | pen_bit[0] = (vram[count+0x40000+(plane * 0x2000)]>>(xi)) & 1 ? 1 : 0; //B |
| 390 | | pen_bit[1] = (vram[count+0x44000+(plane * 0x2000)]>>(xi)) & 1 ? 2 : 0; //R |
| 391 | | pen_bit[2] = (vram[count+0x48000+(plane * 0x2000)]>>(xi)) & 1 ? 4 : 0; //G |
| 392 | | pen_bit[3] = (vram[count+0x4c000+(plane * 0x2000)]>>(xi)) & 1 ? 8 : 0; //I |
| 390 | pen_bit[0] = (vram[count+0x40000+(plane * 0x2000)]>>(xi)) & 1 ? (pen_mask & 0x01) : 0; //B |
| 391 | pen_bit[1] = (vram[count+0x44000+(plane * 0x2000)]>>(xi)) & 1 ? (pen_mask & 0x02) : 0; //R |
| 392 | pen_bit[2] = (vram[count+0x48000+(plane * 0x2000)]>>(xi)) & 1 ? (pen_mask & 0x04) : 0; //G |
| 393 | pen_bit[3] = (vram[count+0x4c000+(plane * 0x2000)]>>(xi)) & 1 ? (pen_mask & 0x08) : 0; //I |
| 393 | 394 | |
| 394 | 395 | pen = 0; |
| 395 | 396 | for(pen_i=0;pen_i<4;pen_i++) |
| 396 | 397 | pen |= pen_bit[pen_i]; |
| 397 | 398 | |
| 398 | | if(pri == ((clut16[pen] & 0x10) >> 4)) |
| 399 | if(pri == ((clut16[pen] & 0x10) >> 4) && clut16[pen] != 0x00 && pen_mask) //correct? |
| 399 | 400 | mz2500_draw_pixel(machine,bitmap,res_x,res_y,(clut16[pen] & 0x0f)+0x10,(x_size == 320 && scr_x_size == 640),cg_interlace == 2); |
| 400 | 401 | } |
| 401 | 402 | count++; |
| r9040 | r9041 | |
| 489 | 490 | |
| 490 | 491 | static void draw_cg_screen(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect,int pri) |
| 491 | 492 | { |
| 493 | //popmessage("%02x %02x",cg_reg[0x0e],cg_reg[0x18]); |
| 494 | |
| 492 | 495 | switch(cg_reg[0x0e]) |
| 493 | 496 | { |
| 494 | 497 | case 0x00: |
| r9040 | r9041 | |
| 790 | 793 | else |
| 791 | 794 | gfx_element_mark_dirty(machine->gfx[4], (offset & 0x7ff) >> 3); |
| 792 | 795 | } |
| 796 | break; |
| 793 | 797 | } |
| 794 | | break; |
| 795 | 798 | case 0x3a: |
| 796 | 799 | { |
| 797 | 800 | // DIC ROM, WRITENOP |
| r9040 | r9041 | |
| 1617 | 1620 | /* disable IRQ */ |
| 1618 | 1621 | for(i=0;i<4;i++) |
| 1619 | 1622 | irq_mask[i] = 0; |
| 1623 | |
| 1624 | kanji_bank = 0; |
| 1620 | 1625 | } |
| 1621 | 1626 | |
| 1622 | 1627 | static const gfx_layout mz2500_cg_layout = |
| r9040 | r9041 | |
| 1976 | 1981 | ROM_START( mz2500 ) |
| 1977 | 1982 | ROM_REGION( 0x80000, "maincpu", ROMREGION_ERASEFF ) |
| 1978 | 1983 | |
| 1979 | | ROM_REGION( 0x2000, "pcg", ROMREGION_ERASEFF ) |
| 1984 | ROM_REGION( 0x2000, "pcg", ROMREGION_ERASE00 ) |
| 1980 | 1985 | |
| 1981 | 1986 | ROM_REGION( 0x100000, "emm", ROMREGION_ERASEFF ) |
| 1982 | 1987 | |