MiGeRA / FlashKit-MD-Plus

Продвинутая и расширенная редакция утилиты работы с интерфейсом (программатором) перезаписываемых Sega MegaDrive/Genesis картриджей – FlashKit MD
12 stars 5 forks source link

Is there a possibility to add 128Mbit support? #3

Open tspfreitas opened 1 year ago

tspfreitas commented 1 year ago

I have studied your page and made a custom pcb using the MX26L6420 memory using your available diagram, and the software for the programmer, but there was a doubt related to homebrews larger than 64Mbit, in this case it would be the Mortal Kombat Trilogy that today reaches 13MB then I thought about making a custom pcb for 128Mbit that would have 16MB available to make this homebrew, what do you suggest in this case would your diagram work? just adding memory address A22 to the bus? or some extra hardware or extra logic would be needed for the higher address mapping. And in terms of programming using your software, there would be the possibility of adding other types of memory using the data sheet.

Thanks in advance for the answers, and sorry for my bad English, I'm using google translator follow my contact email if necessary to exchange documentation and data freitastsp@gmail.com

MiGeRA commented 1 year ago

I happy feedback from you. I am sure that my English is no better than yours ... "Google is our everything" ;-)

8MB is the maximum size for a "linear-addressable" cartridge, which does not require additional circuitry other than a memory chip (provided there is no sega-cd connected).

But in factical, the size limit is 10MB, however this requires additional circuitry logic for generating the DTAck signal when accessing the cartridge at addresses from 8 to 10 megabytes.

Further in next address space, all the big reserves of the Megadrive architecture in terms of the linear-continuous address space are running out!

Yes, you can use a page switcher, for example, with the classic SSF algorithm, but the program must also support it inside. All "hacks" of games larger than 10MB (if it is not SSF) were created either for custom hardware or for a modified emulator.

Something like this ;-)

tspfreitas commented 1 year ago

Wow, thanks for the answer I'm really happy that you answered me, now I don't know if this is the area where we can talk about it, but would you help me to implement the SSF algorithm on a custom card to achieve these 128Mbit, in case question was looking at the Mortal kombat Trilogy hack, I would like to know how to implement it on real hardware where in this last update it used to have 10MB now it has 13MB, so I would need to use the algorithm to access Dtack, I'm still learning about it , but I learn quickly and I like knowledge, curious hehehe

follow the link of the rom hack in question of the patch: https://www.romhacking.net/hacks/1059/

tspfreitas commented 1 year ago

Logica_Sonic_Delta I have this diagram provided by a Brazilian as well where he manages to reach 40Mbit or 5MB, but unfortunately he doesn't answer questions or share how to develop this for real hardware without charging money for such knowledge, which we both know was acquired for free on the internet shared by people like you for knowledge and trivia and even running our hobbies for our beloved Megadrive or genesis

MiGeRA commented 1 year ago

I read the your post a long time ago and right away. I remember that I need to answer, but I was busy, there was not enough time, unfortunately ... And then I also messed around with Google-translation ;-/

In continuation of the topic. Perhaps I will repeat, or once again I will tell the well-known and obvious points. But still, I’ll break it down here, which cartridges for Megadrive (without SRAM or FRAM save-game memory) have practical applications and which ones can be designed for use with existing and already available software:

  1. The simplest one (which I proposed to create) is the “classic” 4MB (32Mbit): just a memory chip of the appropriate size, although the memory size may be smaller (if it is not in demand). But in the case of a smaller size, you need to take into account the pinout of memory chips - there is no compatibility within one form factor variant, even chips of the same size from different manufacturers can have different pinouts (coincidence is more an exception than a rule);
  2. Cartridge double size - 8MB (64Mbit), with linear addressing. This is an unofficial decision - Sega has never released a game with a similar cartridge address space map. The second four megabytes, according to Sega's idea, should be occupied by Sega-CD and no other use is officially allowed for them (on a conceptual, organizational level, of course). But far from everyone has a Sega-CD, and it hasn’t grown tightly if anything ... So why not use completely unnecessary addresses with a simple access algorithm? Thus, based on a cartridge of this architecture, various demos are created, and sometimes hacks of games. Creating such a cartridge is no more difficult than the first one (but without backward compatibility). I checked and described my experiment (in an article on the my site), here I will once again remind you of this project with a photo. There are only two differences from the "classics": one more address line is used and another chip selection signal is used.

csp232-8m

  1. The largest possible size cartridge with linear addressing is 10MB (80Mbit). And here there are no options - because next address space after is used by the equipment of the set-top box and we are forced to accept this fact as it is. Making such a cart is a little more difficult (requires additional logic, such as CPLD). Firstly, you need to manually decode the addressing (from 0x800000 to 0x9FFFFF) and generate an enable signal for the memory chip by combining, and secondly, generate a DTack for the specified addresses (from the cart to the console). The architecture of such a cartridge is supported by the Mega EverDrive x7 device, I don’t see the point in making it separately in bare metal.

There are no other options for linear addressing.

The scope for fantasies on the topic of switching pages of a memory chip by mappers is endless. There is an opinion that for Sega there is one mapper for almost all cases - SSF2. This is not entirely true. Just from the official (licensed from Sega) gaming products, it is the only game that used the simplest page switcher was Street Fighter 2 (hence the name). From open sources, its implementation looks like this.

SSF2 logic mapper

In a general sense, the purpose of creating such a cartridge can only be the desire to record one single designated game (and its modifications).

For independent creativity and programming, as a target platform, you can choose any of the cartridges described above, or develop something else (as the creators of Pier Solar did). Or use the Pier Solar mapper ;-))

As for your question about SSF2, it all depends on what goal you are pursuing. What memory chip do you have or what size do you intend to assemble from several chips. The mapper architecture (if you need to keep backwards compatibility with) SSF2 contains a limit only in the size of the page number register (8bit) - i.e. the maximum size of attached memory is up to 128MB (1Gbit). Yes, a large cartridge with a mapper can be turned into a multi-game cartridge (with classic games without a mapper).

But for multi-game cartridges, mappers other than SSF2 are more commonly used (as in the case in the picture below).

wd1602-qfpl

And why do you need to create a cart for this mutilated and bloated Mortal Kombat? Those version of MK that are up to 8 or up to 10 MB work great on Mega EverDrive x7 (they will work on similar hardware) ... The rest too long - do not work ;-) I have no idea how they were created, on which and how modified emulators such crap was supposed to run. I'm not interested in this as a fact (my interest is hardware, not its emulation), on the other hand I'm not a fan of fighting games as a game genre.

supneo commented 1 year ago

photo_2023-08-01_14-54-01 photo_2023-08-01_14-55-06

Hello, this is 2 GB, it would be nice to be able to flash this kind of cartridge.

MiGeRA commented 1 year ago

There is certainly an opportunity to flash this and similar carts! After all, a flash memory chip is installed here. But there are two nuances that need to be resolved first:

  1. Find the WE pin on the adapter board of the memory chip (which is quite possibly not connected to the circuit and you will have to look for the desired test-point) - after that you can unsolder the adapter with the microcircuit, trace the purpose of the remaining signal lines, connect it anywhat to a programmer, reflash ... Then solder back.
  2. It’s not a fact that it’s possible at all or it may require significant modernization (including changing the cpld configuration) ... At best, to provide in-circuit programming (ex. using FlashKit tools) of such a cart, you need to learn control the mapper to switch pages, for example, by disassembling the start menu code ( I have made attempts to do this, but have not yet achieved a satisfactory result of work reconstructioned algorithm). It may also be possible has command to control the WE signal over mapper - but not necessarily.

Well, in any case, you will need to tune and adjust (in terms names of game and pictures) the interface of the main menu for selecting the game, or write your own.

Do you have the opportunity to contribute at least one of the above points?

tspfreitas commented 1 year ago

When I opened the topic, I actually wanted something simpler and more compatible, even if a cpld was needed for such a feat, which was a 128Mb cartridge for homebrew, which was possible to program by flashkit (with some necessary modifications in the software) like this as it was made to support 64Mb. But I still couldn't make such a cartridge work, only the 64Mb one using MX29LV640 and S29GL064, the one mentioned in your blog the MX26L6420 didn't work at all, so I just ignored it (it may have been a lot of bad Chinese garbage, because it worked up to 32Mb normally ). my success in 64Mb using the other flash memories mentioned above, is 100% proven and tested, I just wanted to expand to 128Mb discreetly, or with cpld even, but keeping the advantage of using the flashkit for reprogramming. as far as I researched I need to generate the DTACK signal to access the other area of available memory, in this case 80Mb or 10MB which is the maximum without a mapper, that's exactly what I want, and in the future when my games grow I can think about implementing a mapper, do you happen to have any idea and how to discreetly do the DTACK to reach the maximum limit of 80Mb. I'm here to add anything if needed, from software to hardware for testing.

alx5962 commented 2 months ago

I have studied your page and made a custom pcb using the MX26L6420 memory using your available diagram, and the software for the programmer, but there was a doubt related to homebrews larger than 64Mbit, in this case it would be the Mortal Kombat Trilogy that today reaches 13MB then I thought about making a custom pcb for 128Mbit that would have 16MB available to make this homebrew, what do you suggest in this case would your diagram work? just adding memory address A22 to the bus? or some extra hardware or extra logic would be needed for the higher address mapping. And in terms of programming using your software, there would be the possibility of adding other types of memory using the data sheet.

Thanks in advance for the answers, and sorry for my bad English, I'm using google translator follow my contact email if necessary to exchange documentation and data freitastsp@gmail.com

Hello, I'm very interested by your PCB as I need to flash MX26L6420 eprom but cannot find a way to flash it. Do you mind to share it? thanks

MiGeRA commented 2 months ago

In this project, I suggested using the MX26L6420 as an affordable and suitable form factor (SOP-44) option for creating a cartridge with a memory size of 8 Megabytes for MegaDrive compatible game console. Just in case, I would like to draw your attention once again to the fact that this software util is dedicated to using the FlashKit programmer as a tool for working with MegaDrive\Genesis carts. If your goal is to record such a chip for other purposes, then of course you can go the way of buying a FlashKit and finding/making a "cartridge" board to use it as an adapter. But I'm not sure that this path is optimal. Wouldn't it be easier to pay attention to ready-made programmers designed specifically for working with bare memory chips, and not as part of game console cartridges?

alx5962 commented 2 months ago

In this project, I suggested using the MX26L6420 as an affordable and suitable form factor (SOP-44) option for creating a cartridge with a memory size of 8 Megabytes for MegaDrive compatible game console. Just in case, I would like to draw your attention once again to the fact that this software util is dedicated to using the FlashKit programmer as a tool for working with MegaDrive\Genesis carts. If your goal is to record such a chip for other purposes, then of course you can go the way of buying a FlashKit and finding/making a "cartridge" board to use it as an adapter. But I'm not sure that this path is optimal. Wouldn't it be easier to pay attention to ready-made programmers designed specifically for working with bare memory chips, and not as part of game console cartridges?

First, thank you for the reply. I need to flash a MX26L6420 for an arcade board and not for a MD. I cannot find a single info about a programmer compatible with this chip unluckily. I spent hours on Google and very few results about the MX26L6420, one lead me here. So I try to find an alternative way to flash this chip, and as some MD/SNES repros use it, it may solve my problem.

MiGeRA commented 2 months ago

I simply used the documentation for this chip (here: https://www.alldatasheet.com/datasheet-pdf/pdf/74450/MCNIX/MX26L6420.html) and made adjustments to the existing program code. In fact, the programming algorithm is the same for many series of chips, the difference is in the memory size (need to be taken into account programmatically) and pinout (make the right adapter). In principle, a large chip can be written in two steps by switching the senior leg of the address manually with a jumper - as device on half size (for how your programmer-tools might thinks). For this chip (L6420), the writing algorithm is classic and it can be written in parts on a programmer that can realise this algrithm (for example MX29LV320, M29W320 anf etc ...)

tspfreitas commented 1 month ago

In this project, I suggested using the MX26L6420 as an affordable and suitable form factor (SOP-44) option for creating a cartridge with a memory size of 8 Megabytes for MegaDrive compatible game console. Just in case, I would like to draw your attention once again to the fact that this software util is dedicated to using the FlashKit programmer as a tool for working with MegaDrive\Genesis carts. If your goal is to record such a chip for other purposes, then of course you can go the way of buying a FlashKit and finding/making a "cartridge" board to use it as an adapter. But I'm not sure that this path is optimal. Wouldn't it be easier to pay attention to ready-made programmers designed specifically for working with bare memory chips, and not as part of game console cartridges?

First, thank you for the reply. I need to flash a MX26L6420 for an arcade board and not for a MD. I cannot find a single info about a programmer compatible with this chip unluckily. I spent hours on Google and very few results about the MX26L6420, one lead me here. So I try to find an alternative way to flash this chip, and as some MD/SNES repros use it, it may solve my problem.

Hello Firstly, as MiGeRA reported, the use of this software for the flash kit is perfect, I have been using it for a long time and without any problems, a tip I give you because from what I saw you want to reprogram it for arcade, in this case no It will be of use to you because the algorithm has a byte swap logic, something that in arcade games mostly doesn't work that way, even the SNES doesn't work that way, however if you really need a sop44 memory with a pinout compatible with the MX26L6420, I I made a tsop48/sop44 adapter (using the 29LV640/29GL064 family)

tspfreitas commented 1 month ago

https://github.com/tspfreitas/Tsop48-SOP44