Jump to content
IGNORED

Programming the Lynx for a living - blank carts


karri

Recommended Posts

I just built a cart with proper pullups. No difference. The error is in my code somewhere. I get the same error on two carts so it is not a bad chip.

 

About the programming I drive the SDA as an output and write both 0 and 1. If I read it becomes an input. Do you believe it matters to flip output to an input for every written 1?

Edited by karri
Link to comment
Share on other sites

I just built a cart with proper pullups. No difference. The error is in my code somewhere. I get the same error on two carts so it is not a bad chip.

If you want a 2nd pair of eyes to look at the code just drop me a PM.

 

About the programming I drive the SDA as an output and write both 0 and 1. If I read it becomes an input. Do you believe it matters to flip output to an input for every written 1?

Don't forget that in I2C you can have multiple masters and multiple slaves in the system at the same time. By making the pin an input and relying on the pull-up, you are emulating the behaviour of a real I2C bus master.

Link to comment
Share on other sites

I changed the write "1" to use SDA as input. No change.

 

Then I simplified a call with

 

sda(rd ? 0xa1 : 0xa0);

 

to

 

sda(0xa0);

 

and everything started to work.

 

I don't know what happened really.

 

I have to out with my daughters dog for a while. After that I try to check in the code into the lynx repository.

Edited by karri
Link to comment
Share on other sites

The first programmer/cart set with 3D printouts is tested and will be sent on Monday. I need to do some more 3D prints before sending out the other boards as I do not have more dead Lynxes around. The first two boards got equipped with connectors from dead Lynxes.

 

Tomorrow I try to print a connector that would work with safety pins. Perhaps it is better.

Link to comment
Share on other sites

I'm very late to the party; have I missed my chance to join in?

 

Vaguely related question: does any of my Navigator code survive in Stardreamer? If my memory isn't at fault in thinking you had any interest in it. Naturally, it being about a decade later, I'm a much better programmer now and would probably wince if I were to review it myself.

Link to comment
Share on other sites

Thomas! What a surprise to hear about you after all these years.

 

Yes, your 3D stuff is still there. But the concept has changed a lot. I will PM you later about the details.

 

It is not late at all to join in. We are still just a few guys trying to make a cheap cart reality.

Link to comment
Share on other sites

The first programmer/cart set with 3D printouts is tested and will be sent on Monday. I need to do some more 3D prints before sending out the other boards as I do not have more dead Lynxes around. The first two boards got equipped with connectors from dead Lynxes.

 

Tomorrow I try to print a connector that would work with safety pins. Perhaps it is better.

 

I am almost tempted to build my own 3D printer since there are no local ones around here.

Link to comment
Share on other sites

 

Do you run into any problems printing something small as that concerning the precision ?

 

The precision has been pretty good so far. Printing this with "normal" settings and 80% fill ratio takes 3 hours. So I plan to take my bike and have a second trip to the library in the evening. In the evening I know for sure if it works or not.

Link to comment
Share on other sites

The Safety Pin design looks very promising. The 3D printout is strong and accurate.

attachicon.gifsafetypins.png

Novel solution! Did you look at using spring loaded probes like these :-

 

http://uk.farnell.com/multicomp/p50-b-120-g/plunger-point-spring-probe-3a/dp/1568260

 

More expensive than safety pins but quite reliable and easy to replace.

Link to comment
Share on other sites

Farnell cost a fortune. The stuff cost 10 cents + 48 € handling fees + 36 € DHL partial delivery. Next week I get the second batch with more fees and deliveries. For hobby stuff I go with RS.

 

But I admit that Farnell is fast. You always get your stuff next day.

 

Actually I browsed some spring loaded probes at ebay. But I do not know what kind of magic you need to fasten them or keep them aligned so I went with something I can understand.

 

Besides... The pins alone would be 34€ plus delivery, packaging and handling.

Edited by karri
Link to comment
Share on other sites

Farnell cost a fortune.

It was just an example. Finding them in your own country is always better.

 

Actually I browsed some spring loaded probes at ebay. But I do not know what kind of magic you need to fasten them or keep them aligned so I went with something I can understand.

They fit into a receptacle that would be inserted into your plastic housing. The other end of the receptacle can be wire wrapped or soldered. That way you can swap out the probes when they become worn.

Link to comment
Share on other sites

If you don't have a scope get one of these Saleae compatible USB 8 channel logic analysers :-

 

eBay Auction -- Item Number: 2218361754831?ff3=2&pub=5574883395&toolid=10001&campid=5336500554&customid=&item=221836175483&mpt=[CACHEBUSTER]

 

Its cheap and they can do I2C packet forming e.g. decode SCL/SDA signals into something that is human readable.

 

They aren't as good as more expensive logic analysers but you'll probably get some good use out of it.

 

this is quite useful, I have used this on a broken colecovision board to tell if the CPU was dead or not.

you need a fast usb port to read the faster speeds, for me a usb 3 port was best, even though this is a usb2 device. perhaps this was something to do with its power requirements. im pretty sure usb 3 ports output more power than usb 2 which could have been the issue

Link to comment
Share on other sites

thanks for the info. This problem is already solved so I don't need a scope.

 

I am sorry for all the delays in this project. The current Lynx cart connector looks like this from below.

 

post-2099-0-53044800-1440423354_thumb.png

 

The top still needs a bit shaping. If someone wants to use a real Lynx connector instead of my fantastic, stylish safetypins drop me a line and I send you the stuff without a cart connector. Then it is up to you to go Lynx hunting.

 

 

  • Like 1
Link to comment
Share on other sites

Awesome way to solve the connector problem.

 

Thanks. I got the new top parts today.

 

post-2099-0-07304100-1440515067_thumb.png

 

The pins are a bit damaged after removing part of the safety pin. I have to figure out a gentle way to do it.

 

post-2099-0-88617400-1440515129_thumb.png

 

The design comes as a bottom part that is also soldered and a removable top part. This makes it easy to fix a broken pin later.

 

The safety pins cost less than 2 cents each when you buy them in a bag of 500. That takes the cost of the connector to 68 cents plus some hours of your time printing 3D, painting the pins, glueing and soldering.

 

I plan to publish good instructions and the 3D models in case someone needs similar things for some other retro computer.

 

The Lynx has 34 pins at a pitch of 1.59mm and the edge connector thickness is 2.54 mm.

Edited by karri
  • Like 2
Link to comment
Share on other sites

Thanks for all encouraging comments.

 

The modified RetroPi 3.0 stable image is now at http://79.125.115.174/pics/Lynx/lynxrpi.zip

 

It has a few additions like support for the Lynx programmer.

 

login: pi

password: raspberry

 

It has remote ssh activated. You can also log in as root with the same password.

 

Edit /etc/network/interfaces to suit your IP requirements.

 

To read a cart go to /opt/lynx/contrib/blankcart/programmer

 

sudo ./readcart

 

reads a cart to cart.lnx

 

sudo ./programcart somecart.lnx

 

programs the cart.

 

This code is still very slow as I have had no time to tune it yet.

Link to comment
Share on other sites

Great. Once you have installed the img on the SD card you should use Raspberry tools in the main menu to "expand the filesystem" so that it uses the whole SD.

 

F4 will flip you to text monitor if you connect an USB keyboard and a HDMI display.

 

The standard RetroPi instructions work for setting up game emulations etc.

 

The cc65 tools are there only in src format. You can compile them (I hope) by

 

cd /opt/lynx/tools

make

 

If you want to improve my code you can go to /opt/lynx/contrib/blankcart/programmer and edit the c-files. A "make" will compile them.

 

Raspberry does not have a clock. Either load some ntp-clock module to fetch the time or enter it by hand. Otherwise the "make" cannot know what needs compiling.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...