Difference between revisions of "Koryuu"

From Classic Console Upscaler wiki
Jump to navigation Jump to search
m (Connection and firmware programming: - Small info on configuring programmer.)
(Use direct link to olimex.com for the Olimex AVR-ISP-MK2 programmer cable.)
 
(11 intermediate revisions by 2 users not shown)
Line 95: Line 95:
  
 
Input mode LEDs – There are two LEDs located at this position. When the unit is in composite video input mode, the bottom LED will illuminate red. When the unit is in S-Video input mode, the top-most LED will illuminate green.
 
Input mode LEDs – There are two LEDs located at this position. When the unit is in composite video input mode, the bottom LED will illuminate red. When the unit is in S-Video input mode, the top-most LED will illuminate green.
 +
 +
== Saving settings ==
 +
 +
Saving settings is supported as of firmware 1.1. To save current settings, press the INPUT_CHANGE and OPT buttons simultaneously. After hitting the button combo successfully, the Koryuu's LEDs flash a few times.
 +
 +
The following settings are saved:-
 +
 +
* Default input (Composite/S-Video)
 +
* Default input pedestal setting (on/off, corresponding to NTSC-M/J)
 +
* Smoothing (on/off)
  
 
== Other connectors ==
 
== Other connectors ==
Line 106: Line 116:
 
== Known issues / limitations  ==  
 
== Known issues / limitations  ==  
  
* Interlace signal field reversal – Intermittently, the Koryuu will reverse the fields in an interlace signal (odd field will be switched with the even field).  
+
* (Firmware version 1.0 only) Interlaced signal field reversal – Intermittently, the Koryuu will reverse the fields in an interlace signal (odd field will be switched with the even field).
 +
** This can cause compatibility issues with the OSSC or other undesirable effects on CRT displays. Usually, power cycling the unit or switching to a different input will cure the problem.
 +
** The issue is believed to have been resolved in firmware version 1.1.
 +
* (Firmware version 1.0 only) Interlaced-to-progressive transitions malfunction – Intermittently, when the input signal changes from interlaced to progressive scan or vice versa, the output signal may be unusable for the OSSC.
 +
** May be related to the previously-mentioned issue.
 +
** This can cause compatibility issues with the OSSC. Usually, power cycling the unit or switching to a different input will cure the problem.
 +
** The issue is resolved in firmware version 1.1.
 +
* Nonstandard or unstable color subcarrier may cause loss of color in output video – If the color subcarrier is nonstandard in terms of frequency and/or amplitude, the Koryuu may be unable to lock onto it. If the subcarrier is weak or unstable, colors may have glitches or the output video may flicker between a colored and a monochrome picture.
 +
** It is under investigation if anything can be done about this.
  
This can cause compatibility issues with the OSSC or other undesirable effects on CRT displays. Usually, power cycling the unit or switching to a different input will cure the problem.
+
== Firmware Upgrade ==
 
 
The issue is still under investigation and will hopefully be resolved in a future firmware update.
 
  
== Firmware Upgrade ==
+
The current release firmware is version 1.1 and comes pre-flashed on all Koryuu’s sold on or after 15/03/21.
  
The current release firmware is version 1.0 and comes pre-flashed on all Koryuu’s sold.
+
New firmware versions can be [https://github.com/megari/koryuu-fw/releases downloaded from the page here.]
  
 
To program new firmware, a USB ASP programmer is required.
 
To program new firmware, a USB ASP programmer is required.
Line 121: Line 137:
  
 
* [https://www.olimex.com/Products/AVR/Programmers/AVR-ISP-MK2/open-source-hardware Olimex AVR-ISP-MK2]
 
* [https://www.olimex.com/Products/AVR/Programmers/AVR-ISP-MK2/open-source-hardware Olimex AVR-ISP-MK2]
* [https://www.sparkfun.com/products/9825 Sparkfun's Pocket AVR Programmer]
+
** NOTE: most likely requires a separate purchase of a 10-to-6-pin ICSP cable or adapter (such as [https://www.olimex.com/Products/AVR/Programmers/AVR-ICSP/ this (Olimex)] or [https://www.sparkfun.com/products/9215 this (Sparkfun)]), as one is reported '''not''' to be supplied with the programmer itself.
* [https://www.sparkfun.com/products/8702 Sparkfun's STK500 Compatible USB Programmer]
+
** For some tips specific to this programmer, please see [https://imgur.com/a/WJbyjcP this album].
 
+
* Sparkfun's [https://www.sparkfun.com/products/9825 Pocket AVR Programmer] + [https://www.sparkfun.com/products/9215 AVR Programming Cable]
=== Koryuu transcoder firmware flash procedure ===
+
* [https://www.fischl.de/usbasp/ USB ASP programmer]
 +
** USB drivers for Windows are available [https://protostack.com.au/download/USBasp-win-driver-x86-x64-v3.0.7.zip here]
 +
<!-- * [https://www.sparkfun.com/products/8702 Sparkfun's STK500 Compatible USB Programmer] (discontinued) -->
  
'''Prerequisite Requirements'''
+
=== Prerequisite Requirements ===
  
 
* Koryuu transcoder and PSU
 
* Koryuu transcoder and PSU
* Suitable [https://www.fischl.de/usbasp/ USB ASP programmer]
+
* Suitable AVR ASP/ISP programmer (see above)
* USB drivers for the ASP programmer [https://protostack.com.au/download/USBasp-win-driver-x86-x64-v3.0.7.zip Windows drivers are available here]
+
* Ribbon cable and, if applicable, a 10 to 6 pin adapter for the ICSP header.
* Ribbon cable and 10 to 6 pin adapter for ASP (AVRisp)
+
* A computer with Windows 7/8/8.1/10 with a USB port
* Windows 10 PC with USB port
+
* Compiled Firmware file
* [http://khazama.com/project/programmer/KhazamaAVRProgrammer.rar Khazama AVR Programmer software]
 
* Complied Firmware file
 
 
<br>
 
<br>
 
Note - Firmware needs to have been flashed before the unit is functional. If powered up without firmware, only the PWR LED next to the power switch will light up. This will simply indicate that the unit is receiving power, but tells nothing else. All units sold by VideoGamePerfection.com come with firmware pre-flashed.
 
Note - Firmware needs to have been flashed before the unit is functional. If powered up without firmware, only the PWR LED next to the power switch will light up. This will simply indicate that the unit is receiving power, but tells nothing else. All units sold by VideoGamePerfection.com come with firmware pre-flashed.
  
=== Connection and firmware programming ===
+
=== Hardware setup ===
  
 
'''To avoid damage, the programmer must be set at 5V logic high level, with no power supplied to the Koryuu by the programmer (target mode off).''' These settings are usually configurable through jumpers on the programmer itself. The exact location varies depending on the model. Usually the jumpers are labeled according to their function. Sometimes there is a need to open up the casing of the programmer to access these jumpers.
 
'''To avoid damage, the programmer must be set at 5V logic high level, with no power supplied to the Koryuu by the programmer (target mode off).''' These settings are usually configurable through jumpers on the programmer itself. The exact location varies depending on the model. Usually the jumpers are labeled according to their function. Sometimes there is a need to open up the casing of the programmer to access these jumpers.
 +
 +
1. Connect the USB programmer to the PC.
 +
 +
2. Connect the ribbon cable and adapter (if one is needed) to the programmer.
 +
 +
3. Connect the other end of the ribbon cable to the Koryuu transcoder via the header shown in the picture below. Pin 2 is voltage or VCC so orientate the ribbon cable accordingly. Double-check this before proceeding.
 +
 +
[[File:Koryuu-top.jpg]]
 +
 +
4. Check again the orientation of the ribbon cable. Pin 2 is voltage and must match pin 2 as shown on the picture above.
 +
 +
5. Power on the Koryuu transcoder.
 +
 +
6. If needed, install the driver for your programmer. If you are not sure if you have an appropriate driver installed or how to install one, see the '''Software setup''' section for details.
 +
 +
7. Start your programmer software. If you do not have one installed yet, see the '''Software setup''' section for instructions for one such software.
 +
 +
8. Flash the new firmware image using your programmer software. If you are not sure how, see the '''Software setup''' section for instructions how to do this with a particular piece of software.
 +
 +
The Koryuu is now updated.
 +
 +
=== Software setup (Windows 7/8/8.1/10) ===
 +
 +
This section walks us through setting up the drivers and software needed to update the firmware on your Koryuu.
 +
 +
There are two pieces of software required:
 +
* [https://zadig.akeo.ie/ Zadig] for installing drivers for your programmer,
 +
* [https://blog.zakkemble.net/avrdudess-a-gui-for-avrdude/ AVRDUDESS] for flashing the firmware.
 +
 +
==== Install driver using Zadig ====
 +
 +
First, we need to install Zadig, which is a nifty piece of software for installing drivers for most kinds of ISP/ASP programmers. Simply point your web browser to [https://zadig.akeo.ie/], find the link labeled ''Download'' and save the executable file on your desktop (or whichever location you prefer).
 +
 +
You may now plug your programmer into one of the USB ports on your computer, if you have not done so already. Please see the Hardware setup section for more details.
 +
 +
Then, run the executable you saved previously. If an elevation ([https://en.wikipedia.org/wiki/User_Account_Control UAC]) prompt pops up, accept it to continue.
 +
 +
The Zadig window should initially look like this:<br>
 +
[[File:Zadig_initial_avrispmkII.png]]
 +
 +
The type of your programmer may already be shown in the selection box, as in the image above (''AVRISP mkII''). If it is not, and you are sure it is connected, select the correct programmer from the list. Tick ''Options->List All Devices'' to show all supported devices if none show up.
 +
 +
Then you should choose a driver. For our purposes, selecting either the 'libusbK' or 'libusb-win32' driver should be a safe bet, the former having somewhat higher performance than the latter. Click ''Install Driver''.<br>
 +
[[File:Zadig_libusbK_avrispmkII.png]]
 +
 +
Once the installation is finished, you should see a dialog stating so.<br>
 +
[[File:Zadig_libusbK_after_install_avrispmkII.png]]
 +
 +
Finally, you should see something similar to this, indicating that you now have a proper driver set up for your programmer.<br>
 +
[[File:Zadig_libusbK_driver_installed_avrispmkII.png]]
 +
 +
The driver setup is now complete. You may now close Zadig.
 +
 +
==== Install and run AVRDUDESS ====
 +
 +
Open [https://blog.zakkemble.net/avrdudess-a-gui-for-avrdude/ the AVRDUDESS web page] in your web browser and download the portable version of AVRDUDESS, which does not require any particular installation, other than extracting the archive.
 +
 +
Extract the archive to a location of your choosing and then open said location if Windows does not do that for you. There may be more than one file labeled ''Application''. Choose the one with a distinct icon, named ''avrdudess'' or ''avrdudess.exe'', and run it by double-clicking it.
 +
[[File:AVRDUDESS_folder_exe_selected.png]]
 +
 +
At this point you may get a ''Windows protected your PC'' box, warning that you attempted to run an unrecognized program:<br>
 +
[[File:AVRDUDESS_folder_nag1.png]]
 +
 +
This is normal, and you should click ''More info'', which makes a button labeled ''Run anyway'' appear. Click it.<br>
 +
[[File:AVRDUDESS_folder_nag2.png]]
 +
 +
Next, if you have not run any .Net applications before, Windows may prompt you to install the [https://en.wikipedia.org/wiki/.NET_Framework .Net Framework].<br>
 +
[[File:AVRDUDESS_folder_dotnet_required.png]]
 +
 +
This is completely normal and safe, so allow Windows to install it. This may require accepting another elevation prompt. After the installation is done, you can try opening AVRDUDESS again.<br>
 +
[[File:AVRDUDESS_folder_dotnet_installed.png]]
 +
 +
==== Flash the firmware update using AVRDUDESS ====
 +
 +
Now we are ready to flash the new firmware. If you do not have AVRDUDESS open yet, open it now. The AVRDUDESS window may look a bit daunting, but fear not! We will walk through the entire process step by step.<br>
 +
[[File:AVRDUDESS_main_window_initial.png]]
 +
 +
First, select the correct kind of programmer for your device from the top-left selection box.<br>
 +
[[File:AVRDUDESS_main_window_programmer_menu.png]]
 +
 +
Then select the appropriate port. The port is probably going to be one of ''usb'' or ''COM1'', but you can try each option until you find the correct one, or type the correct one in the selection box.<br>
 +
[[File:AVRDUDESS_main_window_port_menu.png]]
 +
 +
Try detecting the Koryuu on-board MCU using the ''Detect'' button. It should come up as ''ATmega328P''.<br>
 +
[[File:AVRDUDESS_main_window_mcu_detect.png]]
 +
 +
If not, select ''ATmega328P'' manually.<br>
 +
[[File:AVRDUDESS_main_window_mcu_menu.png]]
 +
 +
<!-- As an optional step to verify that the programmer is working, you can try and read the current firmware image from the Koryuu. -->
 +
 +
Within the part of the window labeled ''Flash'', enter the path to the Koryuu firmware image or select it using the file picker dialog. Select ''Write'' on the radio selector and either ''Auto'' or ''Intel Hex'' as the format. Then click ''Go''.<br>
 +
[[File:AVRDUDESS_main_window_flashing.png]]
 +
 +
If everything went well, you should see a message like so. Please make sure that the verification part is successful. If it was successful, you are done. The Koryuu is now updated.<br>
 +
[[File:AVRDUDESS_main_window_flash_success.png]]
 +
 +
If you get a failure, such as the one below, make sure all cables are plugged correctly and the settings are as described in the '''Hardware setup''' section. Also, try to make sure nothing (such as a high-priority process using a lot of CPU) is disrupting the flashing process, as it is somewhat timing-sensitive. Then try clicking ''Go'' again.<br>
 +
[[File:AVRDUDESS_main_window_flash_failure.png]]
 +
 +
 +
=== Alternative software setup (Windows XP and newer) ===
 +
 +
If you have a programmer based on the [https://www.fischl.de/usbasp/ open-source USB ASP] design, there is an alternative software setup, using the [http://khazama.com/project/programmer/ Khazama AVR Programmer software] and a driver specific to this type of programmer. This type of programmer tends to be affordable and widely available from multiple vendors.
 +
 +
==== Specific requirements ====
 +
* A programmer based on the [https://www.fischl.de/usbasp/ USB ASP] design.
 +
* USB drivers for the ASP programmer
 +
** Windows drivers are available [https://protostack.com.au/download/USBasp-win-driver-x86-x64-v3.0.7.zip here]
 +
* [http://khazama.com/project/programmer/ Khazama] AVR Programmer software ([http://khazama.com/project/programmer/KhazamaAVRProgrammer.rar direct download link])
 +
 +
'''Note''' - Firmware needs to have been flashed before the unit is functional. If powered up without firmware, only the PWR LED next to the power switch will light up. This will simply indicate that the unit is receiving power, but tells nothing else. All units sold by VideoGamePerfection.com come with firmware pre-flashed.
 +
 +
Before proceeding, please make sure you have carefully read the '''Hardware setup''' section.<br>
 +
 +
==== Install Khazama and the driver ====
  
 
1. Download and install the Khazama AVR Programmer software to your PC
 
1. Download and install the Khazama AVR Programmer software to your PC
Line 148: Line 280:
 
3. If you have never used the programmer on your PC before, install the drivers from [https://alselectro.wordpress.com/2018/06/08/usbasp-how-to-install-driver-on-windows-8-10/ this link]. If you need help with this, [https://alselectro.wordpress.com/2018/06/08/usbasp-how-to-install-driver-on-windows-8-10/ see this page]. Scroll down to the heading "Best & Easy method" and follow the instructions from there
 
3. If you have never used the programmer on your PC before, install the drivers from [https://alselectro.wordpress.com/2018/06/08/usbasp-how-to-install-driver-on-windows-8-10/ this link]. If you need help with this, [https://alselectro.wordpress.com/2018/06/08/usbasp-how-to-install-driver-on-windows-8-10/ see this page]. Scroll down to the heading "Best & Easy method" and follow the instructions from there
  
4. Connect the ribbon cable and adapter to the USB ASP
+
==== Update the Koryuu firmware ====
 
 
5. Connect the other end of the ribbon cable to the Koryuu transcoder via the header shown in the picture below. Pin 2 is voltage or VCC so orientate the AVRisp accordingly. Double check this before proceeding
 
  
[[File:Koryuu-top.jpg]]
+
1. Double-check that your hardware setup is correct: logic level, cables properly plugged in, the ribbon cable oriented correctly on both ends. If you are unsure, please review the '''Hardware setup''' section.
  
6. Check again the orientation of the ribbon cable. Pin 2 is voltage and must match pin 2 as shown on the picture above.
+
2. Power on the Koryuu transcoder.
  
7. Power on the Koryuu transcoder.
+
3. Start the Khazama AVR Programmer software. The program window shown below should appear.
 
 
8. Start the Khazama AVR Programmer software. The program window shown below should appear.
 
  
 
<br>
 
<br>
Line 164: Line 292:
 
<br>
 
<br>
  
<br>9. On the drop down box under "AVR:" ensure that the correct AVR is selected. ATMEGA328P is the AVR in our recommended programmer.
+
<br>4. On the drop down box under "AVR:" ensure that the correct AVR is selected. ATMEGA328P is the AVR in our recommended programmer.
  
10. Open the file menu and choose "Load FLASH file to buffer".  Using the standard Windows file requester, navigate to the hex file containing the firmware, click on it and choose "Open".
+
5. Open the file menu and choose "Load FLASH file to buffer".  Using the standard Windows file requester, navigate to the hex file containing the firmware, click on it and choose "Open".
  
11. Open the command menu and choose "Write flash buffer to chip". A successful programming should only take a second or two.
+
6. Open the command menu and choose "Write flash buffer to chip". A successful programming should only take a second or two.
  
Note – On some PCs you may see a message that says "Error setting USBASP ISP Clock". This can safely be ignored (just click on OK to dismiss it).
+
'''Note''' – On some PCs you may see a message that says "Error setting USBASP ISP Clock". This can safely be ignored (just click on OK to dismiss it).
  
 
The Koryuu is now updated.
 
The Koryuu is now updated.
Line 176: Line 304:
 
=== Firmware Revision History ===
 
=== Firmware Revision History ===
  
Version 1.0 – Release
+
Version 1.0 – Release - Original firmware shipped with Koryuu.
 +
 
 +
Version 1.1 – Release - Bug fixes and other changes. Settings can now be saved. Improved robustness of video chip initialization, video mode changes and tracking of current video mode. Transitions between interlaced and progressive video modes should no longer cause trouble with the OSSC. Added -ntp firmware variant (No Test Pattern), which disables video output when there is no input signal on the currently selected input.
 +
 
 +
See the [https://github.com/megari/koryuu-fw/releases firmware download page for more information.]

Latest revision as of 15:44, 28 March 2021

Koryuu front
Koryuu back

Introduction

Koryuu is an affordable composite and S-Video to component video transcoder/converter designed by Ari Sundholm (megari).

Designed particularly with OSSC users in mind, Koryuu can be connected to the AV2 input on the OSSC to add composite and S-video compatibility. It can also be used as a general purpose transcoder for CRT displays.

The device is compatible with many flat panel displays too, but since the Koryuu does not upscale or deinterlace, it is usually best to combine it with a scaler or line doubler, such as an OSSC, in this situation.

Currently, the device has open source firmware. The PCB, case design and detailed schematics are not public at the moment, but sufficient technical information required for firmware development will be made available. There is an intention to eventually make the design files public, but the time frame has not been decided on yet.

Specifications

  • Designed for use with OSSC, no additional transcoder/converter required
  • Composite and S-Video in, Component video out
  • 7.5 IRE option
  • PAL 60 supported
  • Firmware updatable (requires USB Asp or similar programmer)
  • Uses the same PSU as OSSC, no chance of mixing them up and damaging either unit
  • Plexiglass enclosure
  • Connect Composite and S-Video at the same time, no problems
  • Option button for additional features added in future firmware updates.

Availability

Pre-assembled units and accessories are available from VideoGamePerfection (EU).

More information & discussion


Power

Koryuu uses the same 5 volt power supply as OSSC. The specifications are as follows:-

DC 5 Volt output with at least 1 Amp current. The tip must be 2.1 x 5.5mm and center positive.

Do not use a power supply rated for AC output, or a power supply rated higher than 5 volts DC, doing so can damage the Koryuu.

AV Inputs

Inputs and switches on the front of the Koryuu
Output and additional I/O on the back of the Koryuu

Koryuu has two AV inputs. The currently selected input can be selected by pressing the input change button, which is the button on the right of the unit. The input signal can be 240/288p or 480/576i (NTSC/PAL).

Composite video

The yellow RCA connector on the front of the unit on the left hand side accepts a standard composite video (CVBS) signal suppled by a single RCA cable. Both PAL and NTSC formats are supported.

S-Video

A S-Video device outputting a separate luma and chroma signal can be connected to the S-video input using a standard S-video cable. Both PAL and NTSC formats are supported.

Output

Koryuu has a single component video output. The device does not scale, deinterlace or affect frame rate, so whatever signal goes in will be transcoded and output via the component video out. The device has no frame buffer so no input lag is added.

Buttons and controls

The device has two buttons on the front of the unit and a power switch. The power switch simply toggles the unit off and on.

Input Change button

By pressing the input change button (see the image above) the user can cycle through the active inputs. There are currently four input modes:-

  1. Composite video (CVBS)
  2. Composite video + pedestal (7.5 IRE mode)
  3. S-Video (YC)
  4. S-Video + pedestal (7.5 IRE mode)

When powered on, the Koryuu defaults to input mode 1. Press the Input change button to cycle through the available modes. When in mode 4, pressing the input change button again will cycle back to mode 1.

7.5 IRE mode may be required for certain sources (e.g video cassettes). If the picture is too light, try 7.5 IRE mode.

Option button

The option button is for future firmware updates and features and as of firmware 1.0 it applies a smoothing/blur filter however this effect is not correctly implemented.

Status LEDs

LEDs on the Koryuu

The Koryuu Transcoder has four LED (light emitting diodes) that illuminate to indicate various modes of operation. In the picture above we can see the location of these LEDs.

Power LED – This LED will illuminate green whenever the Koryuu is powered on.

Option LED – This LED will illuminate red whenever the Koryuu’s option mode is enabled. This is expected to be utilised in future firmware revisions.

Input mode LEDs – There are two LEDs located at this position. When the unit is in composite video input mode, the bottom LED will illuminate red. When the unit is in S-Video input mode, the top-most LED will illuminate green.

Saving settings

Saving settings is supported as of firmware 1.1. To save current settings, press the INPUT_CHANGE and OPT buttons simultaneously. After hitting the button combo successfully, the Koryuu's LEDs flash a few times.

The following settings are saved:-

  • Default input (Composite/S-Video)
  • Default input pedestal setting (on/off, corresponding to NTSC-M/J)
  • Smoothing (on/off)

Other connectors

J5 – Serial connector for capturing debugging information and development. J5 is located just to the right of the component video output when viewing the unit from behind.

J3 – This connector can be used with suitable USP ASP programmers to load new firmware (see the picture in the firmware upgrade section for pin orientation). The pin-out for this connector is as follows.

J5-pinout-sm.png

Known issues / limitations

  • (Firmware version 1.0 only) Interlaced signal field reversal – Intermittently, the Koryuu will reverse the fields in an interlace signal (odd field will be switched with the even field).
    • This can cause compatibility issues with the OSSC or other undesirable effects on CRT displays. Usually, power cycling the unit or switching to a different input will cure the problem.
    • The issue is believed to have been resolved in firmware version 1.1.
  • (Firmware version 1.0 only) Interlaced-to-progressive transitions malfunction – Intermittently, when the input signal changes from interlaced to progressive scan or vice versa, the output signal may be unusable for the OSSC.
    • May be related to the previously-mentioned issue.
    • This can cause compatibility issues with the OSSC. Usually, power cycling the unit or switching to a different input will cure the problem.
    • The issue is resolved in firmware version 1.1.
  • Nonstandard or unstable color subcarrier may cause loss of color in output video – If the color subcarrier is nonstandard in terms of frequency and/or amplitude, the Koryuu may be unable to lock onto it. If the subcarrier is weak or unstable, colors may have glitches or the output video may flicker between a colored and a monochrome picture.
    • It is under investigation if anything can be done about this.

Firmware Upgrade

The current release firmware is version 1.1 and comes pre-flashed on all Koryuu’s sold on or after 15/03/21.

New firmware versions can be downloaded from the page here.

To program new firmware, a USB ASP programmer is required.

Recommended Programmers

Prerequisite Requirements

  • Koryuu transcoder and PSU
  • Suitable AVR ASP/ISP programmer (see above)
  • Ribbon cable and, if applicable, a 10 to 6 pin adapter for the ICSP header.
  • A computer with Windows 7/8/8.1/10 with a USB port
  • Compiled Firmware file


Note - Firmware needs to have been flashed before the unit is functional. If powered up without firmware, only the PWR LED next to the power switch will light up. This will simply indicate that the unit is receiving power, but tells nothing else. All units sold by VideoGamePerfection.com come with firmware pre-flashed.

Hardware setup

To avoid damage, the programmer must be set at 5V logic high level, with no power supplied to the Koryuu by the programmer (target mode off). These settings are usually configurable through jumpers on the programmer itself. The exact location varies depending on the model. Usually the jumpers are labeled according to their function. Sometimes there is a need to open up the casing of the programmer to access these jumpers.

1. Connect the USB programmer to the PC.

2. Connect the ribbon cable and adapter (if one is needed) to the programmer.

3. Connect the other end of the ribbon cable to the Koryuu transcoder via the header shown in the picture below. Pin 2 is voltage or VCC so orientate the ribbon cable accordingly. Double-check this before proceeding.

Koryuu-top.jpg

4. Check again the orientation of the ribbon cable. Pin 2 is voltage and must match pin 2 as shown on the picture above.

5. Power on the Koryuu transcoder.

6. If needed, install the driver for your programmer. If you are not sure if you have an appropriate driver installed or how to install one, see the Software setup section for details.

7. Start your programmer software. If you do not have one installed yet, see the Software setup section for instructions for one such software.

8. Flash the new firmware image using your programmer software. If you are not sure how, see the Software setup section for instructions how to do this with a particular piece of software.

The Koryuu is now updated.

Software setup (Windows 7/8/8.1/10)

This section walks us through setting up the drivers and software needed to update the firmware on your Koryuu.

There are two pieces of software required:

  • Zadig for installing drivers for your programmer,
  • AVRDUDESS for flashing the firmware.

Install driver using Zadig

First, we need to install Zadig, which is a nifty piece of software for installing drivers for most kinds of ISP/ASP programmers. Simply point your web browser to [1], find the link labeled Download and save the executable file on your desktop (or whichever location you prefer).

You may now plug your programmer into one of the USB ports on your computer, if you have not done so already. Please see the Hardware setup section for more details.

Then, run the executable you saved previously. If an elevation (UAC) prompt pops up, accept it to continue.

The Zadig window should initially look like this:
Zadig initial avrispmkII.png

The type of your programmer may already be shown in the selection box, as in the image above (AVRISP mkII). If it is not, and you are sure it is connected, select the correct programmer from the list. Tick Options->List All Devices to show all supported devices if none show up.

Then you should choose a driver. For our purposes, selecting either the 'libusbK' or 'libusb-win32' driver should be a safe bet, the former having somewhat higher performance than the latter. Click Install Driver.
Zadig libusbK avrispmkII.png

Once the installation is finished, you should see a dialog stating so.
Zadig libusbK after install avrispmkII.png

Finally, you should see something similar to this, indicating that you now have a proper driver set up for your programmer.
Zadig libusbK driver installed avrispmkII.png

The driver setup is now complete. You may now close Zadig.

Install and run AVRDUDESS

Open the AVRDUDESS web page in your web browser and download the portable version of AVRDUDESS, which does not require any particular installation, other than extracting the archive.

Extract the archive to a location of your choosing and then open said location if Windows does not do that for you. There may be more than one file labeled Application. Choose the one with a distinct icon, named avrdudess or avrdudess.exe, and run it by double-clicking it. AVRDUDESS folder exe selected.png

At this point you may get a Windows protected your PC box, warning that you attempted to run an unrecognized program:
AVRDUDESS folder nag1.png

This is normal, and you should click More info, which makes a button labeled Run anyway appear. Click it.
AVRDUDESS folder nag2.png

Next, if you have not run any .Net applications before, Windows may prompt you to install the .Net Framework.
AVRDUDESS folder dotnet required.png

This is completely normal and safe, so allow Windows to install it. This may require accepting another elevation prompt. After the installation is done, you can try opening AVRDUDESS again.
AVRDUDESS folder dotnet installed.png

Flash the firmware update using AVRDUDESS

Now we are ready to flash the new firmware. If you do not have AVRDUDESS open yet, open it now. The AVRDUDESS window may look a bit daunting, but fear not! We will walk through the entire process step by step.
AVRDUDESS main window initial.png

First, select the correct kind of programmer for your device from the top-left selection box.
AVRDUDESS main window programmer menu.png

Then select the appropriate port. The port is probably going to be one of usb or COM1, but you can try each option until you find the correct one, or type the correct one in the selection box.
AVRDUDESS main window port menu.png

Try detecting the Koryuu on-board MCU using the Detect button. It should come up as ATmega328P.
AVRDUDESS main window mcu detect.png

If not, select ATmega328P manually.
AVRDUDESS main window mcu menu.png


Within the part of the window labeled Flash, enter the path to the Koryuu firmware image or select it using the file picker dialog. Select Write on the radio selector and either Auto or Intel Hex as the format. Then click Go.
AVRDUDESS main window flashing.png

If everything went well, you should see a message like so. Please make sure that the verification part is successful. If it was successful, you are done. The Koryuu is now updated.
AVRDUDESS main window flash success.png

If you get a failure, such as the one below, make sure all cables are plugged correctly and the settings are as described in the Hardware setup section. Also, try to make sure nothing (such as a high-priority process using a lot of CPU) is disrupting the flashing process, as it is somewhat timing-sensitive. Then try clicking Go again.
AVRDUDESS main window flash failure.png


Alternative software setup (Windows XP and newer)

If you have a programmer based on the open-source USB ASP design, there is an alternative software setup, using the Khazama AVR Programmer software and a driver specific to this type of programmer. This type of programmer tends to be affordable and widely available from multiple vendors.

Specific requirements

Note - Firmware needs to have been flashed before the unit is functional. If powered up without firmware, only the PWR LED next to the power switch will light up. This will simply indicate that the unit is receiving power, but tells nothing else. All units sold by VideoGamePerfection.com come with firmware pre-flashed.

Before proceeding, please make sure you have carefully read the Hardware setup section.

Install Khazama and the driver

1. Download and install the Khazama AVR Programmer software to your PC

2. Connect the USB ASP programmer to the PC

3. If you have never used the programmer on your PC before, install the drivers from this link. If you need help with this, see this page. Scroll down to the heading "Best & Easy method" and follow the instructions from there

Update the Koryuu firmware

1. Double-check that your hardware setup is correct: logic level, cables properly plugged in, the ribbon cable oriented correctly on both ends. If you are unsure, please review the Hardware setup section.

2. Power on the Koryuu transcoder.

3. Start the Khazama AVR Programmer software. The program window shown below should appear.


Khazama-window.png


4. On the drop down box under "AVR:" ensure that the correct AVR is selected. ATMEGA328P is the AVR in our recommended programmer.

5. Open the file menu and choose "Load FLASH file to buffer". Using the standard Windows file requester, navigate to the hex file containing the firmware, click on it and choose "Open".

6. Open the command menu and choose "Write flash buffer to chip". A successful programming should only take a second or two.

Note – On some PCs you may see a message that says "Error setting USBASP ISP Clock". This can safely be ignored (just click on OK to dismiss it).

The Koryuu is now updated.

Firmware Revision History

Version 1.0 – Release - Original firmware shipped with Koryuu.

Version 1.1 – Release - Bug fixes and other changes. Settings can now be saved. Improved robustness of video chip initialization, video mode changes and tracking of current video mode. Transitions between interlaced and progressive video modes should no longer cause trouble with the OSSC. Added -ntp firmware variant (No Test Pattern), which disables video output when there is no input signal on the currently selected input.

See the firmware download page for more information.