Reading from a file into memory

Do you live and breathe hexadecimal? Do you like speaking to hardware directly?

Moderator: Programming Moderators

Post Reply
User avatar
varmfskii
Posts: 183
Joined: Fri Jun 23, 2017 1:13 pm
Location: Albuquerque, NM USA

Reading from a file into memory

Post by varmfskii » Sun Mar 11, 2018 3:53 am

What are some efficient ways to read from a file into memory?
Backer #2741 - TS2068, Byte, ZX Evolution

User avatar
Timbucus
Posts: 223
Joined: Tue May 30, 2017 7:43 pm

Re: Reading from a file into memory

Post by Timbucus » Sun Mar 11, 2018 9:20 am

The most efficient way is to stream directly from the drive - if you look at the NextOS_API document in the docs directory of the 0.8A distribution there is a sample program stream.asm to use DISK_FILEMAP/STRMSTART and STRMEND - this could be used to speed up the initial load of a full 1Mb/2Mb game or even for live use during game running to bring in extra assets.
I'm Infinite Imaginations when not in work... PAWS for thought.

User avatar
varmfskii
Posts: 183
Joined: Fri Jun 23, 2017 1:13 pm
Location: Albuquerque, NM USA

Re: Reading from a file into memory

Post by varmfskii » Mon Mar 12, 2018 2:45 am

Thanks.
Backer #2741 - TS2068, Byte, ZX Evolution

Post Reply