From edc472eb6952d9f71b4cd82f98653230d3b0504a Mon Sep 17 00:00:00 2001 From: dinkc64 Date: Mon, 9 Aug 2021 15:25:28 -0400 Subject: [PATCH] fixeight bootfix.. again --- src/burn/drv/toaplan/d_battleg.cpp | 3 ++- src/burn/drv/toaplan/toaplan.h | 30 ++---------------------------- 2 files changed, 4 insertions(+), 29 deletions(-) diff --git a/src/burn/drv/toaplan/d_battleg.cpp b/src/burn/drv/toaplan/d_battleg.cpp index 5c5a9ed410..fe65a845b2 100644 --- a/src/burn/drv/toaplan/d_battleg.cpp +++ b/src/burn/drv/toaplan/d_battleg.cpp @@ -692,7 +692,8 @@ static UINT16 __fastcall battlegReadWord(UINT32 sekAddress) switch (sekAddress) { case 0x21C03C: - return (location_test) ? ToaScanlineRegisterLoctest() : ToaScanlineRegister(); + return ToaScanlineRegister(); + //return (location_test) ? ToaScanlineRegisterLoctest() : ToaScanlineRegister(); case 0x300004: return ToaGP9001ReadRAM_Hi(0); diff --git a/src/burn/drv/toaplan/toaplan.h b/src/burn/drv/toaplan/toaplan.h index 4ebde3d9b6..deff47d364 100644 --- a/src/burn/drv/toaplan/toaplan.h +++ b/src/burn/drv/toaplan/toaplan.h @@ -168,7 +168,7 @@ inline static UINT16 ToaScanlineRegister() { static INT32 nPreviousScanline; UINT16 nFlags = 0xFE00; - INT32 nCurrentScanline = SekCurrentScanline(); + INT32 nCurrentScanline = (SekCurrentScanline() + 1) % 262; #if 0 // None of the games actually use this @@ -186,33 +186,7 @@ inline static UINT16 ToaScanlineRegister() } - return nFlags | ((nCurrentScanline > 255) ? 0xff : nCurrentScanline); -} - -inline static UINT16 ToaScanlineRegisterLoctest() // bgaregga location test -{ - static INT32 nPreviousScanline; - UINT16 nFlags = 0xFE00; - INT32 nCurrentScanline = (SekCurrentScanline() + 15) % 262; - if (nCurrentScanline > 0xff) nCurrentScanline = 0xff; - -#if 0 - // None of the games actually use this - INT32 nCurrentBeamPosition = SekTotalCycles() % nToaCyclesScanline; - if (nCurrentBeamPosition < 64) { - nFlags &= ~0x4000; - } -#endif - - if (nCurrentScanline != nPreviousScanline) { - nPreviousScanline = nCurrentScanline; - nFlags &= ~0x8000; - -// bprintf(PRINT_NORMAL, _T(" - line %3i, PC 0x%08X\n"), nCurrentScanline, SekGetPC(-1)); - - } - - return nFlags | nCurrentScanline; + return nFlags | ((nCurrentScanline > 255) ? 0x1ff : nCurrentScanline); } // toa_extratext.cpp