nesdev.com
http://forums.nesdev.com/

Script for namcot_108_3446 for Megami Tensei on kazoo
http://forums.nesdev.com/viewtopic.php?f=9&t=15330
Page 1 of 1

Author:  Pickle [ Mon Jan 02, 2017 5:24 pm ]
Post subject:  Script for namcot_108_3446 for Megami Tensei on kazoo

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:
/*
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);
   }
}

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/