--- In mattelaquarius@yahoogroups.com, "harroldspier" <harrold.spier@...> wrote:
>
> I believe PACMR (and other games) use some kind of init code to copy the
application to a fixed location. If you disassembly the binary code of a game,
they all start with the same code sequence:
>
... snap
>
> Regards,
> Harrold
>
Funny, the procedure within z88dk that produces the CAQ file for the array has a
similar procedure, but it has been disabled.
You can find the file aquarius.c in the folder z88dk\src\appmake
Maybe if you enable this piece of code then it will work?
/* Mattel games loader relocator */
/*
writebyte(0x2A,fpout); // ld hl,(14552)
writeword(14552,fpout);
writebyte(0x23,fpout); // inc hl
writebyte(0x23,fpout); // inc hl
writebyte(0x4e,fpout); // ld c,(hl)
writebyte(0x23,fpout); // inc hl
writebyte(0x46,fpout); // ld b,(hl)
writebyte(0x11,fpout); // le de,67
writeword(67,fpout);
writebyte(0x19,fpout); // add hl,de
writebyte(0xe5,fpout); // push hl
writebyte(0xc5,fpout); // push bc
writebyte(0xe1,fpout); // pop hl
writebyte(0xb7,fpout); // or a
writebyte(0xed,fpout); // sbc hl,de
writebyte(0x52,fpout);
writebyte(0xe5,fpout); // push hl
writebyte(0xc1,fpout); // pop bc
writebyte(0xe1,fpout); // pop hl
writebyte(0x23,fpout); // inc hl
writebyte(0x7e,fpout); // ld a,(hl)
writebyte(0xb7,fpout); // or a
writebyte(0x28,fpout); // jr z,-4
writebyte(0xfb,fpout);
writebyte(0x11,fpout); // ld de,14768
writeword(14768,fpout);
writebyte(0xed,fpout); // ldir
writebyte(0xb0,fpout);
for (i=1;i<=41;i++)
writebyte(0,fpout);
*/
Regs
Martin