Merge pull request #3602 from shattered/_ef54424

pc_fdc: use logmacro (nw)
This commit is contained in:
R. Belmont 2018-05-23 20:26:13 -04:00 committed by GitHub
commit 4727246924
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,6 +16,14 @@
#include "emu.h"
#include "machine/pc_fdc.h"
//#define LOG_GENERAL (1U << 0) //defined in logmacro.h already
//#define VERBOSE (LOG_GENERAL)
//#define LOG_OUTPUT_STREAM std::cout
#include "logmacro.h"
DEFINE_DEVICE_TYPE(PC_FDC_XT, pc_fdc_xt_device, "pc_fdc_xt", "PC FDC (XT)")
DEFINE_DEVICE_TYPE(PC_FDC_AT, pc_fdc_at_device, "pc_fdc_at", "PC FDC (AT)")
@ -101,7 +109,7 @@ void pc_fdc_family_device::device_reset()
WRITE8_MEMBER( pc_fdc_family_device::dor_w )
{
logerror("%s: dor = %02x\n", tag(), data);
LOG("dor = %02x\n", data);
uint8_t pdor = dor;
dor = data;
@ -134,7 +142,7 @@ READ8_MEMBER( pc_fdc_family_device::dir_r )
WRITE8_MEMBER( pc_fdc_family_device::ccr_w )
{
static const int rates[4] = { 500000, 300000, 250000, 1000000 };
logerror("%s: ccr = %02x\n", tag(), data);
LOG("ccr = %02x\n", data);
fdc->set_rate(rates[data & 3]);
}
@ -168,7 +176,7 @@ void pc_fdc_family_device::check_irq()
bool pirq = irq;
irq = fdc_irq && (dor & 4) && (dor & 8);
if(irq != pirq && !intrq_cb.isnull()) {
logerror("%s: pc_irq = %d\n", tag(), irq);
LOG("pc_irq = %d\n", irq);
intrq_cb(irq);
}
}