Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repton3 Redux #35

Open
thomasintrouble opened this issue Nov 16, 2023 · 6 comments
Open

Repton3 Redux #35

thomasintrouble opened this issue Nov 16, 2023 · 6 comments

Comments

@thomasintrouble
Copy link

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
Copy link
Owner

hoglet67 commented Nov 16, 2023

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
Copy link
Author

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
Copy link

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
Copy link

fozretro commented Dec 20, 2023

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)

@thomasintrouble
Copy link
Author

Hi did the same on MMFS1, removing the FE60s ( I even also tried to JMPed across the SWRAM detection and hardcoded slot 2 into the appropriate location) but still crashed on trying to load a new map; any ideas where to go next?

@afawcett
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants