Skip to content

Commit

Permalink
Check econet is enabled before accessing data
Browse files Browse the repository at this point in the history
Fixes #456
  • Loading branch information
mattgodbolt committed Nov 11, 2024
1 parent 4e5f366 commit 487c598
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion 6502.js
Original file line number Diff line number Diff line change
Expand Up @@ -735,12 +735,13 @@ export class Cpu6502 extends Base6502 {
}

handleEconetStationId() {
if (!this.econet) return 0xff;
this.econet.econetNMIEnabled = false;
return this.econet.stationId;
}

handleEconetNMIEnable() {
if (!this.econet.econetNMIEnabled) {
if (this.econet && !this.econet.econetNMIEnabled) {
// was off
this.econet.econetNMIEnabled = true;
if (this.econet.ADLC.status1 & 128) {
Expand Down

0 comments on commit 487c598

Please sign in to comment.