GBS 8200/8220 CFW Project

The place for all discussion on gaming hardware
mybook4
Posts: 25
Joined: Sun Jan 18, 2015 11:35 pm

Re: GBS 8200/8220 CFW Project

Post by mybook4 »

After putting the microcontroller port on hold (life stuff, new job, moving, etc), I finally got back to it. Success!

TLDR; I wrote code for the Digispark Pro (a $13 micro controller board) which can send dooklink's custom firmware settings to the GBS8220 and has a switch to toggle between 240p and 480i. The code can be found at https://github.com/mybook4/DigisparkSke ... BS_Control.

Turns out that the Tvia (scaler chip) and the TinyWireM library (an i2c library for ATTiny chips) didn't get along very well. Almost everything was NACKed. I recorded the onboard microcontroller communicating with the Tvia (via logic analyzer). I decided to implement an i2c bit banger to write the register values. By implementing the i2c communication manually, I was able to better match the timing characteristics of the onboard microcontroller. After using the manual bit banging code, the Digispark Pro was able to successfully set register values on the Tvia.

Hard coded settings for 240p and 480i (from dooklink's set files) were included in the code. I currently use one switch that toggles between 240p and 480i. I might also add a switch (for P8 and an available GPIO pin?) to toggle between using the onboard microcontroller and the custom firmware. Check out the README.txt file for more details.

Obviously dooklink's awesome work is much more flexible than this port (on the fly settings adjustment, etc). This was more of a "I wonder if I can" test that provides a low cost alternative (to the raspberry pi) for those who are interested.

P.S. For anyone looking for a logic analyzer for hobby work, check out the Saleae Logic 8. It was a pleasure to debug with.
mybook4
Posts: 25
Joined: Sun Jan 18, 2015 11:35 pm

Re: GBS 8200/8220 CFW Project

Post by mybook4 »

dooklink wrote:
blank964 wrote:What is setup for component out? Right now I have vga output and the composite from the rpi going into the green component of the GBS. Obviously to get component out I'd need a different setup. How should it be configured?
Do you mean input or output. I haven't got any component input settings yet. Component output just requires a VGA to 3 RCA cable. You then use the hotkeys to change the ui video mode and load a YPbPr setting in the menu.
Would this cable work?
http://www.monoprice.com/Product?c_id=1 ... 1&format=2

Are VGA Green Blue and Red connected to component Y Pb and Pr respectively (sync on Luma)?
User avatar
dooklink
Posts: 85
Joined: Fri Nov 07, 2014 6:16 am
Location: Australia

Re: GBS 8200/8220 CFW Project

Post by dooklink »

mybook4 wrote:
dooklink wrote:
blank964 wrote:What is setup for component out? Right now I have vga output and the composite from the rpi going into the green component of the GBS. Obviously to get component out I'd need a different setup. How should it be configured?
Do you mean input or output. I haven't got any component input settings yet. Component output just requires a VGA to 3 RCA cable. You then use the hotkeys to change the ui video mode and load a YPbPr setting in the menu.
Would this cable work?
http://www.monoprice.com/Product?c_id=1 ... 1&format=2

Are VGA Green Blue and Red connected to component Y Pb and Pr respectively (sync on Luma)?
Yes, any of those types of cables should work. I should also mention that the component out is not correct yet. I have found a way to improve it that I haven't published yet. (I've been overseas for 2 weeks and haven't got to finishing v0.3 just yet)
Solo761
Posts: 16
Joined: Mon Jan 26, 2015 5:29 pm

Re: GBS 8200/8220 CFW Project

Post by Solo761 »

mybook4 wrote:After putting the microcontroller port on hold (life stuff, new job, moving, etc), I finally got back to it. Success!

TLDR; I wrote code for the Digispark Pro (a $13 micro controller board) which can send dooklink's custom firmware settings to the GBS8220 and has a switch to toggle between 240p and 480i. The code can be found at https://github.com/mybook4/DigisparkSke ... BS_Control.

...

P.S. For anyone looking for a logic analyzer for hobby work, check out the Saleae Logic 8. It was a pleasure to debug with.
Hi, I've tried porting (or better said compiling) your code to Arduino Uno, but so far haven't got it to work.

To make it compile I've had to change few pin defines in GBS_Control.ino. I've moved "resolution" switch from PA7 do PD2 (adjusted DDR, PORT and PIN defines),

Code: Select all

from 

#define RESOLUTION_SWITCH_DDR  DDRA
#define RESOLUTION_SWITCH_PIN  PINA
#define RESOLUTION_SWITCH_PORT PORTA
#define RESOLUTION_SWITCH_BIT  7

to

#define RESOLUTION_SWITCH_DDR  DDRD
#define RESOLUTION_SWITCH_PIN  PIND
#define RESOLUTION_SWITCH_PORT PORTD
#define RESOLUTION_SWITCH_BIT  2
I also changed LED pin define from 1 to pin 13, as Arduino Uno has LED. It's on port B same as digispark so no need to adjust DDR and PORT defines

Code: Select all

from

#define LED_DDR DDRB
#define LED_PORT PORTB
#define LED_BIT 1

to

#define LED_DDR DDRB
#define LED_PORT PORTB
#define LED_BIT 13
And I also changed port/pin defines in I2CBitBangWriter.h from port B pins 0 and 2 to port C and pins A4 and A5 where Arduino Uno has SDA/SCL pins

Code: Select all

from
#define DDR_I2CBB             DDRB
#define PORT_I2CBB            PORTB
#define PIN_I2CBB             PINB
#define SDA_BIT        0
#define SCL_BIT        2

to 

#define DDR_I2CBB             DDRC
#define PORT_I2CBB            PORTC
#define PIN_I2CBB             PINC
#define SDA_BIT        A4
#define SCL_BIT        A5
I think these are all places where pins are defined. Anyway, code compiled successfully, but of course, it doesn't work :).

My main question is, does GBS has to have something connected to it's input for it to turn the monitor on? With built in firmware it doesn't, it wakes it from standby and shows message "no signal". I expect it would turn monitor on with black picture, but I don't know if it's maybe supposed to leave it in standby until there's something on the input. Just to make it easier to test :). I tried connecting Amiga to it but monitor was still in standby.

I'm not a pro at this stuff so don't have any logic analyzers to check what actually happens in communication.
mybook4
Posts: 25
Joined: Sun Jan 18, 2015 11:35 pm

Re: GBS 8200/8220 CFW Project

Post by mybook4 »

You might want to try using the arduino i2c library/examples (the Wire library http://www.arduino.cc/en/Reference/Wire). I found that the TinyWireM library usually used for ATTiny (i.e. the Digispark) didn't work with the GBS 8220, so I bit banged it myself.
mybook4
Posts: 25
Joined: Sun Jan 18, 2015 11:35 pm

Re: GBS 8200/8220 CFW Project

Post by mybook4 »

To answer your question, you don't need an input. You'd just see a blank screen.

Also, I'd double check the "bit numbers". I'm using masks into avr PORT/PIN/DDR. For example, my digispark's labelled pin 5 is actually AVR PA7. Theoretically, you could use any digital gpio for i2c since my code implements i2c writing without the use of AVR hardware USI.


Not sure what version of the Uno you're using, but check out the following mapping between ATMega328 ports and the Arduino labeled digital/analog ports.
http://www.arduino.cc/en/Hacking/PinMapping168

From the looks of it, SDA would be PORT/PIN/DDR C with bit 4 (rather than A4). SCL would be bit 5, the LED would be PORT/PIN/DDR B with bit 5.
mybook4
Posts: 25
Joined: Sun Jan 18, 2015 11:35 pm

Re: GBS 8200/8220 CFW Project

Post by mybook4 »

So some more additions were made to the microcontroller port. I added the following:

-horizontal image stretching/shrinking
-horizontal image shift left/right
-vertical image shift up/down
-240p/480i selection

An IR receiver was added to the board and I bought a cheap IR remote to control the above settings.

After adjusting the image, the settings can be saved into the microcontroller's onboard EEPROM by selecting a save button (the 200+ button on the remote I'm using) and then pressing the desired bank (button 1-9). Saved settings can be loaded by pressing the bank (button 1-9).

I'm thinking about designing a small printed circuit board which contains the microcontroller (and its peripherals) and would clip into GBS (similar to the pictured prototype, but probably more compact). I'd need to get at least 10 boards made, so if anyone's interested let me know.

Picture album of the setup:
http://imgur.com/a/Vu34H

A video showing a couple of the capabilities.
https://youtu.be/YtGaB6MjuS4


Image
Solo761
Posts: 16
Joined: Mon Jan 26, 2015 5:29 pm

Re: GBS 8200/8220 CFW Project

Post by Solo761 »

mybook4 wrote:To answer your question, you don't need an input. You'd just see a blank screen.

Also, I'd double check the "bit numbers". I'm using masks into avr PORT/PIN/DDR. For example, my digispark's labelled pin 5 is actually AVR PA7. Theoretically, you could use any digital gpio for i2c since my code implements i2c writing without the use of AVR hardware USI.


Not sure what version of the Uno you're using, but check out the following mapping between ATMega328 ports and the Arduino labeled digital/analog ports.
http://www.arduino.cc/en/Hacking/PinMapping168

From the looks of it, SDA would be PORT/PIN/DDR C with bit 4 (rather than A4). SCL would be bit 5, the LED would be PORT/PIN/DDR B with bit 5.
OK, that's mostly what interested me, so far monitor stayed in standby, didn't wake up with blank screen and I assumed that's because it didn't work. Luckily that's correct, it would make experimenting a bit harder if I have to have something connected to GBS input.

My arduino is rev 3 (ATMega328), but pinout is the same as with older ATMega168. I'll try with your suggestion and change pin defines to 4 and 5 instead of A4. So far I've used mostly Arduino and he likes his pins called by their numbers, that's why I used A4 and A5 as pin names, but since you access port directly it could be that that's where the problem is. Arudino environment recognized A4 and A5 but who knows what it linked in the end :).

If this doesn't help I'll have to start reading TVIA documents to learn how it wants it's I2C data :). I already tried to cobble something up with wire library.

Code: Select all

  for (int x = 0; x < sizeof(startArray) - 1; x++)
  {
    Wire.beginTransmission(0x17);
    Wire.write(pgm_read_byte(&(startArray[x])));
    Wire.endTransmission();
  }
but of course, it didn't work :). It reads all of the values OK (tested with reading and printing them to serial) but didn't work.

One more thing I've noticed, If I P8 without jumper, but have arudino connected, although, turned off, GBS won't boot, I have to disconnect SDA and SCL lines for it to boot to original firmware. Is this what happens to everyone?


One question about your prototype, I don't see it in pictures clearly. Does ATTiny in digispark pro works at 5V or 3.3V? I'm asking because TVIA I2C interface is 3.3V. Arduino UNO uses 5V so it's I2C is also at 5V. While it won't kill it immediately longer periods at 5V could damage TVIA chip so I used this type of connection

http://playground.arduino.cc/Main/I2CBi ... velShifter

to lower it's 5V to 3.3V.


*edit*

I just had to try it before going to sleep (myself this time, not the monitor :) ) and it worked. Those A4/A5 were at fault, I swapped them to plain port bits and off we go. GBS woke the monitor from sleep, tried connecting A600 to it and picture appeared

Image

Now I just have to find what settings I used on rPi version to turn off deinterlacing as I suspect it's turned on in this case. Mouse pointer makes distortion around itself when moved. Same thing happens with original firmware because it deinterlaces the input, and default Amiga output is progressive. But the main thing is solved, Arduino Uno can talk to GBS :)
mybook4
Posts: 25
Joined: Sun Jan 18, 2015 11:35 pm

Re: GBS 8200/8220 CFW Project

Post by mybook4 »

One question about your prototype, I don't see it in pictures clearly. Does ATTiny in digispark pro works at 5V or 3.3V? I'm asking because TVIA I2C interface is 3.3V. Arduino UNO uses 5V so it's I2C is also at 5V. While it won't kill it immediately longer periods at 5V could damage TVIA chip so I used this type of connection

http://playground.arduino.cc/Main/I2CBi ... velShifter

to lower it's 5V to 3.3V.
I'm glad you got it working with the Uno!

We shouldn't have to worry about the difference in voltage between the TVIA and the Arduino. The i2c bus (and the bit bang code) puts the pins into two states, pull to ground and release line (the pullups on the GBS board pull the voltage on the SCL and SDA lines to 3.3v). I've verified this with an Oscilloscope.

The ATTiny167 on the Digispark is capable of operating at 3.3v, but not at 16mhz. It would be cool to power the ATTiny167 with the 3.3v rail on the GBS's i2c header. I'd have to look into setting the ATTiny to run at something lower (e.g. 8mhz) and adjust the time dependent code (bit banging and IR decoder).
Solo761
Posts: 16
Joined: Mon Jan 26, 2015 5:29 pm

Re: GBS 8200/8220 CFW Project

Post by Solo761 »

Ah, so actually TVIA dictates voltage on I2C bus. I've checked them with multimeter and I've noticed that it never goes over 3.3V when connected directly, but just to be sure I used connection from that link to ensure it's at 3.3V. Haven't tested with oscilloscope yet, I have small one channel digital oscilloscope so I can check, but I haven't been playing with GBS for last few days. First I'll try to get picture centered and disable deinterlacing. I'll worry about I2C voltage when I'll build standalone board.

I've checked prices of ATTiny167 and funnily it's more expensive than atmega328, at least on ebay. I guess it's because supply and demand. That's why I want to try and set it up on regular Uno, cheaper in the end :).
It's also the same with the clock. ATMega328p works at 16 MHz, but needs higher voltage than 3.3V. When used at 3.3V it's usually set to 8MHz. If I remember correctly from datasheet, it needs at least 3.9V to work at 16MHz. But using it at 8MHz has another benefit, it can use internal clock, it goes up to 8MHz, so you won't need crystal and two ceramic caps for custom board.
mybook4
Posts: 25
Joined: Sun Jan 18, 2015 11:35 pm

Re: GBS 8200/8220 CFW Project

Post by mybook4 »

Solo761 wrote:Ah, so actually TVIA dictates voltage on I2C bus. I've checked them with multimeter and I've noticed that it never goes over 3.3V when connected directly, but just to be sure I used connection from that link to ensure it's at 3.3V.
Neither chip dictates the high voltage level. Both pull to ground or let go of the lines (letting the onboard pull up resistors pull the lines high, which in the case of the GBS board is the 3.3v output of a voltage regulator). Check out this page http://www.robot-electronics.co.uk/acat ... orial.html

You are correct about being able to use the internal clock at 8mhz. It might not be that accurate (+/- 10%), but it probably wouldn't matter for this usage.
User avatar
dooklink
Posts: 85
Joined: Fri Nov 07, 2014 6:16 am
Location: Australia

Re: GBS 8200/8220 CFW Project

Post by dooklink »

mybook4 wrote:
Solo761 wrote:Ah, so actually TVIA dictates voltage on I2C bus. I've checked them with multimeter and I've noticed that it never goes over 3.3V when connected directly, but just to be sure I used connection from that link to ensure it's at 3.3V.
Neither chip dictates the high voltage level. Both pull to ground or let go of the lines (letting the onboard pull up resistors pull the lines high, which in the case of the GBS board is the 3.3v output of a voltage regulator). Check out this page http://www.robot-electronics.co.uk/acat ... orial.html

You are correct about being able to use the internal clock at 8mhz. It might not be that accurate (+/- 10%), but it probably wouldn't matter for this usage.
This is not strictly true if you are using the standard wire library on a 328p. See this: http://playground.arduino.cc/Main/I2CBi ... velShifter

The wire library enables internal pull-ups to 5V. But this usually doesn't create any problems as the I2C line only rises a small amount as the internal pull-ups are usually weaker (Higher Impedance). But the pull-ups can be disabled after initializations to fix the issue.
User avatar
yxkalle
Posts: 135
Joined: Sun Feb 16, 2014 4:32 am
Location: Stockholm, Sweden

Re: GBS 8200/8220 CFW Project

Post by yxkalle »

Is it hard to implement 1280x1024 or 1280x960? I tried to mess around in the settings but there're too many unknowns to me. Help? Great project by the way, I have no idea how you figured this out Dooklink. :)
User avatar
dooklink
Posts: 85
Joined: Fri Nov 07, 2014 6:16 am
Location: Australia

Re: GBS 8200/8220 CFW Project

Post by dooklink »

yxkalle wrote:Is it hard to implement 1280x1024 or 1280x960? I tried to mess around in the settings but there're too many unknowns to me. Help? Great project by the way, I have no idea how you figured this out Dooklink. :)
I guess I could add them to v0.3 for RGBHV only. I'm close to finishing it and don't want to work on the RPi based solution after that. A custom resolution generator would be best, but I don't think I really want to put that much effort in.

I've just finished a dynamic deinterlace switcher which you can test on the development branch. And I'm adding brightness, contrast, saturation and hue controls now.
User avatar
yxkalle
Posts: 135
Joined: Sun Feb 16, 2014 4:32 am
Location: Stockholm, Sweden

Re: GBS 8200/8220 CFW Project

Post by yxkalle »

Thank you so much! :D
User avatar
dooklink
Posts: 85
Joined: Fri Nov 07, 2014 6:16 am
Location: Australia

Re: GBS 8200/8220 CFW Project

Post by dooklink »

Just published version 0.3, hopefully I haven't broken anything.
The changes are:

Code: Select all

Version 0.3
  
  Colour adjustment menu - Brightness, Contrast, Saturation and Hue
  Dynamic De-interlace - detect and change de-interlace mode automatically
  New Settings Added
    -YPbPr 1080p 50Hz modes
    -YPbPr 720p 50Hz modes
    -YPbPr 720p 60Hz modes
    -RGBHV 1080p 50 to 60Hz modes
    -RGBHV 720p 60Hz modes
    -RGBHV 720p 50 to 60Hz modes
    -RGBHV 800x600 50 to 60 Hz scaled 567i mode
    -RGBHV 1280x960 60Hz and 50 to 60Hz modes
    -RGBHV 1280x1024 60Hz and 50 to 60Hz modes
    -RGBHV 320x240p 60 to 120Hz Double Scan mode (for 31kHz CRTs)
    -RGBHV 320x240p from 640x480p 60Hz downscaling mode (for 15kHz CRTs)
  Sync Level Adjust added, used for component YPbPr output
  Spelling in Menu fixed "Rasberry" -> "Raspberry"
  Version added to Menu Title (v0.3)
  Load and Delete menus now use whiptail interface, allows for scroll bar
  Fixed Right Ctrl hot-key in Triggerhappy con-fig
  Device Tree support added to install script (kernel 3.18+)
Please see the component sync level section I have added to the OP if you use component mode.
User avatar
yxkalle
Posts: 135
Joined: Sun Feb 16, 2014 4:32 am
Location: Stockholm, Sweden

Re: GBS 8200/8220 CFW Project

Post by yxkalle »

The new video modes looks great on my monitor, however, I can't get dynamic de-interlace to work. When I pick Set Detection it switches to video processing mode and when I try to go back to the menu it says the following:

Error: Could not open file '\dev\i2c-1': No such file or directory
/home/pi/gbs-control.sh: row 111: (( & 0x0F ) << 7 + ( >> 1): Syntax error

But maybe you should focus on leaving the rpi platform for something better.

EDIT: It worked fine after I rewrote the "detect_revision()" function to always set I2C_PORT to 0.
User avatar
dooklink
Posts: 85
Joined: Fri Nov 07, 2014 6:16 am
Location: Australia

Re: GBS 8200/8220 CFW Project

Post by dooklink »

yxkalle wrote:The new video modes looks great on my monitor, however, I can't get dynamic de-interlace to work. When I pick Set Detection it switches to video processing mode and when I try to go back to the menu it says the following:

Error: Could not open file '\dev\i2c-1': No such file or directory
/home/pi/gbs-control.sh: row 111: (( & 0x0F ) << 7 + ( >> 1): Syntax error

But maybe you should focus on leaving the rpi platform for something better.

EDIT: It worked fine after I rewrote the "detect_revision()" function to always set I2C_PORT to 0.
So it must not be detecting rev 1 boards. Thanks for testing that.

EDIT: Can you (or anyone) please test the development branch version I just updated. I've been using the wrong line of /proc/cpuinfo to detect the board revision. the information is available here: http://elinux.org/RPi_HardwareHistory
User avatar
yxkalle
Posts: 135
Joined: Sun Feb 16, 2014 4:32 am
Location: Stockholm, Sweden

Re: GBS 8200/8220 CFW Project

Post by yxkalle »

dooklink wrote:Can you (or anyone) please test the development branch version I just updated.
Seems to work fine!:)
Solo761
Posts: 16
Joined: Mon Jan 26, 2015 5:29 pm

Re: GBS 8200/8220 CFW Project

Post by Solo761 »

Stupid question... I tried to setup new installation on my rPi (512MB model B) to test some settings but for some reason I can't get it to work.

1. I installed fresh Raspbian (tried two versions, one new, and one from last December, that I used first time i tried it), connected rPi to HDMI so I can go through setup.
2. Finished setup (basically I select to expand filesystem, although one time I tried enabling I2C from raspi-setup before installing further) using USB keyboard and installed gbs-controller software
3. After this turned rPi off, connected composite output to GBS green component connector, connected GBS SDA to rPi SDA, SCL to SCL, GND to GND
4. disconnect HDMI cable, connect GBS to power supply, connect power to rPi

I think I did everything right, but it doesn't work. Monitor remains in standby. I also tried with HDMI still connected and using that input, I get GBS-controller menu, but no matter what I choose RGB input stays in standby, GBS doesn't wake. I tried one without GBS I2C connected and before GBS-controller appears I get warnings how I2C can't see anything on address 0x17, this doesn't happen if I have I2C connected so I guess communication works, at least in a sense it can find the device on I2C bus.

Funny thing is that I had it working before when dooklink published first version and I don't remember that I had to do anything else beside steps I mentioned above. That's the reason why I also tried with raspbian version from December, I had it working on it :/.

GBS board works (it also worked before), if I disconnect I2C wires and remove P8 jumper it starts up fine with original software. It also works with Arduino Duo and port of mybook4's digispark firmware.
User avatar
dooklink
Posts: 85
Joined: Fri Nov 07, 2014 6:16 am
Location: Australia

Re: GBS 8200/8220 CFW Project

Post by dooklink »

Solo761 wrote:Stupid question... I tried to setup new installation on my rPi (512MB model B) to test some settings but for some reason I can't get it to work.

1. I installed fresh Raspbian (tried two versions, one new, and one from last December, that I used first time i tried it), connected rPi to HDMI so I can go through setup.
2. Finished setup (basically I select to expand filesystem, although one time I tried enabling I2C from raspi-setup before installing further) using USB keyboard and installed gbs-controller software
3. After this turned rPi off, connected composite output to GBS green component connector, connected GBS SDA to rPi SDA, SCL to SCL, GND to GND
4. disconnect HDMI cable, connect GBS to power supply, connect power to rPi

I think I did everything right, but it doesn't work. Monitor remains in standby. I also tried with HDMI still connected and using that input, I get GBS-controller menu, but no matter what I choose RGB input stays in standby, GBS doesn't wake. I tried one without GBS I2C connected and before GBS-controller appears I get warnings how I2C can't see anything on address 0x17, this doesn't happen if I have I2C connected so I guess communication works, at least in a sense it can find the device on I2C bus.

Funny thing is that I had it working before when dooklink published first version and I don't remember that I had to do anything else beside steps I mentioned above. That's the reason why I also tried with raspbian version from December, I had it working on it :/.

GBS board works (it also worked before), if I disconnect I2C wires and remove P8 jumper it starts up fine with original software. It also works with Arduino Duo and port of mybook4's digispark firmware.
So it sounds like I2C communication is working. The only thing I can think of is try pressing ~/` + 1 to get the menu back into 480p RGB. Maybe I goofed the default to be 480p YPbPr or something.

Edit: You could also try F1 and F2, or post a copy of log.txt if it is created after booting in to the menu with I2C connected.
Solo761
Posts: 16
Joined: Mon Jan 26, 2015 5:29 pm

Re: GBS 8200/8220 CFW Project

Post by Solo761 »

Still no luck... I gave it up for now, when it boots there is no log.txt, but when I try to load some of the settings (either when I login via SSH or if I leave HDMI connected so I get to control menu that way) it gets created, but it's empty.

I used fresh raspbian again, and during install I noticed it complaining that /etc/modprobe.d/raspi-blacklist.conf got rejected and that it saved it as raspi-blacklist.conf.rej. I tried renaming that file to raspi-blacklist.conf (and cleaned it's contents a bit, it had some extras from what should be there) but still no luck when I commented i2c part and rebooted.

Actually, the reason why I wanted to do try it again was to load one of Amiga settings, set the picture for it and save to new setting file that I'd transfer to Arduino uno firmware. As I mentioned above, after mybook4 mentioned that he used port bits and not arduino pin names I managed to get his digispark fw working on Arduino uno, but picture was shifted about 1/5 to the left. So instead of trying to figure out how to implement on the fly shifting. In his public firmware he implemented bit bang sending of I2C data, but from your rPi firmware it looks that for shifting you need to get current value, add shift value and send it back. That is beyond my abilities at the moment :). Maybe if I managed to get wire library working at some point.
That's why I thought of the lazy way, load it on rPi, set image shift, save that setting and hard code it in Arduino :mrgreen:
Solo761
Posts: 16
Joined: Mon Jan 26, 2015 5:29 pm

Re: GBS 8200/8220 CFW Project

Post by Solo761 »

Image

Well, it seems I didn't have to bother :). I noticed that there are more settings in v0.3 so I tried 1920x1080 and 1280x1024 settings for 288p and they worked without the need for adjustments, nothing was off the screen, here's soccer kid on A1200 :)

http://i.imgur.com/XBereE3.jpg
http://i.imgur.com/0VgRhAU.jpg

It's better quality than SCART to HDMI adapter, I guess it's because it also forces deinterlace on Amiga signal which is progressive so there's blurring that shouldn't be there. In case of GBS and dooklink's settings this isn't a problem :).
Ace9921
Posts: 30
Joined: Sun Jul 18, 2010 7:18 pm

Re: GBS 8200/8220 CFW Project

Post by Ace9921 »

Has the code for v0.3 been ported over to the Arduino Uno yet? I really want to see the results of this update on my LED TV. v0.2 had black level anomalies in Component at 480p and a huge amount of noise in 1080p.

Also, a question: I have noticed screen centering problems with SHVC-CPU-01 Super NES motherboards. For some reason, this particular Super NES board revision is shifted very far down, but other revisions don't do this. I've tested two different SHVC-CPU-01 boards, both have the same problem, but I haven't seen this vertical shift on the SNS-CPU-GPM-01, SNS-CPU-RGB-01 and SNS-CPU-1CHIP-01 boards as well as the Super NES Mini. What does the SHVC-CPU-01 board do to cause this massive vertical shift?
User avatar
dooklink
Posts: 85
Joined: Fri Nov 07, 2014 6:16 am
Location: Australia

Re: GBS 8200/8220 CFW Project

Post by dooklink »

Ace9921 wrote:Has the code for v0.3 been ported over to the Arduino Uno yet? I really want to see the results of this update on my LED TV. v0.2 had black level anomalies in Component at 480p and a huge amount of noise in 1080p.

Also, a question: I have noticed screen centering problems with SHVC-CPU-01 Super NES motherboards. For some reason, this particular Super NES board revision is shifted very far down, but other revisions don't do this. I've tested two different SHVC-CPU-01 boards, both have the same problem, but I haven't seen this vertical shift on the SNS-CPU-GPM-01, SNS-CPU-RGB-01 and SNS-CPU-1CHIP-01 boards as well as the Super NES Mini. What does the SHVC-CPU-01 board do to cause this massive vertical shift?
I've begun looking at the ardunio code, Just got mybook4's code working on my Uno so far. I'm going to try getting it working with standard arduino library functions. Also, nothing stops you from changing the settings files used by the existing arduino code.

Be sure to read my component sync write up added to the first post.

I've only got a SNES Mini so I don't know anything about that issue. This is the first time I've heard of it. It must have a different starting line for the active video. 240p has 262 lines per frame with the excess being vertical blanking and Vsync. Is this issue on NTSC or PAL SNESes? PAL could be a worse story in that regard, Just see the offset options in 240p test suite in 288p for the Wii as an example.
Ace9921
Posts: 30
Joined: Sun Jul 18, 2010 7:18 pm

Re: GBS 8200/8220 CFW Project

Post by Ace9921 »

I don't have a PAL Super NES. These are all NTSC consoles I've tested.
Solo761
Posts: 16
Joined: Mon Jan 26, 2015 5:29 pm

Re: GBS 8200/8220 CFW Project

Post by Solo761 »

I'm getting an inclination to throw my TV out of the window...

My main motivation for this is that my TV (LG 42LW579S) doesn't like Amiga signal. It has Scart connector, that should support RGB, but all I get is garbage on screen. Cable is fine, it works fine with TV/Monitor (LG M2262D, it's shown in pictures few posts back) that also has Scart connector. For other retro computers and consoles I tried (C64, Sega Mega Drive, Sega Master System, PSX...) it works fine with either composite, RGB, or s-video (over Scart).

But I managed to get it display picture from Amiga if I use RGB to HDMI adapter or GBS board, unfortunately, Amiga's output is progressive and both RGB to HDMI and GBS board expect it to be interlaced and deinterlace it and this introduces blurring in the picture and some artifacts.

And then came dooklink with this CFW project :). After I managed to get mybook4's code to work on Arduino uno I experimented with few resolution settings and found which works the best. On said TV/Monitor combo it worked great, no blurring, no artifacts. Finally I decided it's good enough and before I try to make standalone board that plugs into GBS I tried it on my big TV.

Aaaaaaaand... zip, zilch, nada, doesn't work... All I get is "invalid format" message... I tried with RGBHV 1280x1024 288p50 settings, next I tried with 1280x720, same thing. Lastly I tried with 1920x1080 settings, that should work, TV is full HD, that's full HD resolution, it should work... But you guessed it, nope :), again "invalid format". All of these settings work fine on small TV/Monitor, it's just the big TV that has problems with... everything...
I saved best for last :), it works fine with original GBS firmware :/.
retroware
Posts: 3
Joined: Sun Jun 28, 2015 12:38 pm

Re: GBS 8200/8220 CFW Project

Post by retroware »

First off, many thanks for starting this great project! I'm attempting to use it to convert a 400x300 19khz signal coming from an old piece of HP test equipment to drive a 640x480 lcd panel. I'm using an Arduino mini with the standard Arduino library to send the settings.
I've managed to find the correct set of settings but I can only get things to work if I first let the GBS cpu boot up. That is, things work fine if I let the cpu boot, then short out the i2c pin, and then send the settings. If however I start the board with the i2c pin shorted and then send the settings, the screen fills with a checkerboard of noisy green squares - even with no signal. It almost seems like there is something else on the board that needs to be initialized.

I've tried reading back the settings and I've verified that the registers got set correctly.

The sync source is separate h/v. I gotten it to work (with a cpu boot) both with separate h/v and composite sync (by using a sync combiner). In both cases, I'm using the white pin connector for input.

Any ideas as to what is wrong would be appreciated.
User avatar
dooklink
Posts: 85
Joined: Fri Nov 07, 2014 6:16 am
Location: Australia

Re: GBS 8200/8220 CFW Project

Post by dooklink »

Solo761 wrote:I'm getting an inclination to throw my TV out of the window...

My main motivation for this is that my TV (LG 42LW579S) doesn't like Amiga signal. It has Scart connector, that should support RGB, but all I get is garbage on screen. Cable is fine, it works fine with TV/Monitor (LG M2262D, it's shown in pictures few posts back) that also has Scart connector. For other retro computers and consoles I tried (C64, Sega Mega Drive, Sega Master System, PSX...) it works fine with either composite, RGB, or s-video (over Scart).

But I managed to get it display picture from Amiga if I use RGB to HDMI adapter or GBS board, unfortunately, Amiga's output is progressive and both RGB to HDMI and GBS board expect it to be interlaced and deinterlace it and this introduces blurring in the picture and some artifacts.

And then came dooklink with this CFW project :). After I managed to get mybook4's code to work on Arduino uno I experimented with few resolution settings and found which works the best. On said TV/Monitor combo it worked great, no blurring, no artifacts. Finally I decided it's good enough and before I try to make standalone board that plugs into GBS I tried it on my big TV.

Aaaaaaaand... zip, zilch, nada, doesn't work... All I get is "invalid format" message... I tried with RGBHV 1280x1024 288p50 settings, next I tried with 1280x720, same thing. Lastly I tried with 1920x1080 settings, that should work, TV is full HD, that's full HD resolution, it should work... But you guessed it, nope :), again "invalid format". All of these settings work fine on small TV/Monitor, it's just the big TV that has problems with... everything...
I saved best for last :), it works fine with original GBS firmware :/.
It could be the video timings themselves, but I would guess it it most likely the sync pulses. Perhaps the sync periods are not long enough. On the RPi version you can change this in the geometry menu.

You could try extend the sync periods in the array from the header file. I'll have to go look at what you will need to change if you can't find it yourself. Just let me know what you are using.
retroware
Posts: 3
Joined: Sun Jun 28, 2015 12:38 pm

Re: GBS 8200/8220 CFW Project

Post by retroware »

First off, many thanks for starting this great project! I'm attempting to use it to convert a 400x300 19khz signal coming from an old piece of HP test equipment to drive a 640x480 lcd panel. I'm using an Arduino mini with the standard Arduino library to send the settings.
I've managed to find the correct set of settings but I can only get things to work if I first let the GBS cpu boot up. That is, things work fine if I let the cpu boot, then short out the i2c pin, and then send the settings. If however I start the board with the i2c pin shorted and then send the settings, the screen fills with a checkerboard of noisy green squares - even with no signal. It almost seems like there is something else on the board that needs to be initialized.
I figured out what the issue was. I wasn't sending the initial set of register writes specified in start.txt. I am curious as to why these are needed when one then goes and rewrites every register in video processor.
Post Reply