A7800Hawk: Fix pokey 0x450 detection
This commit is contained in:
parent
6f809de609
commit
fa7ac3d4c1
Assets/gamedb
src
BizHawk.Emulation.Common/Database
BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk
|
@ -150,7 +150,7 @@ md5:980c35ae9625773a450aa7ef51751c04 Scrapyard Dog A78 NTSC=true;board=1
|
|||
md5:53db322c201323fe2ca8f074c0a2bf86 Scrapyard Dog A78 PAL=true;board=1
|
||||
md5:b697d9c2d1b9f6cb21041286d1bbfa7f Sentinel A78 NTSC=true;board=1
|
||||
md5:5469b4de0608f23a5c4f98f331c9e75f Sentinel A78 PAL=true;board=1
|
||||
md5:9bd70c06d3386f76f8162881699a777a Serpentine A78 NTSC=true;board=1;RAM=16
|
||||
md5:9bd70c06d3386f76f8162881699a777a Serpentine A78 NTSC=true;board=1;RAM=16;Pokey_450=true
|
||||
md5:2d643ac548c40e58c99d0fe433ba4ba0 Sirius A78 NTSC=true;board=1;RAM=16
|
||||
md5:a84c1b2300fbfbf21b1c02387f613dad Space Duel A78 PAL=true;board=0
|
||||
md5:771cb4609347657f63e6f0eb26036e35 Space Duel A78 NTSC=true;board=0
|
||||
|
|
|
@ -30,8 +30,8 @@ namespace BizHawk.Emulation.Common
|
|||
FirmwareAndOption("91383B92745CC7CC4F15409AC5BC2C2F699A43F1", 163840, "SNES", "ST018", "st018.rom", "ST018 Rom");
|
||||
FirmwareAndOption("79F5FF55DD10187C7FD7B8DAAB0B3FFBD1F56A2C", 262144, "PCECD", "Bios", "pcecd-3.0-(J).pce", "Super CD Bios (J)");
|
||||
FirmwareAndOption("014881a959e045e00f4db8f52955200865d40280", 32768, "PCECD", "GE-Bios", "gecard.pce", "Games Express CD Card (Japan)");
|
||||
FirmwareAndOption("D9D134BB6B36907C615A594CC7688F7BFCEF5B43", 4096, "A78", "Bios_NTSC", "7800NTSCBIOS.bin", "NTSC Bios");
|
||||
//FirmwareAndOption("CE236581AB7921B59DB95BA12837C22F160896CB", 4096, "A78", "Bios_NTSC", "speed_bios.bin", "NTSC Bios speed");
|
||||
//FirmwareAndOption("D9D134BB6B36907C615A594CC7688F7BFCEF5B43", 4096, "A78", "Bios_NTSC", "7800NTSCBIOS.bin", "NTSC Bios");
|
||||
FirmwareAndOption("CE236581AB7921B59DB95BA12837C22F160896CB", 4096, "A78", "Bios_NTSC", "speed_bios.bin", "NTSC Bios speed");
|
||||
|
||||
FirmwareAndOption("5A140136A16D1D83E4FF32A19409CA376A8DF874", 16384, "A78", "Bios_PAL", "7800PALBIOS.bin", "PAL Bios");
|
||||
FirmwareAndOption("A3AF676991391A6DD716C79022D4947206B78164", 4096, "A78", "Bios_HSC", "7800highscore.bin", "Highscore Bios");
|
||||
|
|
|
@ -189,7 +189,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
|
|||
if (temp == 4)
|
||||
{
|
||||
// the pokey chip ticks at the nominal cpu speed, but is unaffected by cpu slowdown (I think)
|
||||
if (is_pokey)
|
||||
if (is_pokey || is_pokey_450)
|
||||
{
|
||||
pokey.Tick();
|
||||
temp_s_pokey = pokey.sample();
|
||||
|
|
|
@ -43,6 +43,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
|
|||
ser.Sync("pal kara", ref PAL_Kara);
|
||||
ser.Sync("Cart RAM", ref cart_RAM);
|
||||
ser.Sync(nameof(is_pokey), ref is_pokey);
|
||||
ser.Sync(nameof(is_pokey_450), ref is_pokey_450);
|
||||
ser.Sync(nameof(left_toggle), ref left_toggle);
|
||||
ser.Sync(nameof(right_toggle), ref right_toggle);
|
||||
ser.Sync(nameof(left_was_pressed), ref left_was_pressed);
|
||||
|
|
|
@ -41,6 +41,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
|
|||
public bool PAL_Kara = false;
|
||||
public int cart_RAM = 0;
|
||||
public bool is_pokey = false;
|
||||
public bool is_pokey_450 = false;
|
||||
|
||||
private readonly ITraceable _tracer;
|
||||
|
||||
|
@ -142,7 +143,6 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
|
|||
if (dict.ContainsKey("RAM"))
|
||||
{
|
||||
int.TryParse(dict["RAM"], out cart_RAM);
|
||||
Console.WriteLine(cart_RAM);
|
||||
}
|
||||
|
||||
if (dict.ContainsKey("Pokey"))
|
||||
|
@ -150,6 +150,11 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
|
|||
bool.TryParse(dict["Pokey"], out is_pokey);
|
||||
}
|
||||
|
||||
if (dict.ContainsKey("Pokey_450"))
|
||||
{
|
||||
bool.TryParse(dict["Pokey_450"], out is_pokey_450);
|
||||
}
|
||||
|
||||
// some games will not function with the high score bios
|
||||
// if such a game is being played, tell the user and disable it
|
||||
if (dict.ContainsKey("No_HS"))
|
||||
|
@ -187,8 +192,8 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
|
|||
{
|
||||
cart_RAM = 8;
|
||||
|
||||
// the homebrew game serpentine requires extra RAM, seems to use bit 6 to indicate this
|
||||
if (cart_2.Bit(6))
|
||||
// the homebrew game serpentine requires extra RAM, but in the alternative style
|
||||
if (hash_md5 == "md5:9BD70C06D3386F76F8162881699A777A")
|
||||
{
|
||||
cart_RAM = 16;
|
||||
}
|
||||
|
@ -200,6 +205,9 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
|
|||
}
|
||||
|
||||
if (cart_2.Bit(0)) { is_pokey = true; }
|
||||
|
||||
// the homebrew game serpentine requires the pokey chip to be available at the alternative location 0x450
|
||||
if (cart_2.Bit(6)) { is_pokey_450 = true; }
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using BizHawk.Common;
|
||||
using BizHawk.Common.NumberExtensions;
|
||||
using System;
|
||||
|
||||
namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
|
||||
{
|
||||
|
@ -28,6 +29,14 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
|
|||
{
|
||||
return Core._hsbios[addr - 0x3000];
|
||||
}
|
||||
else if (Core.is_pokey_450 && (addr >= 0x450) && (addr < 0x480))
|
||||
{
|
||||
if (addr < 0x460)
|
||||
{
|
||||
return Core.pokey.ReadReg(addr & 0xF);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
return Core.RAM[0x800 + addr & 0x7FF];
|
||||
}
|
||||
|
@ -112,6 +121,13 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
|
|||
if (addr >= 0x3000 && Core._hsbios != null)
|
||||
{
|
||||
}
|
||||
else if (Core.is_pokey_450 && (addr >= 0x450) && (addr < 0x480))
|
||||
{
|
||||
if (addr < 0x460)
|
||||
{
|
||||
Core.pokey.WriteReg(addr & 0xF, value);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Core.RAM[0x800 + addr & 0x7FF] = value;
|
||||
|
|
Loading…
Reference in New Issue