Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buffered file reading #34

Open
dbeef opened this issue Apr 19, 2020 · 1 comment
Open

Buffered file reading #34

dbeef opened this issue Apr 19, 2020 · 1 comment

Comments

@dbeef
Copy link

dbeef commented Apr 19, 2020

First of all, great job in recreating the original engine - I appreciate technologies used, namely CMake and SDL. This is why I could easily cross compile your engine to PSP using psptoolchain.

Problem is, PSP has 32, and in later models, 64 MB of RAM, thus causing throwing bad alloc when loading the AGG file which is around 40 MB (loading program into memory already takes 19 MB).

Do you plan creating a buffered file reader, so to not load whole AGG file into memory, but rather chunk-by-chunk? It would make this memory spike when loading assets much smaller, thus actually allowing to play on memory constrained platforms.

@dbeef
Copy link
Author

dbeef commented Apr 19, 2020

After removing LOTS of assets from the AGG file (to reclaim RAM) and some editing of your sources, I was actually able to run fheroes2enh on PSP emulator:

image

Though, there are some problems when running on a real device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant