Is there any possible chance for a rework of this thing that implements less vibe-coded parts? I also saw you mentioning that some people are working on ways to directly port ZX BASIC stuff to the Sega Master System.
Either way, if you want, you could have Steve help clean this up at least. Wouldn't hurt to try at least?
Viewing post in Pocket Platformer SMS comments
It could certainly be refactored to improve code quality, it would just take more time.
If you want to contribute to the repository, I would be thankful.
As for ZX-BASIC, please see this discussion on SMSPower:
https://www.smspower.org/forums/20954-BASICCompilerForTheSegaMasterSystem