ppu: less magical lcdc constants

This commit is contained in:
MrWint 2019-05-25 19:29:59 +02:00
parent 567756d6cc
commit 85ad140a2c
5 changed files with 1279 additions and 1229 deletions

View File

@ -64,7 +64,7 @@ public:
}
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;
statReg_ = statReg;

View File

@ -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

View File

@ -19,6 +19,7 @@
#ifndef PPU_H
#define PPU_H
#include "lcddef.h"
#include "video/ly_counter.h"
#include "video/sprite_mapper.h"
#include "gbint.h"

Binary file not shown.