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

VIC chip addressing fix #95

Open
aycock opened this issue Apr 20, 2024 · 0 comments
Open

VIC chip addressing fix #95

aycock opened this issue Apr 20, 2024 · 0 comments

Comments

@aycock
Copy link

aycock commented Apr 20, 2024

The VIC chip couldn't address the full 16-bit address space, and programmers took advantage of this to have access to both custom chars and in-ROM char sets at the same time. Here's one discussion of this: https://sleepingelephant.com/~sleeping/ipw-web/bulletin/bb/viewtopic.php?p=111327&sid=f729b55c1b19ce39fe779605640d517b#p111327

You can see the emulation bug if you run, say, Jeff Minter's Gridrunner (http://www.minotaurproject.co.uk/downloads/softography/vic20/gridrunner-vic20.zip) because the numbers won't display correctly.

If this line:

uint16_t data = (sys->color_ram[addr & 0x03FF]<<8) | mem_rd(&sys->mem_vic, addr);

is changed to:
uint16_t data = (sys->color_ram[addr & 0x03FF]<<8) | mem_rd(&sys->mem_vic, addr & 0x3fff);
then it seems to fix the problem.

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

No branches or pull requests

1 participant