namco #19

スクリプトを 163 と 340 にわけてみました。163 で気になる点があります。

  • 内蔵RAMと内蔵音源のレジスタアドレスが重複するので、同時に使用することは出来ないはず。
  • 電池なしソフトは外部 RAM がついてないので、簡単に内蔵RAMを使用しているかが不明
  • 外部 RAM がついてるソフトは、内蔵音源使用率が高いが、そもそも QFP 163 を見つけた実例がないので、163 か不明
  • 電池あり、外部 RAM なしは音源を使ってないはず

まだまだ難しいですね。スクリプト内コメントの英語は適当に書いたので間違ってたらこっそり教えてくださいね。

namcot_19.ai

/*
iNES mapper #19

Many cartridges uses epoxies for ROM, RAM and mapper. Few cartridges 
uses discrete parts. Other functions are various though the memory 
mapping is common. 

The mistake of an old document is an etymology of 'namcot 106'. I have
seen mapper IC with 163 (well known chip), 129, 175 and 340 for #19. 
I have never seen labeled IC with '106'. 
'106' is informal virtual name, and the relic of old emulators. 
*/
function cpu_dump(d, pagesize, banksize)
{
	for(local i = 0; i < pagesize - 2; i += 2){
		cpu_write(d, 0xe000, i);
		cpu_write(d, 0xe800, i | 1);
		cpu_read(d, 0x8000, banksize * 2);
	}
	cpu_write(d, 0xf000, 0x3e);
	cpu_read(d, 0xc000, banksize * 2);
}

function ppu_dump(d, pagesize, banksize)
{
	cpu_write(d, 0xe800, 0xe0);
	for(local i = 0; i < pagesize; i += 8){
		local address = 0x8000;
		for(local j = 0; j < 8; j++){
			cpu_write(d, address, i | j);
			address += 0x0800;
		}
		ppu_read(d, 0, banksize * 8);
	}
}

namcot_163.ad

/*
No battery, no external RAM:
  Star Wars (129), Namco Classic, Youkai Douchuki, Final Lap, 
  Erika to Satoru no Yumebouken, Rolling Thunder, Dragon Ninja, 
  Mappy Kids

Battery-backuped Memory is used by an external RAM:
  Dokuganryu Masamune, Sangokushi, King of Kings, Juvei Quest,
  Megami Tensei II, Sangokushi II (uses IRQ)

Battery-backuped Memory is used by an internal RAM:
  Kaiju Monogatari, Mindseeker, Hydride3, Famista '90, Battle Fleet

The access to work RAM is not supported because there is a lot of 
uncertain information. 
*/
board <- {
	mappernum = 19, 
	cpu_rom = {
		size_base = 2 * mega, size_max = 2 * mega,
		banksize = 0x2000
	}, 
	ppu_rom = {
		size_base = 2 * mega, size_max = 2 * mega,
		banksize = 0x0400
	},
	ppu_ramfind = false,
	vram_mirrorfind = false
};
dofile("namcot_19.ai");

namcot_340.ad

/*
Namcot 175, 340

Most games has Program ROM (1M or 2M) and Chatcter ROM.
Family Circuit '91 has Program ROM(4M), Charcter ROM and external 
Battery Backuped WorkRAM.
*/
board <- {
	mappernum = 210, 
	cpu_rom = {
		size_base = 2 * mega, size_max = 4 * mega,
		banksize = 0x2000
	}, 
	ppu_rom = {
		size_base = 2 * mega, size_max = 2 * mega,
		banksize = 0x0400
	},
	ppu_ramfind = false,
	vram_mirrorfind = true //175 and 340 does not have register?
};
dofile("namcot_19.ai");