TurboCD progress

This commit is contained in:
beirich 2011-06-19 03:27:18 +00:00
parent 3a8721f600
commit a659c05b21
2 changed files with 60 additions and 10 deletions

View File

@ -4,18 +4,53 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
{
public partial class PCEngine
{
private byte[] CdIoPorts = new byte[16];
private void WriteCD(int addr, byte value)
{
switch (addr & 0x1FFF)
{
case 0x1807:
case 0x1802: // ADPCM / CD Control
CdIoPorts[2] = value;
break;
case 0x1804: // CD Reset Command
CdIoPorts[4] = value;
break;
case 0x1807: // BRAM Unlock
if (BramEnabled && (value & 0x80) != 0)
{
Console.WriteLine("UNLOCK BRAM!");
BramLocked = false;
}
break;
case 0x180B: // ADPCM DMA Control
CdIoPorts[0x0B] = value;
Console.WriteLine("Write to ADPCM DMA Control [B]");
// TODO... there is DMA to be done
break;
case 0x180D: // ADPCM Address Control
CdIoPorts[0x0D] = value;
Console.WriteLine("Write to ADPCM Address Control [D]");
break;
case 0x180E: // ADPCM Playback Rate
CdIoPorts[0x0E] = value;
Console.WriteLine("Write to ADPCM Address Control [E]");
break;
case 0x180F: // Audio Fade Timer
CdIoPorts[0x0F] = value;
Console.WriteLine("Write to CD Audio fade timer [F]");
// TODO: hook this up to audio system);
break;
default:
Console.WriteLine("unknown write to {0:X4}:{1:X2}",addr, value);
break;
}
}
@ -23,15 +58,27 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
{
switch (addr & 0x1FFF)
{
case 0x1803:
case 0x1802: // ADPCM / CD Control
return CdIoPorts[2];
case 0x1803: // BRAM Lock
if (BramEnabled)
{
Console.WriteLine("LOCKED BRAM!");
BramLocked = true;
}
break;
return CdIoPorts[3];
case 0x1804: // CD Reset
return CdIoPorts[4];
case 0x180F: // Audio Fade Timer
return CdIoPorts[0x0F];
default:
Console.WriteLine("unknown read to {0:X4}", addr);
return 0xFF;
}
return 0xFF;
}
}
}

View File

@ -2010,7 +2010,7 @@ FFD92458 Body Conquest II PCE
599EAD9B Bonk's Adventure PCE
64301FF1 Bonk's Revenge PCE
9913A9DE Bonk 3 - Bonk's Big Adventure PCE
605BE213 Boxy Boy PCE
605BE213 Boxy Boy PCE BRAM
CCA08B02 Bravoman PCE
C9D7426A Break In PCE
0D766139 Bubblegum Crash PCE
@ -2018,9 +2018,11 @@ C9D7426A Break In PCE
D233C05A Burning Angels PCE
47AFE6D7 Bloody Wolf PCE
BB0B3AEF Cadash PCE
3F9F95A4 CD-ROM System V1.00 (J) PCE
D634D931 CD-ROM System V2.00 (U) PCE
283B74E0 CD-ROM System V2.10 (J) PCE
3F9F95A4 CD-ROM System Card V1.00 (J) PCE BRAM
FF2A5EC3 CD-ROM System Card V2.00 (U) PCE BRAM
283B74E0 CD-ROM System Card V2.10 (J) PCE BRAM
6D9A73EF CD-ROM Super System Card V3.00 (J) PCE BRAM
2B5B75FE CD-ROM Super System Card V3.00 (U) PCE BRAM
9EDC0AEA Champion Wrestler PCE
15EE889A Champions Forever Boxing PCE
6F4FD790 Chase HQ (J) PCE
@ -2081,7 +2083,7 @@ E749A22C Gokuraku Chuka Taisen PCE
4BD38F17 Gomola Speed PCE
0517DA65 Gradius PCE
FAE0FC60 Order of the Griffon PCE
F370B58E Gunboat PCE
F370B58E Gunboat PCE BRAM
A17D4D7E Gunhed PCE
BA4D0DD4 Hana Taka Daka PCE
BF3E2CC7 Hani in the Sky PCE
@ -2158,7 +2160,7 @@ BB4429B6 Paranoia PCE
E6458212 Parasol Stars PCE
647718F9 Parodius PCE
740491C2 PC Denjin - Punkic Cyborgs PCE
4938B8BB Populous PCE
4938B8BB Populous PCE BRAM
25E0F6E9 Power Drift PCE
BE8B6E3B Power Gate PCE
04A85769 Power League PCE
@ -2234,6 +2236,7 @@ B77F2E2F Zero 4 Champ PCE
67AAB7A1 Zipang PCE
DA9A2DC9 V Battle Royale (bad dump) PCE
7AA9D4DC V Blazing Lazers (bad dump) PCE
D634D931 V CD-ROM System V2.00 (U) (bad dump) PCE
AC4DFBE5 V Darkwing Duck (bad dump) PCE
4F8AEA16 V Davis Cup Tennis (bad dump) PCE
F9C3EFD4 V Dungeon Explorer (bad dump) PCE