TOS105 ROM

News,announcements,programming,fixes,game patches & discussions.

Moderator: Petari

Petari
Posts: 372
Joined: Tue Nov 28, 2017 1:32 pm

Re: TOS105 ROM

Post by Petari » Mon Jul 02, 2018 1:13 pm

Official explanation of Atari was in those times that it is to prevent monitor/TV damages - 71 Hz vertical and about 30 KHz horizontal refresh rate could damage those old analog deflection circuits, with transformators designed for specific frequency (overvoltage). And that was good thing.
GEM RSCs should to change when want make possible mono-color switch form Desktop - so actually it is Desktop RSC . It is same, just that what is not allowed is grayed out (like my hair :D ) .
Point is not in which video pins to connect, but in that mono sensor pin. Mono out is probably dead in color mode and versus. ST simply will not switch to mono mode if mono sensor is not connected to GND - for what must not have mechanical switch, it can be transistor what will 'connect' .
And we are pretty much off-topic again :D
There is 2 kind of people: one thinking about moving to Mars after here becomes too bad, the others thinking about how to keep this planet habitable.

User avatar
Smonson
Posts: 95
Joined: Sat Oct 28, 2017 10:21 am

Re: TOS105 ROM

Post by Smonson » Mon Jul 02, 2018 1:19 pm

Heh, well, it was an idea 😀

Cyprian
Posts: 15
Joined: Fri Dec 22, 2017 9:16 am

Re: TOS105 ROM

Post by Cyprian » Mon Jul 02, 2018 1:22 pm

unfortunately video modes are hardcoded into GLUE and SHIFTER. Both chips are "watching" the same hardware register $FFFF8260
The logic behind that register is simply.
  • GLUE watches a bit 1:
    • when it is "0" then VBL is 50Hz (or 60Hz) and HBL is 15kHz;
    • when it is "1" then VBL is 72Hz and HBL is 32kHz.
  • SHIFTER watches bits 0 and 1:
    • when they are "01" then pixelock is 16MHz and color mode MID
    • when they are "00" then pixelock is 8MHz and color mode LOW
    • when bit 1 is set then pixelock is 32MHz and color mode HIGH
Maye would be possible to a fake SHIFTER by e.g. puting a GAL/PAL chip between SHIFTER and $FFFF8260.
E.g CPU write value 2 to that register, GLUE set ST-HIGH (VBL: 72Hz and HBL: 32kHz) but PAL chip presents value e.g. "00" to SHIFTER, therefore it produces ST-LOW color signal.

troed
Posts: 224
Joined: Mon Aug 21, 2017 10:27 pm

Re: TOS105 ROM

Post by troed » Mon Jul 02, 2018 1:23 pm

Petari wrote:
Mon Jul 02, 2018 1:13 pm
Point is not in which video pins to connect, but in that mono sensor pin. Mono out is probably dead in color mode and versus. ST simply will not switch to mono mode if mono sensor is not connected to GND - for what must not have mechanical switch, it can be transistor what will 'connect' .
And we are pretty much off-topic again :D
Well it's on the topic of TOS extensions ;)

The ST will happily switch between mono and color from software - you just need to poke $ff8260 (after having disabled TOS RESET on resolution switch, one of the $4xx-addresses, or replace TOS VBL) with what you want. Us demo coders do that all the time :) The output signal does change from mono out pin and RGB output pins, the ubeswitch takes care of understanding that and feeding the screen with whatever signal's active.

The mono sensor pin is simply another way used for resolution switching when physical connectors are used, and as you say, is likely there to make sure the wrong signal didn't destroy a non-compliant monitor.

If the desktop could be made to "follow" a switch between mono/color without having to reset the computer then that would be _awesome_ and a feature most every buyer of an ubeswitch would actively use. My understanding has been that it's quite difficult to achieve though.

Petari
Posts: 372
Joined: Tue Nov 28, 2017 1:32 pm

Re: TOS105 ROM

Post by Petari » Mon Jul 02, 2018 1:34 pm

I can do that change in Desktop RSC + AES/Desktop code + in Vblank. Of course, you can switch color/mono by SW, but that's not enough, as is told by at least 2 people here.
Depends on interest and that someone explain here how that thing (ubeswitch, and possibly others) exactly work . Is there some mechanical switch in them to change color/mono ?
What was off topic here is going deeper in way how video works in STs. Well, that happens often, because need to explain how some things work, and what is really possible.
There is 2 kind of people: one thinking about moving to Mars after here becomes too bad, the others thinking about how to keep this planet habitable.

User avatar
Smonson
Posts: 95
Joined: Sat Oct 28, 2017 10:21 am

Re: TOS105 ROM

Post by Smonson » Mon Jul 02, 2018 2:11 pm

Cyprian wrote:
Mon Jul 02, 2018 1:22 pm
  • GLUE watches a bit 1:
    • when it is "0" then VBL is 50Hz (or 60Hz) and HBL is 15kHz;
    • when it is "1" then VBL is 72Hz and HBL is 32kHz.
  • SHIFTER watches bits 0 and 1:
    • when they are "01" then pixelock is 16MHz and color mode MID
    • when they are "00" then pixelock is 8MHz and color mode LOW
    • when bit 1 is set then pixelock is 32MHz and color mode HIGH
Ah, I assumed $000448 was used for all three video frame formats, rather than being split across that one and the resolution register. That's a pity. I'm assuming it was designed that way because the data transfer format is the the same in modes 0 and 1, while mono mode has a different scanline length. Perhaps that register at $000448 is separate for the MMU's benefit.

troed
Posts: 224
Joined: Mon Aug 21, 2017 10:27 pm

Re: TOS105 ROM

Post by troed » Mon Jul 02, 2018 2:15 pm

Petari wrote:
Mon Jul 02, 2018 1:34 pm
Depends on interest and that someone explain here how that thing (ubeswitch, and possibly others) exactly work . Is there some mechanical switch in them to change color/mono ?
Yes. Ube detects the length of VSYNC (which differs between mono and color) and switches between passing through the RGB pins or the mono output pin.

I have such a switch, it works really well. I can code in Devpac in mono, and when my demo starts it switches over to color (I disable TOS VBL and switch $ff8260) and then back at exit.

I did some work on tricking TOS but it turned out to be very complicated - a lot of VDI variables need to be reinitialized.


Petari
Posts: 372
Joined: Tue Nov 28, 2017 1:32 pm

Re: TOS105 ROM

Post by Petari » Mon Jul 02, 2018 3:09 pm

Smonson wrote:
Mon Jul 02, 2018 2:11 pm
Ah, I assumed $000448 was used for all three video frame formats, rather than being split across that one and the resolution register. That's a pity. I'm assuming it was designed that way because the data transfer format is the the same in modes 0 and 1, while mono mode has a different scanline length. Perhaps that register at $000448 is separate for the MMU's benefit.
Scan frequencies are same in low and high - but not pixel freq. as is said already. Data format is not same too: low - 4 bit planes, medium - 2 bit planes.

Btw. Falcon can work in all 3 ST video modes with all attachable displays: TV/old analog monitors, RGB monitors and VGA monitors. But scan frequencies are not always same as with ST. Mono on TV/RGB is with lower freqs, so not sharp. In VGA mode everything is with 60 Hz refresh rate. Falcon has programmable video chip, so can do lot of it.
There is 2 kind of people: one thinking about moving to Mars after here becomes too bad, the others thinking about how to keep this planet habitable.

User avatar
Marsupilami
Posts: 15
Joined: Tue Apr 03, 2018 5:55 pm
Contact:

Re: TOS105 ROM

Post by Marsupilami » Tue Jul 03, 2018 3:11 pm

@Petari, nice work ! I wish i could use it :)
Do you need help to translate it in french ?
https://atarinside.dyndns.org : Atari 800XL in Europe France/Italy/Benelux/Deutschland/UK White&Silver plastic boxes : Dumps, Videos, Books, reference list / + / as usual high resolution pictures of the Atari 800 XL motherboards.

Petari
Posts: 372
Joined: Tue Nov 28, 2017 1:32 pm

Re: TOS105 ROM

Post by Petari » Tue Jul 03, 2018 3:49 pm

Marsupilami wrote:
Tue Jul 03, 2018 3:11 pm
@Petari, nice work ! I wish i could use it :)
Do you need help to translate it in french ?
There are French v. in my computer - of TOS 1.04, 1.62, 2.06 too . No need to translate. It's just matter of some time to combine all parts properly.
Maybe some tests are where you can help.
There is 2 kind of people: one thinking about moving to Mars after here becomes too bad, the others thinking about how to keep this planet habitable.

Post Reply