Jump to content
Jagware
Stone

Jag cart port questions

Recommended Posts

Stone    0

Hi all,

 

Share your wisdom! 3 questions for now: (more as they arise)

 

1) What happens to the cart bus when a cartridge asserts nRESET? I know it causes a 68k NMI but does the memory controller see it also? Does the bus freeze in its last state, get tristated, neither? Can you hold the line low forever to keep it reset forever?

 

2) I know some of you use 3.3V devices on your custom carts (Zerosquare) - does the Jag accept 3.3V signalling or do you translate it? Obviously no problem to do either (or combine it in a bus tristate IC) but no point doing it if you don't need to bother.

 

3) Does anyone have the section of the developer's manual (cartridge and expansion port) that's missing from Starcat's copy?

 

Thanks in advance, and no, there's nothing to see here :whistling:

 

Stone

Share this post


Link to post
Share on other sites
Zerosquare    10
1) What happens to the cart bus when a cartridge asserts nRESET? I know it causes a 68k NMI but does the memory controller see it also? Does the bus freeze in its last state, get tristated, neither?
Sorry, I don't know. Maybe SCPCD knows :)

 

Can you hold the line low forever to keep it reset forever?
I think you can do this without problem, yes.

 

2) I know some of you use 3.3V devices on your custom carts (Zerosquare) - does the Jag accept 3.3V signalling or do you translate it? Obviously no problem to do either (or combine it in a bus tristate IC) but no point doing it if you don't need to bother.
The cartridge's data bus is internally buffered by 74ACT245s in the Jaguar. Since they're designed to be compatible with TTL levels, 3.3 V CMOS signaling should work fine. Beware that the bus is pulled-up to +5V with resistors, though, so both the inputs and the outputs of your 3.3 V devices must be 5 V-tolerant. (74LVCxxx chips are fine for this).

 

3) Does anyone have the section of the developer's manual (cartridge and expansion port) that's missing from Starcat's copy?
I don't, and I don't know anybody who does. You can try asking Curt Vendel, as he's got a lot of docs from Atari.

 

Thanks in advance, and no, there's nothing to see here :whistling:
I don't believe you :D

Share this post


Link to post
Share on other sites
SCPCD    0
1) What happens to the cart bus when a cartridge asserts nRESET? I know it causes a 68k NMI but does the memory controller see it also? Does the bus freeze in its last state, get tristated, neither? Can you hold the line low forever to keep it reset forever?

The RESETIL (on B33) signal is directly connected to the reset logic of the jaguar.

An assert on this signal will reset all the jag (the RESETL on B18 will be asserted to) and logically, the cartridge data line will be tristated.

 

It's on the RESETIL line that we add the reset button.

 

 

Share this post


Link to post
Share on other sites
Stone    0
The cartridge's data bus is internally buffered by 74ACT245s in the Jaguar. Since they're designed to be compatible with TTL levels, 3.3 V CMOS signaling should work fine. Beware that the bus is pulled-up to +5V with resistors, though, so both the inputs and the outputs of your 3.3 V devices must be 5 V-tolerant. (74LVCxxx chips are fine for this).

I might have to read the schematic to get this straight in my mind. Are you saying if you drive the bus low the IC sinks (5V*pullup resistance) internally, and if you drive it to 3.3V you have the pullups trying to pour (1.2V*resistance) into the output driver? How does this affect your Flash chips etc, or do you just buffer all the outputs? This is exactly the kind of pitfall I was hoping to be warned about so thanks! I don't mind making mistakes as long as they can be fixed in software...

 

I don't believe you :-D

Suit yourself ;)

 

The RESETIL (on B33) signal is directly connected to the reset logic of the jaguar.

An assert on this signal will reset all the jag (the RESETL on B18 will be asserted to) and logically, the cartridge data line will be tristated.

Perfect, thanks. I haven't had a good look inside a Jag for ages but all the ones I have here are rare stub ones! If I can't find a retail in my parents' house this weekend I might have to buy one <_<

 

Stone

Share this post


Link to post
Share on other sites
Stone    0

Oh, and are there any more errors in the schematic I should be aware of, other than both joypad ports being for Controller 0? :lol:

Share this post


Link to post
Share on other sites
Zerosquare    10
I might have to read the schematic to get this straight in my mind. Are you saying if you drive the bus low the IC sinks (5V*pullup resistance) internally, and if you drive it to 3.3V you have the pullups trying to pour (1.2V*resistance) into the output driver? How does this affect your Flash chips etc, or do you just buffer all the outputs?
It's 5V/R and 1.2V/R, but yeah, it's correct. The current is pretty low, but the real problem occurs when the IC tries to drive the pins to 3.3V. The internal ESD protection diode that's between Vcc and the output pin will be forward biased, which is not supposed to happen in normal usage. I don't know if it is actually destructive, but it's not recommended, so we buffered every signal on the Flash cart (we needed to anyways, since the Flash memory we use isn't 5 V-tolerant at all).

Share this post


Link to post
Share on other sites
Stone    0

Yeah, whoops, it was past my bedtime ;)

 

I'd forgotten about the diodes, I was thinking of latch-up. Thanks. Looks like the easiest way is to buffer everything through a simple PLD, then as an added bonus you can rearrange the pinout to make it more convenient! I think you can get ones with multiple VCCio domains so it can become true 5V signalling as it leaves the cart.

 

Cheers chaps, it's very refreshing to have people on a Jag forum be both well-informed and friendly!

 

Stone

Share this post


Link to post
Share on other sites
Stone    0
Oh, and are there any more errors in the schematic I should be aware of, other than both joypad ports being for Controller 0? :lol:

It turns out the answer was yes...

 

The cart port in the schematic has D0 as A23 and D16 as A40, whereas Matthias's website has D0 as A40 and D16 as A23. The rest of the data lines seem scrambled about also. Could someone confirm if Matthias's diagram is correct?

 

(if so why would they use D16 for data into the E2PROM? D0 makes more sense, kinda :blink:)

 

Stone

Share this post


Link to post
Share on other sites
Zerosquare    10
Oh, and are there any more errors in the schematic I should be aware of, other than both joypad ports being for Controller 0? :lol:
Oops, missed that part. I don't remember seeing any error in the schematic, or at least nothing important. The only thing I can think of at the moment is that there a few places where there's a capacitor symbol that doesn't make sense (the controller-port-shielding to ground connection, for example).

 

Oh, by the way, while we're on the subject of carts : if you build your own PCB, make sure that the edge is beveled, like this :

bevel_finish.gif

It is very easy to damage the cartridge connector's contacts by accident otherwise.

Share this post


Link to post
Share on other sites
SCPCD    0
It turns out the answer was yes...

 

The cart port in the schematic has D0 as A23 and D16 as A40, whereas Matthias's website has D0 as A40 and D16 as A23. The rest of the data lines seem scrambled about also. Could someone confirm if Matthias's diagram is correct?

 

(if so why would they use D16 for data into the E2PROM? D0 makes more sense, kinda :blink:)

 

Stone

The correct pinout is this one :

post-5-1286639571_thumb.png

 

And EEPROM is connected like this :

EEPROM /CS = GPIO1

EEPROM CLK = GPIO0

EEPROM Data Out = E2DATA

EEPROM Data In = D0

Share this post


Link to post
Share on other sites
Stone    0

Many thanks for that. It looks kinda like Matthias traced a 4-chip cart without knowing which ROM was which! Also thanks for the edge tip, I'll bear that in mind. This is all very useful, you've saved me two board revs already :)

 

Stone

Share this post


Link to post
Share on other sites
Stone    0

Finally had a bit of time to do some schematic work on this, I've been really busy! I have a few more stupid questions if you don't mind…

 

1) Are TxD on B49 and RxD on B50 just attached directly to the same pins as on the external network port, and can you talk to them using normal Jag networking code? Do you need to use SCK/WS with it or are they unrelated? Also, what are UARTO and UARTI for?

 

2) Am a bit unclear on ROM1 (pin A20) - is this /CS for the cart memory ICs? Can I just leave it tied low on the cart and unconnected on the cart port or is it actually used? (am running out of level translator pins :))

 

3) Likewise /EOE1 (pin B22) and /EOE0 (pin B23) - Matthias has B23 as OE for the high word and B22 as OE for the low word, is this correct or is it backwards? I assume they always change state together in 32-bit accesses anyway so I may be able to get away with just one…once you've told the memory controller to run in 32-bit mode are all bus accesses always 32bit from then on even if you use mv.w?

 

4) A0 and A1 are always low for 32-bit accesses, correct? (so I only need A2 - A23 hooked up to the memory - A2 on cart port to A0 on my memory IC)

 

5) How do you use /EWE0, /EWE2 and ERW?

 

6) /RESETI is for when the cart wants to reset the Jag, but how does /RESET work? Is it just active for a few ms on powerup or does it fire under software reset (*+#) also?

 

Just checking! :)

 

I'm making EAGLE libraries of all the parts as I go along so if anybody would like a copy once they're finalised and checked then do get in touch and I'll share.

 

Thanks in advance!

 

Stone

Share this post


Link to post
Share on other sites
Zerosquare    10

What are you up to ? :P

 

1) Are TxD on B49 and RxD on B50 just attached directly to the same pins as on the external network port, and can you talk to them using normal Jag networking code? Do you need to use SCK/WS with it or are they unrelated?
TXD and RXD are the I²S data pins for audio, and are directly connected to the same pins on the DSP port ; they're used by the JagCD to stream audio tracks, for example. Together with SCK and WS, they form a synchronous, full-duplex serial port ; SCK is the bit clock (its frequency is equal to the baud rate) while WS is used to identify which bit is the MSB and which channel (left or right) is being transmitted.

 

There's a detailed timing diagram of how I²S works in the datasheet for the audio DAC.

 

Those signals are not related to the UART used for networking.

 

Also, what are UARTO and UARTI for?
UARTO is the output (TXD) of the UART, and UARTI is the input (RXD). They're the same signals than those on the DSP port, which are used by the JagLink, etc.

 

2) Am a bit unclear on ROM1 (pin A20) - is this /CS for the cart memory ICs? Can I just leave it tied low on the cart and unconnected on the cart port or is it actually used? (am running out of level translator pins :))
Yes, this is the chip select for the cartridge space ; you can't get rid of it, sorry ! :D

 

3) Likewise /EOE1 (pin B22) and /EOE0 (pin B23) - Matthias has B23 as OE for the high word and B22 as OE for the low word, is this correct or is it backwards?
/EOE1 (pin B22) is active for read accesses to bits 31..16, /EOE0 (pin B23) is active for read accesses to bits 15..0.

 

I assume they always change state together in 32-bit accesses anyway so I may be able to get away with just one…once you've told the memory controller to run in 32-bit mode are all bus accesses always 32bit from then on even if you use mv.w?
AFAIK, yes, it's correct.

 

4) A0 and A1 are always low for 32-bit accesses, correct? (so I only need A2 - A23 hooked up to the memory - A2 on cart port to A0 on my memory IC)
Correct ; if your cart is 32-bit, you don't need to connect A0 and A1.

 

5) How do you use /EWE0, /EWE2 and ERW?
/EWE0 is low during write accesses to bits 7..0, so it should be connected to /WE if you've got RAM or Flash memory on your cart, etc. /EWE2 is the same thing for bits 23..16.

ERW indicates whether the current bus cycle is a read or a write, but I don't remember the polarity. Ask SCPCD :P

 

6) /RESETI is for when the cart wants to reset the Jag, but how does /RESET work? Is it just active for a few ms on powerup or does it fire under software reset (*+#) also?
Pressing * and # together doesn't do anything particular on the hardware side ; the game has to detect and handle in software.

/RESET is active only on power up (it's longer than a few milliseconds, but I don't remember how much ; that's another thing for SCPCD to answer), when the cart asserts /RESETI, or when you press the reset button if you've added one :)

Share this post


Link to post
Share on other sites
Stone    0
What are you up to ? :P

Patience! I promise it will all make sense in the end...;)

 

TXD and RXD are the I²S data pins for audio, and are directly connected to the same pins on the DSP port [...] Those signals are not related to the UART used for networking.

OK, that makes sense. I never really looked into how the JagCD hardware worked in detail, I was always happiest at $4000 ;)

 

UARTO is the output (TXD) of the UART, and UARTI is the input (RXD). They're the same signals than those on the DSP port, which are used by the JagLink, etc.

Yep, got it now. I hadn't realised they were pinned out to the cart port, it makes it a lot easier to talk to custom hardware than by reading and writing magic addresses in cartspace! (also much easier to debug when you do the Jag software - just use an Alpine and listen to the serial port for your commands/data)

 

Yes, this is the chip select for the cartridge space ; you can't get rid of it, sorry ! :D
I was thinking of the different EPROM access methods - many datasheets include one where the chip remains selected (/CE low) at all times and you control reads and writes just by using /OE and /WE. I have scrounged some more level translation pins together now (had to add another small bus tristate for pins going into the Jag - E2DATA, /RESETI, UARTI etc) as I had almost filled up my 74LVC16T245s and couldn't spare eight bits to swap the direction around. The PCB layout is going to be a nightmare, I'm trying to think ahead at the schematic stage but it's not always obvious what will make things hard later...

 

/EOE1 (pin B22) is active for read accesses to bits 31..16, /EOE0 (pin B23) is active for read accesses to bits 15..0.

OK, yeah, so for 32-bit accesses they'll both be enabled at once. There seems to be a lot of flexibility in the memory controller for different cart designs - was the 1MB cart they did for Cybermorph a 16-bit-only one with one maskrom?

 

/EWE0 is low during write accesses to bits 7..0, so it should be connected to /WE if you've got RAM or Flash memory on your cart, etc. /EWE2 is the same thing for bits 23..16.

ERW indicates whether the current bus cycle is a read or a write, but I don't remember the polarity. Ask SCPCD :P

Do you mean /EWE0 for bits 15..0 and /EWE2 for 32..16? Or can you only write in small widths? Very strange :blink:

 

Pressing * and # together doesn't do anything particular on the hardware side ; the game has to detect and handle in software.

/RESET is active only on power up (it's longer than a few milliseconds, but I don't remember how much ; that's another thing for SCPCD to answer), when the cart asserts /RESETI, or when you press the reset button if you've added one :)

Yeah, adding a button isn't hard, that seems the easiest way. :)

 

Sorry to be so cryptic, it will be worth it in the end though! :yes:

 

Stone

Share this post


Link to post
Share on other sites
SCPCD    0
1) Are TxD on B49 and RxD on B50 just attached directly to the same pins as on the external network port, and can you talk to them using normal Jag networking code? Do you need to use SCK/WS with it or are they unrelated? Also, what are UARTO and UARTI for?

If you use I2S, make sure that there is no bus conflict with the JagCD or the Jaguar :

you need to add extra logic to enable/disable it.

If you use UART, make sure that there is no JagLink connected to the Jaguar.

2) Am a bit unclear on ROM1 (pin A20) - is this /CS for the cart memory ICs? Can I just leave it tied low on the cart and unconnected on the cart port or is it actually used? (am running out of level translator pins :))

You need the ROM1 because the bus is shared with the boot rom and also by the JagCD boot rom.

On the JagCD, there is a bit in a register to switch between the internal ROM or the external cartridge that ROM1 will control.

3) I assume they always change state together in 32-bit accesses anyway so I may be able to get away with just one…once you've told the memory controller to run in 32-bit mode are all bus accesses always 32bit from then on even if you use mv.w?

If the memory controler is set to 32-bit mode, a move.w will change the state to only one, not both.

PS :

- the 68k can not make 32-bit access : a move.l is 2x16-bit access

- the blitter can made 16-bit access : depends of the configuration. (pixel mode, etc...)

4) A0 and A1 are always low for 32-bit accesses, correct? (so I only need A2 - A23 hooked up to the memory - A2 on cart port to A0 on my memory IC)

for 32-bit bus, A0 and A1 is not needed because there is /EOE0 and /EOE1.

5) How do you use /EWE0, /EWE2 and ERW?

like zerosquare said : /EWE0 = bits[7..0], /EWE2 = bits[23..16] it's not an error :)

in 32-bit bus mode, you can't write with 8-bit access.

You can only make 16-bit or 32-bit write.

ex with a 32-bit bus mode :

- 8-bit write to $800000 => KO => there is no /EWE3 on the cartridge bus but data will be available on bits[31..24]

- 8-bit write to $800001 => OK => there is /EWE2 : data will be available on bits[23..16]

- 8-bit write to $800002 => KO => there is no /EWE1 on the cartridge bus but data will be available on bits[15..8]

- 8-bit write to $800003 => OK => there is /EWE0 : data will be available on bits[7..0]

 

- 16-bit write to $800000 => OK => use /EWE2 : all data will be present on bits[31..16] of the bus

- 16-bit write to $800002 => OK => use /EWE0 : all data will be present on bits[15..0] of the bus.

 

ERW :

- 0 : write

- 1 : read

6) /RESETI is for when the cart wants to reset the Jag, but how does /RESET work?

/RESET is composed by a simple RC timer follow by a trigger (74HC14) with R = 100K and C = 10uF.

So the time before the /RESET is deasserted depends of the contents of the capacity.

If the length time of /RESETI signal is too short the /RESET will be asserted during a very short time and can be not enough to reset correctly the complet logic.

 

 

Share this post


Link to post
Share on other sites
Tyrant    0
Patience! I promise it will all make sense in the end...;)

 

I just hope you make enough of them for us all to get one. There will be demand.

Share this post


Link to post
Share on other sites
sh3-rg    6
I just hope you make enough of them for us all to get one. There will be demand.

Yea, I want one & I have no real idea what it is :)

Share this post


Link to post
Share on other sites
Stone    0

Aww, you guys :D Another of the pieces fell into place earlier but again I can't tell you what it was without giving the game away! Hurrah for people who keep stockpiles of everything just in case. Also acquired a laser printer off Freecycle so I might experiment with toner transfer PCBs for quick prototyping. It's already been invaluable in printing out 1:1 PCB footprints so I can line parts up on them and check the spacing. My cart edge connector was seriously wonky!

 

After SCPCD's post above I've realised I've screwed up a big chunk of the bus translation logic (and it will get much worse if I allow the Jag to write into the cart!) so I'll have to redo a big chunk of it, which is very irritating. Better now than after the first PCB is made, I guess - I'll have to stop designing stuff so early in the morning. Probably about half of it so far was done between 10pm and 4am :blink:

 

If you use UART, make sure that there is no JagLink connected to the Jaguar.

Why? Obviously all the data sent from Jag to cart will go out externally too, but why should I care? Does adding a JagLink change something in the hardware side?

 

You need the ROM1 because the bus is shared with the boot rom and also by the JagCD boot rom.

On the JagCD, there is a bit in a register to switch between the internal ROM or the external cartridge that ROM1 will control.

That makes perfect sense, thank you for reminding me.

 

If the memory controler is set to 32-bit mode, a move.w will change the state to only one, not both.

PS :

- the 68k can not make 32-bit access : a move.l is 2x16-bit access

- the blitter can made 16-bit access : depends of the configuration. (pixel mode, etc...)

Again I'd forgotten these things :D I'll make sure I attach all the relevant pins then, when I've used EPROMs in the past I've just tied BHE and BLE pins active. In this case (16 bit memory ICs) I'll tie BHE and BLE to /EOE1 on one chip and /EOE0 on the other.

 

Stone

Share this post


Link to post
Share on other sites
Tyrant    0
Tell me you're not building a flash cart... otherwise you're doing a lot of work that's already been done ;)

Talking of which, when're you going to release your bjl-flash one, the world is waiting and wanting.

Share this post


Link to post
Share on other sites
Stone    0
Tell me you're not building a flash cart

I'm not building a flash cart.

 

Actually what I'd really like is a USB BJL cable - wouldn't be a hard project but I can't really be arsed ;)

 

Stone

Share this post


Link to post
Share on other sites
SCPCD    0
Why? Obviously all the data sent from Jag to cart will go out externally too, but why should I care? Does adding a JagLink change something in the hardware side?

Just say that in case of you used input in the same time. :)

 

 

Share this post


Link to post
Share on other sites
Stone    0
Just say that in case of you used input in the same time. :)

That's what magic numbers are for, right? ;)

 

Stone

Share this post


Link to post
Share on other sites
LinkoVitch    0
I'm making EAGLE libraries of all the parts as I go along so if anybody would like a copy once they're finalised and checked then do get in touch and I'll share.

 

Oooo yes please good sir!

 

:)

Share this post


Link to post
Share on other sites
Stone    0

I'll see what I can manage :) I had an old EAGLE layout of an EPROM cart I never got around to fabricating which was the source of my cart slot footprint but for some reason it's way out! Lots of tedious counting and measuring to do which is why I've been putting it off...

 

Been quite distracted recently with other stuff - but on the bright side I now have a working Time Crisis in my living room :yes: I'll have to try and get back into it soon.

 

Stone

Share this post


Link to post
Share on other sites
Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoticons maximum 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.


×