It is currently Thu Oct 18, 2018 12:49 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Tue Jan 16, 2018 12:57 pm 
Offline

Joined: Thu May 19, 2005 11:30 am
Posts: 672
I've got three J.Y. Company multicart ROM images that use some variation of mapper 90/209/211. The variation lies in what register $D003 does.

Regular mappers 90/209/211: Used by all single-game releases, as well as the 1998 Super 45-in-1 multicart (JY-120A, Mapper 90). Register $D003:
Code:
 7654 3210
 ---- ----
 M.BC CPPC
 | || |||+- Select 256 KiB outer CHR-ROM bank if M==0
 | || |++-- Select 512/1024 KiB outer PRG-ROM bank
 | |+-+---- Select 512/1024 KiB outer CHR-ROM bank
 | +------- CHR Banking Mode
 |          0=Use outer 256 KiB CHR-ROM bank, masking off the regular CHR bank registers' bits ($9000-$AFFF) that select 256 KiB+ bank numbers
 |          1=Do not use outer 256 KiB CHR-ROM bank; use the regular CHR bank registers' bits ($9000-$AFFF) unmasked
 +--------- MMC2/4 Mode (effective in 4 KiB CHR banking mode, ignored otherwise)
            0=Do not automatically change CHR banks
            1=Automatically change CHR banks when encountering CHR tiles $FD and $FE (same as Nintendo MMC2/4)
Extended Mirroring is always off for Mapper 90, always on for Mapper 211, and selectable for Mapper 209 by register $D000 bit 5. Final Fight 3, Shin Samurai Spirits II and Tekken 2 all set bit 5 to select 256 KiB+ CHR-ROM banks directly, indicating that they are running on hardware that otherwise would mask off the higher-order CHR bank register bits and replace them with the outer bank.

Variation 1: Used by the 1997 Super HIK 4-in-1 multicart (JY-052), which has 512 KiB each of PRG-ROM and CHR-ROM. A single bit in register D003 selects both PRG and CHR outer banks:
Code:
 7654 3210
 ---- ----
 .... ...C
         +- Select 256 KiB outer PRG-ROM bank
         +- Select 256 KiB outer CHR-ROM bank
PRG ($8000-$8FFF) and CHR ($9000-$AFFF) bank select register bits that select 256 KiB banks are masked off. Extended Mirroring is selected by register $D001 (Mirroring) bit 3.

Variation 2: Used the 1997 Super HIK 21-in-1 multicart (JY-105), which has 1 MiB each of PRG-ROM and CHR-ROM, and the 1998 Super HIK 5-in-1 multicart (JY-114), also 1 MiB each of PRG/CHR. Like regular mappers 90/209/211, except that the outer PRG-ROM bank is 256 KiB in size, and Extended Mirroring is selected differently. Register $D003:
Code:
 7654 3210
 ---- ----
 .... CPPC
      |||+- Select 256 KiB outer CHR-ROM bank
      |++-- Select 256/512 KiB outer PRG-ROM bank
      +---- Select 512 KiB outer CHR-ROM bank
PRG ($8000-$8FFF) and CHR ($9000-$AFFF) bank select register bits that select 256 KiB banks are masked off. Extended Mirroring is selected by register $D001 (Mirroring) bit 3, as in Variation 1.

The 1997 Super HIK 4-in-1 multicart (Variation 1) is already in GoodNES 3.23b, tagged as Mapper 90, and to my knowledge does not run in any emulator other than Nestopia Plus which identifies it by CRC. The others were dumped by CaH4e3, who permits release of them once they're emulated. I can assign two submappers of mapper 209 (not 90 since Extended Mirroring is selectable) and write one of those dreaded test ROMs, or assign two entirely new NES 2.0 mapper numbers in the 256-511 range. Which one is preferred?


Top
 Profile  
 
PostPosted: Tue Jan 16, 2018 1:27 pm 
Online

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7661
Location: Seattle
I tentatively think that submappers were originally intended for "here are two boards that are mostly-but-not-completely-compatible and have been historically emulated using the same code" ...

But that's clearly not true for mapper 78, where I don't think there's a robust way to detect which board variant is desired.

I think I'd lean towards allocating a new mapper number.


Top
 Profile  
 
PostPosted: Tue Jan 16, 2018 4:49 pm 
Offline

Joined: Mon Dec 12, 2011 8:15 pm
Posts: 427
NewRisingSun wrote:
I've got three J.Y. Company multicart ROM images that use some variation of mapper 90/209/211. The variation lies in what register $D003 does.

Regular mappers 90/209/211: Used by all single-game releases, as well as the 1998 Super 45-in-1 multicart (JY-120A, Mapper 90). Register $D003:
Code:
 7654 3210
 ---- ----
 M.BC CPPC
 | || |||+- Select 256 KiB outer CHR-ROM bank if M==0
 | || |++-- Select 512/1024 KiB outer PRG-ROM bank
 | |+-+---- Select 512/1024 KiB outer CHR-ROM bank
 | +------- CHR Banking Mode
 |          0=Use outer 256 KiB CHR-ROM bank, masking off the regular CHR bank registers' bits ($9000-$AFFF) that select 256 KiB+ bank numbers
 |          1=Do not use outer 256 KiB CHR-ROM bank; use the regular CHR bank registers' bits ($9000-$AFFF) unmasked
 +--------- MMC2/4 Mode (effective in 4 KiB CHR banking mode, ignored otherwise)
            0=Do not automatically change CHR banks
            1=Automatically change CHR banks when encountering CHR tiles $FD and $FE (same as Nintendo MMC2/4)
Extended Mirroring is always off for Mapper 90, always on for Mapper 211, and selectable for Mapper 209 by register $D000 bit 5. Final Fight 3, Shin Samurai Spirits II and Tekken 2 all set bit 5 to select 256 KiB+ CHR-ROM banks directly, indicating that they are running on hardware that otherwise would mask off the higher-order CHR bank register bits and replace them with the outer bank.

Variation 1: Used by the 1997 Super HIK 4-in-1 multicart (JY-052), which has 512 KiB each of PRG-ROM and CHR-ROM. A single bit in register D003 selects both PRG and CHR outer banks:
Code:
 7654 3210
 ---- ----
 .... ...C
         +- Select 256 KiB outer PRG-ROM bank
         +- Select 256 KiB outer CHR-ROM bank
PRG ($8000-$8FFF) and CHR ($9000-$AFFF) bank select register bits that select 256 KiB banks are masked off. Extended Mirroring is selected by register $D001 (Mirroring) bit 3.

Variation 2: Used the 1997 Super HIK 21-in-1 multicart (JY-105), which has 1 MiB each of PRG-ROM and CHR-ROM, and the 1998 Super HIK 5-in-1 multicart (JY-114), also 1 MiB each of PRG/CHR. Like regular mappers 90/209/211, except that the outer PRG-ROM bank is 256 KiB in size, and Extended Mirroring is selected differently. Register $D003:
Code:
 7654 3210
 ---- ----
 .... CPPC
      |||+- Select 256 KiB outer CHR-ROM bank
      |++-- Select 256/512 KiB outer PRG-ROM bank
      +---- Select 512 KiB outer CHR-ROM bank
PRG ($8000-$8FFF) and CHR ($9000-$AFFF) bank select register bits that select 256 KiB banks are masked off. Extended Mirroring is selected by register $D001 (Mirroring) bit 3, as in Variation 1.

The 1997 Super HIK 4-in-1 multicart (Variation 1) is already in GoodNES 3.23b, tagged as Mapper 90, and to my knowledge does not run in any emulator other than Nestopia Plus which identifies it by CRC. The others were dumped by CaH4e3, who permits release of them once they're emulated. I can assign two submappers of mapper 209 (not 90 since Extended Mirroring is selectable) and write one of those dreaded test ROMs, or assign two entirely new NES 2.0 mapper numbers in the 256-511 range. Which one is preferred?

JY ROM, I DUMP have more variations.


Top
 Profile  
 
PostPosted: Wed Jan 17, 2018 1:14 am 
Online

Joined: Tue Feb 14, 2017 9:50 am
Posts: 91
Can you be more specific, please?


Top
 Profile  
 
PostPosted: Wed Jan 17, 2018 3:24 pm 
Offline

Joined: Thu May 19, 2005 11:30 am
Posts: 672
The last mapper number that krzysiobal has assigned is 280. I am therefore assigning mapper numbers 281 and 282 for these two variants. Attached find a Nintendulator emulation source.

Related question: If someone could tell me which J.Y. Company game actually uses Mapper 90/209/211's feature of putting PRG-ROM in the $6000-$7FFF range, and in which game situation, it would be much appreciated.


Attachments:
mapper090.cpp [10.86 KiB]
Downloaded 60 times
Top
 Profile  
 
PostPosted: Wed Jan 17, 2018 4:11 pm 
Offline

Joined: Mon Dec 12, 2011 8:15 pm
Posts: 427
case 281:
name = "BMC NEWSTAR 12-IN-1/76-IN-1";

k.....

PRG-ROM: 512 kB (hovewer A19 is wired to the EPROM)
CHR-RAM: 8 kB

[mvPP .P..] 74*174: $8000-$bfff
|||| |
||++--+--- outer PRG (high to low: D0, D5, D4)
|+-------- mode (0=16kB, 1=32kB)
+--------- mirroring (0=V, 1=H)

[.... uppp] 74*161: $8000-$9fff and $c000-$dfff
||||
|+++- inner PRG
+---- mode (0=UNROM,1=NROM)
yes, it overlaps partially with previous reg, so when wring at $8000-$9fff, botch registers are updated

Power up: both registers set to 0
Reset: no change

PRG Modes:

uv $8000 $bfff
----------------
00 PPPppp PPP111
01 PPPpp0 PPP111
10 PPPppp PPPppp
11 PPPpp0 PPPpp1
------------------------------------

#include "mapinc.h"

static uint8 reg174, reg161;

//shifts bit at position `from` to position `to` in expression
#define shi(exp, from, to) ((((exp) >> (from)) & 1) << (to))

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

static void Sync(void) {
int uv = shi(reg161, 3, 1) | shi(reg174, 6, 0);
int PPP = shi(reg174, 0, 2) | shi(reg174, 5, 1) | shi(reg174, 4, 0);
int ppp = reg161 & 0x7;

switch (uv) {
case 0: setprg16(0x8000, (PPP << 3) | ppp); setprg16(0xc000, (PPP << 3) | 7); break;
case 1: setprg16(0x8000, ((PPP << 3) | ppp) & (~1)); setprg16(0xc000, (PPP << 3) | 7); break;
case 2: setprg16(0x8000, (PPP << 3) | ppp); setprg16(0xc000, (PPP << 3) | ppp); break;
case 3: setprg32(0x8000, ((PPP << 3) | ppp) >> 1); break;
}
setmirror(((reg174 >> 7) & 1) == 0 ? MI_V : MI_H);

}

static DECLFW(M281Write) {
if ((A >= 0x8000) && (A <= 0xBFFF)) {
reg174 = V;
}
if (((A >= 0x8000) && (A <= 0x9FFF)) || ((A >= 0xC000) && (A <= 0xFFFF))) {
reg161 = V;
}
Sync();
}

static void M281Power(void) {
setchr8(0);
reg174 = reg161 = 0;
SetWriteHandler(0x8000, 0xffff, M281Write);
SetReadHandler(0x8000, 0xFFFF, CartBR);
Sync();
}

static void M281Reset(void) {
Sync();
}


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

void Mapper281_Init(CartInfo *info) {
info->Power = M281Power;
info->Reset = M281Reset;

GameStateRestore = StateRestore;

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


Top
 Profile  
 
PostPosted: Wed Jan 17, 2018 11:39 pm 
Offline

Joined: Thu May 19, 2005 11:30 am
Posts: 672
I suggest that instead of assigning mapper numbers for your new dumps secretly, you announce them in a way that people can know about them, either by making a forum post or a nesdev wiki stub. I am not changing my assignment of 281.


Top
 Profile  
 
PostPosted: Thu Jan 18, 2018 5:52 am 
Offline

Joined: Mon Dec 12, 2011 8:15 pm
Posts: 427
NewRisingSun wrote:
I suggest that instead of assigning mapper numbers for your new dumps secretly, you announce them in a way that people can know about them, either by making a forum post or a nesdev wiki stub. I am not changing my assignment of 281.


I am not changing. rom test,to public!

282-500,have rom.


Top
 Profile  
 
PostPosted: Thu Jan 18, 2018 1:37 pm 
Offline

Joined: Thu May 19, 2005 11:30 am
Posts: 672
As I have just written, the ROM that I have assigned to Mapper 281 has been out there for a long time as part of the GoodNES 3.23b set as "1997 Super HIK 4-in-1 (JY-052) [p1][!]". So no, you are not the first one to publicly release a ROM image for this mapper.

I intend to assign "BMC NEWSTAR 12-IN-1/76-IN-1" to Mapper 293. Since Nestopia Plus identifies ROM images by CRC32 anyway, it should make no difference when using either ROM image.


Top
 Profile  
 
PostPosted: Thu Jan 18, 2018 1:55 pm 
Offline

Joined: Sun Jun 12, 2011 12:06 pm
Posts: 396
Location: Poland
As far as I remember, the 45-in-1 mapper 90 variation is not 100% compatible with what is shown in nesdev.com (I implemented it in hardware and it worked for signle mapper-90 games but not for 45-in-1). Then I had to see in FCEUX source code what's really going on (as far as I remember upper CHR-lines were used as PRG lines or something that)


Top
 Profile  
 
PostPosted: Thu Jan 18, 2018 2:03 pm 
Offline

Joined: Thu May 19, 2005 11:30 am
Posts: 672
The first description of my initial post is based on the FCEUX source code and runs all single games as well as 45-in-1. I agree that it needs to be incorporated into the wiki.

The two Mapper 282 ROMs are now available at the, uh, usual place.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group