dacholer, itaten, convert to generic tilemaps

This commit is contained in:
dinkc64 2024-04-15 00:13:45 -04:00
parent a3a2fe4036
commit 63830be5d0
1 changed files with 123 additions and 125 deletions

View File

@ -101,144 +101,147 @@ STDINPUTINFO(Itaten)
static struct BurnDIPInfo DacholerDIPList[]= static struct BurnDIPInfo DacholerDIPList[]=
{ {
{0x12, 0xff, 0xff, 0x0f, NULL }, DIP_OFFSET(0x12)
{0x13, 0xff, 0xff, 0x3d, NULL }, {0x00, 0xff, 0xff, 0x0f, NULL },
{0x01, 0xff, 0xff, 0x3d, NULL },
{0 , 0xfe, 0 , 4, "Coin A" }, {0 , 0xfe, 0 , 4, "Coin A" },
{0x12, 0x01, 0x03, 0x01, "2 Coins 1 Credits" }, {0x00, 0x01, 0x03, 0x01, "2 Coins 1 Credits" },
{0x12, 0x01, 0x03, 0x03, "1 Coin 1 Credits" }, {0x00, 0x01, 0x03, 0x03, "1 Coin 1 Credits" },
{0x12, 0x01, 0x03, 0x00, "2 Coins 3 Credits" }, {0x00, 0x01, 0x03, 0x00, "2 Coins 3 Credits" },
{0x12, 0x01, 0x03, 0x02, "1 Coin 2 Credits" }, {0x00, 0x01, 0x03, 0x02, "1 Coin 2 Credits" },
{0 , 0xfe, 0 , 4, "Coin B" }, {0 , 0xfe, 0 , 4, "Coin B" },
{0x12, 0x01, 0x0c, 0x00, "6 Coins 1 Credits" }, {0x00, 0x01, 0x0c, 0x00, "6 Coins 1 Credits" },
{0x12, 0x01, 0x0c, 0x04, "5 Coins 1 Credits" }, {0x00, 0x01, 0x0c, 0x04, "5 Coins 1 Credits" },
{0x12, 0x01, 0x0c, 0x08, "4 Coins 1 Credits" }, {0x00, 0x01, 0x0c, 0x08, "4 Coins 1 Credits" },
{0x12, 0x01, 0x0c, 0x0c, "1 Coin 1 Credits" }, {0x00, 0x01, 0x0c, 0x0c, "1 Coin 1 Credits" },
{0 , 0xfe, 0 , 4, "Lives" }, {0 , 0xfe, 0 , 4, "Lives" },
{0x13, 0x01, 0x03, 0x03, "1" }, {0x01, 0x01, 0x03, 0x03, "1" },
{0x13, 0x01, 0x03, 0x02, "2" }, {0x01, 0x01, 0x03, 0x02, "2" },
{0x13, 0x01, 0x03, 0x01, "3" }, {0x01, 0x01, 0x03, 0x01, "3" },
{0x13, 0x01, 0x03, 0x00, "4" }, {0x01, 0x01, 0x03, 0x00, "4" },
{0 , 0xfe, 0 , 13, "Bonus Life" }, {0 , 0xfe, 0 , 13, "Bonus Life" },
{0x13, 0x01, 0x3c, 0x3c, "20k 70k then every 50k" }, {0x01, 0x01, 0x3c, 0x3c, "20k 70k then every 50k" },
{0x13, 0x01, 0x3c, 0x38, "30k 80k then every 50k" }, {0x01, 0x01, 0x3c, 0x38, "30k 80k then every 50k" },
{0x13, 0x01, 0x3c, 0x34, "40k 90k then every 50k" }, {0x01, 0x01, 0x3c, 0x34, "40k 90k then every 50k" },
{0x13, 0x01, 0x3c, 0x2c, "20k 90k then every 70k" }, {0x01, 0x01, 0x3c, 0x2c, "20k 90k then every 70k" },
{0x13, 0x01, 0x3c, 0x28, "30k 100k then every 70k" }, {0x01, 0x01, 0x3c, 0x28, "30k 100k then every 70k" },
{0x13, 0x01, 0x3c, 0x24, "40k 110k then every 70k" }, {0x01, 0x01, 0x3c, 0x24, "40k 110k then every 70k" },
{0x13, 0x01, 0x3c, 0x1c, "20k 120k then every 100k" }, {0x01, 0x01, 0x3c, 0x1c, "20k 120k then every 100k" },
{0x13, 0x01, 0x3c, 0x18, "30k 130k then every 100k" }, {0x01, 0x01, 0x3c, 0x18, "30k 130k then every 100k" },
{0x13, 0x01, 0x3c, 0x14, "40k 140k then every 100k" }, {0x01, 0x01, 0x3c, 0x14, "40k 140k then every 100k" },
{0x13, 0x01, 0x3c, 0x0c, "20k only" }, {0x01, 0x01, 0x3c, 0x0c, "20k only" },
{0x13, 0x01, 0x3c, 0x08, "30k only" }, {0x01, 0x01, 0x3c, 0x08, "30k only" },
{0x13, 0x01, 0x3c, 0x04, "40k only" }, {0x01, 0x01, 0x3c, 0x04, "40k only" },
{0x13, 0x01, 0x3c, 0x00, "None" }, {0x01, 0x01, 0x3c, 0x00, "None" },
{0 , 0xfe, 0 , 2, "Demo Sounds" }, {0 , 0xfe, 0 , 2, "Demo Sounds" },
{0x13, 0x01, 0x40, 0x40, "Off" }, {0x01, 0x01, 0x40, 0x40, "Off" },
{0x13, 0x01, 0x40, 0x00, "On" }, {0x01, 0x01, 0x40, 0x00, "On" },
{0 , 0xfe, 0 , 2, "Cabinet" }, {0 , 0xfe, 0 , 2, "Cabinet" },
{0x13, 0x01, 0x80, 0x00, "Upright" }, {0x01, 0x01, 0x80, 0x00, "Upright" },
{0x13, 0x01, 0x80, 0x80, "Cocktail" }, {0x01, 0x01, 0x80, 0x80, "Cocktail" },
}; };
STDDIPINFO(Dacholer) STDDIPINFO(Dacholer)
static struct BurnDIPInfo KickboyDIPList[]= static struct BurnDIPInfo KickboyDIPList[]=
{ {
{0x12, 0xff, 0xff, 0x0f, NULL }, DIP_OFFSET(0x12)
{0x13, 0xff, 0xff, 0x7d, NULL }, {0x00, 0xff, 0xff, 0x0f, NULL },
{0x01, 0xff, 0xff, 0x7d, NULL },
{0 , 0xfe, 0 , 4, "Coin A" }, {0 , 0xfe, 0 , 4, "Coin A" },
{0x12, 0x01, 0x03, 0x01, "2 Coins 1 Credits" }, {0x00, 0x01, 0x03, 0x01, "2 Coins 1 Credits" },
{0x12, 0x01, 0x03, 0x03, "1 Coin 1 Credits" }, {0x00, 0x01, 0x03, 0x03, "1 Coin 1 Credits" },
{0x12, 0x01, 0x03, 0x00, "2 Coins 3 Credits" }, {0x00, 0x01, 0x03, 0x00, "2 Coins 3 Credits" },
{0x12, 0x01, 0x03, 0x02, "1 Coin 2 Credits" }, {0x00, 0x01, 0x03, 0x02, "1 Coin 2 Credits" },
{0 , 0xfe, 0 , 4, "Coin B" }, {0 , 0xfe, 0 , 4, "Coin B" },
{0x12, 0x01, 0x0c, 0x04, "2 Coins 1 Credits" }, {0x00, 0x01, 0x0c, 0x04, "2 Coins 1 Credits" },
{0x12, 0x01, 0x0c, 0x0c, "1 Coin 1 Credits" }, {0x00, 0x01, 0x0c, 0x0c, "1 Coin 1 Credits" },
{0x12, 0x01, 0x0c, 0x08, "1 Coin 2 Credits" }, {0x00, 0x01, 0x0c, 0x08, "1 Coin 2 Credits" },
{0x12, 0x01, 0x0c, 0x00, "Free Play" }, {0x00, 0x01, 0x0c, 0x00, "Free Play" },
{0 , 0xfe, 0 , 4, "Lives" }, {0 , 0xfe, 0 , 4, "Lives" },
{0x13, 0x01, 0x03, 0x03, "3" }, {0x01, 0x01, 0x03, 0x03, "3" },
{0x13, 0x01, 0x03, 0x02, "4" }, {0x01, 0x01, 0x03, 0x02, "4" },
{0x13, 0x01, 0x03, 0x01, "5" }, {0x01, 0x01, 0x03, 0x01, "5" },
{0x13, 0x01, 0x03, 0x00, "99 (Cheat)" }, {0x01, 0x01, 0x03, 0x00, "99 (Cheat)" },
{0 , 0xfe, 0 , 13, "Bonus Life" }, {0 , 0xfe, 0 , 13, "Bonus Life" },
{0x13, 0x01, 0x3c, 0x3c, "20k 50k then every 30k" }, {0x01, 0x01, 0x3c, 0x3c, "20k 50k then every 30k" },
{0x13, 0x01, 0x3c, 0x38, "30k 60k then every 30k" }, {0x01, 0x01, 0x3c, 0x38, "30k 60k then every 30k" },
{0x13, 0x01, 0x3c, 0x34, "40k 70k then every 30k" }, {0x01, 0x01, 0x3c, 0x34, "40k 70k then every 30k" },
{0x13, 0x01, 0x3c, 0x2c, "20k 70k then every 50k" }, {0x01, 0x01, 0x3c, 0x2c, "20k 70k then every 50k" },
{0x13, 0x01, 0x3c, 0x28, "30k 80k then every 50k" }, {0x01, 0x01, 0x3c, 0x28, "30k 80k then every 50k" },
{0x13, 0x01, 0x3c, 0x24, "40k 90k then every 50k" }, {0x01, 0x01, 0x3c, 0x24, "40k 90k then every 50k" },
{0x13, 0x01, 0x3c, 0x1c, "20k 90k then every 70k" }, {0x01, 0x01, 0x3c, 0x1c, "20k 90k then every 70k" },
{0x13, 0x01, 0x3c, 0x18, "30k 100k then every 70k" }, {0x01, 0x01, 0x3c, 0x18, "30k 100k then every 70k" },
{0x13, 0x01, 0x3c, 0x14, "40k 110k then every 70k" }, {0x01, 0x01, 0x3c, 0x14, "40k 110k then every 70k" },
{0x13, 0x01, 0x3c, 0x0c, "20k only" }, {0x01, 0x01, 0x3c, 0x0c, "20k only" },
{0x13, 0x01, 0x3c, 0x08, "30k only" }, {0x01, 0x01, 0x3c, 0x08, "30k only" },
{0x13, 0x01, 0x3c, 0x04, "40k only" }, {0x01, 0x01, 0x3c, 0x04, "40k only" },
{0x13, 0x01, 0x3c, 0x00, "None" }, {0x01, 0x01, 0x3c, 0x00, "None" },
{0 , 0xfe, 0 , 2, "Difficulty" }, {0 , 0xfe, 0 , 2, "Difficulty" },
{0x13, 0x01, 0x40, 0x40, "Easy" }, {0x01, 0x01, 0x40, 0x40, "Easy" },
{0x13, 0x01, 0x40, 0x00, "Hard" }, {0x01, 0x01, 0x40, 0x00, "Hard" },
{0 , 0xfe, 0 , 2, "Cabinet" }, {0 , 0xfe, 0 , 2, "Cabinet" },
{0x13, 0x01, 0x80, 0x00, "Upright" }, {0x01, 0x01, 0x80, 0x00, "Upright" },
{0x13, 0x01, 0x80, 0x80, "Cocktail" }, {0x01, 0x01, 0x80, 0x80, "Cocktail" },
}; };
STDDIPINFO(Kickboy) STDDIPINFO(Kickboy)
static struct BurnDIPInfo ItatenDIPList[]= static struct BurnDIPInfo ItatenDIPList[]=
{ {
{0x10, 0xff, 0xff, 0xff, NULL }, DIP_OFFSET(0x10)
{0x11, 0xff, 0xff, 0x3f, NULL }, {0x00, 0xff, 0xff, 0xff, NULL },
{0x01, 0xff, 0xff, 0x3f, NULL },
{0 , 0xfe, 0 , 4, "Coin A" }, {0 , 0xfe, 0 , 4, "Coin A" },
{0x10, 0x01, 0x03, 0x01, "2 Coins 1 Credits" }, {0x00, 0x01, 0x03, 0x01, "2 Coins 1 Credits" },
{0x10, 0x01, 0x03, 0x03, "1 Coin 1 Credits" }, {0x00, 0x01, 0x03, 0x03, "1 Coin 1 Credits" },
{0x10, 0x01, 0x03, 0x02, "1 Coin 2 Credits" }, {0x00, 0x01, 0x03, 0x02, "1 Coin 2 Credits" },
{0x10, 0x01, 0x03, 0x00, "Free Play" }, {0x00, 0x01, 0x03, 0x00, "Free Play" },
{0 , 0xfe, 0 , 4, "Coin B" }, {0 , 0xfe, 0 , 4, "Coin B" },
{0x10, 0x01, 0x0c, 0x00, "3 Coins 1 Credits" }, {0x00, 0x01, 0x0c, 0x00, "3 Coins 1 Credits" },
{0x10, 0x01, 0x0c, 0x04, "2 Coins 3 Credits" }, {0x00, 0x01, 0x0c, 0x04, "2 Coins 3 Credits" },
{0x10, 0x01, 0x0c, 0x0c, "1 Coin 3 Credits" }, {0x00, 0x01, 0x0c, 0x0c, "1 Coin 3 Credits" },
{0x10, 0x01, 0x0c, 0x08, "1 Coin 6 Credits" }, {0x00, 0x01, 0x0c, 0x08, "1 Coin 6 Credits" },
{0 , 0xfe, 0 , 4, "Difficulty" }, {0 , 0xfe, 0 , 4, "Difficulty" },
{0x11, 0x01, 0x03, 0x03, "Easy" }, {0x01, 0x01, 0x03, 0x03, "Easy" },
{0x11, 0x01, 0x03, 0x02, "Medium" }, {0x01, 0x01, 0x03, 0x02, "Medium" },
{0x11, 0x01, 0x03, 0x01, "Hard" }, {0x01, 0x01, 0x03, 0x01, "Hard" },
{0x11, 0x01, 0x03, 0x00, "Hardest" }, {0x01, 0x01, 0x03, 0x00, "Hardest" },
{0 , 0xfe, 0 , 4, "Lives" }, {0 , 0xfe, 0 , 4, "Lives" },
{0x11, 0x01, 0x0c, 0x0c, "3" }, {0x01, 0x01, 0x0c, 0x0c, "3" },
{0x11, 0x01, 0x0c, 0x08, "4" }, {0x01, 0x01, 0x0c, 0x08, "4" },
{0x11, 0x01, 0x0c, 0x04, "5" }, {0x01, 0x01, 0x0c, 0x04, "5" },
{0x11, 0x01, 0x0c, 0x00, "6" }, {0x01, 0x01, 0x0c, 0x00, "6" },
{0 , 0xfe, 0 , 4, "Bonus Life" }, {0 , 0xfe, 0 , 4, "Bonus Life" },
{0x11, 0x01, 0x30, 0x30, "30k then every 50k" }, {0x01, 0x01, 0x30, 0x30, "30k then every 50k" },
{0x11, 0x01, 0x30, 0x20, "60k then every 50k" }, {0x01, 0x01, 0x30, 0x20, "60k then every 50k" },
{0x11, 0x01, 0x30, 0x10, "30k then every 90k" }, {0x01, 0x01, 0x30, 0x10, "30k then every 90k" },
{0x11, 0x01, 0x30, 0x00, "60k then every 90k" }, {0x01, 0x01, 0x30, 0x00, "60k then every 90k" },
{0 , 0xfe, 0 , 2, "Demo Sounds" }, {0 , 0xfe, 0 , 2, "Demo Sounds" },
{0x11, 0x01, 0x40, 0x40, "Off" }, {0x01, 0x01, 0x40, 0x40, "Off" },
{0x11, 0x01, 0x40, 0x00, "On" }, {0x01, 0x01, 0x40, 0x00, "On" },
{0 , 0xfe, 0 , 2, "Cabinet" }, {0 , 0xfe, 0 , 2, "Cabinet" },
{0x11, 0x01, 0x80, 0x00, "Upright" }, {0x01, 0x01, 0x80, 0x00, "Upright" },
{0x11, 0x01, 0x80, 0x80, "Cocktail" }, {0x01, 0x01, 0x80, 0x80, "Cocktail" },
}; };
STDDIPINFO(Itaten) STDDIPINFO(Itaten)
@ -412,6 +415,20 @@ static INT32 DrvDoReset()
return 0; return 0;
} }
static tilemap_callback( bg )
{
INT32 Code = DrvBgRAM[offs] + (bgbank * 0x100);
TILE_SET_INFO(1, Code, (itaten) ? 0 : 0x10, 0);
}
static tilemap_callback( fg )
{
INT32 Code = DrvFgRAM[offs];
TILE_SET_INFO(0, Code, 0, 0);
}
static INT32 MemIndex() static INT32 MemIndex()
{ {
UINT8 *Next; Next = AllMem; UINT8 *Next; Next = AllMem;
@ -602,6 +619,12 @@ static INT32 DrvInit(INT32 type)
MSM5205SetRoute(0, 0.30, BURN_SND_ROUTE_BOTH); MSM5205SetRoute(0, 0.30, BURN_SND_ROUTE_BOTH);
GenericTilesInit(); GenericTilesInit();
GenericTilemapInit(0, TILEMAP_SCAN_ROWS, bg_map_callback, 8, 8, 32, 32);
GenericTilemapInit(1, TILEMAP_SCAN_ROWS, fg_map_callback, 8, 8, 32, 32);
GenericTilemapSetGfx(0, DrvGfxROM0, 4, 8, 8, 0x100 * 8 * 8, 0x00, 0x01);
GenericTilemapSetGfx(1, DrvGfxROM1, 4, 8, 8, 0x400 * 8 * 8, 0x00, 0x01);
GenericTilemapSetTransparent(1, 0);
GenericTilemapSetOffsets(1, 0, -16);
DrvDoReset(); DrvDoReset();
@ -649,39 +672,6 @@ static void DrvPaletteInit()
} }
} }
static void draw_bg_layer()
{
INT32 color = (itaten) ? 0 : 0x10;
for (INT32 offs = 0; offs < 32 * 32; offs++)
{
INT32 sx = (offs & 0x1f) * 8;
INT32 sy = (offs / 0x20) * 8;
sx -= scrollx;
if (sx < -7) sx += 256;
sy -= scrolly;
if (sy < -7) sy += 256;
INT32 code = DrvBgRAM[offs] + (bgbank * 0x100);
Render8x8Tile_Clip(pTransDraw, code, sx, sy, color, 0, 0, DrvGfxROM1);
}
}
static void draw_fg_layer()
{
for (INT32 offs = (32 * 2); offs < (32 * 32) - (32 * 2); offs++)
{
INT32 sx = (offs & 0x1f) * 8;
INT32 sy = (offs / 0x20) * 8;
INT32 code = DrvFgRAM[offs];
Render8x8Tile_Mask(pTransDraw, code, sx, sy - 16, 0, 0, 0, 0, DrvGfxROM0);
}
}
static void draw_sprites() static void draw_sprites()
{ {
for (INT32 offs = 0; offs < 0x100; offs += 4) for (INT32 offs = 0; offs < 0x100; offs += 4)
@ -714,11 +704,19 @@ static INT32 DrvDraw()
DrvRecalc = 0; DrvRecalc = 0;
} }
if ((nBurnLayer & 1) == 0) BurnTransferClear(); GenericTilemapSetFlip(TMAP_GLOBAL, flipscreen ? (TMAP_FLIPX | TMAP_FLIPY) : 0);
if ((nBurnLayer & 1) == 1) draw_bg_layer(); INT32 sx = (flipscreen) ? (256 - scrollx) : scrollx;
if ((nBurnLayer & 2) == 2) draw_sprites(); INT32 sy = (flipscreen) ? ((256 + 30) - scrolly) : scrolly;
if ((nBurnLayer & 4) == 4) draw_fg_layer();
GenericTilemapSetScrollX(0, sx);
GenericTilemapSetScrollY(0, sy);
BurnTransferClear();
if (nBurnLayer & 1) GenericTilemapDraw(0, pTransDraw, 0);
if (nBurnLayer & 2) draw_sprites();
if (nBurnLayer & 4) GenericTilemapDraw(1, pTransDraw, 0);
BurnTransferFlip(flipscreen, flipscreen); // coctail unflippy
BurnTransferCopy(DrvPalette); BurnTransferCopy(DrvPalette);
return 0; return 0;