mirror of
https://github.com/holub/mame
synced 2025-04-28 11:11:48 +03:00
pc_fdc: use logmacro (nw)
This commit is contained in:
parent
190032e0b7
commit
40df5a4844
@ -16,6 +16,14 @@
|
|||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "machine/pc_fdc.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_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)")
|
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 )
|
WRITE8_MEMBER( pc_fdc_family_device::dor_w )
|
||||||
{
|
{
|
||||||
logerror("%s: dor = %02x\n", tag(), data);
|
LOG("dor = %02x\n", data);
|
||||||
uint8_t pdor = dor;
|
uint8_t pdor = dor;
|
||||||
dor = data;
|
dor = data;
|
||||||
|
|
||||||
@ -134,7 +142,7 @@ READ8_MEMBER( pc_fdc_family_device::dir_r )
|
|||||||
WRITE8_MEMBER( pc_fdc_family_device::ccr_w )
|
WRITE8_MEMBER( pc_fdc_family_device::ccr_w )
|
||||||
{
|
{
|
||||||
static const int rates[4] = { 500000, 300000, 250000, 1000000 };
|
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]);
|
fdc->set_rate(rates[data & 3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,7 +176,7 @@ void pc_fdc_family_device::check_irq()
|
|||||||
bool pirq = irq;
|
bool pirq = irq;
|
||||||
irq = fdc_irq && (dor & 4) && (dor & 8);
|
irq = fdc_irq && (dor & 4) && (dor & 8);
|
||||||
if(irq != pirq && !intrq_cb.isnull()) {
|
if(irq != pirq && !intrq_cb.isnull()) {
|
||||||
logerror("%s: pc_irq = %d\n", tag(), irq);
|
LOG("pc_irq = %d\n", irq);
|
||||||
intrq_cb(irq);
|
intrq_cb(irq);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user