Screen buffering for old game code
Stephen Scott (491) 38 posts |
Hi all, I’m hoping to spend some time this year revisiting my RISC OS game code for use on RISC OS Pi, after a few years hiatus. I’ve been looking over the forums in despair. My two problems are thus: - I have mode 12 sprites. When I looked into this a few years back, the consensus seemed to be to convert the sprites to Mode 27. If I do this however, would I still be able to use screen banking/buffering i.e. os_byte 112 and 113? I can’t seem to find any definitive answer on whether the above techniques are still valid, or whether games have to be rewritten to not screen buff anymore. Updating sprites is not a problem, but buffering was a useful technique, which doesn’t seem to work. Can anyone point me in the right direction? You may refer to a post I made some time ago regarding the above (https://www.riscosopen.org/forum/forums/11/topics/1554) Thanks very much! Steve Scott |
Jon Abbott (1421) 2599 posts |
Yes, you can use banking on the Pi in the same way as before. You’ll need to go to an 8bit MODE though, MODE 15 or 28. Banking was added over a year ago, but there have been a few changes to resolve issues. So long as you’re on RC12 I believe you should be okay. |
Jeffrey Lee (213) 6046 posts |
True colour modes will work as well, although the driver currently doesn’t make any guarantees about how many screen banks are available in any given mode (something else to go on the todo list!) |
Stephen Scott (491) 38 posts |
Thanks for those updates. Always appreciated. I recall doing something like MODE MODE to clear the screen, but it would then be impossible to perform screen buffering due to the memory required. If I was to recreate a game now, I would effectively have to abandon the screen buffering technique? Then there is the question of actual display of 8-bit modes. In the past, we’ve had monitor definition files, the GameModes module, and for the Pi, the config file settings. How can I resolve all this? The sweet spot is to ideally have a game that can run across the Pi, and newer RISC OS based systems, without worrying about compatibility issues. I have a sneaky suspicion that your work Jon, has borne fruit on this :) |
Stephen Scott (491) 38 posts |
Was just browsing through the preview issues of Drag and Drop, and found reference to this – Anymode – simple module for the Pi and RPCEmu to allow use of old style screen modes (including, amusingly, teletext mode 7) |
Jon Abbott (1421) 2599 posts |
Provided you’ve called OS_Byte 112 / 113 with the correct values, you’d use CLS to clear the screen and can still use screen buffers.
Provided you switch to a suitable MODE, compatibility shouldn’t be an issue. 8bit is the minimum for most platforms these days, although there are some that are I think 24/32bit only (OMAP?). |
Stephen Scott (491) 38 posts |
Thanks for the feedback Jon. |