don't click here

Open Source Sega Hardware

Discussion in 'General Sega Discussion' started by biggestsonicfan, Oct 24, 2018.

  1. biggestsonicfan

    biggestsonicfan

    Model2wannaB Tech Member
    1,608
    406
    63
    ALWAYS Sonic the Fighters
    A Mega Blaster (Hardware Sega Genesis Video Game Music Player), a custom 3-button Mega Drive controller, 8BitDo Mod Kit for Original MD Controller, and a Mega Sg FPGA. All of these creations are based on original Sega parts or equivalents thereof.

    My question is: Why hasn't Retro looked into the hardware aspect of Sega more than what relatively poor support Sega Forever and the various AtGames clones have to offer?

    I would prefer if legal implications aren't discussed in the thread because obviously, you can't go around selling bootleg hardware at that level, but why can't we come up with a relatively nice solution for classic or arcade software to be played with the advancement of technology in this modern era. I was thinking something along the lines of a Retrode or the HyperKin SmartBoy, but not limited to the function of a PC or a Mobile Device. We could even perhaps take things a step further with homebrew and additional custom hardware, or even create our own debugging software for real-time fiddling with the software being used. For example, Pocket Sonar uses an additional PCB in it's cartridge. The data from the game could be pulled and analyzed on hardware rather than bitbanging random addresses in an attempt to yield results in an emulator.

    Thoughts?
     
  2. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    19,218
    965
    93
    Long-term happiness
    The cynic in me says "because Kodi boxes are easy to set up and Retrode just shows as a USB device so is also not hard to do"... but eh =P
     
  3. Turbohog

    Turbohog

    Member
    923
    117
    43
    I actually know a thing or two about FPGAs and I've thought about this a bit. Once I get the time I'd really like to look into it more. I believe there have been some open cores released that emulate at least parts of Sega HW. But no full set of open cores has ever been released for a Genesis, correct?

    What I would like to see is a full Genesis core that can be implemented onto a variety of FPGAs, not some commercial Genesis clone.
     
  4. biggestsonicfan

    biggestsonicfan

    Model2wannaB Tech Member
    1,608
    406
    63
    ALWAYS Sonic the Fighters
    There is this MiSTer FPGA, which can handle SMS, Genesis, and even Pengo. But perhaps knowing about FPGAs might help us out here if you could elaborate a bit on what an FPGA is and how it would benefit this type of project. The idea of replicating component-to-component compatible circuit logic on a board does indeed seem like a daunting, but intriguing, task and it would seem FPGAs, or field-programmable gate arrays, can handle "cores" like a system-on-a-chip instead of physical components. I may be getting this wrong, but I feel that that's why this thread is important to help those understand their options a little better.
     
  5. BlackHole

    BlackHole

    You're going to need MORE than help. Member
    5,645
    771
    93
    England
    Complaining
    I'd love to develop a SEGA Dream Drive, with hardware for all SEGA games to boot up, a slot for Master System, Mega Drive, 32X and Saturn carts and a disc drive for Mega CD, Saturn and Dreamcast discs.

    Failing that being possible, I'd love to see a SEGA Mega Drive: Genesis/Genesis: Mega Drive design that hosts the parts for the addons: Mega Drive, 32X and CD, all within the Mega Drive shell. But alas, I'm not particularly good at designing hardward, just disassembling and reassembling it, so I'm unsure of such viability. Can anyone fathom if such a thing is possible?
     
  6. ICEknight

    ICEknight

    Researcher Researcher
    It would just need a USB port to connect a Retrode, a regular CD drive and... an SD card reader?

    EDIT: Oh, that would still leave Saturn cartridges out of the equation. =\
     
  7. Aesculapius Piranha

    Aesculapius Piranha

    つづく Oldbie
    4,534
    143
    43
    Unknown
    Diva
    I mean, there is a lot of Sega hardware and a lot of different ways of attacking this. Most hardware related things I've seen from Sonic hacking are console mods. Still, the way OSH has gained more and more popularity, it very well may be time to start making Sega related hardware demos. Its not like I haven't been bouncing around the idea.

    I guess I am curious what we should be putting here, though. Just general SEGA hardware knowledge?
     
  8. BlackHole

    BlackHole

    You're going to need MORE than help. Member
    5,645
    771
    93
    England
    Complaining
    So if a project like this were to occur, would it focus on emulation or would the project actually attempt to try and transfer bios and other programming to new hardware?
     
  9. biggestsonicfan

    biggestsonicfan

    Model2wannaB Tech Member
    1,608
    406
    63
    ALWAYS Sonic the Fighters
    Hardware knowledge and perhaps we could start linking "for parts only" listings of Sega products to better understand them. I'm planning on something for arcade hardware eventually but I've got a lot to learn.


    Personally, I would focus on accuracy to the hardware source to modern day components, but that's a very broad definition. Many SoC boards like the RPi could emulate without so much as a hiccup (don't quote me I don't RPi at all), so my point here is to create a system by which legitimately owned software could be played and deliver enhancements such as hardware enabled scanlines, GameGenie support, hell even add your own peripherals like a 4-player tap built-in or as daughter board.

    I'm not too keen on the idea of "ROM loading", because that is basically all Sega does these days, leaving many carts to stay as collectibles or get the Atari E.T. treatment someday. Granted, open source, you're gonna have that guy mod the cart loader into a ROM haven.

    What this thread should become, imho, is a repository for those willing to share hardware knowledge, and who would like to maintain what parts. For example, if we do not have a reputable supply of PCB connectors to attach the game software to the open source boards, the project will become difficult to say the least. If someone would be willing to design based on their experiences with the hardware and have those parts made, from there parts could be exchanged or sold to other open source hardware makers. If someone else can get a nice supply of a certain IC for cheap, etc... There's gonna be a lot of prototyping before we see anything light up on a board I'm sure.

    EDIT: Case VERY MUCH IN POINT the TinyNES.
     
  10. Turbohog

    Turbohog

    Member
    923
    117
    43
    Thanks for the link. I've been hearing about this project a bit lately and hadn't looked into it at all.

    So basically, a field programmable gate array (FPGA) can be thought of as a re-programmable silicon chip. FPGAs are used in commercial products and are also sometimes used for both prototyping ASICs (since they are reconfigurable). Normally, you create circuit designs for an FPGA by writing in a hardware description language (HDL) such as Verilog or VHDL. HDLs are very different beasts from programming languages as you are describing hardware that runs in parallel and not sequential code, which is how you normally think when writing software. After your HDL is written, you use tools, normally provided by FPGA vendors, to physically map the design to hardware. Depending on the complexity of the design, this can take anywhere from a few minutes to a week. Cores are often distributed that contain implemented FPGA circuits; sometimes these are open and you can see and edit the HDL. Sometimes the cores are distributed in other ways where you can't see the source. It can be pretty difficult to do write HDL, etc. which is probably why FPGA-based emulators and things aren't more common right now.

    The advantage of using FPGAs is of course that if you have the proper knowledge of a some piece of Sega hardware, you could replicate it nearly exactly on an FPGA. So if you knew exactly how the processor used in the Sega Genesis worked, you could basically create an identical implementation of it on an FPGA. Same goes with any other Sega HW. You could then in theory add functionality to the hardware as well.

    It looks like the MisterFPGA project is using a board with an Intel SoC that contains an FPGA coupled to a hard ARM processor (as opposed to a soft processor implemented in an FPGA). I don't know the details, but they are doing some sort of hybrid-approach to emulation - some things are emulated by software (with the ARM processor) and some things are emulated by the FPGA. Specifically looking at the Genesis portion of the project, they have cores for the main CPU (TG68K), the sound CPU (Z80), the Sega PSG sound chip, and whatever the JT12 is.

    While the TinyNES looks cool, I honestly think FPGAs are a better long-term option as you aren't necessarily dependent on having original hardware like the TinyNes project uses.
     
  11. ICEknight

    ICEknight

    Researcher Researcher
    So... the best kind of "open source Mega Drive" would be a replica of the very first mother board, but with all the chips replaced with FPGAs programmed to exactly mimic the original ones?
     
  12. biggestsonicfan

    biggestsonicfan

    Model2wannaB Tech Member
    1,608
    406
    63
    ALWAYS Sonic the Fighters
    Hmm... this sets an incredibly large gap for those who wish to contribute though. Also, I don't quite understand the FPGA supply chain? Are you limited to whatever FPGA you use, like a particular brand? While I do believe Application-Specific Integrated Circuits (ASICs) would be very difficult to find for the original hardware, it very much seems like Sega would have invented the wheel, we use the wheel, we research the wheel, then reinvent it exactly... It really seems like more effort than it's worth, but I do believe it is an avenue worth taking due to the literal ASICs used in the many different hardware types of Sega BIOSes and arcade components used throughout the years, such as the Lockheed Martin flight simulator tech for the Model2 boards. I don't, however, believe it should be used for the consoles, as the consoles were designed for home entertainment and needed to be designed specifically to handle the entire library of software with any ASICs being integrated on the PCB of the cartridge and interfacing through the board connector. They are mini-computers designed for a specific function, and I believe FPGAs compromise that logic if embedded in a malleable FPGA if that makes sense...

    Basically, I believe the high learning curve of FPGAs and the cost excludes participation from the OSH project, but I also believe it is a necessity to run the arcade hardware, as desoldering and remounting SMT ASICs is just going to be an expensive pain in the ass if anyone wants to further any type of Sega arcade hardware. A steady supply chain of 1:1 compatible components spread throughout everyone's findings and research could dramatically reduce the cost of polished, presentable product people can modify and continue on developing.

    EDIT: Also, if you have your whole system reliant on one FPGA, and something happens to it, you have to replace it with another FPGA, and not just another IC from ebay or from here on Retro.

    From what Open Source Hardware should be, you should never be defined to a "replica of a motherboard", especially given the first model of the MD. If anything, I believe the Model 3 Genesis was an efficient use of space, and also is roughly the size of a small external CD-ROM drive for Sega CD loading. But the nature of Open Source allows us to modify however we wanted, so anyone could take, oh let's say we do design a platform based on the scale of the original MD to fit inside current Mega Drives as a replacement board, they could modify this and add connectors and remove whatever they wanted to create their own board sizes and dimensions. Also if you were going to install each IC as an FPGA individiually and not program all the ICs inside the FPGA together, you're talking lots of do$h here.
     
  13. Scarred Sun

    Scarred Sun

    Be who you needed when you were younger Administrator
    7,745
    127
    101
    Tower 8 ️
    Welp, this.
    I think a large part of that lack of "looking into" things is that we just don't have anyone interested/who knows electrical engineering versus folks who want to work in software development.

    For example, I've bandied about with the idea of building a modern Sega Channel cartridge that would allow games to be streamed into a Mega Drive, but: I have no idea how to do that aside from "call a hardware consultant and have them build to business requirements". Likewise with some attempts that were floating around earlier to build a "real" Sega Neptune.

    That said, I've got the logistics/manufacturing side if someone ever wants to pursue such sorts of hardware seriously.
     
  14. biggestsonicfan

    biggestsonicfan

    Model2wannaB Tech Member
    1,608
    406
    63
    ALWAYS Sonic the Fighters
    There are people out there who literally got an SNES modem and within a few days managed to duplicate it successfully in an emulator as part of a retro programming challenge, all while also managing to dump the SRAM from a Gameboy Camera in their spare time just because they happen to make a wonderful adapter to hook an N64 controller to USB.

    Meanwhile, we have someone so dedicated to cracking the Saturn's copy protection to "use for audio samples", they did not realize the Model2 arcade hardware which is considerably less expensive holds no copy protection, uses the exact same audio hardware, and samples could be loaded among many EEPROMs and be programmed for the Intel 960. So, they lied about their intentions without doing any research first, and I think that's where a lot of the problem lies with Sega hardware: NO one cares to do the research whereas Nintendo fanboys actually lived the hardware design era.
     
  15. Black Squirrel

    Black Squirrel

    no reverse gear Wiki Sysop
    8,543
    2,465
    93
    Northumberland, UK
    steamboat wiki
    Usually these sorts of hardware projects gain traction when there's a genuine need for them to exist. There are people making replacement sound card devices for IBM PCs because the price of real ones second hand is extortionate. With the original NES, the 10NES chip can stop a system from working, and picture quality is poor - you might not want to deal with that noise in 2018.


    However with a Mega Drive, there are millions out there that still work fine. Emulation is above average and Sega has most of its best games readily available on almost everything produced this century - your dream will come true eventually, but in the here and now, the problems aren't big enough to deal with.
     
  16. biggestsonicfan

    biggestsonicfan

    Model2wannaB Tech Member
    1,608
    406
    63
    ALWAYS Sonic the Fighters
    [​IMG]

    You are technically correct, which is the best kind of correct. I put "if Sonic Mania can do it" as a sub-tag merely because without Sonic Mania, would we really have a point of reference to judge things like Sonic Forces or other attempts Sega has made at 'classic' Sonic if the collective efforts and knowledge of what was essentially the community shared info to establish a solid enough foundation for what 'classic' really is?

    I know it's not going to happen any time soon, but that doesn't mean I can't be the mad scientist and post my research notes first so others may benefit down the line. We're literally starting the foundation in this thread mind you. Well, my foundation anyway. Anyone and everyone is welcome to build from their own ground up mind you.
     
  17. biggestsonicfan

    biggestsonicfan

    Model2wannaB Tech Member
    1,608
    406
    63
    ALWAYS Sonic the Fighters
    So for Christmas my mom revealed that Pengo was her favorite arcade games and now I want to do the Pengo FPGA....
     
  18. Aerosol

    Aerosol

    Not here. Moderator
    11,163
    573
    93
    Not where I want to be.
    Sonic (?): Coming summer of 2055...?
    Things like this are what initially drew me towards electrical engineering as an area of study.
     
  19. FPGA technology is always going to be a winner. Especially since I've seen and experienced quite a few well-known brands who showed me their work-in-progress of a new product being implemented in an FPGA as a proof-of-concept.

    FPGAs are always my go-to for when I have to marry ancient systems to new ones.

    Reproducing old SEGA chips at the silicon level is going to be prohibitively expensive.. because technology moves on. The process used in those days, is likely very costly now. Every year the semiconductor industry chases the goal of smaller feature sizes and processes to get costs down and yields high. This is why an FPGA makes even more sense. If the FPGA is obsolete, no problem, recompile the HDL source for the new FPGA (after adjusting the constraints file to account for the differences incurred in silicon) and BOOM, back in business.

    BUT, getting everything beautifully cloned is always a challenge. I would love to know if companies like SEGA hang onto hardware IP of yesteryear or if it becomes destroyed during the dissolution of various business units i.e. when they stopped making hardware, did they lay off all those people and then just bin all the source code, hardware files, etc? Because if by some miracle, you could obtain that, it would make an IP core of the original hardware quite easy to develop. I suspect they hang onto it, but will charge you an absolute fortune + licensing fees if you even were successful in requesting a license to reproduce it. An example that comes to mind is that HOLLY chip in the Dreamcast. I see lots of surplus stock of that chip on Chinese websites (I suspect 8 out of 10 ads are fake), but yeah, reproducing that functionality accurately in an FPGA as a soft core, would be amazing.
     
  20. biggestsonicfan

    biggestsonicfan

    Model2wannaB Tech Member
    1,608
    406
    63
    ALWAYS Sonic the Fighters
    I completely disagree. The design of the original Sega hardware, especially for systems not fully reverse engineered such as the 32X and select arcade boards, namely Model2 onwards and including things like the Triforce and Lindbergh, will not be possible to create 1:1 hardware setups within the FPGAs. It's not a question of redesigning the wheel, but using components from older, dead hardware, and recycling that into new boards like the Mega Blaster does in the original post. In some cases, we may never have a blueprint of the silicon layout to reproduce into an FPGA. The homebrew hardware scene is very niche, yes, and does require quite a bit of time to source components, but can produce very high-quality results.

    There is also the factor of what interference should be caused by component layouts in the original design as well as any flaws that exist. As far as I understand, FPGAs mitigate these design flaws.