mirror of
https://github.com/autc04/Retro68.git
synced 2025-03-30 04:43:22 +00:00
Calling RecoverHandle on the wrong address is bad, so don't, for now. (see #33)
This commit is contained in:
parent
401278a18e
commit
310ad344c2
@ -4,6 +4,6 @@ type 'INIT' {
|
||||
RETRO68_CODE_TYPE
|
||||
};
|
||||
|
||||
resource 'INIT' (128) {
|
||||
resource 'INIT' (128, locked) {
|
||||
dontBreakAtEntry, $$read("SystemExtension.flt");
|
||||
};
|
||||
|
@ -1,3 +1,3 @@
|
||||
data 'WDEF' (129) {
|
||||
data 'WDEF' (129, locked) {
|
||||
$$read("WDEF")
|
||||
};
|
||||
|
@ -232,6 +232,16 @@ void Retro68Relocate()
|
||||
else
|
||||
{
|
||||
data_displacement = displacement;
|
||||
#if 0
|
||||
// find the beginning of the current code resource and lock it.
|
||||
// this crashes with some implementations of the memory manager
|
||||
// if we guess wrong, so let's don't for now.
|
||||
// Therefore, all Retro68-compiled code resources have to be locked,
|
||||
// or they might get relocated as soon as the global variables are
|
||||
// relocated below.
|
||||
// TODO: figure out a way to reliably determine the offset from the
|
||||
// start of the resource (to pass it from Elf2Mac, probably).
|
||||
|
||||
{
|
||||
uint8_t *orig_rsrc_start;
|
||||
GET_VIRTUAL_ADDRESS(orig_rsrc_start, _rsrc_start);
|
||||
@ -245,7 +255,7 @@ void Retro68Relocate()
|
||||
rState->codeHandle = h;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
// Allocate BSS section (uninitialized/zero-initialized global data)
|
||||
if(!rState->bssPtr)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user