4 Many cartridges uses epoxies for ROM, RAM and mapper. Few cartridges
\r
5 uses discrete parts. Other functions are various though the memory
\r
8 The mistake of an old document is an etymology of 'namcot 106'. I have
\r
9 seen mapper IC with 163 (well known chip), 129, 175 and 340 for #19.
\r
10 I have never seen labeled IC with '106'.
\r
11 '106' is informal virtual name, and the relic of old emulators.
\r
13 function cpu_dump(d, pagesize, banksize)
\r
15 for(local i = 0; i < pagesize - 2; i += 2){
\r
16 cpu_write(d, 0xe000, i);
\r
17 cpu_write(d, 0xe800, i | 1);
\r
18 cpu_read(d, 0x8000, banksize * 2);
\r
20 cpu_write(d, 0xf000, 0x3e);
\r
21 cpu_read(d, 0xc000, banksize * 2);
\r
24 function ppu_dump(d, pagesize, banksize)
\r
26 cpu_write(d, 0xe800, 0xe0);
\r
27 for(local i = 0; i < pagesize; i += 8){
\r
28 local address = 0x8000;
\r
29 for(local j = 0; j < 8; j++){
\r
30 cpu_write(d, address, i | j);
\r
33 ppu_read(d, 0, banksize * 8);
\r
37 function program_initalize(d, cpu_banksize, ppu_banksize)
\r
39 cpu_command(d, 0x0000, 0xa000, cpu_banksize);
\r
40 cpu_command(d, 0x2aaa, 0x8000, cpu_banksize);
\r
41 cpu_command(d, 0x5555, 0xa000, cpu_banksize);
\r
42 cpu_write(d, 0xe000, 0x41);
\r
43 cpu_write(d, 0xe800, 0xe2);
\r
45 ppu_command(d, 0x0000, 0x0000, ppu_banksize);
\r
46 ppu_command(d, 0x2aaa, 0x0400, ppu_banksize);
\r
47 ppu_command(d, 0x5555, 0x0800, ppu_banksize);
\r
48 cpu_write(d, 0x8000, 0x00);
\r
49 cpu_write(d, 0x8800, 0x0a);
\r
50 cpu_write(d, 0x9000, 0x15);
\r
51 //map 0x2000-0x2fff is RAM
\r
52 cpu_write(d, 0xc000, 0xe0);
\r
53 cpu_write(d, 0xc800, 0xe0);
\r
54 cpu_write(d, 0xd000, 0xe1);
\r
55 cpu_write(d, 0xd800, 0xe1);
\r
58 function cpu_transfer(d, start, end, cpu_banksize)
\r
60 for(local i = start; i < end - 1; i += 1){
\r
61 cpu_write(d, 0xf000, i | 0xe0);
\r
62 cpu_program(d, 0xc000, cpu_banksize);
\r
64 cpu_program(d, 0xe000, cpu_banksize)
\r
67 function ppu_transfer(d, start, end, ppu_banksize)
\r
69 for(local i = start; i < end; i += 4){
\r
70 cpu_write(d, 0xa000, i);
\r
71 cpu_write(d, 0xa800, i | 1);
\r
72 cpu_write(d, 0xb000, i | 2);
\r
73 cpu_write(d, 0xb800, i | 3);
\r
74 ppu_program(d, 0x1000, ppu_banksize * 4);
\r