/* konami VRCIII RC821 各レジスタは4bit write $8000 IRQ cpu clock count, bit0-3?? $9000 IRQ cpu clock count, bit4-7?? $a000 IRQ cpu clock count, bit8-11 $b000 IRQ cpu clock count, bit12-15 $c000 IRQ enable $d000 IRQ Acknowledge $f000 bit0-2 pagenumber at CPU address $8000-$bfff bit3 1: ROM address 0x1c000-0x1cfff map CPU address $c000-$cfff 0: IRQ status? at CPU address $c000-$cfff read $8000-$bfff 可変エリア, write $f000 bit0-2 $c000-$cfff 可変エリア, write $f000 bit3 $d000-$ffff 固定エリア, ROM address 0x1d000-0x1ffff */ board <- { mappernum = 73, cpu_rom = { size_base = 1 * mega, size_max = 1 * mega, banksize = 0x4000 }, ppu_rom= { size_base = 0, size_max = 0, banksize = 0x2000 }, ppu_ramfind = false, vram_mirrorfind = true }; function cpu_dump(d, pagesize, banksize) { for(local i = 0; i < pagesize - 1; i += 1){ cpu_write(d, 0xf000, i); cpu_read(d, 0x8000, banksize); } cpu_write(d, 0xf000, 1 << 3); cpu_read(d, 0xc000, banksize); } function program_initalize(d, cpu_banksize, ppu_banksize) { cpu_write(d, 0x8000, 0); cpu_command(d, 0, 0x8000, cpu_banksize); cpu_command(d, 0x2aaa, 0x8000, cpu_banksize); cpu_command(d, 0x5555, 0xc000, cpu_banksize); } function cpu_transfer(d, start, end, cpu_banksize) { for(local i = start; i < end - 1; i += 1){ cpu_write(d, 0xf000, i); cpu_program(d, 0x8000, cpu_banksize); } cpu_write(d, 0xf000, 1 << 3); cpu_program(d, 0xc000, cpu_banksize); } function ppu_transfer(d, start, end, ppu_banksize) {}