From 4e7b3120e87d40c944637e5eff78c3a8c9e5a30a Mon Sep 17 00:00:00 2001 From: Barry Harris <44396066+barry65536@users.noreply.github.com> Date: Thu, 12 Apr 2012 19:53:17 +0000 Subject: [PATCH] cawingbl progress, decoded graphics, tidied up, still doesn't write the scroll values anywhere though --- src/burn/drv/capcom/cps.cpp | 10 ++++++++ src/burn/drv/capcom/cps.h | 1 + src/burn/drv/capcom/d_cps1.cpp | 42 +++++++++++++++------------------- 3 files changed, 29 insertions(+), 24 deletions(-) diff --git a/src/burn/drv/capcom/cps.cpp b/src/burn/drv/capcom/cps.cpp index 783f6699e..25c9a6a59 100644 --- a/src/burn/drv/capcom/cps.cpp +++ b/src/burn/drv/capcom/cps.cpp @@ -621,6 +621,16 @@ INT32 CpsLoadTilesFcrash(INT32 nStart) return 0; } +INT32 CpsLoadTilesCawingbl(INT32 nStart) +{ + CpsLoadOneBootlegType3(CpsGfx + 0x000000, nStart + 0, 0, 0); + CpsLoadOneBootlegType3(CpsGfx + 0x000000, nStart + 1, 0, 1); + CpsLoadOneBootlegType3(CpsGfx + 0x000000, nStart + 2, 0, 2); + CpsLoadOneBootlegType3(CpsGfx + 0x000000, nStart + 3, 0, 3); + + return 0; +} + INT32 CpsLoadStars(UINT8* pStar, INT32 nStart) { UINT8* pTemp[2] = { NULL, NULL}; diff --git a/src/burn/drv/capcom/cps.h b/src/burn/drv/capcom/cps.h index b045596a0..22ee817e5 100644 --- a/src/burn/drv/capcom/cps.h +++ b/src/burn/drv/capcom/cps.h @@ -45,6 +45,7 @@ INT32 CpsLoadTilesSf2ebbl(UINT8 *Tile, INT32 nStart); INT32 CpsLoadTilesSf2koryu(INT32 nStart); INT32 CpsLoadTilesSf2mdt(INT32 nStart); INT32 CpsLoadTilesFcrash(INT32 nStart); +INT32 CpsLoadTilesCawingbl(INT32 nStart); INT32 CpsLoadStars(UINT8 *pStar, INT32 nStart); INT32 CpsLoadStarsByte(UINT8 *pStar, INT32 nStart); INT32 CpsLoadStarsForgottnAlt(UINT8 *pStar, INT32 nStart); diff --git a/src/burn/drv/capcom/d_cps1.cpp b/src/burn/drv/capcom/d_cps1.cpp index 7aca1486d..b54c48a49 100644 --- a/src/burn/drv/capcom/d_cps1.cpp +++ b/src/burn/drv/capcom/d_cps1.cpp @@ -4054,9 +4054,9 @@ static struct BurnRomInfo CawingblRomDesc[] = { { "caw1.bin", 0x080000, 0xb19b10ce, BRF_ESS | BRF_PRG | CPS1_68K_PROGRAM_BYTESWAP }, // caw1 { "caw5.bin", 0x080000, 0xa045c689, BRF_GRA | CPS1_TILES }, - { "caw7.bin", 0x080000, 0x30dd78db, BRF_GRA | CPS1_TILES }, - { "caw4.bin", 0x080000, 0x61192f7c, BRF_GRA | CPS1_TILES }, - { "caw6.bin", 0x080000, 0x4937fc41, BRF_GRA | CPS1_TILES }, + { "caw4.bin", 0x080000, 0x61192f7c, BRF_GRA | CPS1_TILES }, + { "caw7.bin", 0x080000, 0x30dd78db, BRF_GRA | CPS1_TILES }, + { "caw6.bin", 0x080000, 0x4937fc41, BRF_GRA | CPS1_TILES }, { "caw3.bin", 0x020000, 0xffe16cdc, BRF_PRG | CPS1_Z80_PROGRAM }, }; @@ -10878,37 +10878,33 @@ static INT32 Captcommb2Init() UINT8 __fastcall CawingblInputRead(UINT32 a) { - UINT8 d = 0xff; - switch (a) { case 0x882000: { - d = (UINT8)~Inp000; - return d; + return ~Inp000; } case 0x882001: { - d = (UINT8)~Inp001; - return d; + return ~Inp001; } case 0x882008: { - d = (UINT8)~Inp018; - return d; + return ~Inp018; } case 0x88200a: { - d = (UINT8)~Cpi01A; - return d; + return ~Cpi01A; } case 0x88200c: { - d = (UINT8)~Cpi01C; - return d; + return ~Cpi01C; } case 0x88200e: { - d = (UINT8)~Cpi01E; - return d; + return ~Cpi01E; + } + + default: { + bprintf(PRINT_NORMAL, _T("Input Read Byte %x\n"), a); } } @@ -10918,14 +10914,10 @@ UINT8 __fastcall CawingblInputRead(UINT32 a) void __fastcall CawingblInputWrite(UINT32 a, UINT8 d) { switch (a) { - case 0x882006: { - PsndSyncZ80((INT64)SekTotalCycles() * nCpsZ80Cycles / nCpsCycles); - - PsndCode = d; - return; + default: { + bprintf(PRINT_NORMAL, _T("Input Write Byte %x, %x\n"), a, d); } } - } static INT32 CawingblInit() @@ -10935,11 +10927,13 @@ static INT32 CawingblInit() CpsLayer1XOffs = 0xffc0; // CpsLayer2XOffs = 0xffc0; // CpsLayer3XOffs = 0xffc0; + + Cps1GfxLoadCallbackFunction = CpsLoadTilesCawingbl; nRet = DrvInit(); SekOpen(0); - SekMapHandler(1, 0x882000, 0x88200f, SM_RAM); + SekMapHandler(1, 0x882000, 0x882fff, SM_READ | SM_WRITE); SekSetReadByteHandler(1, CawingblInputRead); SekSetWriteByteHandler(1, CawingblInputWrite); SekClose();