PCB 09-078 128K Games+other game

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 09-078 128K Games+other game

Post by zxbdragon »

this pcb 256K

128K contra
128K other game

but in emu menu is 128K
init_001.png
init_001.png (1.67 KiB) Viewed 2751 times
in hardware menu is contra
20180104225423.jpg
why?
Attachments
20180104225136.jpg
20180104225130.jpg
User avatar
krzysiobal
Posts: 1037
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland
Contact:

Re: PCB 09-078 128K Games+other game

Post by krzysiobal »

Maybe ROM content is different than actual version of hardware? Maybe emu is not 100% accurate with hardware.
Provide ROM to download so we can investigate.
User avatar
krzysiobal
Posts: 1037
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland
Contact:

Re: PCB 09-078 128K Games+other game

Post by krzysiobal »

This one works, but this is a little bit tricky, because it needs the register to be 001000 on powerup, while the hardware resets it to 000000 on powerup.

Code: Select all

/* FCE Ultra - NES/Famicom Emulator
 *
 * Copyright notice for this file:
 *  Copyright (C) 2012 CaH4e3
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#include "mapinc.h"
	
static uint8 reg;

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

// Bus conflicts: no
// $8000-$ffff: [..wm Pppv]
//                 || ||||
//                 || |+++- 16 kB PRG-bank (lowest bit ignored in NROM 32K mode)
//                 || |  +- mode select (0=NROM 32K, 1= NROM 16K)
//                 || +---- 128 kB ROM select (0=first 128kb, 1=second 128kb)
//                 || +---- mode select (0=UNROM, 1=NROM)
//                 |+------ mirroring (0=V, 1=H)
//                 +------- write protection of this register (1=protected)

// On Power up: [0000 1000]
// On reset value is not changed

// Pv $8000-$bfff $c000-$dfff
// 0x   ppv          111      UROM
// 10  1pp0         1pp1      NROM 16k
// 11  1ppp         1ppp      NROM 32k

static void Sync(void) {
	if (((reg >> 3) & 1) == 0) {
		setprg16(0x8000, reg & 7);
		setprg16(0xc000, 7);
	}
	else {
		if ((reg & 1) == 0) {
			setprg32(0x8000, (reg & 15) >> 1);
		}
		else {
			setprg16(0x8000, reg & 15);
			setprg16(0xc000, reg & 15);
		}
	}
	
		setmirror(((reg >> 4) & 1) ^ 1);
}

static DECLFW(M277Write) {
	if (((reg >> 5) & 1) == 0) {
		reg = V & 0x3F;	
	}
	
	Sync();
}

static void M277Power(void) {
	reg = 8;
	
	setchr8(0);
	SetWriteHandler(0x8000, 0xFFFF, M277Write);
	SetReadHandler(0x8000, 0xFFFF, CartBR);
	Sync();
}

static void M277Reset(void) {
	reg = 0;
	Sync();
}


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

void Mapper277_Init(CartInfo *info) {
	info->Power = M277Power;
	info->Reset = M277Reset;
	
	GameStateRestore = StateRestore;

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

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

Re: PCB 09-078 128K Games+other game

Post by zxbdragon »

krzysiobal wrote:This one works, but this is a little bit tricky, because it needs the register to be 001000 on powerup, while the hardware resets it to 000000 on powerup.

Code: Select all

/* FCE Ultra - NES/Famicom Emulator
 *
 * Copyright notice for this file:
 *  Copyright (C) 2012 CaH4e3
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#include "mapinc.h"
	
static uint8 reg;

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

// Bus conflicts: no
// $8000-$ffff: [..wm Pppv]
//                 || ||||
//                 || |+++- 16 kB PRG-bank (lowest bit ignored in NROM 32K mode)
//                 || |  +- mode select (0=NROM 32K, 1= NROM 16K)
//                 || +---- 128 kB ROM select (0=first 128kb, 1=second 128kb)
//                 || +---- mode select (0=UNROM, 1=NROM)
//                 |+------ mirroring (0=V, 1=H)
//                 +------- write protection of this register (1=protected)

// On Power up: [0000 1000]
// On reset value is not changed

// Pv $8000-$bfff $c000-$dfff
// 0x   ppv          111      UROM
// 10  1pp0         1pp1      NROM 16k
// 11  1ppp         1ppp      NROM 32k

static void Sync(void) {
	if (((reg >> 3) & 1) == 0) {
		setprg16(0x8000, reg & 7);
		setprg16(0xc000, 7);
	}
	else {
		if ((reg & 1) == 0) {
			setprg32(0x8000, (reg & 15) >> 1);
		}
		else {
			setprg16(0x8000, reg & 15);
			setprg16(0xc000, reg & 15);
		}
	}
	
		setmirror(((reg >> 4) & 1) ^ 1);
}

static DECLFW(M277Write) {
	if (((reg >> 5) & 1) == 0) {
		reg = V & 0x3F;	
	}
	
	Sync();
}

static void M277Power(void) {
	reg = 8;
	
	setchr8(0);
	SetWriteHandler(0x8000, 0xFFFF, M277Write);
	SetReadHandler(0x8000, 0xFFFF, CartBR);
	Sync();
}

static void M277Reset(void) {
	reg = 0;
	Sync();
}


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

void Mapper277_Init(CartInfo *info) {
	info->Power = M277Power;
	info->Reset = M277Reset;
	
	GameStateRestore = StateRestore;

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

thank you ,but batte city enter game have bug. in fc not have.
zxbdragon
Posts: 498
Joined: Mon Dec 12, 2011 8:15 pm

Re: PCB 09-078 128K Games+other game

Post by zxbdragon »

movie
Attachments
6-in-1 (Unl,09-078) .rar
(69.65 KiB) Downloaded 112 times
User avatar
krzysiobal
Posts: 1037
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland
Contact:

Re: PCB 09-078 128K Games+other game

Post by krzysiobal »

thank you ,but batte city enter game have bug. in fc not have.
It is something with your emulator graphics. I dont see any flickering.

---

Image Image Image

Ok, I think I 100% rev-ed this board. The register is on power up set to 0, but inverted CPU-D3 is latched, that's why I had quite troubles at beginning. In emulation (and analysis) it is the same as assuming that it is set to 8 on powerup.

---

This PCB contains 2 x 128kB mask roms. T
* The first one (marked as 100007C) contains UNROM game.
* The second one contains 5 games: 2 SUPER MERRY BROTHERS (SMB), 3 SUPER FANCY BROTHER, 4 ARKANOID, 5 BATTLE CITY, 6 1989 GALAGA + menu. SUPER FANCY BROTHER is just regular SMB with horizontal mirroring.
The menu has hardcoded CRCs for 5 games - sum of last 256 bytes of PRG's game modulo 256:
*Contra (value $d1)
*Life Force (value $6f)
*1943 (value $a4)
*Ruslin Attack (value $84)
*Jackal (value $05)
This multicart was probably sold in different versions (different game sets - they just changed the first mask rom).
After power-up, it switches for a moment to the UNROM memory and calculates its CRC. If it is one of the 5 known games, it displays its name. If it is none of the above (or mapper is not completely supported in emu), it displays just 128K


The PCB has even two solder-jumpers to select mirroring for the UNROM game

Code: Select all

Layout of memory (each letter=16kB Block) 
0123456789abcdef
||||||||||||||||
||||||||||||||++-----------PRG: Arkanoid (32 kB)
||||||||||||++-------------PRG: SMB (32 kB)
|||||||||||+---------------PRG: Galaga (16 kB)
||||||||||+----------------CHR: SMB + Arkanoid
|||||||||+-----------------PRG: Battle City (16 kB)
||||||||+------------------CHR: Battle City + Galaga
++++++++-------------------UNROM game (first chip)
Menu is encoded into Battle-City prg (and uses Battle City CHR)

Bus conflicts: yes

$8000-$ffff: [..wm Pppv]  Value on Power up: 8, on reset value is not changed
                || ||||
                || |+++- 16 kB PRG-bank (lowest bit ignored in NROM 32K mode, fixed to in in NROM 16K mode)
                || |  +- mode select (0=NROM 32K, 1= NROM 16K)
                || +---- 128 kB ROM select: 0=first 128kb [with UNROM game), 1=second 128kb
                || +---- mode select (0=UNROM, 1=NROM)
                |+------ mirroring (0=V, 1=H)
                +------- write protection of this register (active when w==1 && P == 1), so
                         write protection does not work in UNROM game


Pv|$8000-$bfff|$c000-$dfff|comment
--+-----------+-----------+--------
0x|   0ppv    |   0111    |UROM
10|   1pp0    |   1pp1    |NROM 32k
11|   1pp1    |   1pp1    |NROM 16k

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

Re: PCB 09-078 128K Games+other game

Post by zxbdragon »

krzysiobal wrote:
thank you ,but batte city enter game have bug. in fc not have.
It is something with your emulator graphics. I dont see any flickering.

---

Image Image Image

Ok, I think I 100% rev-ed this board. The register is on power up set to 0, but inverted CPU-D3 is latched, that's why I had quite troubles at beginning. In emulation (and analysis) it is the same as assuming that it is set to 8 on powerup.

---

This PCB contains 2 x 128kB mask roms. T
* The first one (marked as 100007C) contains UNROM game.
* The second one contains 5 games: 2 SUPER MERRY BROTHERS (SMB), 3 SUPER FANCY BROTHER, 4 ARKANOID, 5 BATTLE CITY, 6 1989 GALAGA + menu. SUPER FANCY BROTHER is just regular SMB with horizontal mirroring.
The menu has hardcoded CRCs for 5 games - sum of last 256 bytes of PRG's game modulo 256:
*Contra (value $d1)
*Life Force (value $6f)
*1943 (value $a4)
*Ruslin Attack (value $84)
*Jackal (value $05)
This multicart was probably sold in different versions (different game sets - they just changed the first mask rom).
After power-up, it switches for a moment to the UNROM memory and calculates its CRC. If it is one of the 5 known games, it displays its name. If it is none of the above (or mapper is not completely supported in emu), it displays just 128K


The PCB has even two solder-jumpers to select mirroring for the UNROM game

Code: Select all

Layout of memory (each letter=16kB Block) 
0123456789abcdef
||||||||||||||||
||||||||||||||++-----------PRG: Arkanoid (32 kB)
||||||||||||++-------------PRG: SMB (32 kB)
|||||||||||+---------------PRG: Galaga (16 kB)
||||||||||+----------------CHR: SMB + Arkanoid
|||||||||+-----------------PRG: Battle City (16 kB)
||||||||+------------------CHR: Battle City + Galaga
++++++++-------------------UNROM game (first chip)
Menu is encoded into Battle-City prg (and uses Battle City CHR)

Bus conflicts: yes

$8000-$ffff: [..wm Pppv]  Value on Power up: 8, on reset value is not changed
                || ||||
                || |+++- 16 kB PRG-bank (lowest bit ignored in NROM 32K mode, fixed to in in NROM 16K mode)
                || |  +- mode select (0=NROM 32K, 1= NROM 16K)
                || +---- 128 kB ROM select: 0=first 128kb [with UNROM game), 1=second 128kb
                || +---- mode select (0=UNROM, 1=NROM)
                |+------ mirroring (0=V, 1=H)
                +------- write protection of this register (active when w==1 && P == 1), so
                         write protection does not work in UNROM game


Pv|$8000-$bfff|$c000-$dfff|comment
--+-----------+-----------+--------
0x|   0ppv    |   0111    |UROM
10|   1pp0    |   1pp1    |NROM 32k
11|   1pp1    |   1pp1    |NROM 16k

thank you~,this cart ok.
I try to add nestopia,and dump new pcb rom.
Post Reply