mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2025-01-11 08:30:02 +00:00
__lastrepo_xxx variable goes back to repo for each platform
This commit is contained in:
parent
40f24233b1
commit
f06d338091
@ -175,6 +175,7 @@ TODO:
|
|||||||
- popup
|
- popup
|
||||||
- convert binary to hex stmts
|
- convert binary to hex stmts
|
||||||
- "suggestions" (vblank overrun, variable # scanlines, etc)
|
- "suggestions" (vblank overrun, variable # scanlines, etc)
|
||||||
|
- spinner doesn't always spin on sms
|
||||||
|
|
||||||
|
|
||||||
WEB WORKER FORMAT
|
WEB WORKER FORMAT
|
||||||
|
23
src/ui.ts
23
src/ui.ts
@ -109,12 +109,12 @@ function getCurrentPresetTitle() : string {
|
|||||||
|
|
||||||
function setLastPreset(id:string) {
|
function setLastPreset(id:string) {
|
||||||
if (hasLocalStorage) {
|
if (hasLocalStorage) {
|
||||||
if (repo_id)
|
if (repo_id && platform_id)
|
||||||
localStorage.setItem("__lastrepo", repo_id);
|
localStorage.setItem("__lastrepo_" + platform_id, repo_id);
|
||||||
else
|
else
|
||||||
localStorage.removeItem("__lastrepo");
|
localStorage.removeItem("__lastrepo_" + platform_id);
|
||||||
localStorage.setItem("__lastplatform", platform_id);
|
localStorage.setItem("__lastplatform", platform_id);
|
||||||
localStorage.setItem("__lastid_"+store_id, id);
|
localStorage.setItem("__lastid_" + store_id, id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1836,8 +1836,13 @@ export function startUI(loadplatform : boolean) {
|
|||||||
importProjectFromGithub(qs['githubURL'], true);
|
importProjectFromGithub(qs['githubURL'], true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// add default platform?
|
||||||
|
platform_id = qs['platform'] || (hasLocalStorage && localStorage.getItem("__lastplatform"));
|
||||||
|
if (!platform_id) {
|
||||||
|
platform_id = qs['platform'] = "vcs";
|
||||||
|
}
|
||||||
// lookup repository
|
// lookup repository
|
||||||
repo_id = qs['repo']; // TODO? || (hasLocalStorage && localStorage.getItem("__lastrepo"));
|
repo_id = qs['repo'] || (hasLocalStorage && localStorage.getItem("__lastrepo_" + platform_id));
|
||||||
if (hasLocalStorage && repo_id && repo_id !== '/') {
|
if (hasLocalStorage && repo_id && repo_id !== '/') {
|
||||||
var repo = getRepos()[repo_id];
|
var repo = getRepos()[repo_id];
|
||||||
if (repo) {
|
if (repo) {
|
||||||
@ -1845,17 +1850,13 @@ export function startUI(loadplatform : boolean) {
|
|||||||
if (!qs['file'])
|
if (!qs['file'])
|
||||||
qs['file'] = repo.mainPath;
|
qs['file'] = repo.mainPath;
|
||||||
if (!qs['platform'])
|
if (!qs['platform'])
|
||||||
qs['platform'] = repo.platform_id;
|
qs['platform'] = platform_id = repo.platform_id;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
repo_id = '';
|
repo_id = '';
|
||||||
delete qs['repo'];
|
delete qs['repo'];
|
||||||
}
|
}
|
||||||
// add default platform?
|
// update UI
|
||||||
platform_id = qs['platform'] || (hasLocalStorage && localStorage.getItem("__lastplatform"));
|
|
||||||
if (!platform_id) {
|
|
||||||
platform_id = qs['platform'] = "vcs";
|
|
||||||
}
|
|
||||||
$("#item_platform_"+platform_id).addClass("dropdown-item-checked");
|
$("#item_platform_"+platform_id).addClass("dropdown-item-checked");
|
||||||
$("#platform_name").text(platform_id);
|
$("#platform_name").text(platform_id);
|
||||||
setupSplits();
|
setupSplits();
|
||||||
|
@ -721,7 +721,7 @@ export class SMSVDP extends TMS9918A {
|
|||||||
if (this.writeToCRAM) {
|
if (this.writeToCRAM) {
|
||||||
var palindex = this.addressRegister++ & (this.cram.length-1);
|
var palindex = this.addressRegister++ & (this.cram.length-1);
|
||||||
this.cram[palindex] = i;
|
this.cram[palindex] = i;
|
||||||
this.cpalette[palindex] = RGBA((i&3)<<6, ((i>>2)&3)<<6, ((i>>4)&3)<<6);
|
this.cpalette[palindex] = RGBA((i&3)*85, ((i>>2)&3)*85, ((i>>4)&3)*85);
|
||||||
this.prefetchByte = i;
|
this.prefetchByte = i;
|
||||||
this.addressRegister &= this.ramMask;
|
this.addressRegister &= this.ramMask;
|
||||||
this.redrawRequired = true;
|
this.redrawRequired = true;
|
||||||
|
@ -1296,11 +1296,12 @@ function linkSDLDZ80(step:BuildStep)
|
|||||||
// return unchanged if no files changed
|
// return unchanged if no files changed
|
||||||
if (!anyTargetChanged(step, ["main.ihx", "main.noi"]))
|
if (!anyTargetChanged(step, ["main.ihx", "main.noi"]))
|
||||||
return;
|
return;
|
||||||
|
// parse binary file
|
||||||
var binout = parseIHX(hexout, params.rom_start!==undefined?params.rom_start:params.code_start, params.rom_size, errors);
|
var binout = parseIHX(hexout, params.rom_start!==undefined?params.rom_start:params.code_start, params.rom_size, errors);
|
||||||
if (errors.length) {
|
if (errors.length) {
|
||||||
return {errors:errors};
|
return {errors:errors};
|
||||||
}
|
}
|
||||||
|
// parse listings
|
||||||
var listings = {};
|
var listings = {};
|
||||||
for (var fn of step.files) {
|
for (var fn of step.files) {
|
||||||
if (fn.endsWith('.lst')) {
|
if (fn.endsWith('.lst')) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user