Script for namcot_108_3446 for Megami Tensei on kazoo

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

Moderator: Moderators

Post Reply
Pickle
Posts: 14
Joined: Sat Jul 04, 2015 9:08 am

Script for namcot_108_3446 for Megami Tensei on kazoo

Post by Pickle »

This was based on namcot_108_3433.ad. I made it for Megami Tensei which seems to be the only game to use this pcb type.
I named the script namcot_108_3446.ad

Code: Select all

/*
Namcot 108 Megami Tensei I
*/
board <- {
	mappernum = 76, vram_mirrorfind = true, ppu_ramfind = false,
	cpu_rom = {
		size_base = 0x20000, size_max = 1*mega,
		banksize = 0x2000
	},
	cpu_ram = {
		size_base = 0, size_max = 0, banksize = 0
	}
	ppu_rom = {
		size_base = 0x20000, size_max = 0x20000,
		banksize = 0x0800
	}
};

function cpu_dump(d, pagesize, banksize)
{
	for(local i = 0; i < pagesize - 2; i += 2){
		cpu_write(d, 0x8000, [6, i, 7, i+1]);
		cpu_read(d, 0x8000, banksize * 2);
	}
	cpu_read(d, 0xc000, banksize * 2);
}

function ppu_dump(d, pagesize, banksize)
{
	local i;
	
	for(i = 0; i < pagesize; i += 4){
		cpu_write(d, 0x8000, [2, i, 3, i+1, 4, i+2, 5, i+3]);
		ppu_read(d, 0x0000, banksize * 4);
	}
}
Post Reply