Skip to content

VIC chip addressing fix #95

@aycock

Description

@aycock

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions