Skip to content

Commit

Permalink
Forward GXR setting to VirtualBeeb
Browse files Browse the repository at this point in the history
In particular, having the GXR loaded raises PAGE which matters for some
programs.
  • Loading branch information
ojwb committed Jan 27, 2025
1 parent 89d5e4f commit e40b663
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/emulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ export class Emulator {
modelName += " | GXR";
}

hasGxr() {
return modelName.indexOf("GXR") >= 0;
}

timer() {
if (!beebjitIncoming && !this.showCoords) {
this.emuStatus.innerHTML = `${modelName} | ${Math.floor(
Expand Down
8 changes: 5 additions & 3 deletions src/owlet.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,13 +426,15 @@ export class OwletEditor {
examples: () => this.selectView("examples"),
about: () => this.selectView("about"),

jsbeeb: () =>
jsbeeb: () => {
const gxr = this.emulator.hasGxr() ? "&rom=gxr.rom" : "";
window.open(
`https://virtual.bbcmic.ro/?embedBasic=${encodeURIComponent(
this.getBasicText(),
)}&rom=gxr.rom`,
)}${gxr}`,
"_blank",
),
)
},
rocket: () => this.rocket(),
copy: () => {
this.copy();
Expand Down

0 comments on commit e40b663

Please sign in to comment.