Jump to content
IGNORED

bankswitching logic too slow in 48K atari 400?


Marius

Recommended Posts

Hi,

 

In a few topics I already mentioned some issues with my Atari 400 and AtariMax 8Mbit carts.

 

Thanks to the excellent idea of tf_hh I managed to fix the Ph2 signal on pin "S" of the cartridge port in the Atari 400.

 

So far so good. This solved some issues, and my Atari 400 is getting better and better.

 

But still… AtariMax 8Mbit cart doesn't play nice on my upgraded 400. I found out that the switch-cart-off-routine in EXE loader does not work properly. (On the 1Mbit carts it works perfect).

 

Games that do not use $a000-$bfff run perfect from AtariMax 8Mbit cart but games that make use of this memory area crash or do not run at all(this makes sense; when the cart is still enabled $a000-$bfff is occupied by the cartridge);.

 

Before the upgrade to 48K the Atari 400 cart port RD4 and RD5 are not connected. I guess because $a000-$bfff and $8000-$9FFF are not available as ram in a 16K machine, so there is no need to bankswitch these 8K windows right?

 

In my home-made 48K upgrade RD4 and RD5 are connected (both using a pull-down resistor) to some logical chips.

 

My theory now is that all this logical results in a small, but noticeable delay on -at least- RD4, which probably disturbs the process with the AtariMax cart.

 

But… even then: during loading on the AtariMax cart, I guess every scan line the cart is switched on and off. Why does it work then with some games? If the logic is indeed the reason for failure, It should fail always. And another strange thing: it fails always on the same moment, with the same games (so there must be a traceable reason).

 

I also tried whether the cart can be switched off at all on an atari 400, but yes that works. When I put Assembler Editor (8K rom) on page #$7F and I switch on the Atari 400 with the cart… the assembler editor is there. When I touch $d580, the cart is indeed switched off. So it DOES work.

 

The RAM upgrade I did is this one:

http://atariage.com/forums/topic/109732-atari-400-48k-memory-upgrade/

 

The Ph2 fix described for atari 800 is here:

http://atariage.com/forums/topic/212137-how-to-make-the-myide-ii-work-on-a-atari-800-with-incognito/

 

My Question now is:

Can someone with more knowledge about this subject find a reason why this problem occurs with AtariMax 8Mbit carts?

Is it a timing issue? Is there a possible easy-to-do fix?

 

I also ordered an official 48K upgrade kit from best. These are Atari branded, so I hope this will fix it… although I'm a bit skeptical.

 

What else is important to know:

1) The Atari 400 operates perfect with this 48K. The only issue is with AtariMax 8Mbit; from disk drive it runs all compatible 48K (OS B) titles.

 

2) The software I try to run is -of course- compatible with the 400. On my Atari 800 (also 48K, also OS B) all the titles on my AtariMax 8Mbit cart run.

 

3) I swapped all the atari 400 IC's already with other -known good- IC's. I redid the memory expansion 3 times (see also point 1)

 

I appreciate all the idea's… thanks for help!

 

Link to comment
Share on other sites

Hi,

 

In a few topics I already mentioned some issues with my Atari 400 and AtariMax 8Mbit carts.

 

Thanks to the excellent idea of tf_hh I managed to fix the Ph2 signal on pin "S" of the cartridge port in the Atari 400.

 

So far so good. This solved some issues, and my Atari 400 is getting better and better.

 

But still… AtariMax 8Mbit cart doesn't play nice on my upgraded 400. I found out that the switch-cart-off-routine in EXE loader does not work properly. (On the 1Mbit carts it works perfect).

 

Games that do not use $a000-$bfff run perfect from AtariMax 8Mbit cart but games that make use of this memory area crash or do not run at all(this makes sense; when the cart is still enabled $a000-$bfff is occupied by the cartridge);.

 

Before the upgrade to 48K the Atari 400 cart port RD4 and RD5 are not connected. I guess because $a000-$bfff and $8000-$9FFF are not available as ram in a 16K machine, so there is no need to bankswitch these 8K windows right?

 

In my home-made 48K upgrade RD4 and RD5 are connected (both using a pull-down resistor) to some logical chips.

 

My theory now is that all this logical results in a small, but noticeable delay on -at least- RD4, which probably disturbs the process with the AtariMax cart.

 

But… even then: during loading on the AtariMax cart, I guess every scan line the cart is switched on and off. Why does it work then with some games? If the logic is indeed the reason for failure, It should fail always. And another strange thing: it fails always on the same moment, with the same games (so there must be a traceable reason).

 

I also tried whether the cart can be switched off at all on an atari 400, but yes that works. When I put Assembler Editor (8K rom) on page #$7F and I switch on the Atari 400 with the cart… the assembler editor is there. When I touch $d580, the cart is indeed switched off. So it DOES work.

 

The RAM upgrade I did is this one:

http://atariage.com/forums/topic/109732-atari-400-48k-memory-upgrade/

 

The Ph2 fix described for atari 800 is here:

http://atariage.com/forums/topic/212137-how-to-make-the-myide-ii-work-on-a-atari-800-with-incognito/

 

My Question now is:

Can someone with more knowledge about this subject find a reason why this problem occurs with AtariMax 8Mbit carts?

Is it a timing issue? Is there a possible easy-to-do fix?

 

I also ordered an official 48K upgrade kit from best. These are Atari branded, so I hope this will fix it… although I'm a bit skeptical.

 

What else is important to know:

1) The Atari 400 operates perfect with this 48K. The only issue is with AtariMax 8Mbit; from disk drive it runs all compatible 48K (OS B) titles.

 

2) The software I try to run is -of course- compatible with the 400. On my Atari 800 (also 48K, also OS B) all the titles on my AtariMax 8Mbit cart run.

 

3) I swapped all the atari 400 IC's already with other -known good- IC's. I redid the memory expansion 3 times (see also point 1)

 

I appreciate all the idea's… thanks for help!

 

It may be that the 8 mbit maxflash cart uses extended memory, which a 400/800 can't use because joyports 3/4 use the bank switching PORTB. (just a guess).

Link to comment
Share on other sites

No; on the 800 it works all perfect.

 

The 1Mbit carts work perfect too (on both 400 and 800 after the Ph2 fix on cartport)

 

It's just the 8Mbit on the 400. I got some testing stuff from Steven Tucker now... I'm curious what I will find out!

Link to comment
Share on other sites

Hmm played some with the teststuff from Steven Tucker, and everything seems to work fine.

 

This is extremely odd...

 

Should almost be a software/hardware problem where the Atari 400 responds different in a certain circumstance than an Atari 800.

 

Very odd.

Link to comment
Share on other sites

Well... I did a little test, and I know the problem.... now the fix.

 

The problem:

 

As soon as the AtariMax 8Mbit cart is disabled (and that is happening during the loading of files) the region $a000-$bfff should become RAM again.

This indeed doesn't happen.

 

The cart switches off yes (so $a000-$bfff reads zero) but the RAM contents can't be altered.

 

Tried a simple routine with my 8K assembler stored on page #$7F of AtariMax cart:

          SEI
          STA $D580 ; Cart is off
          LDA #$55
          STA $B000
          LDX $B000
          CPX #$55
          BEQ OK
          LDA #$00
READY     STA $02C6 ; SCREEN BLACK WHEN PROBLEM IS THERE
          STA $D57F ; Cart is on 
          CLI
          RTS
OK        LDA #$44  ; SCREEN WILL BE PURPLE WHEN EVERYTHING WORKS FINE
          JMP READY

On my Atari 800 this works great, and leads to a purple screen. On my Atari 400 the screen gets black.

 

So I suspect the RD4 logic on the RAM expansion. Perhaps someone has a clue?

Edited by ProWizard
  • Like 1
Link to comment
Share on other sites

Can you try the same thing, put a couple of writes to WSync after the cart switchoff and before the write attempt to Ram.

 

Got another switchable cart you could try? A real Mac-65 cart, Action, probably Basic XL or XE - the docs of Atari800Win+ should have the procedure to switch them out.

Link to comment
Share on other sites

Can you try the same thing, put a couple of writes to WSync after the cart switchoff and before the write attempt to Ram.

 

Got another switchable cart you could try? A real Mac-65 cart, Action, probably Basic XL or XE - the docs of Atari800Win+ should have the procedure to switch them out.

 

No difference.

 

I tested this also with AtariMax 1Mbit cart; there it works perfect on the 400.

 

Could try with Mac/65, but have to look for it.

 

All other switchable carts I have here (like Sic, The!CART, MegaCart) all behave properly. The only issue is with AtariMax 8Mbit so far.

When I put the .CAR file on THE!CART the issue is gone too. So I hope a small mod to the AtariMax 8Mbit cart will be sufficient to cure this.

  • Like 1
Link to comment
Share on other sites

Try making the 1K resistor to ground smaller. Shunt it with another 1K. The 800 uses 680 ohms, not 1K. You may not be reaching a logic low level on some carts.

 

Bob

 

What is shunt? I'll search in my collection for a smaller resistor, but your suggestion is exchange the 1K resistor with a smaller one, or do I have to something else?

Link to comment
Share on other sites

I would think he means install in parallel.

 

2 x 1K resistors in parallel = 500 Ohms.

 

Ah thanks.

 

Tried it, but same issue.

 

I am really clue-less. I suspect the LS04 -> LS158 combination ... it reminds me of the instability I had with my 256K XL back in the days. Only strange thing is that it always acts the same. (It never works with AtariMax 8Mbit cart, and always fail in the same way).

 

Unfortunately I don't have other TTL's in stock. I have HCT158 and LS158 in stock, but I seriously doubt that will make the difference.

Link to comment
Share on other sites

Can you measure the voltage on RD4?

 

RD4? That is the control for $8000-$9FFF, isn't it? If it is switching $A000-$BFFF, it uses RD5.

 

Check RD5 - try a shunt on it, also.

 

Bob

 

I'll measure voltage later tonight. I changed resistors on both RD4 and RD5 without any luck.

 

It's pretty annoying to test things, since you have to attach/detach the motherboard from the power board all the time.

Link to comment
Share on other sites

Can you measure the voltage on RD4?

 

RD4? That is the control for $8000-$9FFF, isn't it? If it is switching $A000-$BFFF, it uses RD5.

 

Check RD5 - try a shunt on it, also.

 

Bob

 

OK ... Here are the results... pretty strange (oh and yes RD5 is the problem)

 

Voltages measured over GND and RD5:

 

AtariMax 1Mbit (works properly); Enabled: 3.41V; Disabled 0.04V

THE!Cart (works properly); Enabled: 2.71V; Disabled 0.04V

SIC! (works properly); Enabled 3.51V; Disabled 0.04V

 

AtariMax 8Mbit (carts with issues); Enabled 4.3V; Disabled 0.04V

 

It's a higher voltage when enabled, but when disabled it's still really zero.

 

Any idea whether that 4.3V is a problem or not? (I guess everything around 5V is ok?)

Link to comment
Share on other sites

If you suspect the upgrade circuit then you could try this earlier version. It's more like the 800. You have already done most of the cut and jumper work common to both upgrades.

 

http://atariage.com/forums/topic/123207-expanding-the-400/?do=findComment&comment=1488304

 

That's an interesting doc! Thanks for sharing (and writing!)

I might try it... I have a few more 16K boards floating around here.

 

But:

I also ordered an original Atari 48K upgrade from Best, but that is not arrived yet.

 

If I can't get this working, I first try that original upgrade.

 

Besides the AtariMax 8Mbit, everything works so perfect, I think the AtariMax 8Mbit carts might be the object that I will tweak. But I don't know how yet.

 

Thanks for all the help guys, it's appreciated a lot!

Link to comment
Share on other sites

Well... I am out of ideas.

 

Checked everything (also S4 and S5)... Everything switches lo/hi as expected and needed. I simply do not understand why the RAM area is not accessible even when the cart is switched off (in that case RD5 is measuring 0V, and S5 4.5V) ... Even in case of errors in routines or whatsoever RAM should be released.

 

Is there perhaps some kind of RAM RW E line that can control this? It looks like RAM is on write-protected or something.

 

It's beyond my knowledge; perhaps someone can give me another hint?

Link to comment
Share on other sites

No progress further. I'll wait for the "Original" Atari 48K upgrade first.

 

One other note:

 

I swapped the old Antic with a new one to test wether that would help or not.

 

Strange enough, with cartridge inserted the 400 doesn't want to operate at all with a new Antic inserted.

 

The original Antic (CO14887)

The Antic that does not work in the 400 Antic (CO21698)

 

Should there be a non used pin connected to ground or something? Can't imagine why it doesn't work… in the XL/XE both Antics do work.

 

Tried several Antics; every CO14887 I have here works. Every CO21698 fails; those Antics are all good (well I suppose; since they work fine in my XL/XE)

 

@ClausB: Still very interested in the upgrade you posted. I have to order a 74LS02, which I don't have.

Link to comment
Share on other sites

Need more help!

 

Now I found out something very interesting.

 

1) I disable the cart

2) I fill $a000-$bfff with the value #$FF

3) I read out $a000-$bfff -> it's all filled with #$F2

 

Hmmm bits 0, 2 and 3 do not work.

 

When I try other values, this also matches; everywhere bits 0,2, and 3 are false.

 

This must be a clue for people who know everything about this.

Any suggestions?

 

EDIT:

AHA... since every RAM chip contains one of the 8 bits on every random address, this would mean that the issue is with 3 DRAMS. Since it only occurs with AtariMax 8Mbit cart, I search the solution in or impedance or in disturbance.

 

I removed a few of those 0.1uF capacitors, but in the design they never had to be restored. Hmm

 

In XL/XE address lines are connected through 33Ohm resistors. Haven't seen these on this board. Perhaps that is an idea too?

Edited by ProWizard
Link to comment
Share on other sites

Need more help!

 

Now I found out something very interesting.

 

1) I disable the cart

2) I fill $a000-$bfff with the value #$FF

3) I read out $a000-$bfff -> it's all filled with #$F2

 

Hmmm bits 0, 2 and 3 do not work.

 

When I try other values, this also matches; everywhere bits 0,2, and 3 are false.

 

This must be a clue for people who know everything about this.

Any suggestions?

 

EDIT:

AHA... since every RAM chip contains one of the 8 bits on every random address, this would mean that the issue is with 3 DRAMS. Since it only occurs with AtariMax 8Mbit cart, I search the solution in or impedance or in disturbance.

 

I removed a few of those 0.1uF capacitors, but in the design they never had to be restored. Hmm

 

In XL/XE address lines are connected through 33Ohm resistors. Haven't seen these on this board. Perhaps that is an idea too?

Do not put the capacitors back. Originally, they were power conditioning capacitors, but the new 4164 RAM's don't have power on the pin they were for. They have an address line on that pin.

 

The 33 Ohm resistors: these are on the official Atari 48K board as well, so maybe Atari knows something we don't about these 4164 RAMs...

 

Can you run the "fill with FF" test you did, with the cart in and disabled, but on somewhere other than the RAM under the cart? The problem might be occuring more than just in the cartridge region, though I feel like you would have bigger problems if that were the case. Then also try the same thing (both in and out of the cartridge region RAM) without any cartridge inserted.

 

It's possible that the problem is related to Phi02 loading by the 8Mbit cart, and particularly to the cartridge region RAM. If this is the case, you may have been better off without the 'phi02 fix' unless, of course, no flashcarts worked at all before that. I get the feeling atari used /RAS for a reason, because they knew they already had overloaded phi02, and they needed to avoid any additional loads. Anyway, if phi02 is loaded, it would cause timing skew, and timing skew, in conjunction with additional RAM select logic delays, could cause *just* the cartridge RAM region to screw up. You could replace all the LS parts on the RAM boards with ALS/AC or F/FC parts, which are faster and could possibly solve the problem if it's timing related.

 

The issue with all the atari's and any reproducible intermittent problems, is that it is often timing problems. Unfortunately, some machines are just more unstable than others for no apparent reason. Good luck finding the problem, I hope eventually you get it all figured out.

Edited by Joey Z
  • Like 1
Link to comment
Share on other sites

@JoeyZ

 

Thanks for your reply. Very interesting.

 

The Ph2 fix was needed, since without it most modern carts didn't work at all. (And I remember now I'm typing this, I had the problem with the AtariMax 8Mbit cartridge also before the Ph2 fix; I was hoping that the fix would ... eh... FIX it haha).

 

The problem only exists in the $a000-$bfff range. It does not occur without cart, and it only occurs with AtariMax 8Mbit cart.

 

I have decided to let it rest. I'll wait for the original 48K upgrade, and I hope that that will work properly.

 

I now hooked up my 800XL again. I must admit for a moment I thought: ah what a pleasure, everything works just the way it should work ;)

 

I want to thank all the people here in the thread for all their contributions; it was -although I did not get where I wanted to get- a pleasure to do some solder work again.

Link to comment
Share on other sites

WOOHOOO...

 

The mailman just arrived with my Best Electronics package. Installed... and....

 

IT WORKS!!

 

Yes!

 

Finally I can enjoy the games with the cart-latch shut! Looks much better.

 

Thanks again for all the help. This 48K upgrade is indeed better!

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...