Git Product home page Git Product logo

Comments (40)

chulpanovich avatar chulpanovich commented on May 17, 2024 2

Cool :). Remember that if you sell (or somehow share) your version you also need to offer the source code.

I remember:)

from megadriveplusplus.

chulpanovich avatar chulpanovich commented on May 17, 2024 1

I have added a disable function to the experimental branch: if the console is powered up while Down is held, combo detection will be disabled and IGR and mode switching from the controller will no longer work.

Please test and report.

Yes thank you. I will check back soon and let you know.

from megadriveplusplus.

chulpanovich avatar chulpanovich commented on May 17, 2024 1

it's on the console R68 and R69. I checked on a MD2 Europe 3pcs. I had no such problem on the MD2 Asia model. I will check in the future on different revisions of MD1 and MD2.

from megadriveplusplus.

SukkoPera avatar SukkoPera commented on May 17, 2024

I'm pretty sure this is due to the 8BitDo receiver ouputting 3.3V instead of 5V as it should. I have already investigated this with the help of a friend due to the same receiver not working with OpenC64MegaDrivePadAdapter. He measured 3.25V when the button is not pressed.

I don't really want to cope with shortcomings due to bad designs by other people, but I can add some way of turning MD++ off temporarily.

from megadriveplusplus.

SukkoPera avatar SukkoPera commented on May 17, 2024

I have added a disable function to the experimental branch: if the console is powered up while Down is held, combo detection will be disabled and IGR and mode switching from the controller will no longer work.

Please test and report.

from megadriveplusplus.

chulpanovich avatar chulpanovich commented on May 17, 2024

I'm pretty sure this is due to the 8BitDo receiver ouputting 3.3V instead of 5V as it should. I have already investigated this with the help of a friend due to the same receiver not working with OpenC64MegaDrivePadAdapter. He measured 3.25V when the button is not pressed.

I don't really want to cope with shortcomings due to bad designs by other people, but I can add some way of turning MD++ off temporarily.

Yes. I also noticed a difference of 3.3 and 5 volts.

from megadriveplusplus.

chulpanovich avatar chulpanovich commented on May 17, 2024

I have added a disable function to the experimental branch: if the console is powered up while Down is held, combo detection will be disabled and IGR and mode switching from the controller will no longer work.
Please test and report.

Yes thank you. I will check back soon and let you know.

I checked it and it works great. But each time you turn on the console, holding the button (down) is not very convenient. It would be great if this parameter was stored in memory, but then the control priority should be transferred to the reset button of the console itself. For example, press the reset two or three times and thus enable or disable the IRG.

from megadriveplusplus.

chulpanovich avatar chulpanovich commented on May 17, 2024

I noticed that when you turn on the receiver 8bitdo it automatically turns off the IRG, but I plan to change the coordination of 3.3 and 5 volts using 74LCX245 and so I would like to manually control the switch.

from megadriveplusplus.

SukkoPera avatar SukkoPera commented on May 17, 2024

That is too much work which I don't really want to do just because someone decided they were too lazy to respect the standard voltages :(.

Anyway on second thinking I don't think the 3.3V is the problem. Anything over 2.5V should be recognized as HIGH. Maybe it's the voltage when the signal is LOW? Can you measure it? But it doesn't make much sense either :(.

from megadriveplusplus.

chulpanovich avatar chulpanovich commented on May 17, 2024

That is too much work which I don't really want to do just because someone decided they were too lazy to respect the standard voltages :(.

Anyway on second thinking I don't think the 3.3V is the problem. Anything over 2.5V should be recognized as HIGH. Maybe it's the voltage when the signal is LOW? Can you measure it? But it doesn't make much sense either :(.

Yes, this is really strange. The fact is that I have MD2 VA1.8 ASIA and it works great at 3.3 volts. I can not understand what is the difference with those consoles that have problems (

Ok. please tell me which parameter the IRG is turned off and I myself will add a command for the reset button. :-)

from megadriveplusplus.

SukkoPera avatar SukkoPera commented on May 17, 2024

You can just set enabled = false, see https://github.com/SukkoPera/MegaDrivePlusPlus/blob/experimental/MegaDrivePlusPlus.ino#L590.

from megadriveplusplus.

chulpanovich avatar chulpanovich commented on May 17, 2024

thank you very much!!!

from megadriveplusplus.

chulpanovich avatar chulpanovich commented on May 17, 2024

the problem is not in the drops of 3.3 and 5 volts
I installed the chip 74HC245 and the levels became 5 volts, but the problem with 8BitDO remained (
The fact is that I have MD2 VA1.8 ASIA and it works great at 3.3 volts.

from megadriveplusplus.

chulpanovich avatar chulpanovich commented on May 17, 2024

I also checked the receivers from KriKZZ Joyzz they also have 3.3 volts, but they work correctly. (

from megadriveplusplus.

SukkoPera avatar SukkoPera commented on May 17, 2024

Can you measure the voltage when buttons are pressed? It's supposed to be ~0V.

from megadriveplusplus.

chulpanovich avatar chulpanovich commented on May 17, 2024

I checked. I turned on the game SONIC 1 and when I pressed the buttons on all contacts 1,2,3,4,6,9 except 7, the voltage changed from 5 to 0 volts. Let me remind you, I measured the voltage after 74HC245

from megadriveplusplus.

chulpanovich avatar chulpanovich commented on May 17, 2024

Maybe this is due to the speed of the survey, and somehow it is possible to change? I do not know, therefore I ask). I also noticed that when I press B+C then the command is executed as if I pressed left + start + C :-(

from megadriveplusplus.

SukkoPera avatar SukkoPera commented on May 17, 2024

Naaah. I really don't know then. I don't have this receiver and I don't need to buy it, so unless someone can debug this on their own, I can't do much :(.

from megadriveplusplus.

TurBoss avatar TurBoss commented on May 17, 2024

Hello I successful wired the arduino nano to a IC BD M5 PAL VA4

with the original 3 buttons gamepad it works like a charm Perfect

but with the 8bitdo there are issues...

restart ,region and Hz works

but the C button only works when holding START :/

i didn't manage to reproduce the OT issues about random restarts

My pad is a 8bitdo M30 2.4G 81CA

Thanks

from megadriveplusplus.

TurBoss avatar TurBoss commented on May 17, 2024

can't figure why but holding START is not required anymore to be able to press C

from megadriveplusplus.

chulpanovich avatar chulpanovich commented on May 17, 2024

I seem to have fixed the problem with the receiver 8BITDO. I replaced the resistors R68 and R68 with 10 ohms.

from megadriveplusplus.

SukkoPera avatar SukkoPera commented on May 17, 2024

This is great! But you mean R68 and...? :)

Also is it on the receiver or on the console? Do all revisions need this in the latter case?

from megadriveplusplus.

chulpanovich avatar chulpanovich commented on May 17, 2024

I used the source code to make my version of the mod for megadrive
now there are following functions:

  • Switching regions Europe (EUR), America (USA), Japan (JAP)
  • Switching frequency 50 / 60Hz
  • Switching color standards PAL, NTSC, PAL60, NTSC4.43
  • The image is always in color (two generators)
  • Overclocking the central processor up to 10 MHz
  • Switch sound filtering (when installing a supported MEGAAMP mod)
  • Management of settings with the RESET button (no toggle switches)
  • Manage settings from the gamepad with specific button combinations
  • Light and sound indication of operation and set device parameters
  • Non-volatile memory for saving parameters
  • Disabling IGR and combinations if they are not needed
  • Compact size 54 * 44 mm

from megadriveplusplus.

SukkoPera avatar SukkoPera commented on May 17, 2024

Cool :). Remember that if you sell (or somehow share) your version you also need to offer your modified source code.

from megadriveplusplus.

chulpanovich avatar chulpanovich commented on May 17, 2024

Hello. Unfortunately, replacing resistors does not work very well on some systems, and random combos reappeared. Maybe there is some way to make a timer for combos? For example, we press a combo and it only works two seconds after holding the buttons? Could you make such an option for customization?

from megadriveplusplus.

SukkoPera avatar SukkoPera commented on May 17, 2024

I think you can exploit the debouncing function I've recently introduced in the experimental branch for this. Just increase DEBOUNCE_BUTTONS_MS to 2000U.

from megadriveplusplus.

monsterro avatar monsterro commented on May 17, 2024

I'm speaking from memory and I can confirm when I'm back home. Had the same problem and for fun scoped pad inputs with 8Bitdo M30 connected. Rise and fall times were much worse than with official controller. The readpad routine was too fast so I delayed it with several 'nop' instruction, 8 if I remember correctly. It pretty much fixed the issue for almost every game I tried but I think Batman Forever still had issues, probably game was polling too fast. Anyway, I'll get my MegaDrive and play with it a bit tonight.

from megadriveplusplus.

chulpanovich avatar chulpanovich commented on May 17, 2024

I checked it helped) I set the value to 250U. In Batman Forever also no problems were found. Maybe someone else will check and say here.

from megadriveplusplus.

monsterro avatar monsterro commented on May 17, 2024

Button pressed on M30 (yellow) and official wired controller (blue):
button b m30 vs original

Select (yellow) + button (blue) on M30
select + button b m30 controller

Select (yellow) + button (blue) on official wired controller
select + button b original controller

from megadriveplusplus.

SukkoPera avatar SukkoPera commented on May 17, 2024

This is pretty weird. I used to think games read the lines right after (i.e.: a few tens of nanoseconds) setting Select low. That's why I had to write the ISR in assembly and try to be as fast as possible.

How can this be so slow and still be compatible with all games?

from megadriveplusplus.

chulpanovich avatar chulpanovich commented on May 17, 2024

I checked it helped) I set the value to 250U. In Batman Forever also no problems were found. Maybe someone else will check and say here.

Oh, using these parameters 8bitdo does not work on megadrive 1 VA6. but the wired controller works well.

from megadriveplusplus.

monsterro avatar monsterro commented on May 17, 2024

MegaDrive is most likely using TTL voltage levels, which is minimum 2V for high, maximum 0,8V for low. ATmega328p running on 5V has minimum 3V for high, maximum 1,5V for low.

Dotted lines below are set at 1,5V an 3V. Yellow impulses show when the button state is being read. Reading routine toggles one pin high and low before and after reading the controller. Both times shown the button is read as pressed. Delaying the read slightly allows the button presses to be read correctly.

signalling

@chulpanovich Can you try 74HCT245 as a level shifter instead of 74HC245?

from megadriveplusplus.

chulpanovich avatar chulpanovich commented on May 17, 2024

Yes, I will try 74ls245, but in my city there are no such chips, I will place an order and after a while I will tell you about the results.

from megadriveplusplus.

monsterro avatar monsterro commented on May 17, 2024

I've edited my last reply. Try HCT instead of LS.

Anyway, software solution would be to delay reading the controller until signals reached correct treshold for Arduino to be read correctly. I've done that by adding 10 nop instructions in readpad.S, just before R_PORT, PAD_IOPORT, value determined by trial and error. Crude, but effective :)

On the other hand Batman Returns, not Forever as I said previously, will need some hardware solution as Select signal looks like this (yellow):

batman returns

I don't have any buffers on hand, I'll buy something and try later this week.

from megadriveplusplus.

chulpanovich avatar chulpanovich commented on May 17, 2024

But one circumstance becomes clear why, at different revisions of the consoles, the sensitivity to combos is different.

from megadriveplusplus.

chulpanovich avatar chulpanovich commented on May 17, 2024

I've done that by adding 10 nop instructions in readpad.S, just before R_PORT, PAD_IOPORT,

Please help, I did not quite understand what this means ((
Please show an example of how you did this. )
Today I look at the nearest store 74HCT245.

from megadriveplusplus.

monsterro avatar monsterro commented on May 17, 2024

Like this:

image

from megadriveplusplus.

chulpanovich avatar chulpanovich commented on May 17, 2024

6 nop end 150U give good results, even in Batman Returns

from megadriveplusplus.

Oj5000 avatar Oj5000 commented on May 17, 2024

I've recently installed this into my megadrive 1 VA4 and had trouble with my clone arduino - the same as TurBoss where C only worked if you had Start pressed. I found the issue to be related to the RX0 input on the arudino sucking away some of the power from the controller port (I assume anyway) causing the effect.
Since I was only interested in having in game reset functionality I disconnected RX0, D7, D6 and D5 then connected controller port 9 (Start/C) to D7 and modified the buttons function to:

word buttons = ((b1 & 0x80) >> 5) | (b1 & 0x08)
           | ((b2 & 0x80) >> 6) | ((b2 & 0x08) >> 3)
       ;

I also removed lines 23-25 from readpad.S :
andi R_STATE, 0xF0 ; Check if U/D/L/R are all low at the same time (This sets SREG flags)
breq have6btn ; If == 0, U/D/L/R are all low, this means we have a 6-button pad

I'm not sure if that mattered or if I had a short somewhere causing the reset to not function so don't trust this bit too much!

I also made the nop change as suggested by monsterro to resolve the random resets.

I also tried changing the reset combination to X,Y,Z and START but this only worked in 6 button compatible games, hence going with the 3 button approach.

I hope this is useful to anyone experiencing the strange START + C issues.

from megadriveplusplus.

SukkoPera avatar SukkoPera commented on May 17, 2024

The workaround is now in the master branch. Please open a new issue if any new problems surface.

from megadriveplusplus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.