Jump to content
IGNORED

BJL pinout and data transfer across copper documentation


rocky1138

Recommended Posts

Using my computer's parallel port to transfer files to the Jaguar through BJL has never really worked well. It often takes numerous attempts on small files and simply never works on large ones.

 

As a small side project, I've been considering using the GPIO pins on my Raspberry Pi to talk to the 2nd controller port/BJL on the Jaguar so I can use updated hardware and a much more streamlined toolchain.

 

Does anyone have any technical documentation on what, specifically, the BJL listens to on the 2nd controller port, for data?

Link to comment
Share on other sites

Using my computer's parallel port to transfer files to the Jaguar through BJL has never really worked well. It often takes numerous attempts on small files and simply never works on large ones.

 

As a small side project, I've been considering using the GPIO pins on my Raspberry Pi to talk to the 2nd controller port/BJL on the Jaguar so I can use updated hardware and a much more streamlined toolchain.

 

Does anyone have any technical documentation on what, specifically, the BJL listens to on the 2nd controller port, for data?

If you look at Matthias' web page, you'll find all the info. For example, on this web page, you find the cable schematic:

 

bjl_wire.gif

 

That and any controller port pin listing will give you the needed info.

Link to comment
Share on other sites

If you're using the DOS uploader, try using the attached one instead.

 

If it still doesn't work reliably, and you want to use a Raspberry Pi instead, here are a few pointers:

 

- the Jaguar joypad ports use 5 V signals, while the Raspberry Pi uses 3.3 V ones. A voltage translation buffer is needed between the two, otherwise you risk damaging the Pi. If you don't want to build the circuit yourself, check stores such as SparkFun, AdaFruit, etc., as they probably sell something that's suitable.

 

- BJL can work in 8-bit mode, or 4 bit-mode (identical, except it doesn't use bits D3 to D0, so there are fewer wires but it's 2 times slower). 8-bit mode needs 9 output pins and 1 input pin on the Pi side ; 4-bit mode needs 5 output pins and 1 input pin.

 

- take a look at the lo_inp.c file in the ZIP file. There are a few comments inside that describe the protocol, and the code itself shouldn't be too hard to understand.

 

- timing is critical. If the uploading isn't fast enough, the BJL side timeouts (there is no error message, the upload just silently fails and you don't get past the blue loader bar). As far as I remember, any delay while sending a 32-bit word (either as 4 x 8 or 8 x 4 bits) must be avoided, but delays between two consecutive 32-bit words are okay. But sending stuff too fast tends to fail too. Basically, the whole thing is not very reliable.

 

- the command used to send the command to switch from the menu screen to the upload screen uses a different protocol that's even more timing sensitive and unreliable. Try to get the uploading part working first (in this case, you need press A or C to switch to the uploading screen manually, and add the "-n" option to the uploader command line).

 

That's all I can remember right now, since I've not looked at this code for years. Ask if you need more info.

lo_inp.zip

  • Like 2
Link to comment
Share on other sites

If you're using the DOS uploader, try using the attached one instead.

 

If it still doesn't work reliably, and you want to use a Raspberry Pi instead, here are a few pointers:

 

- the Jaguar joypad ports use 5 V signals, while the Raspberry Pi uses 3.3 V ones. A voltage translation buffer is needed between the two, otherwise you risk damaging the Pi. If you don't want to build the circuit yourself, check stores such as SparkFun, AdaFruit, etc., as they probably sell something that's suitable.

 

- BJL can work in 8-bit mode, or 4 bit-mode (identical, except it doesn't use bits D3 to D0, so there are fewer wires but it's 2 times slower). 8-bit mode needs 9 output pins and 1 input pin on the Pi side ; 4-bit mode needs 5 output pins and 1 input pin.

 

- take a look at the lo_inp.c file in the ZIP file. There are a few comments inside that describe the protocol, and the code itself shouldn't be too hard to understand.

 

- timing is critical. If the uploading isn't fast enough, the BJL side timeouts (there is no error message, the upload just silently fails and you don't get past the blue loader bar). As far as I remember, any delay while sending a 32-bit word (either as 4 x 8 or 8 x 4 bits) must be avoided, but delays between two consecutive 32-bit words are okay. But sending stuff too fast tends to fail too. Basically, the whole thing is not very reliable.

 

- the command used to send the command to switch from the menu screen to the upload screen uses a different protocol that's even more timing sensitive and unreliable. Try to get the uploading part working first (in this case, you need press A or C to switch to the uploading screen manually, and add the "-n" option to the uploader command line).

 

That's all I can remember right now, since I've not looked at this code for years. Ask if you need more info.

 

This is excellent. Sorry to bug again, but I'm curious what the license on the zipfile you've included is?

 

Second question, re: timing: What rate of speed seems to work best? 10Kbps? 100Kbps? 22Kbps? 1Mbps? (just kidding on that last one, heh)

Link to comment
Share on other sites

This is excellent. Sorry to bug again, but I'm curious what the license on the zipfile you've included is?

AFAIK there's no "real" license, and the original authors don't seem to care too much. The source says this:

Freely distributable and modifiable. I only ask that if you use this as the basis of some other work, you give me credit for this original version. Thanks.

Second question, re: timing: What rate of speed seems to work best? 10Kbps? 100Kbps? 22Kbps? 1Mbps? (just kidding on that last one, heh)

It seems to work best around ~50 kbytes per sec.
  • Like 2
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...