MegaST2 with constant resets

Troubles with your machine? Just want to speak about the latest improvements? This is the place!

Moderators: Mug UK, Zorro 2, spiny, Greenious, Moderator Team

User avatar
Arne
Atari Super Hero
Atari Super Hero
Posts: 619
Joined: Thu Nov 01, 2007 10:01 am

Re: MegaST2 with constant resets

Postby Arne » Tue Mar 24, 2020 9:06 am

czietz wrote:The access to $FC3184 is a prefetch,(...)

So the 68000 has a 16bit prefetch "queue"?

czietz wrote:But I cannot explain the cause. Normally I would say bad RAM, but you already ruled that out with the diagnostic cartridge.

Well yes. I forgot to mention in my first post that all RAM and CPU got sockets, too.
So I can swap the RAM. Is your YAART available for cartridges?

Edit: one more thing. When you mentioned the strange CRC results of ROM check I did one more test. See attachment. Check the results of the 5 CRC runs.
romcs.txt
You do not have the required permissions to view the files attached to this post.
Image

czietz
Hardware Guru
Hardware Guru
Posts: 1133
Joined: Tue May 24, 2016 6:47 pm

Re: MegaST2 with constant resets

Postby czietz » Tue Mar 24, 2020 9:21 am

Arne wrote:So the 68000 has a 16bit prefetch "queue"?


Ijor can explain it much better than I could: http://pasti.fxatari.com/68kdocs/68kPrefetch.html

Arne wrote:So I can swap the RAM. Is your YAART available for cartridges?


If you can burn the ROMs for a cartridge I can send you (via PM) an unreleased version I made that loads from cartridge, yes. But -- while YAART's tests are much more thorough -- I think that the Atari diag cartridge would also detect a RAM fault so bad that it causes reproducible crashes.

Arne wrote:Edit: one more thing. When you mentioned the strange CRC results of ROM check I did one more test. See attachment. Check the results of the 5 CRC runs.


Different every single time! That's something I have never seen before.

User avatar
Arne
Atari Super Hero
Atari Super Hero
Posts: 619
Joined: Thu Nov 01, 2007 10:01 am

Re: MegaST2 with constant resets

Postby Arne » Tue Mar 24, 2020 9:35 am

czietz wrote:Ijor can explain it much better than I could: http://pasti.fxatari.com/68kdocs/68kPrefetch.html

Will check that later.

czietz wrote:If you can burn the ROMs for a cartridge (...)

Even without the need to split the BIN using just one 8bit EPROM/Flash :D

PM sent.
Image

User avatar
Arne
Atari Super Hero
Atari Super Hero
Posts: 619
Joined: Thu Nov 01, 2007 10:01 am

Re: MegaST2 with constant resets

Postby Arne » Wed Mar 25, 2020 9:46 am

Update:
The TOS 2.06 card had a contact problem: CPU A6 pin did not make proper contact with the CPU socket pin.
And I always thought those precision contact sockets are reliable.
I programmed your SW into a FlashROM for my cartridge. It boots right after the 2.06 logo appears.
But no RAM errors detected in 10 runs. Same with DiagCart. Swapped RAM nontheless, no change.

Regarding the strange results of CRC calculations of 1.02 I connected the oscilloscope to the 74LS11 that ANDs the /ROMx outputs of Glue.
/ROM0 and /ROM1 give me 5V levels but it's different with /ROM2.
Directly measured at Glue pin 19 and GND alligator clip connected to a GND pin of the nearby MegaBus power connector I get 5V.
Measured at pin 2 of the 74LS11 and GND taken from the GND frame surrounding the PCB I just get 2V. No wonder the LS11 cannot create a combined /CS for the 2 ROMs.
Image

czietz
Hardware Guru
Hardware Guru
Posts: 1133
Joined: Tue May 24, 2016 6:47 pm

Re: MegaST2 with constant resets

Postby czietz » Wed Mar 25, 2020 10:03 am

Arne wrote:Directly measured at Glue pin 19 and GND alligator clip connected to a GND pin of the nearby MegaBus power connector I get 5V.
Measured at pin 2 of the 74LS11 and GND taken from the GND frame surrounding the PCB I just get 2V.


Hm, contact issue at the Glue socket? Cracked PCB trace or solder joint along the way?

User avatar
Arne
Atari Super Hero
Atari Super Hero
Posts: 619
Joined: Thu Nov 01, 2007 10:01 am

Re: MegaST2 with constant resets

Postby Arne » Thu Mar 26, 2020 9:11 am

So, I have been working some hours on the board yesterday. Resoldered all /ROMx vias and joints and 5V signals are back.
With the 1.02 setting it sometimes boots to a white screen (ST-High) and resets as already mentioned. Sometimes it doesn't even display a white screen.
So I checked the input/output of the 74LS11. Looks nice in both cases. To me that means that Glue gets all address lines + control lines to generate /ROM2. I have yet to see a /ROM1 or /ROM0 to be asserted. On those black screen occasions I push down the PCB in the area between Glue and CPU and it will often return to the white screen reset loop. With the diag cart a T6 error is thrown on occasion.
So far I have checked the PCB tracks for continuity:
- CPU <-> Glue
- CPU <-> MMU
- CPU <-> DMA
- DMA <-> FDC
- CPU <-> MFP
- Glue <-> MFP
- MMU <-> Glue

@czietz: do you think that dumping the processor save state area could be useful after that reset happens?
Image

czietz
Hardware Guru
Hardware Guru
Posts: 1133
Joined: Tue May 24, 2016 6:47 pm

Re: MegaST2 with constant resets

Postby czietz » Thu Mar 26, 2020 10:43 am

Arne wrote:@czietz: do you think that dumping the processor save state area could be useful after that reset happens?


I don't know. I mean you have already traced back the/one(?) cause of the crash and subsequent reset and I can't figure it why it would happen. I am at a loss, right now. The fact that pushing the PCB changes something could indicate a crack, but I can't narrow it down. Sorry. Someone I know once had an (almost invisibly) cracked pull-up resistor network. (These usually red things on the PCB.) That also caused a lot of weird effects.

User avatar
Arne
Atari Super Hero
Atari Super Hero
Posts: 619
Joined: Thu Nov 01, 2007 10:01 am

Re: MegaST2 with constant resets

Postby Arne » Thu Mar 26, 2020 2:04 pm

I think I can come up with some solution to get the CPU save state data. Just need some time.
But I also think that it's a mechanical problem. Hard to track down.
And I think that there are two problems buried in that ST. The reset loop and the source of the T6 error in the diag.
Image

User avatar
Arne
Atari Super Hero
Atari Super Hero
Posts: 619
Joined: Thu Nov 01, 2007 10:01 am

Re: MegaST2 with constant resets

Postby Arne » Fri Mar 27, 2020 8:37 am

I wrote a little "diag cart software" that dumps the CPU Save State Area in a loop via MFP UART (as this one was known to be working with the Atari diag cart software).
This is the dump:

Code: Select all

CPU Save State Area
===================
00000380 : 12345678
00000384 : 00FD0000
00000388 : FFFF0000
0000038C : 00000024
00000390 : 0000FFFF
00000394 : 0000008A
00000398 : 00200000
0000039C : 0000FF08
000003A0 : 00000000
000003A4 : 700113C0
000003A8 : 0000168C
000003AC : 00000846
000003B0 : 00FC25A0
000003B4 : ABFC04EA
000003B8 : 00000000
000003BC : 000016C2
000003C0 : 0000167E
000003C4 : B6FC0B52
000003C8 : FF7FFFFF
000003CC : 2304
000003CE : 7020
000003D0 : 0000
000003D2 : 00FC
000003D4 : 9C28
000003D6 : 0005
000003D8 : ABFC
000003DA : 0000
000003DC : 7EF4
000003DE : 00FD
000003E0 : 3296
000003E2 : 0000
000003E4 : 0000
000003E6 : 0000
000003E8 : 0000
000003EA : 0000

If someone is interested I can dump the ASM code.
Image

czietz
Hardware Guru
Hardware Guru
Posts: 1133
Joined: Tue May 24, 2016 6:47 pm

Re: MegaST2 with constant resets

Postby czietz » Fri Mar 27, 2020 9:44 am

OK, let's unravel this dump. First off, "000003C4 : B6FC0B52" makes little sense because it would indicate an exception 0xB6, which does not even exist. But let's not get distracted by this and assume this is a line F exception (0x0B) like you saw before. Decoding the exception frame on the stack...
000003CC : 2304
000003CE : 7020
000003D0 : 0000
... shows that this exception occurred at PC=0x70200000, in line with what you saw before. (On the address bus you only see 24 bits of the PC.) Notice the most significant byte of the PC (0x70), this will get important in a moment.

So, how did you end up there? Let's follow the stack further:
000003D2 : 00FC
000003D4 : 9C28

This looks like a return address, and indeed it is:
00fc9c20 20 6e ff ce movea.l (local_36 ,A6),A0
00fc9c24 20 50 movea.l (A0),A0
00fc9c26 4e 90 jsr (A0)
00fc9c28 58 8f addq.l #0x4 ,SP

This is in the GEMDOS function dispatcher, where GEMDOS jumps to the requested function, depending on its number. Of course, it should never end up at PC=0x70200000, though. Let's look where it presumably jumped to:
000003A4 : 700113C0

This is A0, the jump address -- assuming that this register was not modified since. Notice again the 0x70, so we seem to be on the right track.

But how can the GEMDOS function dispatcher jump to 0x700113C0 in the first place? The dispatches uses a table of function pointers from ROM but none of these of course points to 0x700113C0. But notice how 0x7001 0x13C0 looks like valid opcodes: MOVEQ #1,D0; MOVE.B D0,something.

In TOS 1.02 (German) the function pointer table goes from 0xFD30D4 to ca. 0xFD32DE. And at 0xFC3296 we have: 0x700113C0!

While I made some assumptions along the way, this deduction still seems to indicate to me that your MegaST is somehow reading from the wrong address in ROM sometimes.

EDIT: I only see it now. You even have 0xFD3296 on the stack, further corroborating my deduction. So, the GEMDOS dispatcher meant to read from 0xFD3296 (which is a pointer to Pexec(), BTW) but it read from 0xFC3296, which is a pointer to essentially nowhere.

EDIT2: Tracing with Hatari shows that in TOS 1.02 Pexec() is indeed the first GEMDOS function being called in this way. So this makes sense.

User avatar
Arne
Atari Super Hero
Atari Super Hero
Posts: 619
Joined: Thu Nov 01, 2007 10:01 am

Re: MegaST2 with constant resets

Postby Arne » Fri Mar 27, 2020 10:36 am

Well, at least I now know that my dump-code doesn't dump crap :D
And your assumptions are supported by the diag cart's CRC calculations.
I assume that necessary connections between CPU and Glue are fine - at least those that are needed for /ROMx signals. Glue and CPU are fine, too.
But as I wrote earlier: I still have to see /ROM1 or /ROM0 to be asserted. 8O
According to your post-mortem analysis this should happen (for /ROM1).

Anyway: well done, Sherlock. 8)
Image

czietz
Hardware Guru
Hardware Guru
Posts: 1133
Joined: Tue May 24, 2016 6:47 pm

Re: MegaST2 with constant resets

Postby czietz » Fri Mar 27, 2020 11:14 am

... though in a two ROM ST it would still work if the Glue (erroneously) only ever asserted ROM2, as long as the ROMs themselves see the correct address. Since the difference between 0xFC0000 and 0xFD0000 is just A16, maybe you could (re-)check that address line.

User avatar
Arne
Atari Super Hero
Atari Super Hero
Posts: 619
Joined: Thu Nov 01, 2007 10:01 am

Re: MegaST2 with constant resets

Postby Arne » Fri Mar 27, 2020 11:26 am

Just hooked up the scope to the 3 inputs/1 output of the 74LS11.

Image

I triggered on all 3 inputs and the corresponding output was always asserted as it should. Think this rules out the LS11 as a source of problems.
Your hint with a cracked resistor network now comes in my mind again... but if CPU reads from ROM its outputs are actively driven high/low.

Put MMU, Glue, CPU and ROMs in another Mega. Guess what? Runs smoothly...
Image

User avatar
Arne
Atari Super Hero
Atari Super Hero
Posts: 619
Joined: Thu Nov 01, 2007 10:01 am

Re: MegaST2 with constant resets

Postby Arne » Fri Mar 27, 2020 11:31 am

czietz wrote:(..) A16, maybe you could (re-)check that address line.


Splendid

Just as I touched the 0-Ohms resistor's leg at the center of W3 (pin 2) with my measuring lead it gave way i.e. it had broken off at some point near the solder joint.
Replaced it with some wire.
Now I get 2 bombs - once it made it up to the desktop (without icons as no FDD is connected).
Checked CRCs with diag cart: no more errors.
Pressing down the PCB near CPU/Glue does not change anything i.e. no black screen, just two bombs and no resets (right now).

Shall I dump the CPU save state area again?
Image

czietz
Hardware Guru
Hardware Guru
Posts: 1133
Joined: Tue May 24, 2016 6:47 pm

Re: MegaST2 with constant resets

Postby czietz » Fri Mar 27, 2020 11:54 am

Arne wrote:Shall I dump the CPU save state area again?


Why not. Maybe this time the two bombs / bus error is something easy, for a change. :D

User avatar
Arne
Atari Super Hero
Atari Super Hero
Posts: 619
Joined: Thu Nov 01, 2007 10:01 am

Re: MegaST2 with constant resets

Postby Arne » Fri Mar 27, 2020 12:08 pm

I'm glad I wrote that code yesterday evening.
What I did:
  • switch off ST
  • insert my diag cart and deactivate it (i.e. it's got a jumper routing /CS to the EPROM/Flash - if not a pull-up takes over)
  • switch on ST till 2 bombs are displayed
  • activate cart
  • press reset button

Reset is a Group 0 exception but on the Ataris this does not lead to generating a post mortem dump as the reset line is directly connected to /RESET of the CPU?

Anyway: the PC points to $FC0B52 again with exception 2 (bombs). Disassembly shows me that it's a NOP. But the surrounding code puzzles me a bit. A BSR jumping just behind the NOP. What the heck... 8O

Code: Select all

CPU Save State Area
===================
00000380 : 12345678
00000384 : FFFF0005
00000388 : 00006E25
0000038C : 00000026
00000390 : 0000FFFF
00000394 : 00000044
00000398 : 00200000
0000039C : FFFF0008
000003A0 : 00020000
000003A4 : 0000755A
000003A8 : 00000A4C
000003AC : 00000E94
000003B0 : 00FC25A0
000003B4 : 00002994
000003B8 : 00000000
000003BC : FFFF8606
000003C0 : 00007506
000003C4 : 02FC0B52
000003C8 : FFFFFFFF
000003CC : 33C5
000003CE : FFFF
000003D0 : 8604
000003D2 : 33C7
000003D4 : 2304
000003D6 : 00FC
000003D8 : 1E98
000003DA : 00FC
000003DC : 1E38
000003DE : 00FC
000003E0 : 1762
000003E2 : 00FC
000003E4 : 0F88
000003E6 : 0000
000003E8 : 0000
000003EA : 0000


Edit: $FFFF8604 is the DMA Sector Count/Data Register. Could be related to that T6 error.
Image

User avatar
Arne
Atari Super Hero
Atari Super Hero
Posts: 619
Joined: Thu Nov 01, 2007 10:01 am

Re: MegaST2 with constant resets

Postby Arne » Fri Mar 27, 2020 12:20 pm

Update: pushed on the DMA IC and rebooted. It booted to Desktop without icons. Attached FDD and now it takes an awful amount of time till desktop appears with icons for A:, B: and Trash bin. But it cannot read any disk and any disk is displayed with 0 bytes of capacity.
So at this point it behaves like with the 2.06 card.

But no T6 at this point. Let the diag run with "T10" and pushed the PCB in various spots. No error occurred.
Image

czietz
Hardware Guru
Hardware Guru
Posts: 1133
Joined: Tue May 24, 2016 6:47 pm

Re: MegaST2 with constant resets

Postby czietz » Fri Mar 27, 2020 12:22 pm

I wrote the following answer before I saw your latest post. Still:

I looked at the TOS 1.02 code with Ghidra. It always stores the address of the exception handler at 000003C4; thus, it's only the number (2 = bus error) that is relevant here.

The actual exception data must be decoded from the stack frame:

000003CC : 33C5
000003CE : FFFF
000003D0 : 8604
000003D2 : 33C7
000003D4 : 2304
000003D6 : 00FC
000003D8 : 1E98

Thus, it happened while accessing 0xFFFF8604. The PC was 0xFC1E98. (Actually it was 0x00fc1e92 when the exception happened but the CPU had already incremented it before taking the exception.) The instruction was 0x33C7 (MOVE.W D7,...) which matches in the TOS dump that I have.

0xFFFF8604 can either be an access to the DMA controller or to the FDC. Off the top of my head I cannot say which component is responsible for generating the DTACK for this access. But this error matches the T6 error you sometimes saw with the diag cart: T6--1772 Bus Error. Maybe check around DMA and FDC for further broken solder joints etc.

czietz
Hardware Guru
Hardware Guru
Posts: 1133
Joined: Tue May 24, 2016 6:47 pm

Re: MegaST2 with constant resets

Postby czietz » Fri Mar 27, 2020 12:26 pm

Arne wrote:till desktop appears with icons for A:, B: and Trash bin. But it cannot read any disk and any disk is displayed with 0 bytes of capacity.


Maybe now the floppy drive itself is defective, misaligned, ... The diag cart iirc has a floppy read/write test, too.

User avatar
Arne
Atari Super Hero
Atari Super Hero
Posts: 619
Joined: Thu Nov 01, 2007 10:01 am

Re: MegaST2 with constant resets

Postby Arne » Fri Mar 27, 2020 12:40 pm

I checked FDD and flat-ribbon cable on another Mega. But you may remember what I wrote in the beginning about different FDDs giving different results (write-protect error...).
Image

User avatar
Arne
Atari Super Hero
Atari Super Hero
Posts: 619
Joined: Thu Nov 01, 2007 10:01 am

Re: MegaST2 with constant resets

Postby Arne » Fri Mar 27, 2020 7:47 pm

I swapped the 7606 between FDC and FDD these days - bad idea. The 74F04 I used seems to have problems pulling the level to high on the DIRC pin.
Image

So I swapped it back to the 7606 re-soldered all pins around the FDC and now it can read my disks.

Many thanks, Christian. This repair wouldn't have been possible without your help. :cheers:
Image

czietz
Hardware Guru
Hardware Guru
Posts: 1133
Joined: Tue May 24, 2016 6:47 pm

Re: MegaST2 with constant resets

Postby czietz » Fri Mar 27, 2020 9:40 pm

I'm glad that it works now. :-)


Social Media

     

Return to “Hardware”

Who is online

Users browsing this forum: No registered users and 7 guests