doomhack / GBADoom

A port of prBoom to the Nintendo GBA.
182 stars 25 forks source link

GBA Micro compatibility #5

Closed GValiente closed 4 years ago

GValiente commented 4 years ago

This new release (1.6) crashes on my GBA Micro with a message saying than Z_Malloc is trying to allocate A LOT of memory.

I'm not sure if it is related to the new WRAM timings, but previous versions worked OK.

If the game is crashing because I'm using a GBA Micro, it would be nice if for each release 2 GBA would be provided: the fast one and the compatible one (well, and another one for old flash cards compatibility).

Kippykip commented 4 years ago

Just tested this myself earlier too and can confirm it doesn't work on the GBA Micro. Even when reverting the REG_WAITCNT change, it does work on my GBA SP however!

EDIT: The error being Z_Malloc: Failure trying to allocate 3954180104 bytes

Kippykip commented 4 years ago

Alright I found commit causing the problem! https://github.com/doomhack/GBADoom/commit/7d7646f31e48199346919db36238490816c8bd3d

I guess the undocumented 2/2/4 WRAM wait states modes were removed in the Micro hardware?

GValiente commented 4 years ago

You can setup the fastest REG_WAITCNT timings if your flash card supports them, it's the WRAM overclock what must be giving problems.

Kippykip commented 4 years ago

Yeah REG_WAITCNT is fine as is, its the other one I mentioned in the commit

doomhack commented 4 years ago

Fixed. It was worth a try!