bfirsh / bfirsh/jsnes

MMC5 (Mapper 5): completely non-functional stub

Open
#596 0 comments 0 reactions 0 assignees View on GitHub
bug component: mapper difficulty: hard priority: high
Dominant language
JavaScript
Stars
6.4k
Forks
857
PR merge metrics
No merged PRs in 30d

Description

## Summary

The Mapper 5 (MMC5) implementation calls methods that don't exist anywhere in the codebase. Any game using this mapper will crash immediately.

## Missing methods called

- \`this.SetBank_SRAM(3, value & 3)\` — line 61
- \`this.SetBank_CPU(address, value)\` — line 67
- \`this.SetBank_PPU()\` — lines 79, 88
- \`this.nes.cpu.ClearIRQ()\` — lines 101, 105

## Other issues

- Many instance properties used but never initialized (\`nametable_type\`, \`chr_page\`, \`chr_mode\`, \`irq_status\`, etc.)
- \`loadROM()\` error message says "UNROM" instead of "MMC5"
- No battery RAM loading

## Affected games

Castlevania III: Dracula's Curse, Just Breed, Laser Invasion, Metal Slader Glory, Uncharted Waters

## Recommendation

Either implement MMC5 properly or remove it from the mapper list with a clear error message explaining it's unsupported. The current stub is worse than no support because it crashes silently.

## References

- [MMC5 wiki](https://www.nesdev.org/wiki/MMC5)

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the MMC5 mapper implementation and inspect the calls to SetBank_SRAM, SetBank_CPU, SetBank_PPU, and ClearIRQ, along with the uninitialized properties and mapper list entry. Read the linked MMC5 wiki reference first. Done means either implementing supported MMC5 behavior, including the listed missing pieces and battery RAM loading, or removing the mapper with a clear unsupported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
game-dev
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.