Numbered Mode RPC
Colin Ferris (399) 1748 posts |
Is there an example of a extra numbered Mode – that works with the RPC onwards? ie one that responds to Service_ModeExtension &50 Thanks |
Rick Murray (539) 13405 posts |
The RiscPC was when Acorn decided that mode numbers weren’t going to work (way too limiting) and introduced the mode description things. As such, I would be surprised if there were any numbered modes for RiscPC era hardware, unless somebody ported those “additional DTP modes” modules? But that said, why? An MDF entry and mode string is a much easier solution. Hmm, how does AnyMode work it’s magic? |
Chris Mahoney (1684) 2100 posts |
According to the User Guide, mode 32 (800×600×256) requires 3.5 or later. I don’t know anything about that service call though :) |
Jon Abbott (1421) 2599 posts |
There’s a few games that make use of Service_ModeExtension. If you want to download an example Module, there might be one in the Fervour demo
I not sure any exist. The only custom MODE’s I’ve seen use VIDC List Type 0/1 lists which RO5 doesn’t translate.
The Service_ModeExtension documentation on the Wiki is up to date. |
Colin Ferris (399) 1748 posts |
Looking at older Number modules - it seems you check Service for:- Check &50 in R1 Check for your mode in R2 R1=#0 claim Is there somewhere in RO docs – info on say MODE 32? Showing what the values should be in these two lists pointed to by R3/R4. |
Jon Abbott (1421) 2599 posts |
You’ll need to look at the source code for the MODE 32 definition. |
Colin Ferris (399) 1748 posts |
Thanks for the info. Have made a sort of clone of MODE 32 ie MODE 120 – which works. When Service call &50 is called – how do you check if it is a Read? It seems that if R3=-1 should be a Read – or is that a don’t care for monitor type? Still not sure what is in Workspace_List (R4) Have – which works with clone 32 ie 120. .Workspace_List |
Jeffrey Lee (213) 6046 posts |
R3 will be -1 if it’s a call from OS_ReadModeVariable. For other calls I think the monitor type is always provided.
The first word of the workspace list should be zero (It’s the VIDC list which should start with a 3 for RISC OS 3.5+). If your clone of mode 32 is an exact clone of mode 32 then the rest of the list is fine. If you changed the width & height of your mode 32 clone then you can still list mode 32 as the base mode, but you also need to list the modified mode variables in the workspace list. E.g. if your clone was 900 pixels wide you’d want a workspace list like the following: DCD 0 ; List format DCD 32 ; Base mode DCD 1 ; ScrRCol mode variable DCD (900/8)-1 DCD 6 ; LineLength mode variable DCD 900 ; 900 pixels at 8bpp = 900 bytes DCD 11 ; XWindLimit mode variable DCD 900-1 DCD -1 ; list end (Note that you’d also need to return a suitably adjusted VIDC list, so that the video driver programs the hardware correctly) |
Colin Ferris (399) 1748 posts |
Have a working MODE 120 that is (1024 × 768 256 Colours) VRPC-DL RO 5.25. As a note – RO4.02 doesn’t use the mode 120 on startup – with noboot. Any ideas how the RO4.02 ROM image is compressed – it would be nice to boot straight into RO5.xx. (Perhaps – RO4.02 OS only uses the built in MODES numbers – if no MDF is found – and falls back to MODE 27) Interesting the Star – when F12 is pressed is over to the left – unlike being in the middle usually. I think R3 returns -1 for – don’t care what monitor type or question about the mode – so seems a bit of conflict of interest. I presume that you could define – a C32K MODE! How is 32K colours defined in Workspace_List dcd 6 :dcd LineLength Num of bytes – for a 32K mode? |
Jeffrey Lee (213) 6046 posts |
Theoretically it should work. But I’m not sure if anyone’s actually tried it.
DCD 3 ; NColour DCD 65535 ; i.e. (1<<16)-1 DCD 9 ; Log2BPP DCD 4 ; i.e. log2(16) DCD 10 ; Log2BPC DCD 4 ; must be same as Log2BPP for most modes dcd 6 :dcd LineLength Num of bytes – for a 32K mode? 32K modes have two bytes per pixel, so LineLength is just the pixel width of the screen multiplied by two. |
Colin Ferris (399) 1748 posts |
Had a go – some strange colours there – for the usual grey Backdrop :-| Looks like light green- I think? RO4.02 looks purple. RO5.25 – in a 64M colours numbered mode – I think the colours looks similar – to 32K. |
Colin Ferris (399) 1748 posts |
With some timing changes – it works with my Iyonix. Any ideas why the colours are wrong – in C32K – on both the Iyonix and VRPC-DL ? Trying to work out what the flags do in WorkSpace_List do? dcd 0:dcd ??? Can’t remember whether you can replace RO modes like 23 etc – any ideas. Thanks [edit 1] (I think there was with CC’s ARC ColourCard) [edit 2] [edit 3] |
Colin Ferris (399) 1748 posts |
Is there a free MODE number I can use – that RO will pick up on startup – without going to MODE 27? Thanks |