the cpu object is now passed as the first argument to memory mapped io device interaction functions

This commit is contained in:
Preston Skupinski 2011-06-04 11:36:20 -04:00
parent a0b9497eb4
commit fe0117a1e0

8
cpu.js
View File

@ -372,7 +372,7 @@ var MMU = {
if(device_map_at_bank!=null) {
var device = device_map_at_bank[location];
if(device!=null)
return device.read();
return device.read(this.cpu);
}
return this.memory[this.cpu.r.dbr][location];
},
@ -385,7 +385,7 @@ var MMU = {
if(device_map_at_bank!=null) {
var device = device_map_at_bank[location];
if(device!=null)
return device.read();
return device.read(this.cpu);
}
return this.memory[bank][location];
},
@ -395,7 +395,7 @@ var MMU = {
if(device_map_at_bank!=null) {
var device = device_map_at_bank[location];
if(device!=null)
device.write(b);
device.write(this.cpu, b);
}
this.memory[this.cpu.r.dbr][location] = b;
},
@ -408,7 +408,7 @@ var MMU = {
if(device_map_at_bank!=null) {
var device = device_map_at_bank[location];
if(device!=null)
device.write(b);
device.write(this.cpu, b);
}
this.memory[bank][location] = b;
},