Configurable memory
This commit is contained in:
parent
95beea11ea
commit
f1633becef
16
src/const.js
16
src/const.js
|
@ -2,20 +2,6 @@
|
|||
/** @define {boolean} */
|
||||
var DEBUG = true;
|
||||
|
||||
var
|
||||
|
||||
/**
|
||||
* TODO: Make this configurable
|
||||
* @const
|
||||
*/
|
||||
VGA_MEMORY_SIZE = 128 * 64 * 1024,
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {number}
|
||||
*/
|
||||
memory_size = 1024 * 1024 * 64;
|
||||
|
||||
var
|
||||
|
||||
/** @const */ LOG_ALL = -1,
|
||||
|
@ -160,7 +146,7 @@ PSE_ENABLED = 128,
|
|||
|
||||
|
||||
|
||||
/** @const */ LOOP_COUNTER = 2001,
|
||||
/** @const */ LOOP_COUNTER = 4001,
|
||||
/** @const */ TIME_PER_FRAME = 20;
|
||||
|
||||
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
*/
|
||||
function IO(memory)
|
||||
{
|
||||
var me = this;
|
||||
var me = this,
|
||||
memory_size = memory.size;
|
||||
|
||||
function get_port_description(addr)
|
||||
{
|
||||
|
|
|
@ -16,6 +16,8 @@ function Memory(buffer, memory_size)
|
|||
|
||||
this.buffer = buffer;
|
||||
|
||||
this.size = memory_size;
|
||||
|
||||
// debug function called by all memory reads and writes
|
||||
|
||||
function debug_write(addr, size, value)
|
||||
|
|
Loading…
Reference in a new issue