LOG_ALL_IO configuration if necessary for heavy debugging
This commit is contained in:
parent
4e816e7105
commit
d728c1c667
15
src/io.js
15
src/io.js
|
@ -1,5 +1,8 @@
|
|||
"use strict";
|
||||
|
||||
/** @const */
|
||||
var LOG_ALL_IO = false;
|
||||
|
||||
/**
|
||||
* The ISA IO bus
|
||||
* Devices register their ports here
|
||||
|
@ -335,7 +338,7 @@ IO.prototype.port_write8 = function(port_addr, data)
|
|||
{
|
||||
var entry = this.ports[port_addr];
|
||||
|
||||
if(entry.write8 === this.empty_port_write)
|
||||
if(entry.write8 === this.empty_port_write || LOG_ALL_IO)
|
||||
{
|
||||
dbg_log(
|
||||
"write8 port #" + h(port_addr, 4) + " <- " + h(data, 2) + this.get_port_description(port_addr),
|
||||
|
@ -349,7 +352,7 @@ IO.prototype.port_write16 = function(port_addr, data)
|
|||
{
|
||||
var entry = this.ports[port_addr];
|
||||
|
||||
if(entry.write16 === this.empty_port_write)
|
||||
if(entry.write16 === this.empty_port_write || LOG_ALL_IO)
|
||||
{
|
||||
dbg_log(
|
||||
"write16 port #" + h(port_addr, 4) + " <- " + h(data, 4) + this.get_port_description(port_addr),
|
||||
|
@ -363,7 +366,7 @@ IO.prototype.port_write32 = function(port_addr, data)
|
|||
{
|
||||
var entry = this.ports[port_addr];
|
||||
|
||||
if(entry.write32 === this.empty_port_write)
|
||||
if(entry.write32 === this.empty_port_write || LOG_ALL_IO)
|
||||
{
|
||||
dbg_log(
|
||||
"write32 port #" + h(port_addr, 4) + " <- " + h(data, 8) + this.get_port_description(port_addr),
|
||||
|
@ -377,7 +380,7 @@ IO.prototype.port_read8 = function(port_addr)
|
|||
{
|
||||
var entry = this.ports[port_addr];
|
||||
|
||||
if(entry.read8 === this.empty_port_read8)
|
||||
if(entry.read8 === this.empty_port_read8 || LOG_ALL_IO)
|
||||
{
|
||||
dbg_log(
|
||||
"read8 port #" + h(port_addr, 4) + this.get_port_description(port_addr),
|
||||
|
@ -391,7 +394,7 @@ IO.prototype.port_read16 = function(port_addr)
|
|||
{
|
||||
var entry = this.ports[port_addr];
|
||||
|
||||
if(entry.read16 === this.empty_port_read16)
|
||||
if(entry.read16 === this.empty_port_read16 || LOG_ALL_IO)
|
||||
{
|
||||
dbg_log(
|
||||
"read16 port #" + h(port_addr, 4) + this.get_port_description(port_addr),
|
||||
|
@ -405,7 +408,7 @@ IO.prototype.port_read32 = function(port_addr)
|
|||
{
|
||||
var entry = this.ports[port_addr];
|
||||
|
||||
if(entry.read32 === this.empty_port_read32)
|
||||
if(entry.read32 === this.empty_port_read32 || LOG_ALL_IO)
|
||||
{
|
||||
dbg_log(
|
||||
"read32 port #" + h(port_addr, 4) + this.get_port_description(port_addr),
|
||||
|
|
Loading…
Reference in a new issue