mirror of
https://github.com/libretro/gambatte-libretro.git
synced 2024-11-23 07:49:48 +00:00
Update mem headers
This commit is contained in:
parent
6376ce6a41
commit
fe96309c23
@ -31,10 +31,10 @@ namespace gambatte
|
||||
class Cartridge
|
||||
{
|
||||
public:
|
||||
Cartridge();
|
||||
void setStatePtrs(SaveState &);
|
||||
void saveState(SaveState &) const;
|
||||
void loadState(const SaveState &);
|
||||
Cartridge();
|
||||
|
||||
const unsigned char * rmem(unsigned area) const
|
||||
{
|
||||
@ -46,6 +46,11 @@ namespace gambatte
|
||||
return memptrs.wmem(area);
|
||||
}
|
||||
|
||||
unsigned char * vramdata() const
|
||||
{
|
||||
return memptrs.vramdata();
|
||||
}
|
||||
|
||||
unsigned char * romdata(unsigned area) const
|
||||
{
|
||||
return memptrs.romdata(area);
|
||||
@ -71,11 +76,21 @@ namespace gambatte
|
||||
return memptrs.wsrambankptr();
|
||||
}
|
||||
|
||||
unsigned char * vrambankptr() const
|
||||
{
|
||||
return memptrs.vrambankptr();
|
||||
}
|
||||
|
||||
OamDmaSrc oamDmaSrc() const
|
||||
{
|
||||
return memptrs.oamDmaSrc();
|
||||
}
|
||||
|
||||
void setVrambank(unsigned bank)
|
||||
{
|
||||
memptrs.setVrambank(bank);
|
||||
}
|
||||
|
||||
void setWrambank(unsigned bank)
|
||||
{
|
||||
memptrs.setWrambank(bank);
|
||||
|
@ -56,6 +56,16 @@ namespace gambatte
|
||||
return wmem_[area];
|
||||
}
|
||||
|
||||
unsigned char * vramdata() const
|
||||
{
|
||||
return rambankdata_ - 0x4000;
|
||||
}
|
||||
|
||||
unsigned char * vramdataend() const
|
||||
{
|
||||
return rambankdata_;
|
||||
}
|
||||
|
||||
unsigned char * romdata() const
|
||||
{
|
||||
return memchunk_ + 0x4000;
|
||||
@ -106,6 +116,11 @@ namespace gambatte
|
||||
return wsrambankptr_;
|
||||
}
|
||||
|
||||
unsigned char * vrambankptr() const
|
||||
{
|
||||
return vrambankptr_;
|
||||
}
|
||||
|
||||
OamDmaSrc oamDmaSrc() const
|
||||
{
|
||||
return oamDmaSrc_;
|
||||
@ -114,6 +129,7 @@ namespace gambatte
|
||||
void setRombank0(unsigned bank);
|
||||
void setRombank(unsigned bank);
|
||||
void setRambank(bool enableRam, bool rtcActive, unsigned rambank);
|
||||
void setVrambank(unsigned bank) { vrambankptr_ = vramdata() + bank * 0x2000ul - 0x8000; }
|
||||
void setWrambank(unsigned bank);
|
||||
void setOamDmaSrc(OamDmaSrc oamDmaSrc);
|
||||
|
||||
@ -122,16 +138,20 @@ namespace gambatte
|
||||
unsigned char *wmem_[0x10];
|
||||
unsigned char *romdata_[2];
|
||||
unsigned char *wramdata_[2];
|
||||
unsigned char *vrambankptr_;
|
||||
unsigned char *rsrambankptr_;
|
||||
unsigned char *wsrambankptr_;
|
||||
unsigned char *memchunk_;
|
||||
unsigned char *rambankdata_;
|
||||
unsigned char *rdisabledRam_;
|
||||
unsigned char *wdisabledRam_;
|
||||
unsigned char *wramdataend_;
|
||||
OamDmaSrc oamDmaSrc_;
|
||||
MemPtrs(const MemPtrs &);
|
||||
MemPtrs & operator=(const MemPtrs &);
|
||||
void disconnectOamDmaAreas();
|
||||
unsigned char * rdisabledRamw() const { return wramdataend_ ; }
|
||||
unsigned char * wdisabledRam() const { return wramdataend_ + 0x2000; }
|
||||
};
|
||||
|
||||
inline bool isCgb(const MemPtrs &memptrs)
|
||||
|
Loading…
Reference in New Issue
Block a user