MegaDrive++ : new switchless region + IGR mod

Discussion in 'Sega Discussion' started by keropi, Apr 26, 2016.

  1. Nopileus

    Nopileus Rapidly Rising Member

    Joined:
    Mar 19, 2015
    Messages:
    77
    Likes Received:
    13
    Nice to find out i'm not insane, it's an arduino nano and i'll be able to flash it easily.
     
  2. SukkoPera

    SukkoPera MegaDrive++/SMS++/NES++ Mastermind

    Joined:
    May 6, 2016
    Messages:
    152
    Likes Received:
    27
    Well, nice catch :). I've prolly never noticed this before since I basically only play Sonic on my MD, where you only use one button at a time.

    Anyway I think I know what's going on now. You don't even need to wiggle L/R, just keep B + C pressed. Or Start + A.

    For the techies: It's a timing issue, where we poll the controller right after the Select signal has been toggled, and the 74HC157 inside the controller still hasn't fully updated the outputs. Its datasheet states a propagation delay of 220 ns in the worst case, so we'll probably allow a full microsecond for it to settle.
     
    keropi likes this.
  3. SukkoPera

    SukkoPera MegaDrive++/SMS++/NES++ Mastermind

    Joined:
    May 6, 2016
    Messages:
    152
    Likes Received:
    27
    OK, this is fixed. I'll just wait for the final confirmation by @Nopileus, then I'll merge the fix in the main version.

    @Bad_Ad84: After the fix, I had to remove something more from the 2313A version, but nothing crucial. Now it stands at 2048 bytes over 2048 available :eek:.

    Anyway, after looking into this issue I'm pretty sure that MD++ will screw up when a 6-button controller is used. I have a couple knockoff controllers, but no game that supports them. Could anyone test some? @keropi maybe? ;)
     
  4. keropi

    keropi Familiar Face

    Joined:
    Feb 2, 2011
    Messages:
    1,068
    Likes Received:
    64
    sure I can test this week, I can easily update my nano... what would be a good test though? something with more than one button press? Maybe something like Gunstar Heroes, where you press constantly a button to fire and then a jump one periodically?
     
  5. SukkoPera

    SukkoPera MegaDrive++/SMS++/NES++ Mastermind

    Joined:
    May 6, 2016
    Messages:
    152
    Likes Received:
    27
    Well, to test this fix just update your Nano once I release the code, and just keep B+C pressed for 10 seconds or so. If you try it now you should see your console reset!

    The 6-button test is a separate thing. Just run a game that uses a 6-button controller and check if MD++ behaves normally. I'm pretty sure it will wreak havoc, but I don't know exactly what to expect ;).
     
  6. MoockyLoock

    MoockyLoock Robust Member

    Joined:
    Apr 22, 2015
    Messages:
    265
    Likes Received:
    50
    i'll give a try to that fix.
    @ SukkoPera, well, you'll feel i'm getting annoying, but can I ask a request ?
    Here it is, feel free not to read after this warning ! :)
    I played a bit with my MegaDrive and its MegaDrive++ mod this week-end. It has its MegaCD 2 attached. It's a PAL MD with a PAL MCD2.
    When you boot the MD&MCD2, the MCD2 checks for the MD's region (actually, it's rather its refresh rate). If you last played a game in 60Hz, the MCD2 display an error message telling it's not designed to work with the actual region.
    You can have the same kind of error with some games that refuse to boot on a foreign refresh rate (PAL Boogerman doesn't boot in 60 Hz).
    When the error message is displayed, the paddle isn't "read" anymore, so you have to use the Reset button to switch the refresh/region.

    So it means that you have to turn On your console (last played in 60Hz), use the Reset Button to change it for 50Hz, reset the console, change the refresh for 60Hz once the game is booted to enjoy its fully.

    My request would be as follows :
    could it be possible to create a new mode, let's say the "auto mode", that boots in 50Hz then automatically switch for 60Hz after a while ? The different options (refresh at boot, final refresh, delay) could be set in the sketch, just like the color ?

    It could be set on the "Up" of the D-Pad.

    Let me know what do you think 'bout this :)

    I really hope you wont feel bad 'bout this request, and take it as an "upgrade" of your mod, and not as a complain.

    Regards.
     
  7. SukkoPera

    SukkoPera MegaDrive++/SMS++/NES++ Mastermind

    Joined:
    May 6, 2016
    Messages:
    152
    Likes Received:
    27
    @Nopileus just confirmed that the fix is fine, so I'm going to merge the changes soon. Just need to go to the Post Office first ;).

    @MoockyLoock: The main reason why I'm here is to get suggestions (and even complaints!), so just go for it! :) I understand your problem and will try to implement a solution right after my holidays and right after the first release of SMS++. Shouldn't be hard to implement though!
     
    MoockyLoock likes this.
  8. Nopileus

    Nopileus Rapidly Rising Member

    Joined:
    Mar 19, 2015
    Messages:
    77
    Likes Received:
    13
    All does appear to be working properly now, at least until someone tests a six button game.

    Here's the way i installed it on my system anyway, seems like the perfect spot. (yes yes i need to clean it)
    To get to the USB connector you have to unscrew the motherboard and lift it slightly.
    [​IMG]
     
  9. MoockyLoock

    MoockyLoock Robust Member

    Joined:
    Apr 22, 2015
    Messages:
    265
    Likes Received:
    50
    hey @Nopileus , isn't your custom crystal the DFO one from micro (from nfggames forum) ?
     
  10. Nopileus

    Nopileus Rapidly Rising Member

    Joined:
    Mar 19, 2015
    Messages:
    77
    Likes Received:
    13
    It is, there is a version of it that fits the footprint properly but i didn't have parts for that on hand and used the regular 5v verson.
    My Saturn and PS1 also have one.
     
  11. MoockyLoock

    MoockyLoock Robust Member

    Joined:
    Apr 22, 2015
    Messages:
    265
    Likes Received:
    50
    'llo here.
    Is the fixed version released or still in private test ?
     
  12. SukkoPera

    SukkoPera MegaDrive++/SMS++/NES++ Mastermind

    Joined:
    May 6, 2016
    Messages:
    152
    Likes Received:
    27
    I have just released it. EVERYONE IS RECOMMENDED TO UPDATE! :)
     
  13. MoockyLoock

    MoockyLoock Robust Member

    Joined:
    Apr 22, 2015
    Messages:
    265
    Likes Received:
    50
    yeaAah !
    i really like the way these "SEGA"++ projects go :)

    EDIT : updated in the GiHub ? the MegaDrivePlusPlus.ino is 2 days aged.
     
  14. SukkoPera

    SukkoPera MegaDrive++/SMS++/NES++ Mastermind

    Joined:
    May 6, 2016
    Messages:
    152
    Likes Received:
    27
    Well, there's a NES++ too, actually! To be honest, it was the first project I started, exactly one year ago! Still, it's the one that is not yet mature enough to encourage people to try it.

    2 days aged is fine, it's when I did the last fix that Nopileus then tested.
     
    Last edited: Aug 9, 2016
  15. MoockyLoock

    MoockyLoock Robust Member

    Joined:
    Apr 22, 2015
    Messages:
    265
    Likes Received:
    50
    I already have the NES-IGR from borti, but if you're in Nintendo too, there some consoles that still miss their IGR too ;)
     
  16. SukkoPera

    SukkoPera MegaDrive++/SMS++/NES++ Mastermind

    Joined:
    May 6, 2016
    Messages:
    152
    Likes Received:
    27
    Actually I'm muuuuuch more of a Nintendo guy! The only console I had as a child was the SNES. Now I almost have them all (and even more than one for most of them, like 4 NES's, 4 SNES's, 3 MD's, 2 MS's, 3 N64's, LOL!), but the SNES still remains my favourite.

    I know about NES-IGR, that's why I switched over to MD++ after working a bit on NES++, to make something that wasn't there yet. I know other consoles still lack IGR, like the N64 and GC. I know how their controllers work, but it's rather complex to snoop the data and interpret it correctly, since the protocol is pretty fast, with signals lasting only a few microseconds, and bidirectional, even if a single wire is used: this means that it's impossible to know who is "speaking" every time you see data flowing. This doesn't mean it can't be done, but that it's way more complex than what I had to do for the NES/MD/SMS, so it'll take its time. Besides, there's already a lot of work going on behind the curtains for MD++ and SMS++! ;)

    PS: By the way, NES++ has a couple more features than NES-IGR (CIC control!), and only uses a single chip, which is why I set working on it initially.
     
  17. MoockyLoock

    MoockyLoock Robust Member

    Joined:
    Apr 22, 2015
    Messages:
    265
    Likes Received:
    50
    I've read 'bout your new features, such as the CIC disabling. Neat ! but as my NES are already set with borti's boards, i won't take part of this project (even if i'll still follow it).
    The N64 and GC were the two consoles I was thinking about :)
    But if you ever search in this way, keep in mind that there is that UltraHDMI board for N64 (enabling HDMI) that is sniffing the controller for an OSD menu. So it may interradt with your possibly IGR board.
     
  18. eric90000

    eric90000 Rising Member

    Joined:
    May 30, 2016
    Messages:
    55
    Likes Received:
    11
    Hey guys, I will be installing this in my Japanese MD1 as soon as my Nano arrives. I have been studying all of the various instructions pages and wiring diagrams.
    One thing I am not sure about is the RGB LED wiring. I have 5mm common cathode RGB LEDs. The diagram on the GitHub says to put a resistor on the cathode (which goes to ground) and connect the other 3 legs directly to the Red/Green/Blue points on the Nano board.
    However, most other RGB LED wiring diagrams say make sure you put a resistor on each of the 3 RGB legs and put the cathode straight to ground. Besides using more resistors, are there differences/benefits to each method?

    Thanks for making this by the way SukkoPera, it seems super handy. I just wish I had found it before I drilled holes and installed region/language toggle switches :(
     
  19. rama

    rama Gutsy Member

    Joined:
    Dec 17, 2015
    Messages:
    477
    Likes Received:
    112
    @Nopileus I noticed your little DFO on the Mega Drive :)
    Do you have a way to program it? I'd like to reprogram mine for some tests but I don't have the right programmer, I believe.
    I've got an Arduino or RasPi available though.
     
  20. SukkoPera

    SukkoPera MegaDrive++/SMS++/NES++ Mastermind

    Joined:
    May 6, 2016
    Messages:
    152
    Likes Received:
    27
    It's better to have separate resistors for the R/G/B legs. Using a single resistor on the common leg is only acceptable if you are never going to have more than one color lit at a single time. I'm not sure what the wiki says on the topic, but I'll try to fix that ASAP.

    Using separate resistors also allows you to balance the colors properly. Usually the red led is "weaker" and thus needs a smaller resistor. To do this properly you should look at the led datasheet, but in practice I just use 220 ohms on the red, and then I try various resistors on the other legs until all combinations look good ;).
     
    Last edited: Aug 30, 2016
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page