News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

CPCTelera support file handling?

Started by shifters74, 17:41, 23 November 19

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

shifters74

HI all,
Does CPCtelera support file handling i.e. the ability to read and write files on disk?  I have checked the docs, examples etc and can't find anything so i suspect not - any one more knowledgeable about this tool able to give me a firm answer?
cheers
shifters

Arnaud

Hi @shifters74,

CPCTelera have not  for now file support but here you can find read file function :
https://github.com/lronaldo/cpctelera/issues/50

Simply copy file cpct_loadBinaryfile.s in your source folder and add function declaration where you need :
extern u16 cpct_loadBinaryFile(const char *fileName, void *loadAddr);

If you need Write function, i can find it.

But be careful, to use it you need to have firmware active.

shifters74

#2
HI Arnaud,

a write function would be most helpful if you can provide one!

This is so i can code a read file and write file service for CPLink to and from the raspberry pi that is connected to it. See this thread http://www.cpcwiki.eu/forum/amstrad-cpc-hardware/cpc-cplink-a-coprocessor-interface-card-for-all-cpcs/

The aim is too provide services on the PI that the CPC can use through either basic, c, or asm.


Your help most appreciated!!

cheers
shifters
Oops forgot to say thanks for the read file code :-)  :doh:

Powered by SMFPacks Menu Editor Mod