mirror of
https://github.com/trebonian/visual6502.git
synced 2025-01-02 06:29:41 +00:00
Z80: updated handleBusRead() to leave the databus at 0xFF between reads
This commit is contained in:
parent
924074e305
commit
5005774b1b
@ -110,22 +110,20 @@ var state = 0;
|
||||
var last_rd_done = 1;
|
||||
|
||||
function handleBusRead(){
|
||||
if(!isNodeHigh(nodenames['_m1']) && !isNodeHigh(nodenames['_iorq'])) {
|
||||
// Interrupt acknownledge cycle, force 0xFF onto the bus
|
||||
// In IM0 this is seen as RST 0x38
|
||||
// In IM1 this is ignored
|
||||
// In IM2 this is used as the low byte of the vector
|
||||
// TODO: ideally this "vector" would be a configurable parameter
|
||||
writeDataBus(0xff);
|
||||
} else if(!isNodeHigh(nodenames['_rd'])){
|
||||
if(!isNodeHigh(nodenames['_rd']) && !isNodeHigh(nodenames['_mreq'])) {
|
||||
// Memory read
|
||||
var a = readAddressBus();
|
||||
var d = eval(readTriggers[a]);
|
||||
if(d == undefined)
|
||||
d = mRead(readAddressBus());
|
||||
if(!isNodeHigh(nodenames['_m1']) && !isNodeHigh(nodenames['_mreq'])) {
|
||||
if(!isNodeHigh(nodenames['_m1'])) {
|
||||
eval(fetchTriggers[d]);
|
||||
}
|
||||
writeDataBus(d);
|
||||
} else {
|
||||
// In all other cases we set the data bus to FF
|
||||
// as a crude indicateion that it's not being driven
|
||||
writeDataBus(0xff);
|
||||
}
|
||||
|
||||
// Prefix / displacement / opcode state machine, deals with:
|
||||
|
Loading…
Reference in New Issue
Block a user