REV 3 - REV 5 - The beginning (ST536)

All about the ST536 030 ST booster.
User avatar
exxos
Site Admin
Site Admin
Posts: 29699
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: REV 3 - REV 5 - The beginning (ST536)

Post by exxos »

Not much of an update but @coonsgm is fiddling with the latest board in the background. I have not had time and probably won't do until the New Year to build up my new board.

However I did need to make measurements and had a hour to spare tonight amazingly! So I connected the 5.62 board up, which I know was working fine on my H5 some time ago.. But on the H4, amid some possible iffy connections, they basically would not reset and just had a white screen with a single green pixel line across the top. EMUTOS just said "EMUTOS 1.4" and nothing after. But that was basically a experimental build that I reversed on the next version and also made some other minor changes some months ago that I have completely forgotten about what I did and why.

So anyway, the more recent firmware (V4C2G) is running on the H4 now. I ran it though Claude and basically said the only thing it found was /AS was falling just before the rise of the clock, which, According to Claude, is wrong and should be after the rise. So That's been tweaked.. maybe someone off-hand knows which its supposed to be ? Too tired to go puzzling over datasheets tonight !

IMG_5392.JPG
IMG_5392.JPG (369.5 KiB) Viewed 80 times
IMG_5394.JPG
IMG_5394.JPG (332.17 KiB) Viewed 80 times

EDIT:

Quick measure of CLK8 and /AS and /AS falls on the rise of the clock. (stock H4)

IMG_5387.JPG
IMG_5387.JPG (259.21 KiB) Viewed 78 times
coonsgm
Posts: 463
Joined: Sat Jan 30, 2021 1:30 am

Re: REV 3 - REV 5 - The beginning (ST536)

Post by coonsgm »

Finally got my first build up and running (still trying to find likely a Xilinx soldering issue on the 2nd).
IMG_5289 (1).jpeg
IMG_5289 (1).jpeg (252.21 KiB) Viewed 48 times

Still need to sort out the IDE...running from an external Ultrasatan here.

Running the prior version of the Firmware here right now V4C2F and seeing the following
IMG_5290.jpeg
IMG_5290.jpeg (283.21 KiB) Viewed 48 times
Frontbench here
IMG_5291.jpeg
IMG_5291.jpeg (227.3 KiB) Viewed 48 times
User avatar
exxos
Site Admin
Site Admin
Posts: 29699
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: REV 3 - REV 5 - The beginning (ST536)

Post by exxos »

@coonsgm looks like you have no TTram?

Does TOS display the TTram check on a cold boot?

Also V4C2G is the current firmware.
User avatar
exxos
Site Admin
Site Admin
Posts: 29699
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: REV 3 - REV 5 - The beginning (ST536)

Post by exxos »

ST536 update: the warm reset vs fast ROM problem, and what I have done about it

This one has been a bit of a double-edged sword, so here is the whole story in plain terms.

How fast ROM works on the ST536
When TOS boots, it copies the ROM into TT-RAM. Once the copy is done, the PLD sends every ROM access to the TT-RAM copy instead of the real ROM chips, which is a lot faster. The PLD remembers that the copy has been done, and that memory survives a reset.

Problem 1
Because that "copy done" flag survives a reset, the machine keeps running TOS from the TT-RAM copy after you press reset. If that copy ever got corrupted, pressing reset did not help. You got the green line at the top of the screen and nothing else, and only powering off for 10 seconds or more brought it back.

Problem 2
The obvious fix is to clear the flag on reset so TOS runs from the real ROM again. The catch is that the ROM copy relies on the TT-RAM check, which TOS only does on a full cold boot. A warm reset skips all that, so after pressing reset you were left running from the real ROM at stock speed until the next power off.

Problem 3
I tried clearing the flag on every reset anyway, and for reasons I have not got to the bottom of yet, the machine then would not boot at all. So that was no good either.

So the menu was: slow ROM after a reset, a machine that might not come back after a reset, or a machine that did not boot at all. Not a great menu.

Why a reset was always a warm boot
The ST536 keeps the bottom part of RAM, where TOS keeps its system variables, in TT-RAM rather than ST RAM. That includes the magic number TOS checks on every boot to decide between a warm boot and a cold boot. TT-RAM keeps its contents through a reset, so TOS always found the magic number and always did a warm boot.

The fix
It is monumentally easier to just make TOS do a cold boot every time.
  • After a reset, the first time TOS reads that magic number, the PLD briefly disconnects the TT-RAM from the CPU for that single read.
  • TOS does not see the number it is looking for, decides it is a cold boot, and does everything a cold boot does: memory test, TT-RAM check and the ROM copy.
  • Once TOS writes the number back, everything carries on as normal until the next reset.
  • The SDRAM controller itself is untouched, as it is very fragile to "innocent" changes.
  • No TOS changes were needed, so no new ROMs to burn either.
The downside
This will annoy some people, but there is no such thing as a warm reset on the ST536 any more. Every reset is a cold boot, so anything that normally survives a reset, like RAM disks or reset-resident programs, will not. Reset also takes a little longer because of the memory test. Think of the reset button as the "have you tried turning it off and on again" button, minus the turning it off bit.

Where it stands
First tests on my H4 look good. Reset gives a full cold boot and fast ROM is still there after every reset. Power off boots are fine too. As a bonus, the timings on the latest build actually came out slightly better than before.

One thing which may not be obvious: because the "copy done" flag still survives a reset, the "ROM copy" you see after pressing reset is not reading the real ROM chips at all. TOS is reading the TT-RAM copy and writing it straight back over itself, which is why it is so quick. The real ROM chips are only read again after a power off.

To do
  • Make the cold boot after a reset copy from the real 16-bit ROM chips into TT-RAM again, instead of copying the TT-RAM copy back over itself. That way, if there is ever an SDRAM problem, the reset button gets you a fresh copy straight from the ROM chips. If the copy or its check fails, TOS never switches over to TT-RAM and simply keeps running from the 16-bit ROM, so either way you always end up running a good copy of ROM.
  • More testing, including on the newer board revision.
  • The green line after a very short power off, which is a separate thing still on my list.
coonsgm
Posts: 463
Joined: Sat Jan 30, 2021 1:30 am

Re: REV 3 - REV 5 - The beginning (ST536)

Post by coonsgm »

exxos wrote: Sun Nov 08, 2026 3:09 pm @coonsgm looks like you have no TTram?

Does TOS display the TTram check on a cold boot?

Also V4C2G is the current firmware.
Yep, looks like it. It's never easy is it.... :lol:
coonsgm
Posts: 463
Joined: Sat Jan 30, 2021 1:30 am

Re: REV 3 - REV 5 - The beginning (ST536)

Post by coonsgm »

How can the copy ROM to TT ram succeed and then not have TT ram?
User avatar
exxos
Site Admin
Site Admin
Posts: 29699
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: REV 3 - REV 5 - The beginning (ST536)

Post by exxos »

coonsgm wrote: Sun Nov 08, 2026 11:47 pm How can the copy ROM to TT ram succeed and then not have TT ram?
Good question...

:shrug:

Do you get the ST and TT ram test after power up? What exactly do you get after ROM to ram copy?
coonsgm
Posts: 463
Joined: Sat Jan 30, 2021 1:30 am

Re: REV 3 - REV 5 - The beginning (ST536)

Post by coonsgm »

I get the ST ram test, but not TT ram test.

Message after copying to TT RAM
"Copy Complete"
"Verification successful!"
Post Reply

Return to “ST536 030 ST ACCELERATOR”