Configurable memory

This commit is contained in:
copy 2014-01-08 03:19:02 +01:00
parent 95beea11ea
commit f1633becef
3 changed files with 5 additions and 16 deletions

View file

@ -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;

View file

@ -8,7 +8,8 @@
*/
function IO(memory)
{
var me = this;
var me = this,
memory_size = memory.size;
function get_port_description(addr)
{

View file

@ -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)