Sharp MMC1 Reverse Engineered

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderator: Moderators

Post Reply
User avatar
org
Posts: 155
Joined: Tue Aug 07, 2012 12:27 pm

Sharp MMC1 Reverse Engineered

Post by org »

Hello.

MMC1 circuit reconstruction completed:

https://github.com/emu-russia/mappers/tree/main/MMC1

All the materials are there, including the topology and cell layout, as well as an automatically restored Verilog netlist.
Attachments
package.jpg
package.jpg (20.82 KiB) Viewed 1366 times
mmc1a_annotated_sm.jpg
pads.png
netlist.png
Last edited by org on Sat Jun 24, 2023 11:35 pm, edited 2 times in total.
User avatar
dink
Posts: 157
Joined: Sun Jan 12, 2020 8:42 pm

Re: Sharp MMC1A Reverse Engineered

Post by dink »

nice work! Can we find out exactly how this works: https://www.nesdev.org/wiki/MMC1#Consec ... cle_writes ?

best regards,
- dink
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Sharp MMC1A Reverse Engineered

Post by lidnariq »

org just released a logisim schematic. https://raw.githubusercontent.com/emu-r ... ogisim.jpg

On a falling edge of M2 ...
gates 25 and 26 latch NOT(R/W) AND NOT(delayed(/ROMSEL))
which is then ANDed with NOT(delayed(M2))
which is then delayed
and a rising edge of that signal is what latches things in the shift register.

and no I don't understand how that works.
User avatar
org
Posts: 155
Joined: Tue Aug 07, 2012 12:27 pm

Re: Sharp MMC1A Reverse Engineered

Post by org »

Logisim adaptation made by andkorzh :beer:
User avatar
org
Posts: 155
Joined: Tue Aug 07, 2012 12:27 pm

Re: Sharp MMC1A Reverse Engineered

Post by org »

Can we find out exactly how this works
I have added a test bench so that you can do your own experiments.

https://github.com/emu-russia/mappers/t ... MC1/icarus

As for the ignored-second-write, I am attaching the waves.
Attachments
waves_ignored.png
paulb_nl
Posts: 32
Joined: Fri Nov 18, 2016 7:57 am

Re: Sharp MMC1A Reverse Engineered

Post by paulb_nl »

lidnariq wrote: Sat Jun 10, 2023 3:15 pm org just released a logisim schematic. https://raw.githubusercontent.com/emu-r ... ogisim.jpg

On a falling edge of M2 ...
gates 25 and 26 latch NOT(R/W) AND NOT(delayed(/ROMSEL))
which is then ANDed with NOT(delayed(M2))
which is then delayed
and a rising edge of that signal is what latches things in the shift register.

and no I don't understand how that works.
So when R/W and /ROMSEL are both low on the falling edge of M2 then the signal goes high. Two consecutive writes will keep that signal high so there is only one rising edge. It needs either a read or /ROMSEL to go high before it can produce a rising edge again.

The bit 7 reset is latched at (rising?) edge of M2: (/ROMSEL OR R/W OR NOT(D7)) so every write with D7 set will reset the shift register.
User avatar
org
Posts: 155
Joined: Tue Aug 07, 2012 12:27 pm

Re: Sharp MMC1A Reverse Engineered

Post by org »

Shift register is never reset. The divider that runs in parallel with the shift register and is responsible for turning on the register decoder is reset. The description on the nesdev wiki does not take this pecularity into account.
User avatar
org
Posts: 155
Joined: Tue Aug 07, 2012 12:27 pm

Re: Sharp MMC1A Reverse Engineered

Post by org »

Fixed a small inaccuracy: the dffre cell is actually dffrs (set used during MMC1 reset).

https://github.com/emu-russia/mappers/b ... s.md#dffrs

Updated waves for MMC1 reset.
Attachments
waves.png
User avatar
Quietust
Posts: 1920
Joined: Sun Sep 19, 2004 10:59 pm
Contact:

Re: Sharp MMC1A Reverse Engineered

Post by Quietust »

This wasn't pointed out earlier, but this chip wasn't actually an MMC1A (which looks like this) but a letterless MMC1. However, it still seems to behave the same as the MMC1A.
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.
User avatar
org
Posts: 155
Joined: Tue Aug 07, 2012 12:27 pm

Re: Sharp MMC1 Reverse Engineered

Post by org »

Fixed :beer:
Post Reply