mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-19 05:38:43 +00:00
use the reset vector at 0x4 for entry ##bin
https://darkdust.net/writings/megadrive/initializing for references fixes #12848 i only chk with a few games, but they all look correct
This commit is contained in:
parent
710e6001ec
commit
5bcb5c7206
@ -300,14 +300,16 @@ static RList *entries(RBinFile *bf) { // Should be 3 offsets pointed by NMI, RES
|
||||
if (!(ptr = R_NEW0 (RBinAddr))) {
|
||||
return ret;
|
||||
}
|
||||
#if 0
|
||||
SMD_Header hdr = {{0}};
|
||||
r_buf_read_at (bf->buf, 0, (ut8*)&hdr, sizeof (hdr));
|
||||
ut64 baddr = 0; // r_read_be32 (&hdr.RomStart);
|
||||
ptr->paddr = ptr->vaddr = baddr + 0x100 + sizeof (SMD_Header);
|
||||
#endif
|
||||
ptr->paddr = ptr->vaddr = 0x100 + sizeof (SMD_Header);
|
||||
r_list_append (ret, ptr);
|
||||
if (bf->size < sizeof (SMD_Vectors)) {
|
||||
eprintf ("ERR: binfile too small!\n");
|
||||
ptr->paddr = ptr->vaddr = 0x100 + sizeof (SMD_Header);
|
||||
r_list_append (ret, ptr);
|
||||
} else {
|
||||
SMD_Vectors vectors;
|
||||
r_buf_read_at (bf->buf, 0, (ut8*)&vectors, sizeof (vectors));
|
||||
ptr->paddr = ptr->vaddr = r_read_be32 (&vectors.Reset);
|
||||
r_list_append (ret, ptr);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user