Page 1 of 1

"fcntl" libraries for the Amstrad CPC

Posted: Wed Apr 16, 2008 7:13 am
by stefano
The z88dk library structure is open to multiple fcntl interfaces.

The actual CPC one is for the tape support:
http://www.z88dk.org/wiki/doku.php/plat ... cpc_target

Does anybody have stuff for disk interfaces ?

Posted: Wed Apr 16, 2008 8:35 am
by Mochilote
stefano wrote:Does anybody have stuff for disk interfaces ?
-Loading a file
-Saving a file
-Firmware for Cas/Disc

I hope this can help,

Cheers.

Posted: Thu Apr 17, 2008 10:35 am
by stefano
So the existing fcntl library should be able to work on the disk interface too ?

Posted: Thu Apr 17, 2008 2:59 pm
by norecess
Don't know if it's related, as I said in a previous post I tried to load a file directly with some in-line ASM and I received the system message "Press play on tape". Looks like z88dk sets the system into a special mode at startup.

Posted: Fri Apr 18, 2008 5:29 am
by Mochilote
norecess wrote:Don't know if it's related, as I said in a previous post I tried to load a file directly with some in-line ASM and I received the system message "Press play on tape". Looks like z88dk sets the system into a special mode at startup.
It's not a problem in z88dk its a problem/feature in CPC Firmware. Try to load the binary with memory/load/call and it will work differently.

It seems that when you use run"binary the firmware resets part of its functionality (disable some roms like the amsdos). I solved this program using this method: http://www.cepece.info/amstrad/source/loader.html

You need to store the current drive, and call firmware mc_start_program, kl_rom_walk and then restore current drive, now you can read a file from disk correctly. I have use this without problems.

Cheers.

Posted: Mon Apr 21, 2008 2:17 pm
by norecess
Thank you Mochilote !

I currently did some work-around for my project (binding my data to my exe) but sure I will keep your code as a reference. I will have to use a file loader anyway, later.