mirror of
https://github.com/pskupinski/65816.js.git
synced 2024-06-06 14:29:28 +00:00
the cpu object is now passed as the first argument to memory mapped io device interaction functions
This commit is contained in:
parent
a0b9497eb4
commit
fe0117a1e0
8
cpu.js
8
cpu.js
|
@ -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;
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user