atari batman, fix the driving scene (partials need to be updated in vad)
This commit is contained in:
parent
f373cc0365
commit
10c325fb38
|
@ -22,6 +22,7 @@ static INT32 tilerow_partial_prev_line = 0;
|
|||
INT32 atarivad_scanline_timer = 0;
|
||||
INT32 atarivad_scanline_timer_enabled = 0;
|
||||
static void (*scanline_timer_callback)(INT32 param); // const
|
||||
static void (*AtariVADPartialCB)(INT32 param);
|
||||
|
||||
INT32 atarivad_scanline; // external
|
||||
|
||||
|
@ -282,6 +283,7 @@ void AtariVADInit(INT32 tmap_num0, INT32 tmap_num1, INT32 bg_map_type, void (*sl
|
|||
palette_ram = (UINT8*)BurnMalloc(0x1000);
|
||||
|
||||
scanline_timer_callback = (sl_timer_cb) ? sl_timer_cb : scanline_timer_dummy;
|
||||
AtariVADPartialCB = NULL;
|
||||
|
||||
GenericTilemapInit(tmap_num0, TILEMAP_SCAN_COLS, bg_map_type ? bg_map_callback : bg0_map_callback, 8, 8, 64, 64);
|
||||
GenericTilemapInit(tmap_num1, TILEMAP_SCAN_COLS, bg1_map_callback, 8, 8, 64, 64);
|
||||
|
@ -293,6 +295,11 @@ void AtariVADInit(INT32 tmap_num0, INT32 tmap_num1, INT32 bg_map_type, void (*sl
|
|||
atari_palette_write = palette_write ? palette_write : palette_write_dummy;
|
||||
}
|
||||
|
||||
void AtariVADSetPartialCB(void (*partial_cb)(INT32))
|
||||
{
|
||||
AtariVADPartialCB = partial_cb;
|
||||
}
|
||||
|
||||
void AtariVADExit()
|
||||
{
|
||||
BurnFree(playfield_data[0]);
|
||||
|
@ -332,6 +339,8 @@ void AtariVADEOFUpdate(UINT16 *eof_data)
|
|||
atari_vad_write_word(0x0ffc0 + (i*2), eof_data[i]);
|
||||
}
|
||||
}
|
||||
|
||||
tilerow_partial_prev_line = 0;
|
||||
}
|
||||
|
||||
void AtariVADTimerUpdate()
|
||||
|
@ -357,9 +366,7 @@ void AtariVADTileRowUpdate(INT32 scanline, UINT16 *alphamap_ram)
|
|||
{
|
||||
if (tilerow_partial_prev_line > scanline) tilerow_partial_prev_line = 0;
|
||||
|
||||
// GenericTilesSetClip(-1, -1, tilerow_partial_prev_line, scanline);
|
||||
// BurnDrvRedraw();
|
||||
// GenericTilesClearClip();
|
||||
if (AtariVADPartialCB) AtariVADPartialCB(scanline);
|
||||
|
||||
tilerow_partial_prev_line = scanline;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ void AtariVADInit(INT32 tmap_num0, INT32 tmap_num1, INT32 bgtype, void (*sl_time
|
|||
void AtariVADExit();
|
||||
void AtariVADMap(INT32 startaddress, INT32 endaddress, INT32 shuuz);
|
||||
INT32 AtariVADScan(INT32 nAction, INT32 *pnMin);
|
||||
void AtariVADSetPartialCB(void (*partial_cb)(INT32));
|
||||
|
||||
void AtariVADEOFUpdate(UINT16 *eof_data); // call after last scanline
|
||||
void AtariVADTimerUpdate(); // call after each scanline
|
||||
|
|
|
@ -41,6 +41,8 @@ static UINT16 DrvInputs[3];
|
|||
static UINT8 DrvDips[1];
|
||||
static UINT8 DrvReset;
|
||||
|
||||
static void draw_scanline(INT32 line); // partials
|
||||
|
||||
static struct BurnInputInfo BatmanInputList[] = {
|
||||
{"P1 Coin", BIT_DIGITAL, DrvJoy2 + 1, "p1 coin" },
|
||||
{"P1 Up", BIT_DIGITAL, DrvJoy1 + 15, "p1 up" },
|
||||
|
@ -447,6 +449,7 @@ static INT32 DrvInit()
|
|||
GenericTilemapSetGfx(3, DrvGfxROM0, 2, 8, 8, 0x080000, 0x000, 0x0f);
|
||||
|
||||
AtariVADInit(0, 1, 0, scanline_timer, palette_write);
|
||||
AtariVADSetPartialCB(draw_scanline);
|
||||
AtariMoInit(0, &modesc);
|
||||
|
||||
SekInit(0, 0x68000);
|
||||
|
@ -659,7 +662,6 @@ static INT32 DrvFrame()
|
|||
|
||||
if (atarivad_scanline_timer_enabled) {
|
||||
if (atarivad_scanline_timer == atarivad_scanline) {
|
||||
draw_scanline(i);
|
||||
scanline_timer(CPU_IRQSTATUS_ACK);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue