1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-26 10:49:17 +00:00

use expanded z80fast.js for debugging

This commit is contained in:
Steven Hugg 2017-05-09 21:46:45 -04:00
parent 21ddfce92a
commit 5da7f48d1e
4 changed files with 13724 additions and 14 deletions

View File

@ -146,7 +146,7 @@ body {
<link rel="stylesheet" href="codemirror/addon/dialog/dialog.css"> <link rel="stylesheet" href="codemirror/addon/dialog/dialog.css">
<script src="javatari.js/release/javatari/javatari.js"></script> <script src="javatari.js/release/javatari/javatari.js"></script>
<script src="src/cpu/z80.js"></script> <script src="src/cpu/z80fast.js"></script>
<script src="src/cpu/6809.js"></script> <script src="src/cpu/6809.js"></script>
<script src="tss/js/tss/PsgDeviceChannel.js"></script> <script src="tss/js/tss/PsgDeviceChannel.js"></script>

13718
src/cpu/z80fast.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -198,12 +198,10 @@ var RAM = function(size) {
this.mem = new Uint8Array(memArray); this.mem = new Uint8Array(memArray);
} }
// TODO
var AnimationTimer = function(frequencyHz, callback) { var AnimationTimer = function(frequencyHz, callback) {
var intervalMsec = 1000.0 / frequencyHz; var intervalMsec = 1000.0 / frequencyHz;
var curTime = 0;
var running; var running;
var useReqAnimFrame = false; // TODO: disable on OS X var useReqAnimFrame = false; // TODO: enable?
function scheduleFrame() { function scheduleFrame() {
if (useReqAnimFrame) if (useReqAnimFrame)
@ -211,9 +209,7 @@ var AnimationTimer = function(frequencyHz, callback) {
else else
setTimeout(nextFrame, intervalMsec); setTimeout(nextFrame, intervalMsec);
} }
var nextFrame = function(ts) {
var nextFrame = function(timestamp) {
// TODO: calculate framerate
callback(); callback();
if (running) { if (running) {
scheduleFrame(); scheduleFrame();
@ -439,13 +435,9 @@ var BaseZ80Platform = function() {
var _cpu; var _cpu;
var probe; var probe;
window.buildZ80({
applyContention: false // TODO???
});
this.newCPU = function(membus, iobus) { this.newCPU = function(membus, iobus) {
probe = new BusProbe(membus); probe = new BusProbe(membus);
_cpu = window.Z80({ _cpu = Z80_fast({
display: {}, display: {},
memory: probe, memory: probe,
ioBus: iobus ioBus: iobus

View File

@ -1013,12 +1013,12 @@ function handleWindowMessage(e) {
editor.replaceSelection(e.data.bytestr); editor.replaceSelection(e.data.bytestr);
} }
if (e.data.close) { if (e.data.close) {
$("#pixeditback").hide(250); $("#pixeditback").hide();
} }
} }
function openBitmapEditorWithParams(fmt, bytestr, palfmt, palstr) { function openBitmapEditorWithParams(fmt, bytestr, palfmt, palstr) {
$("#pixeditback").show(250); $("#pixeditback").show();
pixeditframe.contentWindow.postMessage({fmt:fmt, bytestr:bytestr, palfmt:palfmt, palstr:palstr}, '*'); pixeditframe.contentWindow.postMessage({fmt:fmt, bytestr:bytestr, palfmt:palfmt, palstr:palstr}, '*');
} }