test
This commit is contained in:
parent
d964c21903
commit
83e9dbd1e6
3 changed files with 15 additions and 7 deletions
|
|
@ -390,6 +390,7 @@ function ScriptedAmigaEmulator() {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.start_program = function() {
|
this.start_program = function() {
|
||||||
|
console.warn("stage 2");
|
||||||
this.do_start_program();
|
this.do_start_program();
|
||||||
|
|
||||||
if (typeof SAEV_config.hook.event.started === "function")
|
if (typeof SAEV_config.hook.event.started === "function")
|
||||||
|
|
@ -447,6 +448,8 @@ function ScriptedAmigaEmulator() {
|
||||||
}
|
}
|
||||||
SAEF_info("sae.start() starting...");
|
SAEF_info("sae.start() starting...");
|
||||||
|
|
||||||
|
console.warn("stage 1");
|
||||||
|
|
||||||
var err;
|
var err;
|
||||||
if ((err = this.config.setup()) != SAEE_None)
|
if ((err = this.config.setup()) != SAEE_None)
|
||||||
return err;
|
return err;
|
||||||
|
|
|
||||||
14
sae/m68k.js
14
sae/m68k.js
|
|
@ -198,8 +198,8 @@ function SAEO_M68K() {
|
||||||
else
|
else
|
||||||
setTimeout(function() { SAER.m68k.m68k_cycle(0, 0); }, 0);
|
setTimeout(function() { SAER.m68k.m68k_cycle(0, 0); }, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
var counter = 0;
|
var counter = 0;
|
||||||
|
|
||||||
this.m68k_cycle = function(hardboot, startup) {
|
this.m68k_cycle = function(hardboot, startup) {
|
||||||
try {
|
try {
|
||||||
|
|
@ -207,6 +207,8 @@ var counter = 0;
|
||||||
cpu_keyboardreset = SAEV_command == SAEC_command_KeyboardReset;
|
cpu_keyboardreset = SAEV_command == SAEC_command_KeyboardReset;
|
||||||
cpu_hardreset = ((SAEV_command == SAEC_command_HardReset ? 1 : 0) | hardboot) != 0;
|
cpu_hardreset = ((SAEV_command == SAEC_command_HardReset ? 1 : 0) | hardboot) != 0;
|
||||||
|
|
||||||
|
console.warn("m68k_cycle() command start...", SAEV_command, cpu_hardreset);
|
||||||
|
|
||||||
if (SAEV_command == SAEC_command_Quit) {
|
if (SAEV_command == SAEC_command_Quit) {
|
||||||
this.m68k_gone();
|
this.m68k_gone();
|
||||||
return;
|
return;
|
||||||
|
|
@ -243,6 +245,7 @@ var counter = 0;
|
||||||
SAEV_config.hook.event.reseted(cpu_hardreset);
|
SAEV_config.hook.event.reseted(cpu_hardreset);
|
||||||
|
|
||||||
cpu_hardreset = false;
|
cpu_hardreset = false;
|
||||||
|
console.warn("m68k_cycle() ...command done", SAEV_command, cpu_hardreset);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (startup) {
|
if (startup) {
|
||||||
|
|
@ -265,13 +268,13 @@ var counter = 0;
|
||||||
if (prevtime !== false) // && SAEV_config.cpu.speed >= 0)
|
if (prevtime !== false) // && SAEV_config.cpu.speed >= 0)
|
||||||
SAEV_Events_reflowtime = SAEF_now() - prevtime;
|
SAEV_Events_reflowtime = SAEF_now() - prevtime;
|
||||||
|
|
||||||
|
console.log("loop", counter++);
|
||||||
|
|
||||||
SAER_CPU_run_func();
|
SAER_CPU_run_func();
|
||||||
|
|
||||||
//if (SAEV_config.cpu.speed >= 0)
|
//if (SAEV_config.cpu.speed >= 0)
|
||||||
prevtime = SAEF_now();
|
prevtime = SAEF_now();
|
||||||
|
|
||||||
console.log("loop", counter++);
|
|
||||||
|
|
||||||
setTimeout(function() { SAER.m68k.m68k_cycle(hardboot, startup); }, 0);
|
setTimeout(function() { SAER.m68k.m68k_cycle(hardboot, startup); }, 0);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
this.m68k_gone();
|
this.m68k_gone();
|
||||||
|
|
@ -288,6 +291,7 @@ console.log("loop", counter++);
|
||||||
var hardboot = 1;
|
var hardboot = 1;
|
||||||
var startup = 1;
|
var startup = 1;
|
||||||
|
|
||||||
|
console.warn("stage 3, calling setTimeout()...");
|
||||||
counter = 0;
|
counter = 0;
|
||||||
|
|
||||||
//SAEF_info("m68k.m68k_go()");
|
//SAEF_info("m68k.m68k_go()");
|
||||||
|
|
@ -296,6 +300,8 @@ counter = 0;
|
||||||
SAER.running = true;
|
SAER.running = true;
|
||||||
//this.m68k_cycle(1, 1);
|
//this.m68k_cycle(1, 1);
|
||||||
setTimeout(function() { SAER.m68k.m68k_cycle(hardboot, startup); }, 0);
|
setTimeout(function() { SAER.m68k.m68k_cycle(hardboot, startup); }, 0);
|
||||||
|
|
||||||
|
console.warn("stage 4, ...done");
|
||||||
}
|
}
|
||||||
this.m68k_gone = function() {
|
this.m68k_gone = function() {
|
||||||
//SAEF_info("m68k.m68k_gone()");
|
//SAEF_info("m68k.m68k_gone()");
|
||||||
|
|
|
||||||
|
|
@ -479,7 +479,7 @@ function SAEF_ZFile_fopen_file(file) {
|
||||||
var l = SAEF_ZFile_create(null, file.name);
|
var l = SAEF_ZFile_create(null, file.name);
|
||||||
l.name = file.name.length ? file.name : "";
|
l.name = file.name.length ? file.name : "";
|
||||||
|
|
||||||
if (0) { /* ptr-mode. do not enable */
|
if (0) { /* reference-mode. do not enable */
|
||||||
l.data = file.data;
|
l.data = file.data;
|
||||||
} else {
|
} else {
|
||||||
l.data = new Uint8Array(file.size);
|
l.data = new Uint8Array(file.size);
|
||||||
|
|
@ -495,8 +495,7 @@ function SAEF_ZFile_fopen_file(file) {
|
||||||
|
|
||||||
var magic = ((l.data[0] << 24) | (l.data[1] << 16) | (l.data[2] << 8) | (l.data[3])) >>> 0;
|
var magic = ((l.data[0] << 24) | (l.data[1] << 16) | (l.data[2] << 8) | (l.data[3])) >>> 0;
|
||||||
|
|
||||||
SAEF_log("SAEF_ZFile_fopen_file() opening '%s', %d/%d bytes, crc32 0x%08x, magic %08x",
|
//SAEF_log("SAEF_ZFile_fopen_file() opening '%s', %d/%d bytes, crc32 0x%08x, magic %08x", l.name, l.size, l.data.length, file.crc32 !== false ? file.crc32 : 0, magic);
|
||||||
l.name, l.size, l.data.length, file.crc32 !== false ? file.crc32 : 0, magic);
|
|
||||||
|
|
||||||
if (magic == 0x04034B50 || magic == 0x504B0304)
|
if (magic == 0x04034B50 || magic == 0x504B0304)
|
||||||
SAEF_fatal(SAEE_Config_Compressed, "A ZIP file was detected. Compressed files are not yet supported.");
|
SAEF_fatal(SAEE_Config_Compressed, "A ZIP file was detected. Compressed files are not yet supported.");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue