RISC OS SDL 2 support
Chris Gransden (337) 1207 posts |
There’s a mention of the beginnings of RISC OS SDL2 support here on Phoronix. It opens up a lot of new ports using SDL2 to RISC OS. The RISC OS support isn’t yet complete. So far the SDL 2 version of ffplay video player works. Albeit single tasking. |
David Williams (2619) 103 posts |
A RISC OS port of Richard Russell’s excellent ‘BBC BASIC for SDL 2.0’ could be a possibility, then? :-) Has anyone succeeded in porting just the core interpreter yet? If yes, which C compiler was used to compile the source code? |
Chris Gransden (337) 1207 posts |
In theory yes. It should make it a lot easier. Last time I tried building the core interpreter with GCCSDK it crashed immediately when run. |
Cameron Cawley (3514) 157 posts |
Good to hear it’s working (somewhat) okay for you. :-) Regarding the issues with full screen, it’s something I’ve observed in the past on the Pinebook when switching to the best screen mode fails. I was able to fix the issue issue for me, though, so could you open an issue with some more details on what setup you’re testing with? |
Chris Gransden (337) 1207 posts |
Great work so far. Even better if you can get Joystick and Hardware Overlay support working. ;-)
I managed to port the sdl2 version of the ‘starfighter’ game from the auto builder. That has a similar issue but does switch out of the desktop. I’m am using a 4K screen on a Pi 4 so 2160p is available. Both starfighter and ffplay are a quarter of the size they should be. I’ll try restricted the maximum resolution to 1080p to see if it make a difference. |
Chris Gransden (337) 1207 posts |
Got BBC BASIC for SDL 2.0 as far as building. Doesn’t run yet. |
Richard Russell (1920) 95 posts |
David Williams kindly drew my attention to this thread.
It’s possible that you cloned my repo before the recent changes to support it running on the Raspberry Pi Pico (which has an ARM Cortex-M0+ CPU). They included eliminating unaligned memory accesses, which had previously not been a problem because all the supported platforms used CPUs capable of that. You will definitely need those changes to run on anything prior to an ARMv6. Indeed in general the mods for the Pico have resulted in a more lightweight console edition (e.g. with RAM needed only by the GUI versions, such as user-defined characters, scrubbed from the memory map). So I would be more confident of a successful port to RISC OS now. But don’t expect it to run at anything like the same speed as Sophie’s BASIC; using 64-bit integers and at least 64-bit floats (plus being coded in C rather than assembler) hits performance quite badly on a 32-bit CPU. |
Chris Gransden (337) 1207 posts |
I worked out what was causing the problem with ffplay. By default it starts up in non full screen mode. Changing it to default to full screen worked correctly. Now got a very early test version of the latest version of MPV (v0.34) working to a degree. Live youtube streams just about work at 360p. Lip sync is a bit off. Streaming from BBC iPlayer also works. |
Tristan M. (2946) 1039 posts |
It what now? To a lesser extent I’d also like to see the RISC OS build process of brandy fixed too. edit: It’s strange. recently I was kicking around the idea in my head of something not quite RISC OS for Thumb. Pretty much a Beeb with ARM architecture and a few extra SWIs. It seems this Pi Pico port is pretty much it already. Now I think of it, could a 32 bit ARM version run on the native ARM core of the PiTubeDirect on the Beeb? That’d be fun. On another aside I only recently discovered the Graphical Task Window (!GraphTask) for RO. It’s given me the windowed graphics support I’ve always wanted in BASIC. In fact it’s pretty much a killer app for me. Probably about as close as I can get to having BBCSDL on RO for now. |