Mapper 30 4-screen (#10)

mapper 30 support for both 1-screen and 4-screen configurations (see: Black Box Challenge)
This commit is contained in:
Brad Smith 2018-06-05 02:17:38 -04:00 committed by GitHub
parent 211c7972a9
commit 9b6ff8fe49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 2 deletions

View File

@ -241,7 +241,23 @@ void UNROM512_Init(CartInfo *info) {
else
chrram_mask = 0x60;
SetupCartMirroring(info->mirror,(info->mirror>=MI_0)?0:1,0);
int mirror = (head.ROM_type & 1) | ((head.ROM_type & 8) >> 2);
switch (mirror)
{
case 0: // hard horizontal, internal
SetupCartMirroring(MI_H, 1, NULL);
break;
case 1: // hard vertical, internal
SetupCartMirroring(MI_V, 1, NULL);
break;
case 2: // switchable 1-screen, internal (flags: 4-screen + horizontal)
SetupCartMirroring(MI_0, 0, NULL);
break;
case 3: // hard four screen, last 8k of 32k RAM (flags: 4-screen + vertical)
SetupCartMirroring( 4, 1, VROM + (info->vram_size - 8192));
break;
}
bus_conflict = !info->battery;
latcheinit = 0;
WLSync = UNROM512LSync;