ppu: less magical lcdc constants
This commit is contained in:
parent
567756d6cc
commit
85ad140a2c
|
@ -64,7 +64,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void doEvent(unsigned char *const ifreg, const unsigned ly, const unsigned statReg, const unsigned lycReg) {
|
void doEvent(unsigned char *const ifreg, const unsigned ly, const unsigned statReg, const unsigned lycReg) {
|
||||||
if (((statReg_ | statReg) & 0x08) && (!(statReg_ & 0x40) || ly != lycReg_))
|
if (((statReg_ | statReg) & lcdstat_m0irqen) && (!(statReg_ & lcdstat_lycirqen) || ly != lycReg_))
|
||||||
*ifreg |= 2;
|
*ifreg |= 2;
|
||||||
|
|
||||||
statReg_ = statReg;
|
statReg_ = statReg;
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
#ifndef LCDDEF_H
|
||||||
|
#define LCDDEF_H
|
||||||
|
|
||||||
|
namespace gambatte {
|
||||||
|
|
||||||
|
enum { lcdc_bgen = 0x01,
|
||||||
|
lcdc_objen = 0x02,
|
||||||
|
lcdc_obj2x = 0x04,
|
||||||
|
lcdc_tdsel = 0x10,
|
||||||
|
lcdc_we = 0x20,
|
||||||
|
lcdc_en = 0x80 };
|
||||||
|
|
||||||
|
enum { lcdstat_lycflag = 0x04,
|
||||||
|
lcdstat_m0irqen = 0x08,
|
||||||
|
lcdstat_m1irqen = 0x10,
|
||||||
|
lcdstat_m2irqen = 0x20,
|
||||||
|
lcdstat_lycirqen = 0x40 };
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
File diff suppressed because it is too large
Load Diff
|
@ -19,6 +19,7 @@
|
||||||
#ifndef PPU_H
|
#ifndef PPU_H
|
||||||
#define PPU_H
|
#define PPU_H
|
||||||
|
|
||||||
|
#include "lcddef.h"
|
||||||
#include "video/ly_counter.h"
|
#include "video/ly_counter.h"
|
||||||
#include "video/sprite_mapper.h"
|
#include "video/sprite_mapper.h"
|
||||||
#include "gbint.h"
|
#include "gbint.h"
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue