diff --git a/libxenon/drivers/xb360/xb360.c b/libxenon/drivers/xb360/xb360.c index 23bb9017..a82de1c0 100644 --- a/libxenon/drivers/xb360/xb360.c +++ b/libxenon/drivers/xb360/xb360.c @@ -660,3 +660,11 @@ unsigned int xenon_get_kv_offset() return ret; return 0; } + +unsigned int xenon_get_ram_size() +{ + // 0xE1040000 is the host bridge register where HWINIT stores a little endian uint32 + // representing the amount of memory (in bytes) installed on the system. CB_B looks + // here to determine whether or not to throw panic 0xAF (UNSUPPORTED_RAM_SIZE) + return __builtin_bswap32(*(unsigned int *)0xE1040000); +} \ No newline at end of file diff --git a/libxenon/drivers/xb360/xb360.h b/libxenon/drivers/xb360/xb360.h index 16c749a4..8fc09174 100644 --- a/libxenon/drivers/xb360/xb360.h +++ b/libxenon/drivers/xb360/xb360.h @@ -119,6 +119,8 @@ unsigned int xenon_get_DVE(); unsigned int xenon_get_PCIBridgeRevisionID(); unsigned int xenon_get_CPU_PVR(); unsigned int xenon_get_XenosID(); +unsigned int xenon_get_ram_size(); + int xenon_get_console_type(void); int xenon_get_logical_nand_data(void* buf, unsigned int offset, unsigned int len);