MODE 7 on RISC OS BBC Emulator 6502em

want to talk about MESS/model b/beebem/b-em/electrem/elkulator? do it here!
Post Reply
MatthewThompson
Posts: 1235
Joined: Tue Apr 22, 2008 3:44 pm
Location: Oxford
Contact:

MODE 7 on RISC OS BBC Emulator 6502em

Post by MatthewThompson » Tue Jan 23, 2018 5:19 pm

Hi
I have just upgraded my Iyonix to an ARMX6 computer, with a different monitor, but unfortunately I cannot get MODE 7 to display correctly, i've never got to grips using RISC OS MDFs, I suspect this is the problem, I have added the MDFs supplied with 6502Em for use with the Iyonix as it might not be able to display MODE 7 , these did the job perfectly, however on this machine and a newer monitor it doesn't work, the monitor I have is an ASUS 23" display .

MODE 7 looks like this on it (see screenshot)


Anyone any experience or any idea on how I can get this to work? the program works fine, just MODE 7 is the problem . BeebIT runs fine, but there's a few games which won't run on it but will on 6502em and it's display of MODE 7 is much better, it would be nice to have them both working.

Many thanks
Matthew
Attachments
BBCScreen.jpg

User avatar
jms2
Posts: 1970
Joined: Mon Jan 08, 2007 6:38 am
Location: Derby, UK
Contact:

Re: MODE 7 on RISC OS BBC Emulator 6502em

Post by jms2 » Tue Jan 23, 2018 11:13 pm

This doesn't look like an MDF issue to me. It looks instead like the underlying version of Risc OS doesn't provide mode 7.

Try doing *basic then MODE7 from Risc OS. Can you get Teletext colours to work?

steve3000
Posts: 1838
Joined: Sun Nov 25, 2012 12:43 am
Contact:

Re: MODE 7 on RISC OS BBC Emulator 6502em

Post by steve3000 » Wed Jan 24, 2018 12:12 am

As above, it looks like the software MODE7 emulation hasn't kicked in.

What dimensions is MODE 7 in the mdf that you have? There must have been changes to the MODE 7 emulation at some point in the development of RISC OS 5, because it changed from low resolution 320x256 frame size to higher resolution 640x512 size. Perhaps the MODE definition file you have is for the wrong size? (I never really liked these MODE definition files, they seemed like an interesting idea at the time, but ultimately resulted in more complexity and less user friendly-ness)... I created 'AnyMode' to get around these issues on the raspberry pi, but I suspect AnyMode won't work on the ARMX6...

Most (all?) BBC emulators under RISC OS use the RISC OS provided software version of MODE 7, rather than their own implementation, so the other possibility is this is a bug in RISC OS, or maybe MODE 7 isn't available in the ARMX6 build of RISC OS?

Probably a question best answered over at the ROOL forums?

MatthewThompson
Posts: 1235
Joined: Tue Apr 22, 2008 3:44 pm
Location: Oxford
Contact:

Re: MODE 7 on RISC OS BBC Emulator 6502em

Post by MatthewThompson » Wed Jan 24, 2018 7:01 pm

jms2 wrote:This doesn't look like an MDF issue to me. It looks instead like the underlying version of Risc OS doesn't provide mode 7.

Pretty sure RISC OS 5 doesn't as I had to add the MDFs to the Iyonix, but it worked perfectly when I did.

Try doing *basic then MODE7 from Risc OS. Can you get Teletext colours to work?
Yes I get different colours each time I type COLOUR 1 , COLOUR 2 etc.

User avatar
danielj
Posts: 6182
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: MODE 7 on RISC OS BBC Emulator 6502em

Post by danielj » Wed Jan 24, 2018 7:16 pm

That shouldn't work in MODE 7 - you need to use the colour characters :-?

MatthewThompson
Posts: 1235
Joined: Tue Apr 22, 2008 3:44 pm
Location: Oxford
Contact:

Re: MODE 7 on RISC OS BBC Emulator 6502em

Post by MatthewThompson » Wed Jan 24, 2018 7:21 pm

steve3000 wrote:As above, it looks like the software MODE7 emulation hasn't kicked in.

What dimensions is MODE 7 in the mdf that you have? There must have been changes to the MODE 7 emulation at some point in the development of RISC OS 5, because it changed from low resolution 320x256 frame size to higher resolution 640x512 size. Perhaps the MODE definition file you have is for the wrong size? (I never really liked these MODE definition files, they seemed like an interesting idea at the time, but ultimately resulted in more complexity and less user friendly-ness)... I created 'AnyMode' to get around these issues on the raspberry pi, but I suspect AnyMode won't work on the ARMX6...

See the attached textilfe, these are the ones I added to the MDF on my Iyonix to get MODE 7 working, which it did.

I don't know to be honest. It might, might not.

Most (all?) BBC emulators under RISC OS use the RISC OS provided software version of MODE 7, rather than their own implementation, so the other possibility is this is a bug in RISC OS, or maybe MODE 7 isn't available in the ARMX6 build of RISC OS?

It is possible I guess.

Probably a question best answered over at the ROOL forums?
OK thanks, I will put the question out over there.

Thanks for everyones input

Matthew
Attachments
Mode7.txt
(650 Bytes) Downloaded 17 times

MatthewThompson
Posts: 1235
Joined: Tue Apr 22, 2008 3:44 pm
Location: Oxford
Contact:

Re: MODE 7 on RISC OS BBC Emulator 6502em

Post by MatthewThompson » Wed Jan 24, 2018 7:23 pm

danielj wrote:That shouldn't work in MODE 7 - you need to use the colour characters :-?
Funnily enough in !6502em typing the same thing in MODE 7 doesn't generate any colours at all.

User avatar
jms2
Posts: 1970
Joined: Mon Jan 08, 2007 6:38 am
Location: Derby, UK
Contact:

Re: MODE 7 on RISC OS BBC Emulator 6502em

Post by jms2 » Wed Jan 24, 2018 7:41 pm

That probably suggests that !6502Em is working properly. I'm not sure what happens on a real Beeb if you issue COLOUR commands in Mode 7, either it issues the VDU sequence but nothing happens, or it suppresses the VDU sequence because it's in Mode 7. Either way, as danielj says, COLOUR should not work. It sounds as if 6502em is taking the latter path.

I think I've tried mode 7 on my Raspberry Pi, running whatever version of Risc OS you get on there. I recall that it did not work.

steve3000
Posts: 1838
Joined: Sun Nov 25, 2012 12:43 am
Contact:

Re: MODE 7 on RISC OS BBC Emulator 6502em

Post by steve3000 » Wed Jan 24, 2018 9:00 pm

jms2 wrote:I think I've tried mode 7 on my Raspberry Pi, running whatever version of Risc OS you get on there. I recall that it did not work.
It works very well on the Pi, *if* you load AnyMode :)

steve3000
Posts: 1838
Joined: Sun Nov 25, 2012 12:43 am
Contact:

Re: MODE 7 on RISC OS BBC Emulator 6502em

Post by steve3000 » Wed Jan 24, 2018 9:17 pm

MatthewThompson wrote:OK thanks, I will put the question out over there.
As you've posted up the mdf, I've taken a look and I'm sure that should work....unless of course the latest RISC OS build for ARMX6 is filtering or further restricting available modes despite being in the mdf (possibly based on EDID data from the monitor... if RISC OS can now read this data?)?

Easy test, can you enter the 640x512 mode under RISC OS desktop? It should display the desktop ok at the square 640x512 resolution. If not, then it sounds like some restriction may being placed on that mode...

joachim
Posts: 134
Joined: Wed Jun 21, 2006 1:20 am
Contact:

Re: MODE 7 on RISC OS BBC Emulator 6502em

Post by joachim » Wed Jan 24, 2018 9:52 pm

jms2 wrote:That probably suggests that !6502Em is working properly. I'm not sure what happens on a real Beeb if you issue COLOUR commands in Mode 7, either it issues the VDU sequence but nothing happens, or it suppresses the VDU sequence because it's in Mode 7.
It issues the VDU sequence with (usually) no noticeable effect. You can test this with a program such as:

Code: Select all

10MODE 7:VDU 23,224
20COLOUR 1:COLOUR 2:COLOUR 3:COLOUR 4
30MODE 4:VDU 224
which defines a character with the row bitmaps 17, 1, 17, 2, 17, 3, 17, 4.

User avatar
jgharston
Posts: 3059
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield
Contact:

Re: MODE 7 on RISC OS BBC Emulator 6502em

Post by jgharston » Wed Jan 24, 2018 10:59 pm

And to get colours in Teletext mode you need to use Teletext colours, viz CHR$(128+n).

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

Phlamethrower
Posts: 40
Joined: Fri Nov 24, 2017 1:35 pm
Contact:

Re: MODE 7 on RISC OS BBC Emulator 6502em

Post by Phlamethrower » Thu Jan 25, 2018 2:08 pm

I think this is an OS bug with the ARMX6 - I'll look into it tonight.

Traditionally teletext has been 320x250 (with an 8x10 font), but for RISC OS 5 a "high-res" option was added which uses a 640x500 mode (16x20 font). An option was also added for the high-res version to use a 256 colour mode instead of a 16 colour mode (while still exposing the same logical palette), to cope with hardware which doesn't support low-colour modes, like the Iyonix. Both of these are compile-time options, so you're stuck with whatever option your OS was built for, and as RISC OS 5 spread out onto more platforms there hasn't really been any consistency in terms of what options have been used where (e.g. the ARMX6 looks like it's configured for 320x250 in 16 colour, which the hardware most certainly can't support).

More recently (December 2016) I added support for the ability for teletext to be used in arbitrary modes, similar to the feature offered by RISC OS Select: http://riscos.com/support/developers/ri ... html#l0062. However there are still some restrictions, e.g. the font size is still fixed at the build-time option, and if it's using the low-res font then only 16 colour modes are supported (unlike the high-res version which will now support any mode with >= 16 physical colours).

Although supporting teletext in arbitrary modes is useful to perhaps a couple of people, the impetus behind the change was to find a way for mode 7 to work on systems where EDID is in use (since you're highly unlikely to find a monitor that advertises support for 320x250 or 640x500). So now if you select mode 7, and the "native" resolution isn't available, the kernel will work its way through a list of fallback resolutions until it finds one which works (for high-res teletext this will be 720x576, 800x600, and 1280x720, which should cover 99% of displays). Of course this change also benefits MDF users, since not all MDFs contain the appropriate native mode 7 definition either.

Phlamethrower
Posts: 40
Joined: Fri Nov 24, 2017 1:35 pm
Contact:

Re: MODE 7 on RISC OS BBC Emulator 6502em

Post by Phlamethrower » Fri Jan 26, 2018 11:43 am

Phlamethrower wrote:(e.g. the ARMX6 looks like it's configured for 320x250 in 16 colour, which the hardware most certainly can't support)
I didn't actually test with 6502em, but that was the problem preventing regular mode 7 from working.

My changes didn't quite make it in in time for the nightly builds, but I've now simplified things so that all platforms will use the high-res teletext.

MatthewThompson
Posts: 1235
Joined: Tue Apr 22, 2008 3:44 pm
Location: Oxford
Contact:

Re: MODE 7 on RISC OS BBC Emulator 6502em

Post by MatthewThompson » Fri Jan 26, 2018 7:58 pm

steve3000 wrote:
MatthewThompson wrote:OK thanks, I will put the question out over there.
As you've posted up the mdf, I've taken a look and I'm sure that should work....unless of course the latest RISC OS build for ARMX6 is filtering or further restricting available modes despite being in the mdf (possibly based on EDID data from the monitor... if RISC OS can now read this data?)?

Easy test, can you enter the 640x512 mode under RISC OS desktop? It should display the desktop ok at the square 640x512 resolution. If not, then it sounds like some restriction may being placed on that mode...
Just tried this and the monitor says 'out of range' so it cannot display this resolution in the desktop, interestingly, if I add thse MDFs for MODE 7 to my MDF it then upsets !BeebIT and when you try to run it the monitor then says 'out of range' but if I remove them it works, BeebIT does display MODE 7 exactly as it does on Iyonix/Risc PC , it's not as good as what 6502em does but it's there.

Maybe I just have to accept it won't work, it might just be the montior, rather than the machine, !BeebIT works, so maybe i'll just stick to that, be a shame to have a non working 6502em though.

Thanks for all the assistance with this, I will put it to the ROOL forum in case there is a solution.

cheers
Matthew

MatthewThompson
Posts: 1235
Joined: Tue Apr 22, 2008 3:44 pm
Location: Oxford
Contact:

Re: MODE 7 on RISC OS BBC Emulator 6502em

Post by MatthewThompson » Fri Feb 23, 2018 8:31 pm

Just an update (and conclusion) to this , there has now been an update to RISC OS 5 (ARMX6) and MODE 7 on !6502em now works absolutely perfectly now .


Problem solved !

cheers
Matthew

Post Reply