From 95c2fab37d9a73dc31375b19773a45c03d486d65 Mon Sep 17 00:00:00 2001 From: angelosa Date: Sat, 13 Jan 2018 02:33:41 +0100 Subject: [PATCH] hng64.cpp: enabled preliminary ROZ floor for Fatal Fury Wild Ambition / Buriki One [Angelo Salese] --- src/mame/video/hng64.cpp | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/mame/video/hng64.cpp b/src/mame/video/hng64.cpp index b2a3a9b4feb..80902dc89d0 100644 --- a/src/mame/video/hng64.cpp +++ b/src/mame/video/hng64.cpp @@ -600,7 +600,7 @@ void hng64_state::hng64_drawtilemap(screen_device &screen, bitmap_rgb32 &bitmap, // life would be easier if the roz we're talking about for complex zoom wasn't setting this as well // fprintf(stderr, "Tilemap %d is a floor using :\n", tm); - const uint32_t floorAddress = 0x40000 + (scrollbase << 4); + // const uint32_t floorAddress = 0x40000 + (scrollbase << 4); // TODO: The row count is correct, but how is this layer clipped? m_tcram? @@ -635,19 +635,20 @@ void hng64_state::hng64_drawtilemap(screen_device &screen, bitmap_rgb32 &bitmap, // HACK : Clear RAM - this is "needed" in fatfurwa since it doesn't clear its own ram (buriki does) // Figure out what the difference between the two programs is. It's possible writing to // the linescroll ram fills a buffer and it's cleared automatically between frames? - for (int ii = 0; ii < 0x2000/4; ii++) - { - const int realAddress = floorAddress/4; - m_videoram[realAddress+ii] = 0x00000000; - } + // for (int ii = 0; ii < 0x2000/4; ii++) + //{ + // const int realAddress = floorAddress/4; + // m_videoram[realAddress+ii] = 0x00000000; + // } // Floor mode - per pixel simple / complex modes? -- every other line? // (there doesn't seem to be enough data in Buriki for every line at least) rectangle clip = visarea; - if (global_alt_scroll_register_format) // globally selects alt scroll register layout??? - { + // this was wrong, see below +// if (global_alt_scroll_register_format) // globally selects alt scroll register layout??? +// { // Logic would dictate that this should be the 'complex' scroll register layout, // but per-line. That doesn't work however. // @@ -662,11 +663,11 @@ void hng64_state::hng64_drawtilemap(screen_device &screen, bitmap_rgb32 &bitmap, // // buriki line data is at 20146000 (physical) -#if HNG64_VIDEO_DEBUG - popmessage("Unhandled rowscroll %02x", tileregs>>12); -#endif - } - else // 'simple' mode with linescroll, used in some ss64_2 levels (assumed to be correct, but doesn't do much with it.. so could be wrong) +//#if HNG64_VIDEO_DEBUG +// popmessage("Unhandled rowscroll %02x", tileregs>>12); +//#endif +// } +// else // 'simple' mode with linescroll, used in some ss64_2 levels (assumed to be correct, but doesn't do much with it.. so could be wrong) { int32_t xtopleft, xmiddle; int32_t ytopleft, ymiddle; @@ -697,7 +698,8 @@ void hng64_state::hng64_drawtilemap(screen_device &screen, bitmap_rgb32 &bitmap, const int xinc = (xmiddle - xtopleft) / 512; const int yinc = (ymiddle - ytopleft) / 512; - + // TODO: if global_alt_scroll_register_format is enabled uses incxy / incyx into calculation somehow ... + hng64_tilemap_draw_roz(screen, bitmap,clip,tilemap,xtopleft,ytopleft, xinc<<1,0,0,yinc<<1, 1,