Hi,
Running Goplanes on hardware lately has been giving me crashes, with a message of "Address Error!". What would typically cause that?
I've tried a few different emulators but none picked up on the error.
Also, is there a way to plug-in my own error callbacks?
Thanks!
DJCC
what causes an "address error!" ?
Moderator: BigEvilCorporation
-
- Very interested
- Posts: 710
- Joined: Sat Feb 18, 2012 2:44 am
Address error happens when you try to read a word from an odd address, think about it as a misaligned memory access.
Now, emulators generally don't emulate it because no official games rely on it and it slowdowns CPU emulation (since you have to check address alignment on each word reads) but I think Regen at least emulates it.
Now, emulators generally don't emulate it because no official games rely on it and it slowdowns CPU emulation (since you have to check address alignment on each word reads) but I think Regen at least emulates it.
yes, address error exception jump vector is picked from ROM offset $0C so you simply have to put your callback address thereAlso, is there a way to plug-in my own error callbacks?
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: what causes an "address error!" ?
In the SGDK boot header (sega.s), the interrupt calls the following method (located in base.c) :djcouchycouch wrote: Also, is there a way to plug-in my own error callbacks?
Code: Select all
void _addresserror_callback()
{
VDP_init();
VDP_drawText("ADDRESS ERROR !", 10, 10);
while(1);
}
I will use callback pointer in the next version to offer more flexibility here.
-
- Very interested
- Posts: 710
- Joined: Sat Feb 18, 2012 2:44 am
Re: what causes an "address error!" ?
Ok, I'll modify my local copy for now.Stef wrote:.
I will use callback pointer in the next version to offer more flexibility here.
Any idea when that "next version" will appear?
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: what causes an "address error!" ?
Hehe always difficult to answer here :pdjcouchycouch wrote:Ok, I'll modify my local copy for now.Stef wrote:.
I will use callback pointer in the next version to offer more flexibility here.
Any idea when that "next version" will appear?
I have so few time to work on it but honestly i think i will do a release really soon, even if some stuff are missing
Edit: So it's done