The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Troubles with your machine? Just want to speak about the latest improvements? This is the place!

Moderators: Mug UK, Zorro 2, spiny, Greenious, Moderator Team

czietz
Hardware Guru
Hardware Guru
Posts: 783
Joined: Tue May 24, 2016 6:47 pm

The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Postby czietz » Tue Jul 31, 2018 6:08 pm

I guess I found something interesting:

You can switch an ST to a "hidden" video mode where you get 400 lines in color instead of the usual 200 lines. Differing from previous attempts of achieving new resolutions, this neither needs hardware modifications, nor is there any sort of interleaving involved. The new mode has a vertical refresh rate of 71-72 Hz (like the monochrome mode) and will thus display on mostly any VGA monitor; you just need a regular ST-RGB->VGA cable.

Now, I'm no graphics artist to introduce this mode with a beautiful picture, but you'll find my test picture at https://www.chzsoft.de/storage/400-lines-in-color.jpg. If you look closely, you can see that each block consists of 16 lines (either 8 red and 8 green or 8 blue and 8 yellow). There are 25 blocks. If you do the math, you can easily see that I indeed have managed to display 400 lines:

Image

PS: The horizontal resolution gets halved, though. Thus, you can have 320x400 with 4 colors or 160x400 with 16 colors.

User avatar
Frank B
Atari Super Hero
Atari Super Hero
Posts: 975
Joined: Wed Jan 04, 2006 1:28 am
Location: Boston

Re: The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Postby Frank B » Tue Jul 31, 2018 6:34 pm

Certainly is. Do you have more details?

User avatar
shoggoth
Nature
Nature
Posts: 952
Joined: Tue Aug 01, 2006 9:21 am
Location: Halmstad, Sweden
Contact:

Re: The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Postby shoggoth » Tue Jul 31, 2018 6:35 pm

This is pretty cool. How do you enable these modes?
Ain't no space like PeP-space.

User avatar
troed
Atari God
Atari God
Posts: 1436
Joined: Mon Apr 30, 2012 6:20 pm
Location: Sweden

Re: The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Postby troed » Tue Jul 31, 2018 6:36 pm

This is fantastic. I've spent a lot of hours trying to achieve something like this. How are you running GLUE in one mode (high) and Shifter in another (color)?

User avatar
mrbombermillzy
Captain Atari
Captain Atari
Posts: 152
Joined: Tue Sep 13, 2016 9:24 am

Re: The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Postby mrbombermillzy » Tue Jul 31, 2018 6:45 pm

Wow. If this is running at 71/2Hz, theres possibly an option for some temporal colour mixing too. Please, tell us more!

ijor
Hardware Guru
Hardware Guru
Posts: 3627
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Postby ijor » Tue Jul 31, 2018 6:53 pm

troed wrote:This is fantastic. I've spent a lot of hours trying to achieve something like this. How are you running GLUE in one mode (high) and Shifter in another (color)?


As many brilliant ideas, it is almost obvious and trivial once you have been told. I have been told already, but I'll let Chrisitian reveal the secret :)

Btw, more than for actual display, I thought it could be useful for extra overscan/scroll switches that otherwise put SHIFTER in an unstable mode.

dsp56001
Retro freak
Retro freak
Posts: 15
Joined: Tue Dec 25, 2007 12:31 am
Location: Between The GST-MCU and The Blitter ....

Re: The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Postby dsp56001 » Tue Jul 31, 2018 7:04 pm

Maybe a bset.b #1,$ffff8260.w could help ?

czietz
Hardware Guru
Hardware Guru
Posts: 783
Joined: Tue May 24, 2016 6:47 pm

Re: The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Postby czietz » Tue Jul 31, 2018 7:19 pm

troed wrote:This is fantastic. I've spent a lot of hours trying to achieve something like this. How are you running GLUE in one mode (high) and Shifter in another (color)?


I can indeed have Glue and Shifter in permanent disagreement about what the video mode is. The key to this is that Shifter doesn't have a any notion about /UDS and /LDS. If I byte-write to $FF8261, the 68000 CPU will helpfully but the byte on both D15-D8 and D7-D0 and Shifter will update its mode register. Glue however will notice that I didn't access $FF8260 and will not update its copy of the mode register.

So, all my program does is...

Code: Select all

MOVE.B #2, $FF8260      ' Switch both GLUE and Shifter to mono
MOVE.B #0, $FF8261      ' Switch Shifer back to low-res


As ijor mentioned, this is so trivial I couldn't believe someone hasn't found this before.

The only drawback is that you have to keep TOS from detecting that no monochrome monitor is connected and subsequently resetting the computer. For my test, I chose the somewhat brute-force method of redirecting the VBL/VSYNC interrupt which is where TOS does this check.

It also works the other way around, you can have Glue with color timing but Shifter outputting monochrome pixels. That would get you a resolution of 1280x200 monochrome in either 50 or 60 Hz. However it'll probably hard to find a suitable monitor for that.

I have successfully tested this on both my STF (Ricoh and IMP chipset). Right now, it doesn't work properly on my STE, even though I think it should. Maybe I have to time these writes differently on the STE?

User avatar
npomarede
Atari God
Atari God
Posts: 1260
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Postby npomarede » Tue Jul 31, 2018 7:48 pm

This is great !
Guess I will have to add this to Hatari, but this will require a few changes as video conversion routines don't expect this mix :)

User avatar
Cyprian
Atari God
Atari God
Posts: 1518
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Postby Cyprian » Tue Jul 31, 2018 8:07 pm

czietz wrote:
troed wrote:This is fantastic. I've spent a lot of hours trying to achieve something like this. How are you running GLUE in one mode (high) and Shifter in another (color)?


I can indeed have Glue and Shifter in permanent disagreement about what the video mode is. The key to this is that Shifter doesn't have a any notion about /UDS and /LDS. If I byte-write to $FF8261, the 68000 CPU will helpfully but the byte on both D15-D8 and D7-D0 and Shifter will update its mode register. Glue however will notice that I didn't access $FF8260 and will not update its copy of the mode register.

So, all my program does is...

Code: Select all

MOVE.B #2, $FF8260      ' Switch both GLUE and Shifter to mono
MOVE.B #0, $FF8261      ' Switch Shifer back to low-res


nice finding


czietz wrote:It also works the other way around, you can have Glue with color timing but Shifter outputting monochrome pixels. That would get you a resolution of 1280x200 monochrome in either 50 or 60 Hz. However it'll probably hard to find a suitable monitor for that.

lets add interlace and we could have GEM in 1280x400

go further
in additional lets open bottom border :)
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Steem SSE / Aranym / Saint
http://260ste.appspot.com/

Moulinaie
Captain Atari
Captain Atari
Posts: 203
Joined: Wed Feb 01, 2012 9:34 pm

Re: The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Postby Moulinaie » Tue Jul 31, 2018 8:13 pm

czietz wrote:
I have successfully tested this on both my STF (Ricoh and IMP chipset). Right now, it doesn't work properly on my STE, even though I think it should. Maybe I have to time these writes differently on the STE?


Nice if you find the tip for the STE.

Do you think that something equivalent works with the TT ?

Guillaume.

User avatar
troed
Atari God
Atari God
Posts: 1436
Joined: Mon Apr 30, 2012 6:20 pm
Location: Sweden

Re: The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Postby troed » Tue Jul 31, 2018 8:23 pm

czietz wrote:The only drawback is that you have to keep TOS from detecting that no monochrome monitor is connected and subsequently resetting the computer. For my test, I chose the somewhat brute-force method of redirecting the VBL/VSYNC interrupt which is where TOS does this check.


That vector is $46E - just point it to an RTS.

I agree it's quite obvious once you explained it - and now I predict a lot of interesting new demo effects to come from this! :D As long as GLUE is in color then monitors will accept the signal, and the Shifter manically outputting lots of pixels will just make for some really nice dithering one bitplane possibilities.

User avatar
troed
Atari God
Atari God
Posts: 1436
Joined: Mon Apr 30, 2012 6:20 pm
Location: Sweden

Re: The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Postby troed » Tue Jul 31, 2018 8:25 pm

ijor wrote:Btw, more than for actual display, I thought it could be useful for extra overscan/scroll switches that otherwise put SHIFTER in an unstable mode.


Doing hi/lo GLUE tricks without the Shifter picking up on them. Would've been nice if the byte trick was the other way around, but I agree it's worth looking into in more detail :)

User avatar
ube
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 101
Joined: Mon Jun 10, 2002 10:37 pm
Contact:

Re: The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Postby ube » Tue Jul 31, 2018 8:47 pm

Great! Now I have to update the firmware in the ubeswitch to take this mode into account.
Atari STE w/ MicroCosmosex | Atari Falcon w/ Skunk| ubeswitch mk1 | ubeswitch mk2 | ubeswitch mk4 | ubeswitch mk5 | ubeswitch mk6 | ubeswitch mk6 v1.1b

User avatar
Smonson
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 125
Joined: Sat Feb 20, 2016 9:45 am
Location: Canberra
Contact:

Re: The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Postby Smonson » Tue Jul 31, 2018 9:03 pm

Hmm, there's a very interesting side-effect of this.

On an ST boosted to 16MHz which has a custom shifter, as in the case of my HDMI mod, it means you could do a 320x200x256 video mode relatively easily.

User avatar
Smonson
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 125
Joined: Sat Feb 20, 2016 9:45 am
Location: Canberra
Contact:

Re: The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Postby Smonson » Tue Jul 31, 2018 9:07 pm

I think I spoke too soon... I just realised the colour depth is only 2 bits in this mode and not 4.

tin
Atari maniac
Atari maniac
Posts: 99
Joined: Mon Jul 23, 2012 7:59 am
Contact:

Re: The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Postby tin » Tue Jul 31, 2018 9:40 pm

Great findings! I’m also having a very keen interrest seeing this discoveries impact on sync switches.

User avatar
dhedberg
Atari Super Hero
Atari Super Hero
Posts: 832
Joined: Mon Aug 30, 2010 8:36 am
Contact:

Re: The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Postby dhedberg » Tue Jul 31, 2018 10:53 pm

Very neat trick indeed! Looking forward to some new demos utilizing this on the ST as well!
Daniel, New Beat - http://newbeat.atari.org. Like demos? Have a look at our new Falcon030 demo MORE.

User avatar
BenOVR
Atariator
Atariator
Posts: 26
Joined: Wed Nov 02, 2016 7:54 pm
Contact:

Re: The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Postby BenOVR » Tue Jul 31, 2018 11:31 pm

Awesome

evil
Captain Atari
Captain Atari
Posts: 165
Joined: Sun Nov 12, 2006 8:03 pm

Re: The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Postby evil » Tue Jul 31, 2018 11:42 pm

Nice research czietz!

The good news is that it works on my STfm:
http://ae.dhs.nu/pics/160x400.jpg

The bad news is that it doesn't work on STe (two tested). The output is black. Even if the mainloop goes haywire and add.w $0123,$ffff8240.w in a loop there is nothing on screen. The OSSC reports 35.8 kHz / 71.47 Hz refresh rates.

Perhaps I'm doing something wrong here, but as it works on the ST, it seems not.

Test source (and binary with cute cat):
http://files.dhs.nu/files_util/160x400.zip

User avatar
alien
Atari maniac
Atari maniac
Posts: 95
Joined: Sat May 01, 2004 4:01 am
Location: USA
Contact:

Re: The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Postby alien » Wed Aug 01, 2018 12:58 am

Random crazy thought: if one had a monitor which supported a 30Hz refresh rate... one could perhaps do this switch at some point when the screen in low/midrez ends, delay vsync and get a 16 colour 500 and some line screen. Good for displaying static pictures... 8)

The fact one would only turn off output to the colour pins for a few cycles should possibly make the resolution switch easier to hide.
Alien / ST-Connexion

czietz
Hardware Guru
Hardware Guru
Posts: 783
Joined: Tue May 24, 2016 6:47 pm

Re: The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Postby czietz » Wed Aug 01, 2018 5:22 am

evil wrote:The bad news is that it doesn't work on STe (two tested). The output is black. Even if the mainloop goes haywire and add.w $0123,$ffff8240.w in a loop there is nothing on screen. The OSSC reports 35.8 kHz / 71.47 Hz refresh rates.


Yes, this is what I observe on my STE as well. Coming from mono mode, when I write 0 to $FF8261, the Shifter switches off its mono output but it doesn't output anything on its RGB outputs, either. I've made it work the other way around, though: Coming from color mode, when I write 2 to $FF8261, the Shifter will start outputting on its mono output while the timing (generated by GSTMCU) stays at 50/60 Hz.
So, the question is: are there any prerequisites (timing?) to switch the STE Shifter into color mode?

BlankVector
Captain Atari
Captain Atari
Posts: 461
Joined: Wed Oct 24, 2007 7:52 pm
Location: France
Contact:

Re: The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Postby BlankVector » Wed Aug 01, 2018 1:05 pm

czietz, you are a genius 8)
It is incredible that no one has found that for 33 years...
This opens the door to a whole new generation of demo effects. I'm sure amazing new prods will appear shortly.

Am I wrong, or I am the one who recently put you on that way by pointing you to the hidden 334x200 mode on STe :wink:
viewtopic.php?f=1&t=23461
Subscribe to my Vretrocomputing channel on YouTube and Facebook.

evil
Captain Atari
Captain Atari
Posts: 165
Joined: Sun Nov 12, 2006 8:03 pm

Re: The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Postby evil » Wed Aug 01, 2018 1:20 pm

czietz wrote:
evil wrote:The bad news is that it doesn't work on STe (two tested). The output is black. Even if the mainloop goes haywire and add.w $0123,$ffff8240.w in a loop there is nothing on screen. The OSSC reports 35.8 kHz / 71.47 Hz refresh rates.


Yes, this is what I observe on my STE as well. Coming from mono mode, when I write 0 to $FF8261, the Shifter switches off its mono output but it doesn't output anything on its RGB outputs, either. I've made it work the other way around, though: Coming from color mode, when I write 2 to $FF8261, the Shifter will start outputting on its mono output while the timing (generated by GSTMCU) stays at 50/60 Hz.
So, the question is: are there any prerequisites (timing?) to switch the STE Shifter into color mode?


More observations on STe:

1. Booting in colour mode, set 60=2, 61=0: No image, no background colour
2. Booting in colour mode, set 60=2 (don't set 61): No image, no background colour
3. Booting in mono mode, set 60=2, 61=0: No image, no background colour
4. Booting in mono mode, set 60=2 (don't set 61): Monochrome image

The STe have a VGA-adapter that can be switched between colour and mono then sent to OSSC on to a HDMI-screen. The OSSC nicely display the ST output frequencies and that matches what can be expected.

The unexpected thing is that test 3 does seem to switch over to colour, I would have expected it to display a monochrome image.

czietz
Hardware Guru
Hardware Guru
Posts: 783
Joined: Tue May 24, 2016 6:47 pm

Re: The SECRET VIDEO MODE in an ST: 400 lines in COLOR (and with 72 Hz)!

Postby czietz » Wed Aug 01, 2018 3:09 pm

BlankVector wrote:Am I wrong, or I am the one who recently put you on that way by pointing you to the hidden 334x200 mode on STe :wink:
http://www.atari-forum.com/viewtopic.php?f=1&t=23461


You're right. :) After reading Steven Seagal's explanation of that 334x200 resolution, I confirmed what he wrote by looking at the GSTMCU's internal schematic that I have. Then I thought: What other registers might be affected by this? And I came up with the mode register.


Social Media

     

Return to “Hardware”

Who is online

Users browsing this forum: No registered users and 9 guests