summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/m6502/m65ce02.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2010-01-10 00:29:26 +0000
committer Aaron Giles <aaron@aarongiles.com>2010-01-10 00:29:26 +0000
commit4498faacd93cbb7f204d1b47e5d12bd417cf43b3 (patch)
treeeebf7c70b83ce57ba2707407872a01fe3ef7bb3c /src/emu/cpu/m6502/m65ce02.c
parent43d93150b5bc214537d5198cd9e7f01f2020eff8 (diff)
First round of an attempted cleanup of header files in the system.
- Created new central header "emu.h"; this should be included by pretty much any driver or device as the first include. This file in turn includes pretty much everything a driver or device will need, minus any other devices it references. Note that emu.h should *never* be included by another header file. - Updated all files in the core (src/emu) to use emu.h. - Removed a ton of redundant and poorly-tracked header includes from within other header files. - Temporarily changed driver.h to map to emu.h until we update files outside of the core. Added class wrapper around tagmap so it can be directly included and accessed within objects that need it. Updated all users to embed tagmap objects and changed them to call through the class. Added nicer functions for finding devices, ports, and regions in a machine: machine->device("tag") -- return the named device, or NULL machine->port("tag") -- return the named port, or NULL machine->region("tag"[, &length[, &flags]]) -- return the named region and optionally its length and flags Made the device tag an astring. This required touching a lot of code that printed the device to explicitly fetch the C-string from it. (Thank you gcc for flagging that issue!)
Diffstat (limited to 'src/emu/cpu/m6502/m65ce02.c')
-rw-r--r--src/emu/cpu/m6502/m65ce02.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/emu/cpu/m6502/m65ce02.c b/src/emu/cpu/m6502/m65ce02.c
index 80f20189c2b..610f535ba1d 100644
--- a/src/emu/cpu/m6502/m65ce02.c
+++ b/src/emu/cpu/m6502/m65ce02.c
@@ -37,6 +37,7 @@
*/
+#include "emu.h"
#include "debugger.h"
#include "m65ce02.h"
@@ -158,7 +159,7 @@ INLINE void m65ce02_take_irq(m65ce02_Regs *cpustate)
P = (P & ~F_D) | F_I; /* knock out D and set I flag */
PCL = RDMEM(EAD);
PCH = RDMEM(EAD+1);
- LOG(("M65ce02 '%s' takes IRQ ($%04x)\n", cpustate->device->tag, PCD));
+ LOG(("M65ce02 '%s' takes IRQ ($%04x)\n", cpustate->device->tag.cstr(), PCD));
/* call back the cpuintrf to let it clear the line */
if (cpustate->irq_callback) (*cpustate->irq_callback)(cpustate->device, 0);
}
@@ -188,7 +189,7 @@ static CPU_EXECUTE( m65ce02 )
/* check if the I flag was just reset (interrupts enabled) */
if( cpustate->after_cli )
{
- LOG(("M65ce02 '%s' after_cli was >0", cpustate->device->tag));
+ LOG(("M65ce02 '%s' after_cli was >0", cpustate->device->tag.cstr()));
cpustate->after_cli = 0;
if (cpustate->irq_state != CLEAR_LINE)
{
@@ -217,7 +218,7 @@ static void m65ce02_set_irq_line(m65ce02_Regs *cpustate, int irqline, int state)
cpustate->nmi_state = state;
if( state != CLEAR_LINE )
{
- LOG(("M65ce02 '%s' set_nmi_line(ASSERT)\n", cpustate->device->tag));
+ LOG(("M65ce02 '%s' set_nmi_line(ASSERT)\n", cpustate->device->tag.cstr()));
EAD = M65CE02_NMI_VEC;
cpustate->icount -= 7;
PUSH(PCH);
@@ -226,7 +227,7 @@ static void m65ce02_set_irq_line(m65ce02_Regs *cpustate, int irqline, int state)
P = (P & ~F_D) | F_I; /* knock out D and set I flag */
PCL = RDMEM(EAD);
PCH = RDMEM(EAD+1);
- LOG(("M65ce02 '%s' takes NMI ($%04x)\n", cpustate->device->tag, PCD));
+ LOG(("M65ce02 '%s' takes NMI ($%04x)\n", cpustate->device->tag.cstr(), PCD));
}
}
else
@@ -234,7 +235,7 @@ static void m65ce02_set_irq_line(m65ce02_Regs *cpustate, int irqline, int state)
cpustate->irq_state = state;
if( state != CLEAR_LINE )
{
- LOG(("M65ce02 '%s' set_irq_line(ASSERT)\n", cpustate->device->tag));
+ LOG(("M65ce02 '%s' set_irq_line(ASSERT)\n", cpustate->device->tag.cstr()));
cpustate->pending_irq = 1;
}
}