hoglet67 / MMFS

Modern SD Card File System for Acorn 8-bit Machine (Master, Beeb, Electron)
68 stars 17 forks source link

Repton3 Redux #35

Open thomasintrouble opened 10 months ago

thomasintrouble commented 10 months ago

Using the current version of Repton3 Redux (either the bbcmicro.co.uk version or the ssd Matthew posted to stardot), on my BBC B with 32k swram and MMFS 1.5. The game loads and plays but when loading a different mapset it freezes. I've tried with v1.55 mmfs and swmmfs, and with mmfs2 versions of both. Firstly can you replicate the issue? And then any ideas on a cause/fix please?

Happy of course if the answer is just "it won't work" ala White Light! Thanks Tom

hoglet67 commented 10 months ago

I suspect the problem is the game writing to the user port as it tries to detect sideways RAM. This causing junk to get sent to the SD Card which seems to then stop it responding.

Specifically, I caught it doing these writes

00.002198 : Mem Wr Watch hit at DA50 writing FE63:FF  .
00.004307 : Mem Wr Watch hit at DA71 writing FE6E:7F  .
00.004322 : Mem Wr Watch hit at DA71 writing FE6D:7F  .
00.004365 : Mem Wr Watch hit at DA94 writing FE6C:0E  .
05.311545 : Mem Wr Watch hit at 0BFF writing FE60:0E  .
05.311593 : Mem Wr Watch hit at 0BFF writing FE60:0D  .
05.311679 : Mem Wr Watch hit at 0BFF writing FE60:0C  .
05.311765 : Mem Wr Watch hit at 0BFF writing FE60:0B  .
05.311813 : Mem Wr Watch hit at 0BFF writing FE60:0A  .
05.311861 : Mem Wr Watch hit at 0BFF writing FE60:09  .
05.311909 : Mem Wr Watch hit at 0BFF writing FE60:08  .
05.311957 : Mem Wr Watch hit at 0BFF writing FE60:07  .
07.320035 : Mem Wr Watch hit at 0C9A writing FE60:07  .
07.375542 : Mem Wr Watch hit at 22C2 writing FE6B:40  @
07.375548 : Mem Wr Watch hit at 22C7 writing FE64:88  .
07.375554 : Mem Wr Watch hit at 22CC writing FE65:13  .
07.375560 : Mem Wr Watch hit at 22D1 writing FE6E:C0  .
07.406904 : Mem Wr Watch hit at 2304 writing FE6B:00  .
07.415420 : Mem Wr Watch hit at 22C2 writing FE6B:40  @
07.415426 : Mem Wr Watch hit at 22C7 writing FE64:88  .
07.415432 : Mem Wr Watch hit at 22CC writing FE65:13  .
07.415438 : Mem Wr Watch hit at 22D1 writing FE6E:C0  .
07.446764 : Mem Wr Watch hit at 2304 writing FE6B:00  .
...

The problematic writes are I think those to &FE60.

I've just tested it on my Master, where MMFS uses a second user port adapter plugged into the Econet headers (at &FEAx). This works fine, and I was able to load the AFRICA map. If I then switch to a version of MMFS that uses the standard user port, then it hangs.

That supports hypothesis that it's the sideways RAM detection code writing to the standard user port that's the issue.

I can't think of a quick fix for this, other than patching the game.

Dave

thomasintrouble commented 10 months ago

Thanks so much for looking into it. I've dropped a link to this conversation across to Matthew Atkinson on Facebook just in case he has the time to think about a patch (if it's an easy fix of course, I have no idea!) Thanks again Tom

richard-broadhurst commented 10 months ago

What I do with my loader is have: ...do swram detection... 110 ON ERROR 130 120 GOTO 140 130 ON ERROR OFF 140 do disc op 150 ON ERROR OFF This means that when the first disc operation fails, it gets a second try. I think that SmartSpi automatically does the reset and retry, but it may depend on the type of error and doesn't hurt.

fozretro commented 8 months ago

Trying to get MMFS (V2 in my case) working here. I discovered that FE60 is written to twice in repton1 at &C9A and &C30. I loaded a MMFS2 E00 SRAM into battery backed ram (in a lower ram slot, as I think it searchs from the top down). I NOP'd the above address. And called &A9C (exec point for repton1) - alas... no cheese crashed on pressing space on first screen...

I checked other executable files repton2 and repton3 for pokes to this address and did not find anything. Sorry folks, while i have some GOTEK machines, I was also hoping to get this working for MMFS as well.

Maybe someone can try the above trick on MMFS v1?

(BBC Model B, IFEL ROM/RAM Board)