OSDN Git Service

ram dump 対応
[unagi/old-svn-converted.git] / client / trunk / anago / nintendo_unrom.af
1 board <- {
2         mappernum = 2, vram_mirrorfind = true, ppu_ramfind = false,
3         cpu_rom = {
4                 size_base = 1 * mega, size_max = 2 * mega,
5                 banksize = 0x4000
6         }, 
7         ppu_rom = {
8                 size_base = 0, size_max = 0,
9                 banksize = 0x2000
10         }
11 };
12
13 function cpu_dump(d, pagesize, banksize)
14 {
15         for(local i = 0; i < pagesize - 1; i += 1){
16                 cpu_write(d, 0x8000, i);
17                 cpu_read(d, 0x8000, banksize);
18         }
19         cpu_read(d, 0xc000, banksize);
20 }
21
22 /*
23 UNROM/UOROM programming notice
24 command address supports A10-A0 device. A14-A0 is not supported!
25 */
26 function program_initalize(d, cpu_banksize, ppu_banksize)
27 {
28         cpu_write(d, 0x8000, 0);
29         cpu_command(d, 0, 0x8000, cpu_banksize);
30         cpu_command(d, 0x02aa, 0xc000, cpu_banksize);
31         cpu_command(d, 0x0555, 0xc000, cpu_banksize);
32 }
33
34 function cpu_transfer(d, start, end, cpu_banksize)
35 {
36         for(local i = start; i < end - 1; i += 1){
37                 cpu_write(d, 0xe000, i);
38                 cpu_program(d, 0x8000, cpu_banksize);
39         }
40         cpu_program(d, 0xc000, cpu_banksize);
41 }
42
43 function ppu_transfer(d, start, end, ppu_banksize)
44 {
45 }