Page 1 of 1

c128 fast execution

Posted: Wed Apr 14, 2021 5:57 pm
by oflor
Hi:

In c128 native mode, I modify the loader program to execute the z88dk program in FAST mode.

In the VICE emulator it work as spected. But on a real C128 all hangs and nothing is executed.

Anyone know why it occurs?

Thanks to All and
Best Regards

Re: c128 fast execution

Posted: Fri May 07, 2021 9:00 am
by Fabrizio
Yes, I have the same experience. I think it worked even in Z64K.
In order to gain a bit of time I also disable the Vic-IIe.
By the way, Vice is not very accurate. Z64K provides better C128 (and VDC) emulation.

I see that the C128 programs take some time to start. I wonder what the loader is doing. Is it copying the whole binary in a different location?

Re: c128 fast execution

Posted: Fri May 07, 2021 8:17 pm
by stefano
No. the loader simply switches to the new CPU and jumps.
There could be something in the data allocation setup, though. Nothing which I'd expect to differ between the different targets, though.. perhaps the Z80 on the c128 runs VERY slowly.

Re: c128 fast execution

Posted: Fri May 07, 2021 8:28 pm
by Fabrizio
@stefano, the problem is that binaries compiled with Z88DK for the C128 take 1000 times or more more time to start (i.e. seconds for large binaries). It seems to depend on the size of the binary.

Re: c128 fast execution

Posted: Fri May 07, 2021 8:54 pm
by oflor
I see that the loader program upload from disk the program before execute it.

Thats will take time on large program because of the disk uploading procedure.

I don't see on z88dk in native c128 mode, as is on other compilers, that have a bootstrap basic program. This is made with a auxiliar program with name _ldr.