mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-11-28 08:50:22 +00:00
intro tour: dynamic import of .js file; renamed 6809.js to .ts
This commit is contained in:
parent
6f6b617723
commit
f5ba481c1d
@ -373,7 +373,7 @@ body {
|
||||
<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="src/common/cpu/6809.js"></script>
|
||||
|
||||
<!-- UI-only stuff -->
|
||||
<link rel="stylesheet" href="lib/bootstrap-tourist.css">
|
||||
<script src="lib/bootstrap-tourist.js"></script>
|
||||
|
@ -530,6 +530,7 @@ if (window.location.host.endsWith('8bitworkshop.com')) {
|
||||
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
|
||||
<script src="bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="bootstrap/js/bootbox.all.min.js"></script>
|
||||
<link rel="stylesheet" href="lib/bootstrap-tourist.css">
|
||||
|
||||
<script src="src/codemirror/codemirror.js"></script>
|
||||
<script src="codemirror/mode/clike/clike.js"></script>
|
||||
@ -553,17 +554,15 @@ if (window.location.host.endsWith('8bitworkshop.com')) {
|
||||
<script src="codemirror/addon/dialog/dialog.js"></script>
|
||||
<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="src/common/cpu/6809.js"></script>
|
||||
<!-- UI-only stuff -->
|
||||
<link rel="stylesheet" href="lib/bootstrap-tourist.css">
|
||||
<script src="lib/bootstrap-tourist.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>
|
||||
<script src="tss/js/Log.js"></script>
|
||||
|
||||
<!-- main IDE module -->
|
||||
<script src="gen/ui.js" type="module"></script>
|
||||
|
||||
<script>
|
||||
|
@ -12,10 +12,11 @@ import { Probeable, RasterFrameBased, AcceptsPaddleInput } from "./devices";
|
||||
import { SampledAudio } from "./audio";
|
||||
import { ProbeRecorder } from "./recorder";
|
||||
import { BaseWASMMachine } from "./wasmplatform";
|
||||
import { CPU6809 } from "./cpu/6809";
|
||||
|
||||
///
|
||||
|
||||
declare var jt, CPU6809;
|
||||
declare var jt;
|
||||
|
||||
export interface OpcodeMetadata {
|
||||
minCycles: number;
|
||||
@ -636,7 +637,7 @@ export function getToolForFilename_6809(fn:string) : string {
|
||||
export abstract class Base6809Platform extends BaseZ80Platform {
|
||||
|
||||
newCPU(membus : MemoryBus) {
|
||||
var cpu = new CPU6809();
|
||||
var cpu = Object.create(CPU6809());
|
||||
cpu.init(membus.write, membus.read, 0);
|
||||
return cpu;
|
||||
}
|
||||
@ -646,7 +647,7 @@ export abstract class Base6809Platform extends BaseZ80Platform {
|
||||
}
|
||||
disassemble(pc:number, read:(addr:number)=>number) : DisasmLine {
|
||||
// TODO: don't create new CPU
|
||||
return new CPU6809().disasm(read(pc), read(pc+1), read(pc+2), read(pc+3), read(pc+4), pc);
|
||||
return Object.create(CPU6809()).disasm(read(pc), read(pc+1), read(pc+2), read(pc+3), read(pc+4), pc);
|
||||
}
|
||||
getDefaultExtension() : string { return ".asm"; };
|
||||
//this.getOpcodeMetadata = function() { }
|
||||
|
@ -22,7 +22,7 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
var CPU6809 = function() {
|
||||
export function CPU6809() {
|
||||
|
||||
var ticks;
|
||||
var rA,rB,rX,rY,rU,rS,PC,CC,DP,
|
||||
@ -124,17 +124,17 @@ var PUSHWU = function(b) {
|
||||
byteTo(--rU, b & 0xff);
|
||||
byteTo(--rU, (b>>8) & 0xff);
|
||||
};
|
||||
var PULLB = function(b) {
|
||||
var PULLB = function() {
|
||||
return byteAt(rS++);
|
||||
};
|
||||
var PULLW = function(b) {
|
||||
var PULLW = function() {
|
||||
return byteAt(rS++) * 256 + byteAt(rS++);
|
||||
};
|
||||
|
||||
var PULLBU = function(b) {
|
||||
var PULLBU = function() {
|
||||
return byteAt(rU++);
|
||||
};
|
||||
var PULLWU = function(b) {
|
||||
var PULLWU = function() {
|
||||
return byteAt(rU++) * 256 + byteAt(rU++);
|
||||
};
|
||||
|
||||
@ -2237,8 +2237,8 @@ var disasm = function(i,a,b,c,d,pc) {
|
||||
}
|
||||
i=a;a=b;b=c;c=d;
|
||||
}
|
||||
var bytes = sx[0];
|
||||
var mode = sx[1];
|
||||
var bytes = sx[0] as number;
|
||||
var mode = sx[1] as number;
|
||||
var mnemo = sx[2];
|
||||
|
||||
switch (mode) {
|
@ -2001,6 +2001,7 @@ function isLandscape() {
|
||||
|
||||
async function showWelcomeMessage() {
|
||||
if (userPrefs.shouldCompleteTour()) {
|
||||
await loadScript('lib/bootstrap-tourist.js');
|
||||
var is_vcs = platform_id.startsWith('vcs');
|
||||
var steps = [
|
||||
{
|
||||
|
@ -5,7 +5,7 @@ var wtu = require('./workertestutils.js');
|
||||
var PNG = require('pngjs').PNG;
|
||||
|
||||
const dom = createTestDOM();
|
||||
includeInThisContext('src/common/cpu/6809.js');
|
||||
includeInThisContext('gen/common/cpu/6809.js');
|
||||
includeInThisContext("javatari.js/release/javatari/javatari.js");
|
||||
Javatari.AUTO_START = false;
|
||||
includeInThisContext('tss/js/Log.js');
|
||||
|
Loading…
Reference in New Issue
Block a user