So theres a script already for Taito X1-005 (mapper 80) so I need to adapt it to Taito X1-017 (mapper 82).
The mappers are almost the same, in fact I get the PPU correct with the 005.
So mapper 80 is:
mapper 82 is:
Ive got a crude understanding of kazoo scripts (enough to do damage), but this one has me confused.
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.
So clearly the registers should be 0x7efa, 0x7efb, 0x7efc, i dont understand what is written for the P's. Just an incrementing index?
The mappers are almost the same, in fact I get the PPU correct with the 005.
So mapper 80 is:
Code:
$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);
}
$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);
}
mapper 82 is:
Code:
$7EFA: [PPPP PP..] PRG Reg 0 (8k @ $8000)
$7EFB: [PPPP PP..] PRG Reg 1 (8k @ $A000)
$7EFC: [PPPP PP..] PRG Reg 2 (8k @ $C000)
$7EFB: [PPPP PP..] PRG Reg 1 (8k @ $A000)
$7EFC: [PPPP PP..] PRG Reg 2 (8k @ $C000)
Ive got a crude understanding of kazoo scripts (enough to do damage), but this one has me confused.
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:
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 ? */
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 ? */
So clearly the registers should be 0x7efa, 0x7efb, 0x7efc, i dont understand what is written for the P's. Just an incrementing index?
Code:
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);
}
}
{
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);
}
}