If I do individual sprites or models, it seems to be working fine (example in file first). But, then I try to load more files and things go haywire (second and third screenshots). Either I get
Unresolved Exception Excode=0000000Ah
or GPU timeout
and then the app stops responding.I've tried different things:
- First I thought it was due to memory allocation issue, so I've read about
InitHeap3
, malloc3
, tried including mmgmnew.obj
, played around with different heap values or not freeing the memory, but that didn't help- Originally I was planning on allocating and setting up primitives (
SPRT
, POLY_GT3
, DR_TPAGE
, etc) upon startup (cause redoing it every frame just looks incorrect), but that didn't work. All that is visible in my previous commit here https://github.com/rafalgrodzinski/psx- ... 13ee2a1d30. The examples I saw used pre-allocated primitives buffer and set up primitives in each frame, so I've tried that as well (that's my latest attempt, visible in the main branch).- I've tried reading up documentation, examples, or if someone came across similar issue, but I haven't managed to find anything that would help me.
- I thought that could be something to do with frame init/draw/buffer swap, so I played around with those, but that hasn't helped either
- Maybe there is something incorrect with my makefile or some configuration, but I'm not really sure
All the code is available in my github https://github.com/rafalgrodzinski/psx-playground. In
main.c
I've played around with loading different things, displaying them in different order, etc, so it's a little bit messy. I'm mostly suspecting the memory being overwritten somewhere, but I'm not sure how to check it further.I'm quite new to PSX development so I'm not sure if there is some bug in the toolchain, I made a silly typo, or I misunderstand something at a fundamental level. I'm kind a at my wits end here. Any help is appreciated