mist-devel / mist-binaries

Firmware and core binaries for the MIST board
206 stars 50 forks source link

Fpga64: Blue Screen Of Death #21

Closed AmigaIstMiST closed 8 years ago

AmigaIstMiST commented 8 years ago

Steps to reproduce (latest fpga64 core):

  1. Start fpga64
  2. Load and run the program "Simons Basic 3.1" from a D64 image
  3. After Simons Basic start screen is visible: press the RIGHT button on the MiST for a few seconds and release it (reset). Result: no reset, but C64 freezes.
  4. Switch the MiST of , wait a few minutes, switch it on again, load FPGA64 core. All you see is a blue screen (see screenshot).

From now on it's impossible to use the C64 :-) You can load other cores (Amiga, AtatiST) and use them. But after you load the fpga64 core the BSOD is back.

Good news: after 1 day, you can use the C64 core again (well, I don't know the minimum time, maybe it's only 1/2 image hour, but it's more than a few minutes!)

AmigaIstMiST commented 8 years ago

Good news: OSD works (see screenshot), so you can load other cores. Only the C64 itself is unusable.

This is the link to the Simons Basic D64 I used: http://csdb.dk/release/?id=69154

EricGus commented 8 years ago

Did you try loading an older version of the C64 core as well?

AmigaIstMiST commented 8 years ago

No, I only tried the newest core. It tried a few minutes ago: after 15 minutes the C64 was usable again (rest electricity in RAM?). It would be interesting if this bug is only related to Simons Basic, or if it's a more general problem.

harbaum commented 8 years ago

Several cores have similar effects. The reason is that sdram is actually loosing it's contents much slower than one would expect. So if a computer checks for some magic values after boot/reset it may still find them in place frkm a previous run. And if there are remains of some problematic code they will reproducible lock up the core until the memory looses its content.

One solution is to boot a different core that erases this particular part of ram. The best core for this is the Amiga with 24 my fast ram enabled. This will erase most of the 32mb in the mist.

I could actually write a ram eraser core for this purpose ...

AmigaIstMiST commented 8 years ago

I already tried the Amiga AGA core with 24 MB :-) It had no effect, the C64 stayed unusable.

harbaum commented 8 years ago

Then the Amiga doesn't erase it's ram properly. Bad Amiga ...

AmigaIstMiST commented 8 years ago

Well, does anybody know of a AtariST with 24 MB of RAM? ;-)

Maybe the reset function is the problem? I don't know, what it does, does it trigger a builtin C64 function that is moved to a different location by Simons Basic? AFAIK Simons Basic "enhances" the builtin Basic.

AmigaIstMiST commented 8 years ago

If it's like this, maybe it wouldn't be a bug in the core, because an original machine would probably behave the same way.

AmigaIstMiST commented 8 years ago

Maybe it would be a solution, that the whole RAM is erased, when the MiST is switched on, just before a core is loaded?

harbaum commented 8 years ago

Only the fpga can access the ram. So only a core can erase it. Either the target core itself or some 'eraser core'. We are dealing with real hardware here. It not like some simple emulator where the main cpu can simply erase the ram before it loads the emulator :-)

harbaum commented 8 years ago

Currently the Atari st is limited to 14. I planned to make an extended ST with 30mb ram. But whenever I start working on that things get more complicated than expected .... maybe I should try again ... but then: What's the use case for an ST with more than 14mb ram?

AmigaIstMiST commented 8 years ago

What about the new "menu core" (haven't tried it yet)? If it's a common problem among different cores, this migth be the right place for a RAM erase function.

harbaum commented 8 years ago

I wouldn't call it a common problem. I myself have seen it two or three times. Buy yes, it exists and the menu core actually sounds like a good place for this. I'll have a look.

robinsonb5 commented 8 years ago

The One Chip MSX core might benefit from this, too - it can occasionally get into a state where it doesn't boot the BIOS, instead showing a black screen and three clicks through the audio. Power cycling usually fixes it, but being able to do it from a menu core would be ideal.

AmigaIstMiST commented 8 years ago

My experience with the FPG64 is, that it is impossible to load some games after some time. Normally '0' is the NOP instruction, I wonder how many assembly written software for the C64 exists, that relies on a zeroed RAM? I experienced the following behavior with California Games and Lemmings: sometimes the screen stays black, sometimes you see the intro and then the C64 stops, sometimes you can play the the game.

I have found another program/game that makes the fpga64 unusable: zaxxon

AmigaIstMiST commented 8 years ago

It looks like the latest changes from sorgelig to the reset function fixed this issue. I testet it with Simons Basic and Zaxxon, the C64 stays usable after a reset now. Nice work :-)

So I close this issue