Gamoover

[move]Le staff Gamoover vous souhaite la bienvenue ;)

[Beta] - BackForceFeeder : feeder vJoy FFB pour racecabs

Démarré par njz3, Mardi 17 Mars 2020, 19:02:44 PM

Aganyte

Oui, je voulais juste ajouter un test au démarrage pour vérifier que le programme se lance bien. Je suis bête, j'ai fait ça sur l'embrayage, mais on n'a pas de led sur ce dernier, il faudrait faire cela sur les sens A et B du moteur AC, avec l'embrayage à 0% pour ne pas faire bouger le volant. Genre A = 1 et B = 0 pendant une seconde, puis A = 0 et B = 1 pendant encore 1 secondes puis on remet tout à 0.

mentalmike

Today's board
Ok so today's boards seem to be running ok... some learning - daytona seems to be a much better game to test with. Originally I was trying sega rally and wasn't getting any effects, just resistance turning left and right. Loaded daytona and felt like I nearly broke my wrist when I hit the wall as I turned up the power while in rally and left it  :D get effects when hitting walls, other cars, driving over grass etc, so looking good!  ^-

I guess for things like sega rally I need to adjust the effects settings or should use the Boomslangnz plugin? As currently when I start driving in the game the CW light stays lit the whole time, I get resistance steering left and right but no effects.

Until I work out what's happened with yesterdays board I'm not going to try and adjust the pro mini yet, which is a shame as I'd like to test the lights with a mega!

Yesterday's board
I'm going to reflash everything again, but interested to see what Aganyte thinks about the CW and CWW outputting at same time

Aganyte

Citation de: mentalmike le Mercredi 06 Mai 2020, 13:11:42 PM
Yesterday's board
I'm going to reflash everything again, but interested to see what Aganyte thinks about the CW and CWW outputting at same time

I think the code is not in the board, did you try to press reset just before upload start ?

mentalmike

Citation de: aganyte le Mercredi 06 Mai 2020, 13:13:40 PM
I think the code is not in the board, did you try to press reset just before upload start ?

Yes, I suspect that my FT232 is bad  :'(

The pro mini power led lights up when connected. The arduino software compiles and says sent ok but the other led on the pro mini on flashes twice even though the FT232 leds are still flashing for a lot longer

Aganyte

you must active detailed upload then press reset when Arduino IDE seems to pause. You have just few seconds.

mentalmike

Citation de: aganyte le Mercredi 06 Mai 2020, 13:22:41 PM
you must active detailed upload then press reset when Arduino IDE seems to pause. You have just few seconds.

Just tried, same problem  :'(

I tested the FT232 by sending the sample blink sketch to the pro mini and it loads ok, the on board LED flashes so I can only assume the code is being sent ok.

The only thing I don't understand is what you mean by detailed upload?

This is the what is shown in the output:

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\mike\OneDrive\Documents\Arduino\libraries -fqbn=arduino:avr:pro:cpu=16MHzatmega328 -vid-pid=0403_6001 -ide-version=10812 -build-path C:\Users\mike\AppData\Local\Temp\arduino_build_231677 -warnings=none -build-cache C:\Users\mike\AppData\Local\Temp\arduino_cache_639231 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino5.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Temp\arcade\PWM2M2\vjoy installs\_to flash\FeederIOBoard\38400\Pwm2m2_ProMini\Pwm2m2_ProMini.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\mike\OneDrive\Documents\Arduino\libraries -fqbn=arduino:avr:pro:cpu=16MHzatmega328 -vid-pid=0403_6001 -ide-version=10812 -build-path C:\Users\mike\AppData\Local\Temp\arduino_build_231677 -warnings=none -build-cache C:\Users\mike\AppData\Local\Temp\arduino_cache_639231 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino5.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Temp\arcade\PWM2M2\vjoy installs\_to flash\FeederIOBoard\38400\Pwm2m2_ProMini\Pwm2m2_ProMini.ino
Using board 'pro' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Detecting libraries used...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10812 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "C:\\Users\\mike\\AppData\\Local\\Temp\\arduino_build_231677\\sketch\\Pwm2m2_ProMini.ino.cpp" -o nul
Generating function prototypes...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10812 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "C:\\Users\\mike\\AppData\\Local\\Temp\\arduino_build_231677\\sketch\\Pwm2m2_ProMini.ino.cpp" -o "C:\\Users\\mike\\AppData\\Local\\Temp\\arduino_build_231677\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\mike\\AppData\\Local\\Temp\\arduino_build_231677\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10812 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "C:\\Users\\mike\\AppData\\Local\\Temp\\arduino_build_231677\\sketch\\Pwm2m2_ProMini.ino.cpp" -o "C:\\Users\\mike\\AppData\\Local\\Temp\\arduino_build_231677\\sketch\\Pwm2m2_ProMini.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\mike\AppData\Local\Temp\arduino_cache_639231\core\core_arduino_avr_pro_cpu_16MHzatmega328_0c812875ac70eb4a9b385d8fb077f54c.a
Linking everything together...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\mike\\AppData\\Local\\Temp\\arduino_build_231677/Pwm2m2_ProMini.ino.elf" "C:\\Users\\mike\\AppData\\Local\\Temp\\arduino_build_231677\\sketch\\Pwm2m2_ProMini.ino.cpp.o" "C:\\Users\\mike\\AppData\\Local\\Temp\\arduino_build_231677/..\\arduino_cache_639231\\core\\core_arduino_avr_pro_cpu_16MHzatmega328_0c812875ac70eb4a9b385d8fb077f54c.a" "-LC:\\Users\\mike\\AppData\\Local\\Temp\\arduino_build_231677" -lm
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\mike\\AppData\\Local\\Temp\\arduino_build_231677/Pwm2m2_ProMini.ino.elf" "C:\\Users\\mike\\AppData\\Local\\Temp\\arduino_build_231677/Pwm2m2_ProMini.ino.eep"
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\mike\\AppData\\Local\\Temp\\arduino_build_231677/Pwm2m2_ProMini.ino.elf" "C:\\Users\\mike\\AppData\\Local\\Temp\\arduino_build_231677/Pwm2m2_ProMini.ino.hex"
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-size" -A "C:\\Users\\mike\\AppData\\Local\\Temp\\arduino_build_231677/Pwm2m2_ProMini.ino.elf"
Sketch uses 2546 bytes (8%) of program storage space. Maximum is 30720 bytes.
Global variables use 192 bytes (9%) of dynamic memory, leaving 1856 bytes for local variables. Maximum is 2048 bytes.
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM8 -b57600 -D -Uflash:w:C:\Users\mike\AppData\Local\Temp\arduino_build_231677/Pwm2m2_ProMini.ino.hex:i

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM8
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 2
         Firmware Version: 1.16
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\mike\AppData\Local\Temp\arduino_build_231677/Pwm2m2_ProMini.ino.hex"
avrdude: writing flash (2546 bytes):

Writing | ################################################## | 100% 1.27s

avrdude: 2546 bytes of flash written
avrdude: verifying flash memory against C:\Users\mike\AppData\Local\Temp\arduino_build_231677/Pwm2m2_ProMini.ino.hex:
avrdude: load data flash data from input file C:\Users\mike\AppData\Local\Temp\arduino_build_231677/Pwm2m2_ProMini.ino.hex:
avrdude: input file C:\Users\mike\AppData\Local\Temp\arduino_build_231677/Pwm2m2_ProMini.ino.hex contains 2546 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.08s

avrdude: verifying ...
avrdude: 2546 bytes of flash verified

avrdude done.  Thank you.


Aganyte

Ok, try to upload this sketch and tell me if CW and CCW leds blink at boot

https://we.tl/t-4Ygg1Xk89C

mentalmike


Aganyte

1 second for each then go off ? If yes, the sketch is in the Pro mini.

mentalmike

Citation de: aganyte le Mercredi 06 Mai 2020, 15:34:20 PM
1 second for each then go off ? If yes, the sketch is in the Pro mini.

Yes, 1 second each then turn off. CW & CWW still output though

Aganyte

You seem to have a board problem, i'll take it in guarantee  :fleche: Private Message

mentalmike

Citation de: aganyte le Mercredi 06 Mai 2020, 16:19:28 PM
You seem to have a board problem, i'll take it in guarantee  :fleche: Private Message

Thank you, I've messaged.

Good news, second board has been flashed with the code above and is working with a mega and beta 4  ^-^  :D

Just going to try out start buttons and lights but I've run out of connectors so not making things easy for myself!  >:(

njz3

For lamps, you will need to configure a bit the PC software to handle them. I did not prepared a tutorial yet... i may be the only one to have tested this feature so far.
Tell me which game and emulator you want to start with and I will do screenshots of what you need to enter in the control sets parameters.

mentalmike

Citation de: njz3 le Mercredi 06 Mai 2020, 17:01:55 PM
For lamps, you will need to configure a bit the PC software to handle them. I did not prepared a tutorial yet... i may be the only one to have tested this feature so far.
Tell me which game and emulator you want to start with and I will do screenshots of what you need to enter in the control sets parameters.

^- M2 and Daytona  :D

njz3

Ok, here are some hints:
- first it works only with Daytona USA (Saturn Ads) edition (rom name "daytonas"), as this is the only one supported by SailorSat patch (credits go to her and to BigPanik).
- for force feedback, I recommend to use the FFB plugin from Boomslangnz and disable ffb in the emulator.ini file (EnableFF=0). But you can rather choose to use m2emulator's ffb stuff. It's up to you.
- you need to get the lua scripts from "gameassets\nebula_m2_1.1\scripts" from the gameassets/ directory in my package and copy them to your m2emulator/scripts/ directory. These scripts enable 16/9 (wide screen format) and lamp outputs for Daytona.
- configure a control set for this game, enter the following parameters :


The blue parameters are used for auto-detection of the emulator process and game id, the red parameter is what is needed for reading lamps output.
- select your control set in the main page of my software.
- start your emulator and load the rom file.
- wait a bit and check in the "configure outputs" dialog that you see the raw outputs bits changing (bits 6 - VR lamp 3 should blinks for example after the "gentlemen start your engine").
- map an output bits to this raw bit. For example, map output bit 6 (I guess it's A13 on mega2560).


After that, you are all good.


zebassprophet

it may be useful to put these info in the first post ;)