Page 1 of 1

SNES VHDL mappers for CPLD

Posted: Fri Apr 30, 2021 3:40 pm
by mightydidz
Hello guys, I was wondering if any of you know if an open source vhdl code exist for the snes cartridge mapper.
In the past I built myself some repro cart using discrete hardware and jumpers to choose between lo/hi/ex and it worked fine.
I'd like to port it into a CPLD, something like a MAXII, I'll add voltage shifters.
Before investing lot of time into quartus ii, I was wondering if any of you know of an existing vhdl mappers for snes cartridge?

Thanks

Re: SNES VHDL mappers for CPLD

Posted: Sat May 01, 2021 5:37 pm
by Joe
Aren't SNES cartridge mappers pretty simple? If you're using 5V ROMs, you might be able to use a smaller 5V-tolerant programmable logic device, like the ones lidnariq suggested in this post.

Re: SNES VHDL mappers for CPLD

Posted: Sat May 01, 2021 5:52 pm
by lidnariq
Yeah, the canonical SNES "mapper" is just a multiplexer, where any given pin is Address line N, address line N+1, constant high, or constant low. It's only really of use when if you're trying to make a multicart of different memory map games: otherwise you bake the map in at PCB fabrication time.

Re: SNES VHDL mappers for CPLD

Posted: Mon May 03, 2021 5:55 am
by mightydidz
I know its pretty simple, its only a N+1 address line for lorom skipping A15.
Only SRAM!CE and Rom!CE need special attention, but aren't difficult to program into a VHDL code.

I simply wanted to save time for vhdl design. I want a mapper with a single jumper to select between lorom/hirom and possibly exhi.

CPLD would simply multiplex A15-A21 depending on the jumper status.
Multiplexing sram upgrade would also be nice.

Is an existing vhld already exist, or should I design it myself in quartus?