Update vtvideo.cpp

Changes to get the watchdog up and running. Documentation claims that a zero must be written to 0x10C (to disable foulup detection). This is not true. Instead, a sensible value must be written to the DC012 controller register (else video will be hosed).
This commit is contained in:
Bavarese 2016-07-03 14:36:17 +02:00 committed by GitHub
parent 711eb65ece
commit 8573446231

View File

@ -236,20 +236,18 @@ WRITE8_MEMBER(vt100_video_device::dc012_w)
{
// Writes to [10C] and [0C] are treated differently
// - see 3.1.3.9.5 DC012 Programming Information (PC-100 spec)
if ((offset & 0x100) && (data == 0) ) // MHFU is disabled by writing 00 to port 010C.
if ((offset & 0x100) ) // MHFU is disabled by writing a value to port 010C.
{
if (MHFU_FLAG == true)
printf("MHFU *** DISABLED *** \n");
// if (MHFU_FLAG == true)
// printf("MHFU *** DISABLED *** \n");
MHFU_FLAG = false;
MHFU_counter = 0; // ?
}
else
{
if (MHFU_FLAG == false)
printf("MHFU ___ENABLED___ %05x \n", space.device().safe_pc());
// if (MHFU_FLAG == false)
// printf("MHFU ___ENABLED___ %05x \n", space.device().safe_pc());
MHFU_FLAG = true;
MHFU_counter = 0;
MHFU_counter = 0; // TEST-DEBUG ***********
}
if (!(data & 0x08))
@ -835,49 +833,40 @@ void rainbow_video_device::video_blanking(bitmap_ind16 &bitmap, const rectangle
bitmap.fill(((m_reverse_field ^ m_basic_attribute) ? 1 : 0), cliprect);
}
#define MHFU_IS_ENABLED 1
#define MHFU_COUNT -1
#define MHFU_VALUE -2
#define MHFU_RESET_and_ENABLE -100
#define MHFU_RESET_and_DISABLE -200
#define MHFU_RESET -250
int rainbow_video_device::MHFU(int ASK)
{
switch (ASK)
{
case 1: // "true": RETURN BOOLEAN (MHFU disabled or enabled?)
case MHFU_IS_ENABLED: // "true": RETURN BOOLEAN (MHFU disabled or enabled?)
return MHFU_FLAG;
case -1: // -1: increment IF ENABLED, return counter value (=> Rainbow.c)
//if (MHFU_FLAG == true)
if (MHFU_counter < 255)
case MHFU_COUNT: // -1: increment IF ENABLED, return counter value (=> Rainbow.c)
if (MHFU_FLAG == true)
if (MHFU_counter < 254)
MHFU_counter++;
case -2:
case MHFU_VALUE:
return MHFU_counter;
case -250: // -250 : RESET counter (NOTHING ELSE!)
case MHFU_RESET: // -250 : RESET counter (NOTHING ELSE!)
MHFU_counter = 0;
return MHFU_FLAG;
case -100: // -100 : RESET and ENABLE MHFU counter
case MHFU_RESET_and_ENABLE: // -100 : RESET and ENABLE MHFU counter
MHFU_counter = 0;
if(0) //if (VERBOSE)
printf("-100 MHFU * reset and ENABLE * \n");
if(0) // if (VERBOSE)
{
if (MHFU_FLAG == false)
printf("-100 MHFU ___ENABLED___\n");
}
MHFU_FLAG = true;
return -100;
case -200: // -200 : RESET and DISABLE MHFU
case MHFU_RESET_and_DISABLE: // -200 : RESET and DISABLE MHFU
MHFU_counter = 0;
if(0) //if (VERBOSE)
{
if (MHFU_FLAG == true)
printf("MHFU *** DISABLED ***xxx \n");
}
MHFU_FLAG = false;
return -200;