Implement solar sensor processing

This commit is contained in:
Raphaël Zumer
2019-12-10 17:43:25 -05:00
parent 9128517b90
commit f6cd66e5b1
2 changed files with 70 additions and 16 deletions

View File

@ -43,6 +43,14 @@ void Write32(u32 addr, u32 val);
namespace GBACart
{
struct GPIO
{
bool has_solar_sensor;
u16 data;
u16 direction;
u16 control;
};
extern bool CartInserted;
extern u8* CartROM;
extern u32 CartROMSize;
@ -59,4 +67,15 @@ void WriteGPIO(u32 addr, u16 val);
}
namespace GBACart_SolarSensor
{
extern u8 LightLevel;
void Reset();
void Process(GBACart::GPIO* gpio);
}
#endif // GBACART_H