Forget what I just wrote, I wrong.
I'm pretty sure OP's question was about ROMs using BIOS.
In this old thread about Zombie Incident, nenefranz states that ld sp,$F380
was causing issues with the Sony HB-F500, and ld sp,(HIMEM)
fixed those issues.
I remember that I had issues with ld sp,(HIMEM) too, so these days I use a fixed conservative ld sp,0xE000
If the stack can't be placed that low for whatever reason, it means that the system doesn't have enough free memory to run the software.
Do you remember what kind of issues? Was it that HIMEM was lower than E000H?
I have a 256 byte table to deal with the databus problem (ok 256 bytes wasted). It contains something like #C1 for every byte so the pointer to the address will always be #C1C1.
but you need 257 byte. like for example from D800 to D900. because when the low byte is at D8FF, who knows, it does a 16bit increment to get the high byte, and then it reads D900.