MegaDrive++ : new switchless region + IGR mod

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

  1. SukkoPera

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

    Joined:
    May 6, 2016
    Messages:
    137
    Likes Received:
    25
    Hiya! So finally AG is back online! I'm glad!

    Actually I've been concentrating on other projects of mine, since I could not communicate anymore with you, my testers. But I guess we can resume the job. AFAIK, there are currently 2 issues:

    1. The region is set too slowly and some games do not start since they find the wrong region value (e.g.: Virtua Racing).
    2. Some games hang during reset-from-pad (e.g.: Lotus).

    I have bought both games in the meantime, and I guess I could start work on those points ASAP.
     
  2. keropi

    keropi Familiar Face

    Joined:
    Feb 2, 2011
    Messages:
    1,056
    Likes Received:
    60
    after all this time I decided to update to the latest 6button version, but I am getting this error message on compile:

    Code:
    Arduino: 1.8.4 (Windows 7), Board: "Arduino Nano, ATmega328P"
    
    C:\Program Files\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files\Arduino\hardware -tools C:\Program Files\Arduino\tools-builder -tools C:\Program Files\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files\Arduino\libraries -libraries C:\Users\System4\Documents\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328 -ide-version=10804 -build-path C:\Users\System4\AppData\Local\Temp\arduino_build_313432 -warnings=none -build-cache C:\Users\System4\AppData\Local\Temp\arduino_cache_512283 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Program Files\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files\Arduino\hardware\tools\avr -verbose C:\Users\System4\Desktop\MegaDrivePlusPlus\k-MegaDrivePlusPlus\k-MegaDrivePlusPlus.ino
    C:\Program Files\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files\Arduino\hardware -tools C:\Program Files\Arduino\tools-builder -tools C:\Program Files\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files\Arduino\libraries -libraries C:\Users\System4\Documents\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328 -ide-version=10804 -build-path C:\Users\System4\AppData\Local\Temp\arduino_build_313432 -warnings=none -build-cache C:\Users\System4\AppData\Local\Temp\arduino_cache_512283 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Program Files\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files\Arduino\hardware\tools\avr -verbose C:\Users\System4\Desktop\MegaDrivePlusPlus\k-MegaDrivePlusPlus\k-MegaDrivePlusPlus.ino
    Using board 'nano' from platform in folder: C:\Program Files\Arduino\hardware\arduino\avr
    Using core 'arduino' from platform in folder: C:\Program Files\Arduino\hardware\arduino\avr
    Detecting libraries used...
    "C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "C:\Users\System4\AppData\Local\Temp\arduino_build_313432\sketch\k-MegaDrivePlusPlus.ino.cpp" -o "nul"
    "C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Program Files\Arduino\hardware\arduino\avr\libraries\EEPROM\src" "C:\Users\System4\AppData\Local\Temp\arduino_build_313432\sketch\k-MegaDrivePlusPlus.ino.cpp" -o "nul"
    "C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Program Files\Arduino\hardware\arduino\avr\libraries\EEPROM\src" "C:\Users\System4\AppData\Local\Temp\arduino_build_313432\sketch\k-MegaDrivePlusPlus.ino.cpp" -o "C:\Users\System4\AppData\Local\Temp\arduino_build_313432\preproc\ctags_target_for_gcc_minus_e.cpp"
    C:\Users\System4\Desktop\MegaDrivePlusPlus\k-MegaDrivePlusPlus\6b-MegaDrivePlusPlus.ino:210:37: fatal error: SendOnlySoftwareSerial.h: No such file or directory
    
      #include <SendOnlySoftwareSerial.h>
    
                                         ^
    
    compilation terminated.
    
    Using library EEPROM at version 2.0 in folder: C:\Program Files\Arduino\hardware\arduino\avr\libraries\EEPROM 
    exit status 1
    Error compiling for board Arduino Nano.
    
    what's this SendOnlySoftwareSerial.h file I am missing and how to fix this??
     
  3. SukkoPera

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

    Joined:
    May 6, 2016
    Messages:
    137
    Likes Received:
    25
    There's a note at the top of the source that says where you can get that library, but it's only needed if you enable debugging, so just disable it :).
     
    keropi likes this.
  4. keropi

    keropi Familiar Face

    Joined:
    Feb 2, 2011
    Messages:
    1,056
    Likes Received:
    60
    Ok, I can't get it to work without SendOnlySoftwareSerial.h ... it fails to compile and debugging is disabled as far as I can tell by default:

    Code:
    #define RESET_IN_PIN A3
    #define RESET_OUT_PIN A2
    #define VIDEOMODE_PIN A4
    #define LANGUAGE_PIN A5
    #define MODE_LED_R_PIN 9          // PWM
    #define MODE_LED_G_PIN 10         // PWM
    #define MODE_LED_B_PIN 11         // PWM
    #define PAD_LED_PIN LED_BUILTIN
    //~ #define ENABLE_SERIAL_DEBUG
    
    I also tried to remove the "//~ #define ENABLE_SERIAL_DEBUG" line all together, didn't help. Is there another place to disable debugging?
     
  5. Nopileus

    Nopileus Rapidly Rising Member

    Joined:
    Mar 19, 2015
    Messages:
    77
    Likes Received:
    13
    I just tried flashing this to an Arduino Uno since i don't have my console open, compiles and flashes fine.
    This is using Arduino 1.6.6, newest the Fedora repositories offer. Try using an older version of the IDE.
     
  6. keropi

    keropi Familiar Face

    Joined:
    Feb 2, 2011
    Messages:
    1,056
    Likes Received:
    60
    I am using a Nano and I tried the 1.6x (IIRC) version I had installed and the latest 1.8x one ... it just won't work for me.
     
  7. Nopileus

    Nopileus Rapidly Rising Member

    Joined:
    Mar 19, 2015
    Messages:
    77
    Likes Received:
    13
    Uno and Nano use the same atmega328p so that shouldn't matter, my IDE version was a fresh install, didn't even add the serial library.
    Do other projects compile fine?

    Backing up everything and starting with a fresh IDE would be my suggestion.
     
  8. keropi

    keropi Familiar Face

    Joined:
    Feb 2, 2011
    Messages:
    1,056
    Likes Received:
    60
    I've only used the IDE to compile the previous version of md++ , haven't done anything with it since back then... Uninstalled previous version, installed new one and I am getting the error I posted above...
     
  9. SukkoPera

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

    Joined:
    May 6, 2016
    Messages:
    137
    Likes Received:
    25
    I'll have a look at that ASAP. Fell free to install the library though, it won't hurt :).
     
    keropi likes this.
  10. MoockyLoock

    MoockyLoock Robust Member

    Joined:
    Apr 22, 2015
    Messages:
    264
    Likes Received:
    50
    hey SukkoPera, nice to see you around :)
     
  11. Nopileus

    Nopileus Rapidly Rising Member

    Joined:
    Mar 19, 2015
    Messages:
    77
    Likes Received:
    13
    welp, while i can compile and flash the six button branch fine, after changing my wiring and flashing it i can't get anything to work. even the reset button is unresponsive.

    Debug serial works, doesn't detect any controller input but does detect the reset button being pressed.

    I have an everdrive coming so i can finally play the system a bit, or so i thought.

    Edit:
    I feel like i may have zapped the Arduino as i'm getting all kinds of weirdness, like not being able to flash it with the 5v disconnected from the console, console constantly resetting with debug enabled.
    At least now without debug i have the reset button working but controller not being read.
    It sets the region to 2 on startup, so that works.

    Edit2:
    freshly cloned it from github again and here i am with no reset button again,
    the readpad.S file has been in the folder and appearing in the IDE for all of this
     
    Last edited: Sep 27, 2017
  12. Nopileus

    Nopileus Rapidly Rising Member

    Joined:
    Mar 19, 2015
    Messages:
    77
    Likes Received:
    13
    Well don't i feel stupid now, flashed it with my laptop using the loose linux version of the Arduino IDE straight from their site and it works right away.
     
  13. SukkoPera

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

    Joined:
    May 6, 2016
    Messages:
    137
    Likes Received:
    25
    There's no reason why that should happen, but anyway I'm glad you solved the issue :).
     
  14. Nopileus

    Nopileus Rapidly Rising Member

    Joined:
    Mar 19, 2015
    Messages:
    77
    Likes Received:
    13
    Isn't dealing with gremlins the best ...
     
  15. keropi

    keropi Familiar Face

    Joined:
    Feb 2, 2011
    Messages:
    1,056
    Likes Received:
    60
    I installed the latest 1.8.4 on my home pc (no previous versions ever installed) and upon opening the 6button .ino the IDE remarked that it needs to be in a directory called "6b-MegaDrivePlusPlus" and asked to create it and move the file there. So I dropped the .S file in there as well and pressed the verify button, the compile process completed successfully now.
    On my previous attempts the file was not inside a "6b-MegaDrivePlusPlus" directory and I got no such warning/option. Maybe that's it, I'll test tomorrow and report back.
     
  16. keropi

    keropi Familiar Face

    Joined:
    Feb 2, 2011
    Messages:
    1,056
    Likes Received:
    60
    back at my office pc the IDE wanted to move the files in another subdirectory inside the "6b-MegaDrivePlusPlus" directory I made, this time it wanted to use the "6b-MegaDrivePlusPlus\MegaDrivePlusPlus"" path, so I let it create it and move the INO there, dropped the .S file in there too and it finally compiled and uploaded on my Nano - didn't have to mess with debug options and extra libraries as debug is disabled by default.
    Weird path stuff is to blame then, seems kinda lame they did it that way but maybe it helps somewhere when you develop stuff.

    So bottom line is to use a fresh directory, let the IDE do it's extra subdir and move files there and then compile/upload will work as expected.
     
  17. Nopileus

    Nopileus Rapidly Rising Member

    Joined:
    Mar 19, 2015
    Messages:
    77
    Likes Received:
    13
    I have an everdrive x3 in my hands now, MD++ seems to work fairly consistently in retail games.
    Most demos and a music player i tried broke it, if you get the system to somehow crash you also have to do the walk.

    Works in the ED menu as well, for me anyway.
    Love it.
     
  18. MoockyLoock

    MoockyLoock Robust Member

    Joined:
    Apr 22, 2015
    Messages:
    264
    Likes Received:
    50
    I had the same issue for the first time i wanted to flash this. This "auto-created" path was a pain, as i didn't move the .S file into...
     
  19. msimplay

    msimplay Member

    Joined:
    Jan 5, 2014
    Messages:
    10
    Likes Received:
    0
    Interested in this mod.
    Was wondering if you could backport some of these for SMS++ features to Megadrive++.

    I was playing some Master System games through the Mega Everdrive and I applied a patch for sram and pause button to be mapped to start on the Megadrive controller. It was a fantastic experience but I did play some Golvellius and the same could not be said I really missed having a pause button on the controller.
    I had to keep getting up to check my stats.

    So for my request it would be nice to have the SMS Pause button remapped to start on the Megadrive if it's even possible?
     
  20. SukkoPera

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

    Joined:
    May 6, 2016
    Messages:
    137
    Likes Received:
    25
    Do you mean you want SMS++ functions on a Megadrive while playing SMS games?

    In case, I really have no idea how to do that, nor do I even know if it's possible at all.
     

Share This Page