"fcntl" libraries for the Amstrad CPC

Amstrad CPC and NC systems
Post Reply
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

"fcntl" libraries for the Amstrad CPC

Post 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 ?
Mochilote
Member
Posts: 42
Joined: Thu Jul 19, 2007 10:54 am

Post 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.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

So the existing fcntl library should be able to work on the disk interface too ?
norecess
Member
Posts: 73
Joined: Thu Mar 20, 2008 12:58 am

Post 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.
Mochilote
Member
Posts: 42
Joined: Thu Jul 19, 2007 10:54 am

Post 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.
norecess
Member
Posts: 73
Joined: Thu Mar 20, 2008 12:58 am

Post 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.
Post Reply