2017-03-16 02:02:27 +01:00
|
|
|
"use strict";
|
|
|
|
/*
|
|
|
|
* Compile time configuration, some only relevant for debug mode
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @define {boolean}
|
|
|
|
* Overridden for production by closure compiler
|
|
|
|
*/
|
|
|
|
var DEBUG = true;
|
|
|
|
|
|
|
|
/** @const */
|
|
|
|
var LOG_TO_FILE = false;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @const
|
|
|
|
* Enables logging all IO port reads and writes. Very verbose
|
|
|
|
*/
|
|
|
|
var LOG_ALL_IO = false;
|
|
|
|
|
2017-06-17 19:59:56 +02:00
|
|
|
/**
|
|
|
|
* @const
|
|
|
|
*/
|
2018-01-26 18:35:22 +01:00
|
|
|
var DUMP_GENERATED_WASM = false;
|
2017-06-17 19:59:56 +02:00
|
|
|
|
2018-02-02 19:20:22 +01:00
|
|
|
/**
|
|
|
|
* @const
|
|
|
|
*/
|
|
|
|
var DUMP_UNCOMPILED_ASSEMBLY = false;
|
|
|
|
|
2018-09-02 01:33:19 +02:00
|
|
|
/**
|
|
|
|
* @const
|
|
|
|
* More accurate filenames in 9p debug messages at the cost of performance.
|
|
|
|
*/
|
|
|
|
var TRACK_FILENAMES = false;
|
2017-03-16 02:02:27 +01:00
|
|
|
|
|
|
|
var LOG_LEVEL = LOG_ALL & ~LOG_PS2 & ~LOG_PIT & ~LOG_VIRTIO & ~LOG_9P & ~LOG_PIC &
|
2021-05-18 01:36:19 +02:00
|
|
|
~LOG_DMA & ~LOG_SERIAL & ~LOG_NET & ~LOG_FLOPPY & ~LOG_DISK & ~LOG_VGA & ~LOG_SB16;
|
2017-03-16 02:02:27 +01:00
|
|
|
|
2018-01-14 03:59:27 +01:00
|
|
|
/**
|
|
|
|
* @const
|
|
|
|
* Draws entire buffer and visualizes the layers that would be drawn
|
|
|
|
*/
|
|
|
|
var DEBUG_SCREEN_LAYERS = DEBUG && false;
|
|
|
|
|
2017-03-16 02:02:27 +01:00
|
|
|
|
|
|
|
/** @const */
|
|
|
|
var ENABLE_HPET = DEBUG && false;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @const
|
|
|
|
* How often, in milliseconds, to yield to the browser for rendering and
|
|
|
|
* running events
|
|
|
|
*/
|
2017-04-01 00:09:11 +02:00
|
|
|
var TIME_PER_FRAME = 1;
|
2017-03-16 02:02:27 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @const
|
|
|
|
* How many ticks the TSC does per millisecond
|
|
|
|
*/
|
2021-01-01 02:14:31 +01:00
|
|
|
var TSC_RATE = 1 * 1000 * 1000;
|
2017-04-02 18:52:51 +02:00
|
|
|
|
|
|
|
/** @const */
|
|
|
|
var APIC_TIMER_FREQ = TSC_RATE;
|