Skip to content

Commit

Permalink
128k Ay-3-8912 soundchip emulation routines
Browse files Browse the repository at this point in the history
  • Loading branch information
U-PII\colesd authored and U-PII\colesd committed May 31, 2013
1 parent 13c264e commit e9fab62
Show file tree
Hide file tree
Showing 3 changed files with 749 additions and 11 deletions.
14 changes: 13 additions & 1 deletion core/io_bus.js
Expand Up @@ -14,7 +14,10 @@ JSSpeccy.IOBus = function(opts) {
} else if ((addr & 0x00e0) === 0x0000) {
/* kempston joystick */
return 0;
} else {
} else if (addr == 0xfffd) {
return sound.readSoundRegister();
}
else {
return 0xff;
}
};
Expand All @@ -27,6 +30,15 @@ JSSpeccy.IOBus = function(opts) {
if (!(addr & 0x8002)) {
memory.setPaging(val);
}

if (addr==0xfffd) {
sound.selectSoundRegister( val & 0xF );
}

if (addr==0xbffd || addr == 0xbefd) {
sound.writeSoundRegister(val);
}

};

self.isULAPort = function(addr) {
Expand Down

0 comments on commit e9fab62

Please sign in to comment.