Novatron
Forum rules
Be nice. No drama.
Be nice. No drama.
Re: Novatron
The code that tests whether there is a sd card is found in Reset.gcl. It does the things that tiens the card into spi mode, tries the reset command, and checks whether the card answers...
Re: Novatron
I haven't had a chance to work on the SD card since the last update. The Famicom controllers finally showed up, so I was testing those. I found a listing of the original controllers that were shipped with the Gigatron and ordered a few. What was shipping turned out to be different though and initially I couldn't get them to work at all.
Then I realized I had wired up the power on the connector the wrong way round So after blowing up a few I was finally able to get the controller to do something. The buttons on these controllers are all mapped differently. I seem to have all the controls, so I should be able to fix that in software.
There is an issue when both the controller and ATtiny85 are connected. I can add a pair of diodes with one connected to each of the data inputs. The existing resistor will pull the input high and then get pulled low if either of the inputs go low via the diode.
Then I realized I had wired up the power on the connector the wrong way round So after blowing up a few I was finally able to get the controller to do something. The buttons on these controllers are all mapped differently. I seem to have all the controls, so I should be able to fix that in software.
There is an issue when both the controller and ATtiny85 are connected. I can add a pair of diodes with one connected to each of the data inputs. The existing resistor will pull the input high and then get pulled low if either of the inputs go low via the diode.
Code: Select all
Vcc
|
[R] +--|>|-- Famicom
| |
input--+---+--|>|-- ATtiny85
Re: Novatron
What's the mapping you see with these?The buttons on these controllers are all mapped differently.
Re: Novatron
I don't think I have a button that maps to "start". This is how the rest map.
Code: Select all
[ up ] [right]
[down] [left] [A/B?] [right]
[ ?? ] [ ?? ][select] [A/B?]
- Attachments
-
- Screen Shot 2022-08-18 at 11.04.09 AM.png (689.28 KiB) Viewed 2012 times
Re: Novatron
Are you sure that UP is mapped that way? If your UP button is mapped to START, I may have an explanation for what you're seeing.
I would expect that you're seeing:-
If the controller is shifting on a different PULSE clock edge direction from what the 595 on the Gigatron expects, it could transpose the bits as shown below. (2nd column is what Gigatron expects, 3rd column shows bits transposed by 1)
Can you share a waveform of PULSE/LATCH/DATA at the 595 while pressing START?
I would expect that you're seeing:-
Code: Select all
[ start ] [right]
[down] [left] [A] [right]
[ up ] [ B ][select] [A]
If the controller is shifting on a different PULSE clock edge direction from what the 595 on the Gigatron expects, it could transpose the bits as shown below. (2nd column is what Gigatron expects, 3rd column shows bits transposed by 1)
Code: Select all
BIT7 buttonA buttonRight
BIT6 buttonB buttonA
BIT5 buttonSelect buttonB
BIT4 buttonStart buttonSelect
BIT3 buttonUp buttonStart
BIT2 buttonDown buttonUp
BIT1 buttonLeft buttonDown
BIT0 buttonRight buttonLeft
Re: Novatron
Yes, you are correct. I had the up and start mixed up. Holding the top button triggers the reset, so that would be the start button.bmwtcu wrote: ↑18 Aug 2022, 15:19 I would expect that you're seeing:-
Code: Select all
[ start ] [right] [down] [left] [A] [right] [ up ] [ B ][select] [A]
I'll set up the oscilloscope and post some screenshots. Thanks for the insight!
Re: Novatron
Not sure if Rev 1.3 is a downrev schematic, but HSYNC_B shouldn't be wired up to the 595 twice on pins 11 and 12. I assume you already addressed that.
Re: Novatron
I label "OUT6" as ~HSYNC in my schematic. This looks correct. I see pins 11 and 12 of the 595 connected to OUT6 on the Gigatron PCB.
Re: Novatron
DOH, my bad. I was expecting to see LATCH and forgot that it feeds the DB9 pin directly.
Re: Novatron
I think the controller issue may be a timing glitch. I was testing things out and see the bits getting transposed when plugged into a VGA monitor. I plugged in a VGA-to-HDMI adapter and issue goes away. The controller buttons are all mapped correctly, so the data is getting latched as expected.
This might be caused by a reflection coming from the VGA cable because the impedance isn't matched to the 75 ohms of the monitor. That could delay the LATCH or advance the PULSE causing it to miss the first bit. I'll need to think it through to figure out where the problem is.
I remember seeing something from Marcel related to this and tracked it down here - https://cdn.hackaday.io/files/207818890 ... %20R17.pdf
Note: I don't have this 68-ohm resistor in my current design.
This might be caused by a reflection coming from the VGA cable because the impedance isn't matched to the 75 ohms of the monitor. That could delay the LATCH or advance the PULSE causing it to miss the first bit. I'll need to think it through to figure out where the problem is.
I remember seeing something from Marcel related to this and tracked it down here - https://cdn.hackaday.io/files/207818890 ... %20R17.pdf
Note: I don't have this 68-ohm resistor in my current design.