| 535 | } |
| 536 | |
| 537 | function load_fw_specific(version) { |
| 538 | if (version & 0x10000) { |
| 539 | throw RangeError("PS5 not supported yet"); |
| 540 | } |
| 541 | |
| 542 | const value = version & 0xffff; |
| 543 | // we don't want to bother with very old firmwares that don't support |
| 544 | // ECMAScript 2015. 6.xx WebKit poisons the pointer fields of some types |
| 545 | // which can be annoying to deal with |
| 546 | if (value < 0x700) { |
| 547 | throw RangeError("PS4 firmwares <7.00 aren't supported"); |
| 548 | } |
| 549 | |
| 550 | if (0x700 <= value && value < 0x750) { |
| 551 | // 7.00, 7.01, 7.02 |
| 552 | return import("../rop/700.js"); |
| 553 | } else if (0x750 <= value && value < 0x800) { |
| 554 | // 7.50, 7.51, 7.55 |
| 555 | return import("../rop/750.js"); |
| 556 | } else if (0x800 <= value && value < 0x850) { |
| 557 | // 8.00, 8.01, 8.03 |
| 558 | return import("../rop/800.js"); |
| 559 | } else if (0x850 <= value && value < 0x900) { |
| 560 | // 8.50, 8.52 |
| 561 | return import("../rop/850.js"); |
| 562 | } |
| 563 | |
| 564 | throw RangeError("Firmware not supported"); |
| 565 | } |
| 566 | |
| 567 | export let gadgets = null; |
| 568 | export let libwebkit_base = null; |