It is currently Fri Dec 14, 2018 11:21 pm

All times are UTC - 7 hours



Forum rules


1. NO BLATANT PIRACY. This includes reproducing homebrew less than 10 years old, with the exception of free software.
2. No advertising your reproductions, with the exception of free software.
3. Be nice. See RFC 1855 if you aren't sure what this means.



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Tue Jul 03, 2018 3:51 pm 
Offline

Joined: Sun Jun 12, 2011 12:06 pm
Posts: 448
Location: Poland
I wanted to test Punch Out on real console, but implementing MMC2 on my current flash-cartridge was not possible as this mapper needs access to whole PPU address bus. So I thought of creating new PCB. My goal was to use EPM3064 as CPLD (It is 5V tolerant) + DIP EEPROMs (I was not fancy playing with EPM240 and 245 shiftters, because I wanted simple, small and compact PCB).

One of the problem is that EPM3064 has 30 I/O pins (XC9572 has 34). But MMC2 needs
PRG_A[16..13] + CHR_A[16..12] + CPU_A[14..12] + CPU D[4..0] + nROMSEL + RnW + PRG_CE + PPU_A[13..0] + PPU_nRD + CIRAM_A10 = 4 + 5 + 3 + 5 + 1 + 1 + 1 + 14 + 1 + 1 = 36

* for M2, despite being connected to original chip, I don't see any use
* luckily, MMC2 does not have any power-up known state so no external reset need to be wired

I looked at the binary of PPU addresses that need to be hijacked by MMC2 for tile switching:
Code:
     | 1111
     | 32109876543210
     |     xxxx  xyyy
0FD8 | 00111111011000
0FE8 | 00111111101000
     |
1FD8 | 01111111011000
..   |
1FDF | 01111111011111
     |
1FE8 | 01111111101000
..   |
1FEF | 01111111101111


and I thought that:
* PPU A12/11/10 have to be wired for mirroring or knowing the CHR bank, but..
* from PPU_A9/8/7/6/3 I just need to know if they are all ones, so I need only AND of them
* from PPU_A2/1/0 i just need to know if they are all zeros, so I need only OR of them
so it gives 36 - 5 +1 - 3 + 1 = 30 (just barely enough!)

I could also add the PPU_!A13 to AND product (instead of wiring PPU_A13) but on many cheap famiclones, PPU_!A13 and CIRAM_!CS are not wired to the connector at all.
And I used diodes for all that logic!

I wired R/!W to PRG-!WE, !ROMSEL to PRG-!CS, and PRG-!CE to PRG-!OE because I wanted to be able to reflash it using kazzo in future.

Image Image Image Image

I burned EPROMS, soldered everything and... Unfortunatelly the cartridge did not booted at all (sometimes few chords of music from Punch Out were played but it did not go even to the title screen).

So I quattro checked all connections, VHDL code, even dumped the PRG/CHR using kazzo, everything seemed to be correct, but it was not working in console. Then I rewired PRG-!WE to VCC and it worked! Looks like mapper bankswitch writes messes internal state of the 29EE010 EPROM.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group