A7800: more Pokey fixes, should sound correct now
This commit is contained in:
parent
c8bb21ab38
commit
f91c14e42e
|
@ -58,10 +58,14 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
|
|||
int temp_addr = addr - 0x8000;
|
||||
return Core._rom[temp_addr + (bank + 1) * 0x4000];
|
||||
}
|
||||
else if (Core.is_pokey)
|
||||
{
|
||||
return Core.pokey.ReadReg(addr & 0xF);
|
||||
}
|
||||
else
|
||||
{
|
||||
// return the 16k extra ROM (located at beginning of file)
|
||||
int temp_addr = addr - 0x4000;
|
||||
// return the 16k extra ROM (located at beginning of file)
|
||||
int temp_addr = addr - 0x4000;
|
||||
return Core._rom[temp_addr];
|
||||
}
|
||||
}
|
||||
|
@ -105,6 +109,10 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
|
|||
{
|
||||
bank = (byte)(value & 0x7);
|
||||
}
|
||||
else if (Core.is_pokey)
|
||||
{
|
||||
Core.pokey.WriteReg(addr & 0xF, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -152,10 +152,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
|
|||
{
|
||||
if (clock_ch[0])
|
||||
{
|
||||
if ((ch_div[0] + 1) >= (Regs[0 * 2] + 1))
|
||||
{
|
||||
clock_ch[1] = true;
|
||||
}
|
||||
clock_ch[1] = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -176,10 +173,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
|
|||
{
|
||||
if (clock_ch[2])
|
||||
{
|
||||
if ((ch_div[2] + 1) >= (Regs[2 * 2] + 1))
|
||||
{
|
||||
clock_ch[3] = true;
|
||||
}
|
||||
clock_ch[3] = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -205,7 +199,19 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
|
|||
{
|
||||
ch_div[i]++;
|
||||
|
||||
if (ch_div[i] >= (Regs[i * 2] + 1))
|
||||
int test = (Regs[i * 2] + 1);
|
||||
|
||||
if ((i == 1) && Regs[8].Bit(4))
|
||||
{
|
||||
test = Regs[i * 2] * 256 + Regs[0] + 1;
|
||||
}
|
||||
|
||||
if ((i == 3) && Regs[8].Bit(3))
|
||||
{
|
||||
test = Regs[i * 2] * 256 + Regs[2] + 1;
|
||||
}
|
||||
|
||||
if (ch_div[i] >= test)
|
||||
{
|
||||
ch_div[i] = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue