Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support "proper" address translation #326

Open
mattgodbolt opened this issue Jul 7, 2021 · 0 comments
Open

Support "proper" address translation #326

mattgodbolt opened this issue Jul 7, 2021 · 0 comments
Labels

Comments

@mattgodbolt
Copy link
Owner

jsbeeb/video.js

Lines 245 to 264 in a2cf276

this.readVideoMem = function () {
if (this.addr & 0x2000) {
// Mode 7 chunky addressing mode if MA13 set.
// Address offset by scanline is ignored.
// On model B only, there's a quirk for reading 0x3c00.
// See: http://www.retrosoftware.co.uk/forum/viewtopic.php?f=73&t=1011
var memAddr = this.addr & 0x3ff;
if ((this.addr & 0x800) || this.isMaster) {
memAddr |= 0x7c00;
} else {
memAddr |= 0x3c00;
}
return this.cpu.videoRead(memAddr);
} else {
var addr = (this.scanlineCounter & 0x07) | (this.addr << 3);
// Perform screen address wrap around if MA12 set
if (this.addr & 0x1000) addr += this.screenAdd;
return this.cpu.videoRead(addr & 0x7fff);
}
};

c.f. http://beebwiki.mdfs.net/Address_translation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant