shmups.system11.org

Shmups Forum
 
* FAQ    * Search
 * Register  * Login 
It is currently Wed Oct 28, 2020 4:51 pm View unanswered posts
View active topics



Post new topic Reply to topic  [ 133 posts ]  Go to page Previous  1, 2, 3, 4, 5
Author Message
 Post subject: Re: Koryuu (Composite & S-Video to YPbPr Transcoder) Coming
PostPosted: Sun Sep 13, 2020 8:31 pm 



Joined: 01 Mar 2018
Posts: 560
megari wrote:
Please forgive me for the thread necromancy. It has taken me far too long to address the issues people have brought up.

A public test firmware version has been released. If you're interested, please see the release notes and download the firmware images here.

Some highlights are fixes related to interlaced/progressive mode transitions, (hopefully) NTSC field reversal and saving current settings on the EEPROM, automagically loaded and applied on start-up.

Have fun! :)


Thanks for the update Megari!

I have an Olimex on order but wanted to build the files so I was ready to flash when it arrived. I'm on Ubuntu and get as far as building the firmware using
Code:
make build_hex
, but I get this warning below. I shouldn't need to edit the Makefile prior to building because I'm using the same Olimex as you, right? Is this warning OK?

Also, does this previous change still apply to today's update?
- When there is no sync on the current input, the Koryuu outputs no signal.

Code:
from main.cpp:4:
vendor/yaal/include/yaal/io/types/adc.hh:25:4: warning: #warning "For various reasons you have ADC subsystem disabled. So pin.analog won't work." [-Wcpp]
 #  warning "For various reasons you have ADC subsystem disabled. So pin.analog won't work."


Top
 Offline Profile  
 
 Post subject: Re: Koryuu (Composite & S-Video to YPbPr Transcoder) Coming
PostPosted: Sun Sep 13, 2020 9:31 pm 



Joined: 05 Feb 2020
Posts: 21
Location: Europe
ldeveraux wrote:
megari wrote:
Please forgive me for the thread necromancy. It has taken me far too long to address the issues people have brought up.

A public test firmware version has been released. If you're interested, please see the release notes and download the firmware images here.

Some highlights are fixes related to interlaced/progressive mode transitions, (hopefully) NTSC field reversal and saving current settings on the EEPROM, automagically loaded and applied on start-up.

Have fun! :)


Thanks for the update Megari!

I have an Olimex on order but wanted to build the files so I was ready to flash when it arrived. I'm on Ubuntu and get as far as building the firmware using
Code:
make build_hex
, but I get this warning below. I shouldn't need to edit the Makefile prior to building because I'm using the same Olimex as you, right? Is this warning OK?

Also, does this previous change still apply to today's update?
- When there is no sync on the current input, the Koryuu outputs no signal.

Code:
from main.cpp:4:
vendor/yaal/include/yaal/io/types/adc.hh:25:4: warning: #warning "For various reasons you have ADC subsystem disabled. So pin.analog won't work." [-Wcpp]
 #  warning "For various reasons you have ADC subsystem disabled. So pin.analog won't work."


The warning is OK and entirely expected. It is an issue with a work-in-progress feature (convenient access to analog pins or PWM pins) in the underlying YAAL framework, and does not affect the Koryuu firmware in any way.

Disabling video output on no video input is a feature the firmware supports, but can currently only be enabled either by manipulating the EEPROM (possibly by using a custom firmware) or using the koryuu-fw_ntp.hex image, which enables this feature unconditionally. Making this user-configurable while the unit is running is a matter of coming up with a way to express this using the two buttons on the Koryuu. Any ideas are welcome.


Top
 Offline Profile  
 
 Post subject: Re: Koryuu (Composite & S-Video to YPbPr Transcoder) Coming
PostPosted: Sun Sep 13, 2020 10:19 pm 



Joined: 01 Mar 2018
Posts: 560
megari wrote:
Disabling video output on no video input is a feature the firmware supports, but can currently only be enabled either by manipulating the EEPROM (possibly by using a custom firmware) or using the koryuu-fw_ntp.hex image, which enables this feature unconditionally. Making this user-configurable while the unit is running is a matter of coming up with a way to express this using the two buttons on the Koryuu. Any ideas are welcome.


I guess my question is does your newest update today disable video output on no video input? Or do I need to do something else before flashing once the device arrives?


Top
 Offline Profile  
 
 Post subject: Re: Koryuu (Composite & S-Video to YPbPr Transcoder) Coming
PostPosted: Mon Sep 14, 2020 1:15 pm 



Joined: 05 Feb 2020
Posts: 21
Location: Europe
ldeveraux wrote:
megari wrote:
Disabling video output on no video input is a feature the firmware supports, but can currently only be enabled either by manipulating the EEPROM (possibly by using a custom firmware) or using the koryuu-fw_ntp.hex image, which enables this feature unconditionally. Making this user-configurable while the unit is running is a matter of coming up with a way to express this using the two buttons on the Koryuu. Any ideas are welcome.


I guess my question is does your newest update today disable video output on no video input? Or do I need to do something else before flashing once the device arrives?


I see this may be a bit confusing. The answer is just a little bit complicated, as it depends on a choice you'll make. I'll try to express it as simply as I can.

The ZIP file, downloadable from the Github release page linked in the initial post for this test firmware release, contains two alternative firmware images:
  • koryuu-fw_default.hex: The default version of the firmware. Does not disable video output when there is no input. Rather than that, it shows the colored test pattern. [See caveat]
  • koryuu-fw_ntp.hex: The No Test Pattern version of the firmware. Unconditionally disables video output when there is no input.

Pick one depending on which behavior you desire.

([Caveat]: If the settings stored on the on-chip EEPROM have the "disable output if no input" setting on, then the setting will be applied on start-up. This is not really something that you can do accidentally, as the settings are checksummed and your old firmware version never stored any settings in the first place.)


Last edited by megari on Mon Sep 14, 2020 11:28 pm, edited 2 times in total.

Top
 Offline Profile  
 
 Post subject: Re: Koryuu (Composite & S-Video to YPbPr Transcoder) Coming
PostPosted: Mon Sep 14, 2020 1:24 pm 



Joined: 05 Feb 2020
Posts: 21
Location: Europe
Oh, one additional note: if you wish for any settings stored on the EEPROM to be preserved over future firmware updates, it is best to set the EESAVE hfuse bit, so reprogramming the flash won't wipe the EEPROM:
Code:
avrdude -p atmega328p -P usb  -c avrispmkII -U lfuse:w:0x62:m -U hfuse:w:0xd1:m -U efuse:w:0xff:m


Please make sure to select the appropriate parameters for -P and -c if you have a different programmer.
Also, make sure to apply exactly the fuse settings above. With bad luck, It is possible to brick the MCU by applying the wrong fuse bits. It may be best to try flashing the new firmware first to make sure that your programming setup is reliable.

If you're unsure, please do consult your local hacker familiar with the process.

Have fun! :)


Top
 Offline Profile  
 
 Post subject: Re: Koryuu (Composite & S-Video to YPbPr Transcoder) Coming
PostPosted: Thu Sep 17, 2020 8:30 pm 



Joined: 01 Mar 2018
Posts: 560
megari wrote:
Oh, one additional note: if you wish for any settings stored on the EEPROM to be preserved over future firmware updates, it is best to set the EESAVE hfuse bit, so reprogramming the flash won't wipe the EEPROM:
Code:
avrdude -p atmega328p -P usb  -c avrispmkII -U lfuse:w:0x62:m -U hfuse:w:0xd1:m -U efuse:w:0xff:m


Please make sure to select the appropriate parameters for -P and -c if you have a different programmer.
Also, make sure to apply exactly the fuse settings above. With bad luck, It is possible to brick the MCU by applying the wrong fuse bits. It may be best to try flashing the new firmware first to make sure that your programming setup is reliable.

If you're unsure, please do consult your local hacker familiar with the process.

Have fun! :)


You are my local hacker familiar with the process! The Olimex arrived today, the 6-pin cable isn't keyed, which way does it attach to the Koryuu? Will it break if I put on the wrong way? If I want to flash the firmware that disables video out when no video in exists, can I just download the package, rename koryuu-fw_ntp.hex to koryuu-fw.hex and proceed to build/make? I just follow the instructions in your wiki after that?

Sorry for all the questions, never done this before obviously. Should I just power on the Koryuu when I plug in the Olimex to my Linux box?


Top
 Offline Profile  
 
 Post subject: Re: Koryuu (Composite & S-Video to YPbPr Transcoder) Coming
PostPosted: Thu Sep 17, 2020 10:09 pm 



Joined: 05 Feb 2020
Posts: 21
Location: Europe
ldeveraux wrote:
megari wrote:
Oh, one additional note: if you wish for any settings stored on the EEPROM to be preserved over future firmware updates, it is best to set the EESAVE hfuse bit, so reprogramming the flash won't wipe the EEPROM:
Code:
avrdude -p atmega328p -P usb  -c avrispmkII -U lfuse:w:0x62:m -U hfuse:w:0xd1:m -U efuse:w:0xff:m


Please make sure to select the appropriate parameters for -P and -c if you have a different programmer.
Also, make sure to apply exactly the fuse settings above. With bad luck, It is possible to brick the MCU by applying the wrong fuse bits. It may be best to try flashing the new firmware first to make sure that your programming setup is reliable.

If you're unsure, please do consult your local hacker familiar with the process.

Have fun! :)


You are my local hacker familiar with the process! The Olimex arrived today, the 6-pin cable isn't keyed, which way does it attach to the Koryuu? Will it break if I put on the wrong way? If I want to flash the firmware that disables video out when no video in exists, can I just download the package, rename koryuu-fw_ntp.hex to koryuu-fw.hex and proceed to build/make? I just follow the instructions in your wiki after that?

Sorry for all the questions, never done this before obviously. Should I just power on the Koryuu when I plug in the Olimex to my Linux box?


No problem, I'll try to help you the best I can.

The physical setup for the programmer is detailed here: Koryuu programmer tips
There are also some helpful pointers in junkerhq's Koryuu wiki article.
If the pictures and diagrams behind the two links above still leave you uncertain regarding the orientation of the ICSP connector, please note that it can be considered to have the keying point towards the input side (and buttons) of the Koryuu. Also, pin 1 is usually marked somehow on the cable and the connector itself. This, along with the ICSP pin diagram, may help you along.

If you wish to build the firmware image yourself, you the instructions on Github are a good starting point.

Spoiler: show
... but there is also the option of using one of the images in the release ZIP file.

If you opt to use the prebuilt image, you can invoke avrdude like so, even outside the git repository:
Code:
avrdude -p atmega328p -P usb  -c avrispmkII -U flash:w:koryuu-fw_ntp.hex


The incantation simply means: for part atmega328p, using an avrispmkII-type programmer over USB, write koryuu-fw_ntp.hex to the flash memory.


If you wish to build the "NTP" image yourself and use the build system for updating the firmware, it should be as simple as:
Code:
git checkout fw_1.1-test0
make build_hex_ntp program


This builds the "NTP" variant of the firmware and flashes the firmware on the MCU onboard the Koryuu.

Please let me know if you run into any trouble. Have fun! :)


Top
 Offline Profile  
 
 Post subject: Re: Koryuu (Composite & S-Video to YPbPr Transcoder) Coming
PostPosted: Fri Sep 18, 2020 1:35 am 



Joined: 01 Mar 2018
Posts: 560
megari wrote:
No problem, I'll try to help you the best I can.

The physical setup for the programmer is detailed here: Koryuu programmer tips
There are also some helpful pointers in junkerhq's Koryuu wiki article.
If the pictures and diagrams behind the two links above still leave you uncertain regarding the orientation of the ICSP connector, please note that it can be considered to have the keying point towards the input side (and buttons) of the Koryuu. Also, pin 1 is usually marked somehow on the cable and the connector itself. This, along with the ICSP pin diagram, may help you along.

If you wish to build the firmware image yourself, you the instructions on Github are a good starting point.

Spoiler: show
... but there is also the option of using one of the images in the release ZIP file.

If you opt to use the prebuilt image, you can invoke avrdude like so, even outside the git repository:
Code:
avrdude -p atmega328p -P usb  -c avrispmkII -U flash:w:koryuu-fw_ntp.hex


The incantation simply means: for part atmega328p, using an avrispmkII-type programmer over USB, write koryuu-fw_ntp.hex to the flash memory.


If you wish to build the "NTP" image yourself and use the build system for updating the firmware, it should be as simple as:
Code:
git checkout fw_1.1-test0
make build_hex_ntp program


This builds the "NTP" variant of the firmware and flashes the firmware on the MCU onboard the Koryuu.

Please let me know if you run into any trouble. Have fun! :)


I didn't know I needed a 10 pin to 6 pin adapter, so I have one on order. I thought the Olimex 6 pin cable was what I'd use.

To update my Koryuu with the "NTP" image, I'd first build the image with:
Code:
git checkout fw_1.1-test0
make build_hex_ntp program


Then flash with avrdude? The JunkerHQ wiki uses Khazama, so I figured I'd ask.

Complicating things more, your github page just says:
"Flashing the built firmware can be accomplished by the command:"
Code:
make program


Top
 Offline Profile  
 
 Post subject: Re: Koryuu (Composite & S-Video to YPbPr Transcoder) Coming
PostPosted: Fri Sep 18, 2020 1:43 pm 



Joined: 05 Feb 2020
Posts: 21
Location: Europe
ldeveraux wrote:
megari wrote:
If you wish to build the "NTP" image yourself and use the build system for updating the firmware, it should be as simple as:
Code:
git checkout fw_1.1-test0
make build_hex_ntp program


This builds the "NTP" variant of the firmware and flashes the firmware on the MCU onboard the Koryuu.

Please let me know if you run into any trouble. Have fun! :)


I didn't know I needed a 10 pin to 6 pin adapter, so I have one on order. I thought the Olimex 6 pin cable was what I'd use.


Ah, indeed. Now that I think of it, mine did not ship with such a cable either, but I must've already had one at hand.

ldeveraux wrote:
To update my Koryuu with the "NTP" image, I'd first build the image with:
Code:
git checkout fw_1.1-test0
make build_hex_ntp program


Then flash with avrdude?


The command line above does the flashing for you, so no need to run avrdude manually. It basically runs two targets in Makefile back-to-back, as if you had run them sequentially one-by-one like so:
Code:
make build_hex_ntp  # Builds the firmware image
make program # Invokes avrdude with the appropriate parameters and flashes the freshly-built firmware


If you are not very familiar with build systems on Linux (and most other POSIX-like OSes), I recommend reading a bit about make, Makefiles etc, as they are a rather common occurrence in various tasks involving development and automation in Linux and other POSIX-likes.

ldeveraux wrote:
The JunkerHQ wiki uses Khazama, so I figured I'd ask.

The instructions on the JunkerHQ wiki are Windows-specific, and Khazama does not seem to have been updated in a long while. It also appears to be hard-wired to a specific programmer, despite having a full avrdude binary embedded within itself.

Just for the record, for Windows users, my suggestion would be to try AVRDUDESS, possibly after installing drivers for your programmer using Zadig.

ldeveraux wrote:
Complicating things more, your github page just says:
"Flashing the built firmware can be accomplished by the command:"
Code:
make program


That simply flashes the firmware after it has been built [1]. Please note that the "program" target is the latter one of the two targets run in my last message.

[1] To be more precise, the "program" target depends on having a built firmware .hex image, so if none has been built yet, it will actually automatically build one (with the default settings) and then do the flashing. Make is built exactly for these sorts of things where there are dependencies between different components or processes within a project.


Top
 Offline Profile  
 
 Post subject: Re: Koryuu (Composite & S-Video to YPbPr Transcoder) Coming
PostPosted: Sun Sep 20, 2020 6:23 pm 



Joined: 01 Mar 2018
Posts: 560
@megari

The git checkout seemed to work, it selected the correct fw.

When I try to make build_hex_ntp program, I get this series of errors:

https://imgur.com/a/HRrhLen

Is there any reason I can't use the 6-pin cable from the Olimex instead of the 10-pin to 6-pin cable and converter?


Top
 Offline Profile  
 
 Post subject: Re: Koryuu (Composite & S-Video to YPbPr Transcoder) Coming
PostPosted: Mon Sep 21, 2020 1:12 pm 



Joined: 05 Feb 2020
Posts: 21
Location: Europe
ldeveraux wrote:
@megari

The git checkout seemed to work, it selected the correct fw.

When I try to make build_hex_ntp program, I get this series of errors:

https://imgur.com/a/HRrhLen


It seems that the yaal submodule is not in sync with the fw_1.1-test0 branch. That sometimes happens. Submodules may need updating after changing branches, which is done like so:
Code:
git submodule update --recursive


Or, to do a branch checkout and a submodule update in one go (requires a sufficiently new git version):
Code:
git checkout desired_branch --recurse-submodules



ldeveraux wrote:
Is there any reason I can't use the 6-pin cable from the Olimex instead of the 10-pin to 6-pin cable and converter?


The electrical connections and protocols on the ICSP10, PDI and TDI ports are different. The pins in the different connectors do not seem to be electrically connected to each other in a way that plugging the supplied 6-pin cable to the PDI or TDI ports would work for ICSP purposes. Please see the Olimex AVR-ISP-MK2 schematic to confirm.

It is possible to manually rig a 10-pin to 6-pin converter, though. It just requires six female-to-male or female-to-female jumper wires which are connected between the programmer and the 6-pin cable or between the programmer and the Koryuu, respectively.


Top
 Offline Profile  
 
 Post subject: Re: Koryuu (Composite & S-Video to YPbPr Transcoder) Coming
PostPosted: Mon Sep 21, 2020 9:50 pm 



Joined: 01 Mar 2018
Posts: 560
megari wrote:
ldeveraux wrote:
@megari

The git checkout seemed to work, it selected the correct fw.

When I try to make build_hex_ntp program, I get this series of errors:

https://imgur.com/a/HRrhLen


It seems that the yaal submodule is not in sync with the fw_1.1-test0 branch. That sometimes happens. Submodules may need updating after changing branches, which is done like so:
Code:
git submodule update --recursive


Or, to do a branch checkout and a submodule update in one go (requires a sufficiently new git version):
Code:
git checkout desired_branch --recurse-submodules



ldeveraux wrote:
Is there any reason I can't use the 6-pin cable from the Olimex instead of the 10-pin to 6-pin cable and converter?


The electrical connections and protocols on the ICSP10, PDI and TDI ports are different. The pins in the different connectors do not seem to be electrically connected to each other in a way that plugging the supplied 6-pin cable to the PDI or TDI ports would work for ICSP purposes. Please see the Olimex AVR-ISP-MK2 schematic to confirm.

It is possible to manually rig a 10-pin to 6-pin converter, though. It just requires six female-to-male or female-to-female jumper wires which are connected between the programmer and the 6-pin cable or between the programmer and the Koryuu, respectively.


Ah yes, this worked perfectly! No video output when the system behind it is off! So to update in the future, all I need to do is checkout with the branch I want with the --recurse-submodules flag, then make build_I_want program to flash the chip?

Not sure if this was addressed, but the settings aren't saved when the power is toggled. Is there a way to set it to power on with the last selections from the "option" and "input change" buttons? Or at this point should I just leave the device on all the time now that there's no output without input?


Top
 Offline Profile  
 
 Post subject: Re: Koryuu (Composite & S-Video to YPbPr Transcoder) Coming
PostPosted: Tue Sep 22, 2020 1:16 pm 



Joined: 05 Feb 2020
Posts: 21
Location: Europe
ldeveraux wrote:
Ah yes, this worked perfectly! No video output when the system behind it is off! So to update in the future, all I need to do is checkout with the branch I want with the --recurse-submodules flag, then make build_I_want program to flash the chip?


Correct.

ldeveraux wrote:
Not sure if this was addressed, but the settings aren't saved when the power is toggled. Is there a way to set it to power on with the last selections from the "option" and "input change" buttons? Or at this point should I just leave the device on all the time now that there's no output without input?


To save the current settings (input, pedestal, smoothing), press both buttons simultaneously. The saved settings are loaded on startup. This is explained in a bit more detail in the release notes:

Quote:
  • To save current settings, press the INPUT_CHANGE and OPT buttons simultaneously.
    • This is a bit timing-sensitive, which has been mitigated by requiring the buttons to be pressed a bit longer than before, but this requires careful balancing, as making the buttons any "laggier" may make the buttons feel unresponsive in other contexts. Any feedback regarding the "feel" of the buttons is welcome.
    • After hitting the button combo successfully, LEDs flash a few times.
    • On failure to hit the button combo, the input/pedestal setting and/or the smoothing setting changes, as if one or both of the buttons had been hit separately.


It should be fine to just leave the Koryuu on, although, as a matter of principle, I can't go as far as to recommend that. As with any electronic device, there is a non-zero probability of something going catastrophically wrong while a device is left unobserved in a powered-on state (although a low-voltage video transcoder such as Koryuu is pretty far down the list of electric appliances likely to burn your house down). It is your prerogative to choose the level of risk you are willing to accept.


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 133 posts ]  Go to page Previous  1, 2, 3, 4, 5

All times are UTC


Who is online

Users browsing this forum: arrghus8, Extrems and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Space Pilot 3K template by Jakob Persson
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group