mattgodbolt/jsbeeb

Saving with a co-pro enabled seems to crash jsbeeb/brings up the debugger

ZornsLemma opened this issue · 7 comments

With the current code on xania.org, firing up a BBC B with 65C02 co-pro, leaving the default Elite disc in the drive and doing:

*SAVE Z 1000 1100

starts to save and then brings up what looks like the jsbeeb debugger:
Screenshot from 2024-05-17 22-58-57

Credit for discovering this goes to Fredrik, who came across it while testing some of my code on jsbeeb over on stardot. All errors in this bug report are my own, of course. :-)

This works fine if the co-pro is disabled.

Thanks for the note! repro'd and the culprit is:

event noted: exception thrown TypeError: Cannot create property '0' on number '0'
    at dl.parasiteWrite (https://bbc.xania.org/main.ebfd21abafe75f2bc1e8.js:2:261694)
    at Rl.writemem (https://bbc.xania.org/main.ebfd21abafe75f2bc1e8.js:2:289635)
    at n.eval (eval at <anonymous> (https://bbc.xania.org/main.ebfd21abafe75f2bc1e8.js:2:242802), <anonymous>:12:7)
    at n.run (https://bbc.xania.org/main.ebfd21abafe75f2bc1e8.js:2:242866)
    at Rl.execute (https://bbc.xania.org/main.ebfd21abafe75f2bc1e8.js:2:289978)
    at Il.polltimeCommon (https://bbc.xania.org/main.ebfd21abafe75f2bc1e8.js:2:301935)

I'll have to dig more to work out what that really is.

Thanks Matt!

Finally taking a look at this. The offending line is:

                    this.parasiteToHostData[TUBE_ULA_R1][this.parasiteToHostFifoByteCount1++] = value;

which should be a bunch of FIFOs but has become the number 0. I'll get this :)

Time to learn how the tube works :)

Or ask "copilot" 👍🏻
image

Thanks Matt! I'm genuinely impressed with copilot there too...

You and me both! This should be rolling out to the live site now.