1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-20 01:31:51 +00:00
8bitworkshop/testwave.html
2019-05-03 09:33:47 -04:00

151 lines
5.0 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>8bitworkshop IDE</title>
<style type="text/css" media="screen">
body {
overflow: hidden !important;
font-size: 11px;
}
.waverow {
background: #000;
color: #99ff99;
}
</style>
<link rel="stylesheet" href="css/ui.css">
</head>
<body>
<div id="controls_top">
<span class="dropdown">
<a class="btn btn-secondary dropdown-toggle" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="Menu">
<span class="glyphicon glyphicon-menu-hamburger" aria-hidden="true"></span></button>
<span class="caret"></span>
</a>
</span>
<select id="preset_select" name="" title="Project Select">
</select>
<span class="dropdown">
<a class="btn btn-secondary dropdown-toggle" id="windowMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="Window Select">
<span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span></button>
<span class="caret"></span>
</a>
<ul class="dropdown-menu" aria-labelledby="windowMenuButton" id="windowMenuList">
</ul>
</span>
<img id="compile_spinner" src="images/spinner.gif" height="20em" style="visibility:hidden;margin-left:8px;margin-right:8px">
<span class="dropdown" style="float:right">
<a class="btn btn-secondary dropdown-toggle" id="booksMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
GET BOOKS <span class="caret"></span>
</a>
</span>
</div>
<div id="notebook">
<div id="workspace">
</div>
<div class="emulator" id="emulator" style="width:100%">
<div class="emuoverlay" id="emuoverlay">
<span class="btn-group" role="group">
<button type="button" class="btn btn-xs" onclick="this.blur();" title="Go to start of trace"><span class="glyphicon glyphicon-fast-backward" aria-hidden="true"></span></button>
<button type="button" class="btn btn-xs" onclick="this.blur();" title="Go backward"><span class="glyphicon glyphicon-backward" aria-hidden="true"></span></button>
<button type="button" class="btn btn-xs" onclick="this.blur();" title="Go forward"><span class="glyphicon glyphicon-forward" aria-hidden="true"></span></button>
<button type="button" class="btn btn-xs" onclick="this.blur();" title="Go to end of trace"><span class="glyphicon glyphicon-fast-forward" aria-hidden="true"></span></button>
<button type="button" class="btn btn-xs" onclick="this.blur();" title="Zoom out"><span class="glyphicon glyphicon-zoom-out" aria-hidden="true"></span></button>
<button type="button" class="btn btn-xs" onclick="this.blur();" title="Zoom in"><span class="glyphicon glyphicon-zoom-in" aria-hidden="true"></span></button>
</span>
<div id="scope" class="emuscope">
</div>
<div id="scope2" class="emuscope">
</div>
</div>
</div>
<div id="error_alert" class="alert alert-danger alert-dismissable" style="position:absolute;right:0;top:0;display:none">
<!--<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>-->
<div id="error_alert_msg"></div>
</div>
</div>
<script src="jquery/jquery-3.4.1.min.js"></script>
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<script src="bootstrap/js/bootstrap.min.js"></script>
<script src="lib/mousetrap.min.js"></script>
<script src="lib/split.min.js"></script>
<script>
var exports = {};
function require(modname) {
if (modname == 'jquery') return $;
else if (modname.startsWith('.')) return exports;
else { console.log("Unknown require()", modname); return exports; }
}
</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>
<script src="gen/util.js"></script>
<script src="src/vlist.js"></script>
<script src="gen/emu.js"></script>
<script src="gen/baseplatform.js"></script>
<script src="gen/waveform.js"></script>
<script>
var wfp = {
getSignalMetadata: function() {
return [
{label:'clk', len:1},
{label:'big_signal_name__DOT__which_is_big', len:2},
{label:'sig3', len:3},
{label:'sig4', len:4},
{label:'sig5', len:5},
{label:'sig6', len:6},
{label:'sig7', len:7},
{label:'sig8', len:8},
{label:'sig9', len:9},
{label:'sig', len:1},{label:'sig', len:1},{label:'sig', len:1},{label:'sig', len:1},{label:'sig', len:1},{label:'sig', len:1},{label:'sig', len:1},
];
},
getSignalData: function(i,s,l) {
l += s;
var arr = [];
while (s++<l) {
arr.push(s & (1<<(this.getSignalMetadata()[i].len)-1));
}
return arr;
},
};
var wfv = new WaveformView($('#scope')[0], wfp);
var wfv2 = new WaveformView($('#scope2')[0], wfp);
Split(['#scope', '#scope2'], {
minSize: [50, 50],
direction: 'vertical',
onDrag: function() {
wfv.recreate();
wfv2.recreate();
},
});
/*
function update() {
wfv.setOrgTime(wfv.t0+1);
setTimeout(update, 1000/10);
}
update();
*/
</script>
</body>
</html>