A few more Stella cleanups

This commit is contained in:
CasualPokePlayer 2024-09-15 22:53:21 -07:00
parent 1b92d1080f
commit db11df3804
3 changed files with 6 additions and 7 deletions

View File

@ -8,7 +8,7 @@ namespace BizHawk.Emulation.Cores.Atari.Stella
public ControllerDefinition ControllerDefinition => _controllerDeck.Definition; public ControllerDefinition ControllerDefinition => _controllerDeck.Definition;
private bool _leftDifficultyToggled; private bool _leftDifficultyToggled;
private bool _rightDifficultyToggled; private bool _rightDifficultyToggled;
public bool FrameAdvance(IController controller, bool render, bool renderSound) public bool FrameAdvance(IController controller, bool render, bool renderSound)

View File

@ -6,12 +6,11 @@ namespace BizHawk.Emulation.Cores.Atari.Stella
{ {
public partial class Stella public partial class Stella
{ {
internal IMemoryDomains MemoryDomains; private IMemoryDomains MemoryDomains;
private uint _cartMemSize;
private void SetupMemoryDomains() private void SetupMemoryDomains()
{ {
_cartMemSize = Core.stella_get_cartram_size(); var cartMemSize = Core.stella_get_cartram_size();
var mainRamAddress = IntPtr.Zero; var mainRamAddress = IntPtr.Zero;
Core.stella_get_mainram_ptr(ref mainRamAddress); Core.stella_get_mainram_ptr(ref mainRamAddress);
@ -42,11 +41,11 @@ namespace BizHawk.Emulation.Cores.Atari.Stella
1) 1)
}; };
if (_cartMemSize > 0) if (cartMemSize > 0)
{ {
domains.Add(new MemoryDomainDelegate( domains.Add(new MemoryDomainDelegate(
"Cart Ram", "Cart Ram",
_cartMemSize, cartMemSize,
MemoryDomain.Endian.Little, MemoryDomain.Endian.Little,
addr => Core.stella_peek_cartram((uint)addr), addr => Core.stella_peek_cartram((uint)addr),
(addr, value) => Core.stella_poke_cartram((uint)addr, value), (addr, value) => Core.stella_poke_cartram((uint)addr, value),

View File

@ -31,7 +31,7 @@ namespace BizHawk.Emulation.Cores.Atari.Stella
var src = IntPtr.Zero; var src = IntPtr.Zero;
Core.stella_get_video(out var width, out var height, out _, ref src); Core.stella_get_video(out var width, out var height, out _, ref src);
BufferWidth = width; BufferWidth = width;
BufferHeight = height; BufferHeight = height;
if (_vidBuff.Length < BufferWidth * BufferHeight) if (_vidBuff.Length < BufferWidth * BufferHeight)