laoo Posted July 21, 2021 Author Share Posted July 21, 2021 (edited) Yes, I've been working with this exact code. I compiled it by hand and it works without any problems on older LynxSD cartridge. On LynxGD opening file is fine, when I call LynxGD_ReadFile I manage to write the command and the count of bytes to read, but reading (probably) first byte hangs in loop waiting for non-zero AUDIN bit in IODAT. I've got LynxGD 1.04. So either it does not work at all or cc65 runtime is doing some required initialisations off stage. In that case ANY working example (although the simpler the better) of reading a file would be very helpful. Edited July 21, 2021 by laoo Quote Link to comment Share on other sites More sharing options...
Nop90 Posted August 2, 2021 Share Posted August 2, 2021 Sorry for the dalay, only now that I started my vacation I have some free time. Attached there is a working example. In a zip there are the sources, in the other a compiled test rom with the data file to be put in a folder names Saves in the root of the SD. You can't create a new file but you can open and read/write an existing one. testrom.zip testGD4.zip 1 Quote Link to comment Share on other sites More sharing options...
laoo Posted August 3, 2021 Author Share Posted August 3, 2021 @Nop90 Thank you. I've found out that (most probably) depending on opened file size there needs to be some delay after LynxGD_OpenFile and before LynxGD_ReadFile. It wasn't necessary on LynxSD but seems to be obligatory on LynxGD Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.