diff --git a/BizHawk.Emulation/Consoles/Nintendo/GBA/LibMeteor.cs b/BizHawk.Emulation/Consoles/Nintendo/GBA/LibMeteor.cs
index 392dbaf9e8..921fb8917d 100644
--- a/BizHawk.Emulation/Consoles/Nintendo/GBA/LibMeteor.cs
+++ b/BizHawk.Emulation/Consoles/Nintendo/GBA/LibMeteor.cs
@@ -116,13 +116,38 @@ namespace BizHawk.Emulation.Consoles.Nintendo.GBA
///
public enum MemoryArea : int
{
+ ///
+ /// BIOS, may be invalid if bios not loaded. valid size: 16K. system bus: @00000000h
+ ///
bios = 0,
+ ///
+ /// external workram. valid size: 256K. system bus: @02000000h
+ ///
ewram = 1,
+ ///
+ /// internal workram. valid size: 32K. system bus: @03000000h
+ ///
iwram = 2,
+ ///
+ /// palettes. valid size: 1K. system bus: @05000000h
+ ///
palram = 3,
+ ///
+ /// video ram. valid size: 96K. system bus: @06000000h
+ ///
vram = 4,
+ ///
+ /// sprite attribute ram. valid size: 1K. system bus: @07000000h
+ ///
oam = 5,
- rom = 6
+ ///
+ /// rom. always valid to full size, even if no rom or small rom loaded. valid size: 32M. system bus: @08000000h, others
+ ///
+ rom = 6,
+ ///
+ /// direct access to cached io port values. this should NEVER be modified! valid size: 4K. system bus: @04000000h (sort of)
+ ///
+ io = 7
}
///
diff --git a/BizHawk.MultiClient/output/dll/libmeteor.dll b/BizHawk.MultiClient/output/dll/libmeteor.dll
index a82296d79f..574aca3030 100644
Binary files a/BizHawk.MultiClient/output/dll/libmeteor.dll and b/BizHawk.MultiClient/output/dll/libmeteor.dll differ
diff --git a/libmeteor/cinterface.cpp b/libmeteor/cinterface.cpp
index 9432ae9422..66b2f93df8 100644
--- a/libmeteor/cinterface.cpp
+++ b/libmeteor/cinterface.cpp
@@ -144,7 +144,12 @@ EXPORT void libmeteor_loadbios(const void *data, unsigned size)
EXPORT uint8_t *libmeteor_getmemoryarea(int which)
{
- return AMeteor::_memory.GetMemoryArea(which);
+ if (which < 7)
+ return AMeteor::_memory.GetMemoryArea(which);
+ else if (which == 7)
+ return AMeteor::_io.GetIoPointer();
+ else
+ return NULL;
}
EXPORT int libmeteor_loadsaveram(const void *data, unsigned size)
diff --git a/libmeteor/include/ameteor/io.hpp b/libmeteor/include/ameteor/io.hpp
index 5f553c016c..c9b9e9222a 100644
--- a/libmeteor/include/ameteor/io.hpp
+++ b/libmeteor/include/ameteor/io.hpp
@@ -208,6 +208,9 @@ namespace AMeteor
bool SaveState (std::ostream& stream);
bool LoadState (std::istream& stream);
+ // this should be considered very dangerous to use
+ uint8_t* GetIoPointer() {return m_iomem;}
+
private :
uint8_t* m_iomem;
};