Skip to content

Commit

Permalink
fixeight bootfix.. again
Browse files Browse the repository at this point in the history
  • Loading branch information
dinkc64 committed Aug 9, 2021
1 parent 49388e2 commit edc472e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 29 deletions.
3 changes: 2 additions & 1 deletion src/burn/drv/toaplan/d_battleg.cpp
Expand Up @@ -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);
Expand Down
30 changes: 2 additions & 28 deletions src/burn/drv/toaplan/toaplan.h
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit edc472e

Please sign in to comment.