mirror of
https://github.com/whscullin/apple2js.git
synced 2024-01-12 14:14:38 +00:00
Fix bleed, take 2, autoRun support
This commit is contained in:
parent
a5e5e41e3c
commit
d81f1298bd
|
@ -248,7 +248,7 @@
|
|||
</main>
|
||||
<footer class="modal__footer">
|
||||
<button class="modal__btn" data-micromodal-close aria-label="Close this dialog window">Cancel</button>
|
||||
<button class="modal__btn" onclick="Apple2.doLoad()" aria-label="Open the selected disk">Open</button>
|
||||
<button class="modal__btn" onclick="Apple2.doLoad(event)" aria-label="Open the selected disk">Open</button>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -257,7 +257,7 @@
|
|||
</main>
|
||||
<footer class="modal__footer">
|
||||
<button class="modal__btn" data-micromodal-close aria-label="Close this dialog window">Cancel</button>
|
||||
<button class="modal__btn" onclick="Apple2.doLoad()" aria-label="Open the selected disk">Open</button>
|
||||
<button class="modal__btn" onclick="Apple2.doLoad(event)" aria-label="Open the selected disk">Open</button>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
|
15
js/gl.ts
15
js/gl.ts
|
@ -516,13 +516,9 @@ export class HiresPageGL implements HiresPage {
|
|||
bits >>= 1;
|
||||
}
|
||||
} else if (bank === 0) {
|
||||
if (!this._refreshing) {
|
||||
this._refreshing = true;
|
||||
const before = addr - 1;
|
||||
this._write(before >> 8, before & 0xff, this._buffer[0][before & 0x1fff], 0);
|
||||
this._refreshing = false;
|
||||
}
|
||||
const hbs = val & 0x80;
|
||||
const lastCol = col === 39;
|
||||
const cropLastPixel = hbs && lastCol;
|
||||
const dx = col * 14;
|
||||
let offset = dx * 4 + dy * 560 * 4;
|
||||
if (hbs) {
|
||||
|
@ -536,10 +532,13 @@ export class HiresPageGL implements HiresPage {
|
|||
}
|
||||
let bits = val;
|
||||
for (let idx = 0; idx < 7; idx++, offset += 8) {
|
||||
const drawPixel = cropLastPixel && idx == 6
|
||||
? this._drawHalfPixel
|
||||
: this._drawPixel;
|
||||
if (bits & 0x01) {
|
||||
this._drawPixel(data, offset, whiteCol);
|
||||
drawPixel(data, offset, whiteCol);
|
||||
} else {
|
||||
this._drawPixel(data, offset, blackCol);
|
||||
drawPixel(data, offset, blackCol);
|
||||
}
|
||||
bits >>= 1;
|
||||
}
|
||||
|
|
|
@ -241,7 +241,7 @@ export function loadAjax(drive: DriveNumber, url: string) {
|
|||
});
|
||||
}
|
||||
|
||||
export function doLoad() {
|
||||
export function doLoad(event: MouseEvent|KeyboardEvent) {
|
||||
MicroModal.close('load-modal');
|
||||
const select = document.querySelector<HTMLSelectElement>('#disk_select')!;
|
||||
const urls = select.value;
|
||||
|
@ -257,7 +257,8 @@ export function doLoad() {
|
|||
const localFile = document.querySelector<HTMLInputElement>('#local_file')!;
|
||||
const files = localFile.files;
|
||||
if (files && files.length == 1) {
|
||||
doLoadLocal(_currentDrive, files[0]);
|
||||
const runOnLoad = event.shiftKey;
|
||||
doLoadLocal(_currentDrive, files[0], { runOnLoad });
|
||||
} else if (url) {
|
||||
let filename;
|
||||
MicroModal.close('load-modal');
|
||||
|
@ -572,8 +573,8 @@ export function selectDisk() {
|
|||
localFile.value = '';
|
||||
}
|
||||
|
||||
export function clickDisk() {
|
||||
doLoad();
|
||||
export function clickDisk(event: MouseEvent|KeyboardEvent) {
|
||||
doLoad(event);
|
||||
}
|
||||
|
||||
/** Called to load disks from the local catalog. */
|
||||
|
|
Loading…
Reference in New Issue
Block a user