PCB K-3017 128K UNROM+same games.

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderator: Moderators

Post Reply
zxbdragon
Posts: 498
Joined: Mon Dec 12, 2011 8:15 pm

PCB K-3017 128K UNROM+same games.

Post by zxbdragon »

PCB K-3017 128K UNROM+same games.
128K Contra

other games ,is 512K or 1024K?

write 9F00+k*0x4,dump 8000-BFFF 16K,
data is 512K?
20180113141111.jpg
20180113141118.jpg
User avatar
krzysiobal
Posts: 1037
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland
Contact:

Re: PCB K-3017 128K UNROM+same games.

Post by krzysiobal »

Please brighter photo of bottom and photo from more angles of top.
User avatar
krzysiobal
Posts: 1037
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland
Contact:

Re: PCB K-3017 128K UNROM+same games.

Post by krzysiobal »

Where pin 6 is connected to?
Attachments
pin6.PNG
zxbdragon
Posts: 498
Joined: Mon Dec 12, 2011 8:15 pm

Re: PCB K-3017 128K UNROM+same games.

Post by zxbdragon »

20180114024946.jpg
User avatar
krzysiobal
Posts: 1037
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland
Contact:

Re: PCB K-3017 128K UNROM+same games.

Post by krzysiobal »

Image Image Image

Code: Select all

This cartridge switches between UNROM-128 and NROM mode every reset.

1. UNRO-128 MODE
PRG-ROM: 128 kB (using DIL28 memory)
CHR-RAM: 8 kB
Mirroring: vertical
Subject to bus conflicts: yes

When in UNROM-128 mode, it behaves exactly as mapper 2 (one UNROM game is stored
in DIL28 128 kB mask ROM).

2. NROM
PRG-ROM: 512 kB (using DIL32 memory)
CHR-RAM: 8 kB
Subject to bus conflicts for NROM: yes

When in NROM mode, there is one register at $8000-$ffff, written data does not matter
[1... .... wppp ppmv] 
           |||| ||||
           |||| |||+- mode select: 0=16K, 1=32K
           |||| ||+-- mirroring: 0=V, 1=H
           |+++-++--- PRG bank
           +--------- CHR-RAM write protection (1=enabled)

wv $8000 $c000
--------------
00 ppppp p0000
01 pppp0 p0000
10 ppppp ppppp
11 pppp0 pppp1

Interesting feature is that when w=0, c000 is always mapped to bank p000. This will allow the menu routine that is responsible for transferring CHR data from PRG-ROM to CHR-RAM to be placed here, instead of executing it from RAM, as almost every other multicart does.


---


#include "mapinc.h"
	
static uint8 reg;
static uint8 mode; //0=unrom,1nrom

static SFORMAT StateRegs[] =
{
	{ 0 }
};

static void Sync(void) {
	if (mode == 0) {
		setmirror(MI_V);
		setprg16(0x8000, 512/16 + reg);
		setprg16(0xC000, 512/16 + 7);
	}
	else {
		int p = (reg >> 2) & 0x1F;
		setmirror(((reg >> 1) & 1) ? MI_H : MI_V);
		switch ((((reg >> 7) & 1) << 1) | (((reg >> 0) & 1) << 0)) {
		case 0:
			setprg16(0x8000, p);
			setprg16(0xc000, p & 0x10);
			break;
		case 1:
			setprg16(0x8000, p & ~1);
			setprg16(0xc000, p & 0x10);
			break;
		case 2:
			setprg16(0x8000, p);
			setprg16(0xc000, p);
			break;
		case 3:
			setprg32(0x8000, p >> 1);
			break;
		}
	
	}
	
}

static DECLFW(M280Write) {
	if (mode == 0) {
		reg = V & 7;
	}
	else {
		reg = A & 0xFF;
	}
	Sync();
}

static void M280Power(void) {
	reg = 0;
	mode = 0;
	setchr8(0);
	SetWriteHandler(0x8000, 0xffff, M280Write);
	SetReadHandler(0x8000, 0xFFFF, CartBR);
	Sync();
}

static void M280Reset(void) {
	mode ^= 1;
	reg = 0;
	Sync();
}


static void StateRestore(int version) {
	Sync();
}

void Mapper280_Init(CartInfo *info) {
	info->Power = M280Power;
	info->Reset = M280Reset;
	
	GameStateRestore = StateRestore;

	AddExState(&StateRegs, ~0, 0, 0);
}


zxbdragon
Posts: 498
Joined: Mon Dec 12, 2011 8:15 pm

Re: PCB K-3017 128K UNROM+same games.

Post by zxbdragon »

thank you!!
User avatar
aquasnake
Posts: 515
Joined: Fri Sep 13, 2019 11:22 pm

Re: PCB K-3017 128K UNROM+same games.

Post by aquasnake »

A variant of mapper #242
Post Reply