Comments (10)
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.
Thanks - I'm on macOS Big Sur.
from beebjit.
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.
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.
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.
Archive.zip
Like this?
from beebjit.
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.
[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.
That is working nicely - thank you, thank you! I've tried launching 15 times and it succeeded each time.
from beebjit.
Great. Thanks for helping sort out the teething troubles with the new macOS port!
from beebjit.
Related Issues (20)
- First frame sometimes renders incorrectly with -opt video:paint-start-cycles HOT 1
- compilation problem - arm64 issue? HOT 1
- Compile failure with gcc 11.1 HOT 2
- Feature Request - Toggle or Colour Surrounding Screen HOT 6
- Feature Request - Call Stack
- clocksp broken on bbcmic.ro in rocket mode HOT 1
- Additional teletest cases HOT 1
- Incorrect separated graphics teletext chars HOT 1
- Sounds on Depeche mode demo is broken HOT 1
- LinearTTX test issue HOT 10
- Left SHIFT key on Mac HOT 8
- Sideways RAM not initialised HOT 2
- Build issue with gcc 12.1 ( potential uninitialised variable )
- Feature Request - Memory Labels in debugger
- MODE 7 with 6845 skew vs -opt video:border-chars=0 HOT 7
- Another video capturing problem HOT 3
- MakeUEF 2.4 8e1 8o1 Parity HOT 2
- Home Key crashes emulator HOT 2
- Doesn't build on Raspberry Pi 5 (gcc 12.2.0)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from beebjit.