mirror of https://github.com/jscrane/r65emu.git
irq is uint8_t
This commit is contained in:
parent
66af4140f9
commit
e18c1fbfb9
2
CPU.h
2
CPU.h
|
@ -12,7 +12,7 @@ class CPU: public Checkpointable {
|
||||||
public:
|
public:
|
||||||
virtual void run(unsigned instructions) =0;
|
virtual void run(unsigned instructions) =0;
|
||||||
virtual void reset() =0;
|
virtual void reset() =0;
|
||||||
virtual void raise(int level) =0;
|
virtual void raise(uint8_t level) =0;
|
||||||
virtual char *status(char *buf, size_t n, bool hdr) =0;
|
virtual char *status(char *buf, size_t n, bool hdr) =0;
|
||||||
|
|
||||||
virtual void checkpoint(Stream &s) = 0;
|
virtual void checkpoint(Stream &s) = 0;
|
||||||
|
|
|
@ -24,7 +24,7 @@ void i8080::reset() {
|
||||||
_halted = false;
|
_halted = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void i8080::raise(int level) {
|
void i8080::raise(uint8_t level) {
|
||||||
if (flags.I) {
|
if (flags.I) {
|
||||||
flags.I = 0;
|
flags.I = 0;
|
||||||
_irq_pending = 0;
|
_irq_pending = 0;
|
||||||
|
|
4
i8080.h
4
i8080.h
|
@ -13,7 +13,7 @@ public:
|
||||||
|
|
||||||
void run(unsigned);
|
void run(unsigned);
|
||||||
void reset();
|
void reset();
|
||||||
void raise(int);
|
void raise(uint8_t);
|
||||||
char *status(char *buf, size_t n, bool hdr=false);
|
char *status(char *buf, size_t n, bool hdr=false);
|
||||||
|
|
||||||
void checkpoint(Stream &);
|
void checkpoint(Stream &);
|
||||||
|
@ -59,7 +59,7 @@ private:
|
||||||
} flags;
|
} flags;
|
||||||
uint8_t SR;
|
uint8_t SR;
|
||||||
};
|
};
|
||||||
int _irq_pending;
|
uint8_t _irq_pending;
|
||||||
PortDevice<i8080> *_ports;
|
PortDevice<i8080> *_ports;
|
||||||
|
|
||||||
void _op(uint8_t op);
|
void _op(uint8_t op);
|
||||||
|
|
|
@ -76,7 +76,7 @@ void r6502::restore(Stream &s)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void r6502::raise(int level) {
|
void r6502::raise(uint8_t level) {
|
||||||
if (level < 0)
|
if (level < 0)
|
||||||
nmi();
|
nmi();
|
||||||
else if (!P.bits.I)
|
else if (!P.bits.I)
|
||||||
|
|
2
r6502.h
2
r6502.h
|
@ -8,7 +8,7 @@ class Stream;
|
||||||
|
|
||||||
class r6502: public CPU {
|
class r6502: public CPU {
|
||||||
public:
|
public:
|
||||||
void raise(int);
|
void raise(uint8_t);
|
||||||
void reset();
|
void reset();
|
||||||
void run(unsigned);
|
void run(unsigned);
|
||||||
char *status(char *buf, size_t n, bool hdr=false);
|
char *status(char *buf, size_t n, bool hdr=false);
|
||||||
|
|
Loading…
Reference in New Issue