mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2025-04-05 11:38:54 +00:00
vcs: moved Javatari to loadScript() in Platform.start()
This commit is contained in:
parent
4cb8b890da
commit
42f3febb29
@ -55,9 +55,6 @@ if (window.location.host.endsWith('8bitworkshop.com')) {
|
||||
|
||||
<script src="jquery/jquery.min.js"></script>
|
||||
|
||||
<script src="javatari.js/release/javatari/javatari.js"></script>
|
||||
<script src="src/common/cpu/6809.js"></script>
|
||||
|
||||
<script src="tss/js/tss/PsgDeviceChannel.js"></script>
|
||||
<script src="tss/js/tss/MasterChannel.js"></script>
|
||||
<script src="tss/js/tss/AudioLooper.js"></script>
|
||||
|
@ -550,8 +550,6 @@ if (window.location.host.endsWith('8bitworkshop.com')) {
|
||||
<script src="codemirror/addon/selection/active-line.js"></script>
|
||||
<link rel="stylesheet" href="codemirror/addon/dialog/dialog.css">
|
||||
|
||||
<script src="javatari.js/release/javatari/javatari.js"></script>
|
||||
|
||||
<script src="tss/js/tss/PsgDeviceChannel.js"></script>
|
||||
<script src="tss/js/tss/MasterChannel.js"></script>
|
||||
<script src="tss/js/tss/AudioLooper.js"></script>
|
||||
|
@ -1,6 +1,4 @@
|
||||
|
||||
window['Javatari'].AUTO_START = false;
|
||||
|
||||
import { lzgmini } from "../common/util";
|
||||
import { PLATFORMS } from "../common/emu";
|
||||
import { Platform } from "../common/baseplatform";
|
||||
|
@ -24,9 +24,6 @@ declare var Tour, GIF;
|
||||
declare var ga;
|
||||
declare var $ : JQueryStatic; // use browser jquery
|
||||
|
||||
// make sure VCS doesn't start
|
||||
if (window['Javatari']) window['Javatari'].AUTO_START = false;
|
||||
|
||||
// query string
|
||||
|
||||
interface UIQueryString {
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
import { Platform, BasePlatform, cpuStateToLongString_6502, dumpStackToString, DisasmLine, CpuState } from "../common/baseplatform";
|
||||
import { PLATFORMS, dumpRAM, EmuHalt } from "../common/emu";
|
||||
import { hex, lpad, tobin } from "../common/util";
|
||||
import { hex, loadScript, lpad, tobin } from "../common/util";
|
||||
import { CodeAnalyzer_vcs } from "../common/analysis";
|
||||
import { disassemble6502 } from "../common/cpu/disasm6502";
|
||||
import { ProbeRecorder } from "../common/recorder";
|
||||
@ -57,12 +57,6 @@ const VCS_PRESETS = [
|
||||
// {id:'bb/rblast106.bas', name:'Road Blasters (batariBASIC)'},
|
||||
];
|
||||
|
||||
Javatari.AUTO_START = false;
|
||||
Javatari.SHOW_ERRORS = false;
|
||||
Javatari.CARTRIDGE_CHANGE_DISABLED = true;
|
||||
Javatari.DEBUG_SCANLINE_OVERFLOW = false; // TODO: make a switch
|
||||
Javatari.AUDIO_BUFFER_SIZE = 256;
|
||||
|
||||
class VCSPlatform extends BasePlatform {
|
||||
|
||||
lastBreakState; // last breakpoint state
|
||||
@ -74,8 +68,16 @@ class VCSPlatform extends BasePlatform {
|
||||
|
||||
getPresets() { return VCS_PRESETS; }
|
||||
|
||||
start() {
|
||||
async start() {
|
||||
var self : VCSPlatform = this;
|
||||
// load Javatari and configure settings
|
||||
await loadScript("javatari.js/release/javatari/javatari.js");
|
||||
Javatari.AUTO_START = false;
|
||||
Javatari.SHOW_ERRORS = false;
|
||||
Javatari.CARTRIDGE_CHANGE_DISABLED = true;
|
||||
Javatari.DEBUG_SCANLINE_OVERFLOW = false; // TODO: integrate into probe API
|
||||
Javatari.AUDIO_BUFFER_SIZE = 256;
|
||||
// show console div and start
|
||||
$("#javatari-div").show();
|
||||
Javatari.start();
|
||||
var console = Javatari.room.console;
|
||||
|
@ -4,9 +4,10 @@
|
||||
//var IDEURL = 'https://8bitworkshop.com/dev/';
|
||||
var IDEURL = 'http://localhost:8000/';
|
||||
var QS = '?embed=1&platform=c64&file0_name=test.dasm&file0_data=%0A%20%20%20%20%20 processor 6502%0A%20%20%20%20%20 org %24803%0AFoo%3A%20 lda %231%0A%20%20%20%20%20 rts';
|
||||
var EMBEDURL = 'http://localhost:8000/embed.html?p=c64&r=TFpHAAAAagAAAGPy6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qkChboTTBhpEIXHE48gEy%2FTEw%2B7qQqFyBRh1KkDhbygAKIAIHn2oAGiCBTBhQKgAqIQIGb2oAOiGBTCBKIgFMGpEIW2pcQTIQDwpcWiARTBhQKFKoUrpZWFg6IAhgSGBYYm6IYlrYQC0PuFAqkAhQGp5RIDq6C0IIDwwADQA0w%2B9hKGgIWBEoSLjBMDjRMkHKWBhQamtrWGhY61h4WPtYyFgqWMhRuljYUGEoaeE14SGzeFAqWCEqmAhYKFERMLEh0%2BpYKFIaa2tYiFkLWJhZG1ioWStYuFkxIGPxIC6xIcQxIHyI2Fg4oYaQiFthIIORIKN0wi9RTBG4UchQ2FDoUPEiY0AoUBqSASIzQSBQpMXfS5xACVjLnQACn%2BGGkYlYWpAJWNEwaFganXOOWBlYap8ekAlYe5uACouTb0E0qIuTr0EwuJuT4Th4q5QhNHixLekhQfFB8UHxQfFB8UHxQfFB8UHxQfFB8UHxQfFB8UHxQfFB8UHxQDRvQUIg%3D%3D';
|
||||
|
||||
exports['test embed iframe'] = function(browser) {
|
||||
exports['test embed IDE in iframe'] = function(browser) {
|
||||
|
||||
browser.url(IDEURL + QS)
|
||||
.waitForElementNotPresent('#step-0')
|
||||
@ -28,6 +29,17 @@ exports['test embed iframe'] = function(browser) {
|
||||
.waitForElementVisible('.emuvideo')
|
||||
.waitForElementVisible('.hilite-span')
|
||||
|
||||
browser.url(IDEURL + "?embed=1&platform=vcs")
|
||||
.waitForElementNotVisible('#compile_spinner', time=10000)
|
||||
.waitForElementNotVisible('#error_alert')
|
||||
.waitForElementVisible('#javatari-div')
|
||||
|
||||
browser.url(IDEURL + "?embed=1&platform=nes")
|
||||
.waitForElementNotVisible('#compile_spinner', time=10000)
|
||||
.waitForElementNotVisible('#error_alert')
|
||||
.waitForElementVisible('#emuscreen')
|
||||
.waitForElementVisible('.emuvideo')
|
||||
|
||||
browser.url(IDEURL + "?embed=1")
|
||||
.waitForElementVisible('.bootbox-alert')
|
||||
|
||||
@ -40,9 +52,12 @@ exports['test embed iframe'] = function(browser) {
|
||||
*/
|
||||
}
|
||||
|
||||
exports['test embed.html'] = function(browser) {
|
||||
exports['test standalone player'] = function(browser) {
|
||||
|
||||
browser.url(EMBEDURL)
|
||||
browser.url(EMBEDURL_C64)
|
||||
.waitForElementVisible('.emuvideo')
|
||||
|
||||
browser.url(EMBEDURL_VCS)
|
||||
.waitForElementVisible('#javatari-div')
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user