Page 1 of 1
10 MB Flat cart using discrete logic
Posted: Tue Feb 15, 2022 8:36 pm
by mightydidz
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 (5.87 KiB) Viewed 41285 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 (4.5 KiB) Viewed 41285 times
Did I got it or I missed something?
Thanks
Re: 10 MB Flat cart using discrete logic
Posted: Tue Feb 15, 2022 11:45 pm
by Mask of Destiny
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.
Re: 10 MB Flat cart using discrete logic
Posted: Wed Feb 16, 2022 4:53 pm
by mightydidz
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 (3.46 KiB) Viewed 41245 times
Re: 10 MB Flat cart using discrete logic
Posted: Wed Feb 16, 2022 4:55 pm
by masteries
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,
Re: 10 MB Flat cart using discrete logic
Posted: Sat Feb 26, 2022 2:38 pm
by mightydidz
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.
Re: 10 MB Flat cart using discrete logic
Posted: Sat Apr 09, 2022 4:16 pm
by Charles MacDonald
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.
Re: 10 MB Flat cart using discrete logic
Posted: Sun Apr 10, 2022 10:41 pm
by mightydidz
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?
Re: 10 MB Flat cart using discrete logic
Posted: Sun Apr 17, 2022 6:03 pm
by Charles MacDonald
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.
Re: 10 MB Flat cart using discrete logic
Posted: Tue Apr 19, 2022 1:13 am
by Mask of Destiny
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
Re: 10 MB Flat cart using discrete logic
Posted: Thu Nov 17, 2022 12:52 pm
by mightydidz
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?
Re: 10 MB Flat cart using discrete logic
Posted: Thu Nov 17, 2022 5:05 pm
by HardWareMan
/AS didn't asserted when DMA does access. So yes, using /ASEL is a good idea.
Re: 10 MB Flat cart using discrete logic
Posted: Thu Nov 17, 2022 5:52 pm
by mightydidz
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,
Re: 10 MB Flat cart using discrete logic
Posted: Fri Nov 18, 2022 6:41 am
by HardWareMan
You done it wrong. /ASEL is /CS for whole 8MB region. I'll just leave it here.
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.
Re: 10 MB Flat cart using discrete logic
Posted: Fri Nov 18, 2022 12:45 pm
by mightydidz
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?