Giter Club home page Giter Club logo

Comments (10)

scarybeasts avatar scarybeasts commented on June 14, 2024

Thanks for the report. It should be possible to tweak a few constants to get this to work... hopefully!

Out of curiosity, what version of macOS is this?

from beebjit.

TobyLobster avatar TobyLobster commented on June 14, 2024

Thanks - I'm on macOS Big Sur.

from beebjit.

scarybeasts avatar scarybeasts commented on June 14, 2024

Does it work reliably if you edit asm/asm_platform.h and change:

#define K_BBC_MEM_RAW_ADDR 0x1f008000

to

#define K_BBC_MEM_RAW_ADDR 0x27008000

?

from beebjit.

TobyLobster avatar TobyLobster commented on June 14, 2024

Does it work reliably if you edit asm/asm_platform.h and change:

#define K_BBC_MEM_RAW_ADDR 0x1f008000

to

#define K_BBC_MEM_RAW_ADDR 0x27008000

?

Sadly not:
`% ./beebjit -0 test/games/Disc108-FroggerRSCB.ssd
BAILING: mmap in wrong location (expected 0x30000000, got 0x38000000), heap 0x6072b0 binary 0x407880

% ./beebjit -0 test/games/Disc108-FroggerRSCB.ssd
BAILING: mmap in wrong location (expected 0x30000000, got 0x40008000), heap 0x604b50 binary 0x407880

% ./beebjit -0 test/games/Disc108-FroggerRSCB.ssd
BAILING: mmap in wrong location (expected 0x27000000, got 0x28000000), heap 0x14063c0 binary 0x407880
`

from beebjit.

scarybeasts avatar scarybeasts commented on June 14, 2024

Interesting! It's hard to know what to make of those. It looks like this older version of macOS could be ignoring the requested address, even though there's likely nothing there already.

We could confirm by grabbing a vmmap output (or two!) for the beebjit process at the time of the BAILING message. One way to do this would be to modify util_bail() in util.c to add "while (1) {}" after the fprintf. This would force an infinite loop at the time of the BAILING, enabling vmmap to be used on the beebjit process.

from beebjit.

TobyLobster avatar TobyLobster commented on June 14, 2024

Archive.zip
Like this?

from beebjit.

scarybeasts avatar scarybeasts commented on June 14, 2024

Thanks, that's perfect. It looks like this older version of macOS likes to reserve huge malloc areas, and these are conflicting with beebjit's attempts to reserve address space for various things.

Can you try the latest code on master (as of commit: f3160a3) and see if it works now? It's an attempt at fixing this in a simple manner, which might not be perfect, but might do the trick. It squishes beebjit's mappings together so that the huge malloc areas will be placed elsewhere.

from beebjit.

scarybeasts avatar scarybeasts commented on June 14, 2024

[For posterity, here's the older version of macOS grabbing 0x30000000 before beebjit can get it!!]

mapped file 2a008000-2a010000 [ 32K 0K 0K 0K] rw-/rwx SM=S/A /private/tmp/beebjit6q9lU1
mapped file 2b008000-2b010000 [ 32K 0K 0K 0K] rw-/rwx SM=S/A /private/tmp/beebjit6q9lU1
VM_ALLOCATE (reserved) 2b010000-2b018000 [ 32K 0K 0K 0K] rw-/rwx SM=NUL reserved VM address space (unallocated)
MALLOC_MEDIUM 30000000-30800000 [ 8192K 1624K 1624K 0K] rw-/rwx SM=PRV DefaultMallocZone_0x4cf000
MALLOC_MEDIUM (reserved) 30800000-38000000 [120.0M 0K 0K 0K] rw-/rwx SM=NUL DefaultMallocZone_0x4cf000

from beebjit.

TobyLobster avatar TobyLobster commented on June 14, 2024

That is working nicely - thank you, thank you! I've tried launching 15 times and it succeeded each time.

from beebjit.

scarybeasts avatar scarybeasts commented on June 14, 2024

Great. Thanks for helping sort out the teething troubles with the new macOS port!

from beebjit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.