2015-01-13 19:55:36 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
using BizHawk.Emulation.Common;
|
|
|
|
|
|
|
|
|
|
namespace BizHawk.Emulation.Cores.Sega.Saturn
|
|
|
|
|
{
|
2015-01-14 21:55:48 +00:00
|
|
|
|
public partial class Yabause
|
2015-01-13 19:55:36 +00:00
|
|
|
|
{
|
2015-01-14 21:55:48 +00:00
|
|
|
|
private IMemoryDomains _memoryDomains;
|
2015-01-13 19:55:36 +00:00
|
|
|
|
|
|
|
|
|
private void InitMemoryDomains()
|
|
|
|
|
{
|
|
|
|
|
var ret = new List<MemoryDomain>();
|
|
|
|
|
var nmds = LibYabause.libyabause_getmemoryareas_ex();
|
|
|
|
|
foreach (var nmd in nmds)
|
|
|
|
|
{
|
|
|
|
|
int l = nmd.length;
|
|
|
|
|
IntPtr d = nmd.data;
|
2015-02-22 15:19:38 +00:00
|
|
|
|
ret.Add(MemoryDomain.FromIntPtr(nmd.name, nmd.length, MemoryDomain.Endian.Little, nmd.data, true, 4));
|
2015-01-13 19:55:36 +00:00
|
|
|
|
}
|
|
|
|
|
|
2015-01-13 21:46:28 +00:00
|
|
|
|
// main memory is in position 2
|
2015-01-24 16:02:28 +00:00
|
|
|
|
_memoryDomains = new MemoryDomainList(ret);
|
|
|
|
|
_memoryDomains.MainMemory = _memoryDomains["Work Ram Low"];
|
|
|
|
|
|
2015-01-14 21:55:48 +00:00
|
|
|
|
(ServiceProvider as BasicServiceProvider).Register<IMemoryDomains>(_memoryDomains);
|
2015-01-13 19:55:36 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|