10 MB Flat cart using discrete logic

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

Post Reply
mightydidz
Newbie
Posts: 7
Joined: Sun Jan 09, 2022 1:02 pm

10 MB Flat cart using discrete logic

Post by mightydidz » Tue Feb 15, 2022 8:36 pm

I’d like to build myself a custom Genesis board.
I already built a 4MB board with onboard 32K SRAM and it works great.

Using 74HC74 and 74HC139, I’ve asserted ROM-CE and RAM-CE using /CE_O, /VRES, /TIME, D0, A21.
/CART is tied to ground.
/CAS_0 is used as /OE for both ROM and RAM
I’m using /LWR on RAM /WR
Its a pretty simple circuit since it only covers $00 0000 - $3F FFFF.

This time I’d like to push it a little further since I like challenges.
I’d like to have access to the full range $00 0000 - $9F FFFF
I want to make it 10MB on 3x27C322 EEPROM
I’ve been reading a lot lately and learned a lot about advanced address decoding

I read about /DTACK (data transfer acknowledge), it needs to be assert for $80 0000 - $9F FFFF.
I need to pull it low when accessing this area.

I planned to assert it when /AS is low and the address lines match $80 0000 - $9F FFFF, meaning A23 high, A22 low and A21 low. Would using a 139 decoder would do the trick?
dtack.png
dtack.png (5.87 KiB) Viewed 28237 times
I also need to create specific /CE for the two additional EPROM.
This is where I get confused, because fewer signals are asserted over $7F FFFF. I only found limited info on which signal to use.
I read /CAS_0 is asserted for the whole $00 0000-$DF FFFF but for reads only. I’ll only use it for /OE
I suppose /AS would work since its purpose is to inform of a valid address bus address.
I still hesitate to use /CEO, but I dont think its asserted for $80 0000 - $9F FFFF
eprom ce.png
eprom ce.png (4.5 KiB) Viewed 28237 times
Did I got it or I missed something?
Thanks

Mask of Destiny
Very interested
Posts: 615
Joined: Thu Nov 30, 2006 6:30 am

Re: 10 MB Flat cart using discrete logic

Post by Mask of Destiny » Tue Feb 15, 2022 11:45 pm

mightydidz wrote:
Tue Feb 15, 2022 8:36 pm
I read about /DTACK (data transfer acknowledge), it needs to be assert for $80 0000 - $9F FFFF.
I need to pull it low when accessing this area.

I planned to assert it when /AS is low and the address lines match $80 0000 - $9F FFFF, meaning A23 high, A22 low and A21 low. Would using a 139 decoder would do the trick?
/DTACK is an open drain input, which means you never want to actively drive it high, only low. The 139 actively drives its outputs regardless of whether they are low (active) or high (inactive) which is bad.
mightydidz wrote:
Tue Feb 15, 2022 8:36 pm
This is where I get confused, because fewer signals are asserted over $7F FFFF. I only found limited info on which signal to use.
I read /CAS_0 is asserted for the whole $00 0000-$DF FFFF but for reads only. I’ll only use it for /OE
I suppose /AS would work since its purpose is to inform of a valid address bus address.
I still hesitate to use /CEO, but I dont think its asserted for $80 0000 - $9F FFFF
For the 0-$3FFFFF range you should use /CE0 as this will avoid bus fights with TMSS on systems where it's present. For the other regions you will want to generate !CE yourself using the top 3 address lines.

Using !AS as an ingredient in both of these is more correct for the 68K, but I seem to remember that it is not asserted during DMA so you may run into problems there. That said, I don't think DMA works properly for the $800000 - $9FFFFF range anyway (it doesn't work properly on my Mega Everdrive v1 at least).

One other thing I feel I should point out is that doing a flat mapped cart like this will conflict with the Sega/Mega CD and 32X if either of those is present.

mightydidz
Newbie
Posts: 7
Joined: Sun Jan 09, 2022 1:02 pm

Re: 10 MB Flat cart using discrete logic

Post by mightydidz » Wed Feb 16, 2022 4:53 pm

Mask of Destiny wrote:
Tue Feb 15, 2022 11:45 pm
/DTACK is an open drain input, which means you never want to actively drive it high, only low. The 139 actively drives its outputs regardless of whether they are low (active) or high (inactive) which is bad.
Thanks for this reminder, since its an open drain input it needs to be floating when its not asserted?
Would it work using simple logic gate with transistor?
I was thinking using 3NOR + AND + NPN to assert /DTACK.
dtack logic.png
dtack logic.png (3.46 KiB) Viewed 28197 times

masteries
Very interested
Posts: 53
Joined: Thu Jul 30, 2020 3:33 pm

Re: 10 MB Flat cart using discrete logic

Post by masteries » Wed Feb 16, 2022 4:55 pm

Thanks for your effort, very interesting,

Please, when you reached final design, share with us

10 MB is a must for very high detailed games,

mightydidz
Newbie
Posts: 7
Joined: Sun Jan 09, 2022 1:02 pm

Re: 10 MB Flat cart using discrete logic

Post by mightydidz » Sat Feb 26, 2022 2:38 pm

I will definetly share but I must find more information about /ce for third rom and dma for the $800000 - $9fffff region.

There is no reply, so cannot do a lot.

Charles MacDonald
Very interested
Posts: 292
Joined: Sat Apr 21, 2007 1:14 am

Re: 10 MB Flat cart using discrete logic

Post by Charles MacDonald » Sat Apr 09, 2022 4:16 pm

The ROM3-CE# signal is correct though IC5B doesn't need input A=A23, as A23 is already checked by IC5A, thus when IC5B is decoding A23 is always low.

DTACK# can be the same as your ROM3-CE#, but you can run it through a 74HC1G125 buffer like this to make it open drain:

Input A : Ground
Output enable : ROM3-CE#
Output Y : DTACK#

This will pull DTACK# low whenever ROM3-CE# is asserted, otherwise it will float.

It sounds like this cart is for homebrew anyway? So for the lack of DMA in 800000-9FFFFF you can put code there instead, or data tables, etc.

mightydidz
Newbie
Posts: 7
Joined: Sun Jan 09, 2022 1:02 pm

Re: 10 MB Flat cart using discrete logic

Post by mightydidz » Sun Apr 10, 2022 10:41 pm

Thank for replying,
I'll definitely give it a try.
It I understood, I cannot put any graphical contents in region $800000-9fffff?

Was wondering if umkt would work with this schematic?

Charles MacDonald
Very interested
Posts: 292
Joined: Sat Apr 21, 2007 1:14 am

Re: 10 MB Flat cart using discrete logic

Post by Charles MacDonald » Sun Apr 17, 2022 6:03 pm

You can still store graphics data in $800000-$9FFFFF if you'd like, you just can't transfer it to the VDP using DMA. Instead you can write 68000 code to transfer the data to the VDP.

If you test it let us know how it works. I think nobody's tried it before, so your results will be interesting.

Mask of Destiny
Very interested
Posts: 615
Joined: Thu Nov 30, 2006 6:30 am

Re: 10 MB Flat cart using discrete logic

Post by Mask of Destiny » Tue Apr 19, 2022 1:13 am

The Mega Everdrive supports 10MB flat carts so it's definitely been tried (and I can confirm DMA does not work in the >8MB region, though I suppose it's possible there's something specific to the MED implementation). Pretty sure this is the first discrete logic implementation though

mightydidz
Newbie
Posts: 7
Joined: Sun Jan 09, 2022 1:02 pm

Re: 10 MB Flat cart using discrete logic

Post by mightydidz » Thu Nov 17, 2022 12:52 pm

I found this 8mb cartridge , it's simply using nand gates
https://www.retrorgb.com/fx-unit-yuki-p ... drive.html

A combinaison of /ce0, /asel and a22.

Wondering if someone have this schematic?

Is it better to use these signals instead of /as to create the roms /ce?

HardWareMan
Very interested
Posts: 745
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Re: 10 MB Flat cart using discrete logic

Post by HardWareMan » Thu Nov 17, 2022 5:05 pm

/AS didn't asserted when DMA does access. So yes, using /ASEL is a good idea.

mightydidz
Newbie
Posts: 7
Joined: Sun Jan 09, 2022 1:02 pm

Re: 10 MB Flat cart using discrete logic

Post by mightydidz » Thu Nov 17, 2022 5:52 pm

I tried this schematic using LS00 NAND gates.
It does work when its only a single 4mb game.

I only get garbage marble when I try to start a 2x4mb game.

Any idea what I need to adjust to have it working with 2x 4mb game?
I know the rom is good, since I tested into an aliexpress umkt board.
Its a cheapo 3v cpld mapper, that why I'd like to build myself a safe discrete 5v version.

Regards,
Attachments
8mb nand gates.JPG
8mb nand gates.JPG (36.26 KiB) Viewed 25167 times

HardWareMan
Very interested
Posts: 745
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Re: 10 MB Flat cart using discrete logic

Post by HardWareMan » Fri Nov 18, 2022 6:41 am

You done it wrong. /ASEL is /CS for whole 8MB region. I'll just leave it here.
Image
Also your 2NAND logic with /ASEL and /CE0 can burn your console because there must be 2OR logic. So, if you disconnect /CE0 and connect 13 pin to 12 you'll get the right result. Yes, /ASEL should be just inverted before it will put onto those 2NAND.

mightydidz
Newbie
Posts: 7
Joined: Sun Jan 09, 2022 1:02 pm

Re: 10 MB Flat cart using discrete logic

Post by mightydidz » Fri Nov 18, 2022 12:45 pm

for fx-unit-yuki they did use /CEO.

I tried removing /CEO and used /ASEL twice as input as you suggested but no success.

I wonder if its maybe my rom preparation?
I swap binned before splitting into 2 parts.
I also tried splitting before swapbin, but no luck, only black screen.

On my umkt aliexpress tsop cart, I only swapbinned since it can support 10mb, no splitting required.
That's why i swap binned before splitting for this 4v uv eeprom project.
In trying to make the same rom work on another cartridge.

It this point I'm really confused since nothing seems to work pass 4mb.

I simply like to have a working 8mb discrete mapper.

I also found this other thread:
viewtopic.php?t=1826
It uses a 139 decoder instead of nand gates.

Is it likely to have better results?
Attachments
md-8mb.jpg
md-8mb.jpg (114.8 KiB) Viewed 25133 times

Post Reply