Skip to content

Mbc1Cartrige.__getitem__ -> None return value #2

@zstewar1

Description

@zstewar1

Mbc1Cartridge.__getitem__ will return None for RAM addresses when ram_enable is off.

Is this intended behavior? It seems to me like a more obvious default action would be to return 0x0, and I haven't checked, but that seems more like what hardware would do if you accessed a disabled thing.

Unless that action is supposed to signal an interrupt or something and None is a sigil return value to tell the emulator to trigger that interrupt, but if that is the case, then None should probably be returned explicitly, and a comment should be added explaining why, when all the other functions return integers.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions