View Single Post
Old 09 May 2020, 21:28   #4
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,660
Quote:
Originally Posted by MacSpain View Post
On 512+512 the game simply refuses to read any files after allocating memory for the arenas, and on 1 MB it loads small 10 kB files i use as logos for splash screen, but chokes on bigger, 30 KB files I use for intro graphics.
What does "refuses to read" or "chokes" mean in detail? You can open the file and get a valid file handle, but then fread() or Read() is returning zero-bytes read and/or an error code (which)?

There is "fread" in the subject, so I guess you're using fread() from a C-compiler's clib? Which?

Why using fread() in an Amiga game anyway? It certainly doesn't need to be portable. So dos.library Read() would be the better choice, without pulling all of the compiler's clib code into the executable and wasting a lot of memory.

Quote:
Is there some finicky memory stuff I have to keep in mind when planning to read files, or could it be a problem with adf?
I doubt that the ADF has anything to do with it. Did you try on real hardware?

Quote:
when I boot the game from exe in Workbench it works just fine,
Then I would debug and compare these two variants. Either by inserting an AvailMem() call just before the failing reads, or by setting a breakpoint and inspect the MemHeaders and memory lists manually.

Quote:
For building into adf I use exe2adf. http://www.exe2adf.com/
Toni suggested that you create the ADF without exe2adf, from within the emulation (format, copy). Might be worth a test, although I doubt it makes a difference.

Last edited by phx; 09 May 2020 at 21:31. Reason: s/with/without/
phx is offline  
 
Page generated in 0.05740 seconds with 11 queries