The mappers are almost the same, in fact I get the PPU correct with the 005.
So mapper 80 is:
Code: Select all
$7EFA,7EFB: PRG Reg 0 (8k @ $8000)
$7EFC,7EFD: PRG Reg 1 (8k @ $A000)
$7EFE,7EFF: PRG Reg 2 (8k @ $C000)
function cpu_dump(d, pagesize, banksize)
{
local i;
for(i = 0; i < pagesize - 2; i += 2){
cpu_write(d, 0x7efa, i);
cpu_write(d, 0x7efc, i | 1);
cpu_read(d, 0x8000, banksize * 2);
}
cpu_write(d, 0x7efe, i);
cpu_read(d, 0xc000, banksize * 2);
}
Code: Select all
$7EFA: [PPPP PP..] PRG Reg 0 (8k @ $8000)
$7EFB: [PPPP PP..] PRG Reg 1 (8k @ $A000)
$7EFC: [PPPP PP..] PRG Reg 2 (8k @ $C000)
It would be great if someone took the time one day to define all of these variables.
But im going to write my comments on this script on what i think is happening. Hopefully someone can correct me.
Code: Select all
for(i = 0; i < pagesize - 2; i += 2){ /* the total memory is 128k, i think the notes above mean that i can see 24k at one time. So would it mean i have 5 pages? but the +=2 seems to be counting banks.... */
cpu_write(d, 0x7efa, i); /* 2nd arg is the register, notes above dont really make it clear what has to be written to the register, maybe 1,2,3...? */
cpu_write(d, 0x7efc, i | 1); /* what is the OR 1 trying to do here?
cpu_read(d, 0x8000, banksize * 2); /* reading from 0x8000 and 0xA000? */
}
cpu_write(d, 0x7efe, i); /* ok this is the 3rd bank, but i seem no reason its not part of the page..is it always the same?
cpu_read(d, 0xc000, banksize * 2); /* reading from 0xC000 and beyond, i thought it would be *1 ? */
Code: Select all
function cpu_dump(d, pagesize, banksize)
{
local i;
for(i = 0; i < pagesize; i += 1){
cpu_write(d, 0x7efa, i<<2);
cpu_write(d, 0x7efb, i<<2);
cpu_write(d, 0x7efc, i<<2);
cpu_read(d, 0x8000, banksize * 3);
}
}