I learned another interesting fact which has probably been altering my conclusions a bit.
Under emulation in Hatari, the virtual shifter in RGB mode can be set to 0, 1, or 2 (and if it's 2, the screen is disabled so you can't see what's going on) but when it's set to use a mono monitor, it's read-only and set to 2 permanently, ignoring all writes.
Similar in Steem, except that in RGB mode the register is also only limited to values 0 and 1. 2 is not possible. Same as Hatari when emulating a monochrome screen: mode 2 only.
It's possible that it might work fine on a real machine, I'll attach the ROM file here in case a volunteer with the HDMI mod would like to test it.
I really want to make some progress on my H4 - especially since I'm isolated in my house to protect my immune-compromised fiancee from catching any random viruses that happen to be floating around - but I shipped all the hardware that I've bought to my work address, and the office has been shuttered until at least the end of the month! :headbang:
Modified TOS to remove resolutions limitation
-
Smonson
- Posts: 717
- Joined: 28 Oct 2017 10:21
- Location: Canberra, Australia
Re: Modified TOS to remove resolutions limitation
You do not have the required permissions to view the files attached to this post.
-
Icky
- Site Admin

- Posts: 4375
- Joined: 03 Sep 2017 10:57
- Location: UK
Re: Modified TOS to remove resolutions limitation
Great work @Smonson it works. Unfortunately I had a wobble on the video (not sure why - need to take a look) but you can see the effect here, all three resolutions without changing a cable.
EDIT: Flashy Clock is very handy to quickly put a TOS image on and boot.
EDIT: Flashy Clock is very handy to quickly put a TOS image on and boot.
-
PhilC
- Moderator

- Posts: 7441
- Joined: 23 Mar 2018 20:22
Re: Modified TOS to remove resolutions limitation
Nice work.
If it ain't broke, test it to Destruction.
-
Smonson
- Posts: 717
- Joined: 28 Oct 2017 10:21
- Location: Canberra, Australia
Re: Modified TOS to remove resolutions limitation
Awesome! :yay2: Thanks heaps for testing it!Icky wrote: 17 Mar 2020 18:57 Great work @Smonson it works. Unfortunately I had a wobble on the video (not sure why - need to take a look) but you can see the effect here, all three resolutions without changing a cable.
I'll go back over it tonight and relay my exact changes as I promised to do earlier.
I don't know what the sync wobble is but it's probably my fault :lol:
-
exxos
- Site Admin

- Posts: 28350
- Joined: 16 Aug 2017 23:19
- Location: UK
Re: Modified TOS to remove resolutions limitation
great stuff!
Wasn't the wobble down to that clock issue from wayyyyy back ? I'm not at home for a couple of days so can't test mine out :(
Wasn't the wobble down to that clock issue from wayyyyy back ? I'm not at home for a couple of days so can't test mine out :(
-
Smonson
- Posts: 717
- Joined: 28 Oct 2017 10:21
- Location: Canberra, Australia
Re: Modified TOS to remove resolutions limitation
Thanks Exxos! Yeah, I hope the wobble is just clock noise, at least we have a solution to that :Dexxos wrote: 17 Mar 2020 23:34 great stuff!
Wasn't the wobble down to that clock issue from wayyyyy back ? I'm not at home for a couple of days so can't test mine out :(
-
Smonson
- Posts: 717
- Joined: 28 Oct 2017 10:21
- Location: Canberra, Australia
Re: Modified TOS to remove resolutions limitation
Changes (offsets given are for TOS1.4 UK, MD5 036c5ae4f885cbf62c9bed651c6c58a8):
At 0xfc06e, in the level 4 autovector (VBL handler), bypass the mono monitor check:
At 0xfcb2b6, at the beginning of FindDevice(), redirect to a replacement implementation:
At 0xfd86ba, in desk_pref(), stop disabling the mode buttons:
At 0xfefc00, in place of a bunch of extraneous ffffs, insert the new FindDevice() implementation
At 0xfc06e, in the level 4 autovector (VBL handler), bypass the mono monitor check:
Code: Select all
/* In colour modes: */
btst #7,%d1 /* Check mono detect */
- bnes lvl4_vec_nochange /* No mono monitor --> skip */
+ bras lvl4_vec_nochange /* Always skip */
movew #2000,%d0 /* Delay loop */
lvl4_vec_delay:
dbf %d0,lvl4_vec_delay
moveb #2,%d0 /* Set resolution to mono */
bras lvl4_vec_chmode
addr_0702:
/* In mono: */
btst #7,%d1 /* Check mono detect */
- beqs lvl4_vec_nochange /* Monitor is present */
+ bras lvl4_vec_nochange /* Always skip */
moveb %a5@(defshiftmod),%d0 /* Get default shifter mode */
.short 0xb03c,0x0002 /* cmpb #2,%d0 */
blts lvl4_vec_chmode /* Default shifter mode compatible with colour monitor --> jump over */
Code: Select all
_FindDevice:
- movew #4,%sp@-
- trap #14 /* Getrez() - get current video mode */
+ jmp _FindDevice2
addql #2,%sp
moveb %d0,%d2 /* Save the original resolution value */
.short 0xb43c,0x0002 /* cmpb #2,%d2 - current rez = mono? */
Code: Select all
- movew #8,%a0@ /* HIGH res button .ob_state */
+ movew #0,%a0@ /* HIGH res button .ob_state */
bras addr_186be
addr_186a6:
moveal %d7,%a0
addal #346,%a0
- movew #8,%a0@ /* LOW res button .ob_state */
+ movew #0,%a0@ /* LOW res button .ob_state */
moveal %d7,%a0
addal #370,%a0
- movew #8,%a0@ /* MED res button .ob_state */
+ movew #0,%a0@ /* MED res button .ob_state */
addr_186be:
movew _gl_restype,%d4
subqw #2,%d4
Code: Select all
_FindDevice2:
movew #4,%sp@-
trap #14 /* Getrez() - get current video mode */
addql #2,%sp
moveb %d0,%d2 /* Save the original resolution value */
extw %d2
moveal INTIN,%a0
movew %a0@,%d0 /* Get the requested res from INTIN[0] */
cmpw #1,%d0
bnes fd3_not_1 /* Mode 1 (no change) not requested, continue here */
tstb %d2
beq fd3_low_pal /* Originally low, mode "1" now selected - go here */
cmpb #2,%d2
beq fd3_high_pal /* Originally high, mode "1" now selected - go here */
bra fd3_med_pal /* Originally medium, mode "1" now selected - go here */
fd3_not_1:
tstb %d2
beq fd3_orig_low /* Originally low */
cmpb #2,%d2
beq fd3_orig_high /* Originally high */
fd3_orig_med:
cmpw #4,%d0
beq fd3_goto_high /* 4 = Switch to high res */
cmpw #3,%d0
beq fd3_med_pal /* 3 = Stay in medium */
fd3_goto_low:
clrw %sp@-
moveq #-1,%d0
movel %d0,%sp@-
movel %d0,%sp@-
movew #5,%sp@-
trap #14 /* Setscreen(-1, -1, 0) - change to low res */
lea %sp@(12),%sp
/* Set up 16-colour palette */
fd3_low_pal:
pea paltab16
movew #6,%sp@-
trap #14 /* Setpalette(void *pallptr) */
addql #6,%sp
moveq #1,%d0 /* return 1 */
rts
fd3_orig_low:
cmpw #3,%d0
beqs fd3_goto_med /* 3 = Switch to medium */
cmpw #4,%d0
beqs fd3_goto_high /* 4 = Switch to high */
bra fd3_low_pal /* Stay in low */
fd3_goto_med:
movew #1,%sp@-
moveq #-1,%d0
movel %d0,%sp@-
movel %d0,%sp@-
movew #5,%sp@-
trap #14 /* Setscreen(-1, -1, 1) - change to medium res */
lea %sp@(12),%sp
/* Set up 4-colour palette */
fd3_med_pal:
pea paltab4
movew #6,%sp@-
trap #14 /* Setpalette(void *pallptr) */
addql #6,%sp
moveq #2,%d0 /* return 2 */
rts
fd3_orig_high:
cmpb #3,%d0
beq fd3_goto_med /* 3 = Switch to medium */
cmpb #4,%d0
beq fd3_high_pal /* 4 = Stay in high */
bra fd3_goto_low /* Switch to low */
fd3_goto_high:
movew #2,%sp@-
moveq #-1,%d0
movel %d0,%sp@-
movel %d0,%sp@-
movew #5,%sp@-
trap #14 /* Setscreen(-1, -1, 2) - change to high res */
lea %sp@(12),%sp
fd3_high_pal:
movew #1,palette
moveq #3,%d0 /* return 3 (high) */
rts
-
Icky
- Site Admin

- Posts: 4375
- Joined: 03 Sep 2017 10:57
- Location: UK
Re: Modified TOS to remove resolutions limitation
Not your fault @Smonson. Turns out its the stack sockets I have on the DEV motherboard to help with FPGA GLUE and MMU testing are causing the issue.Smonson wrote: 17 Mar 2020 21:11 I don't know what the sync wobble is but it's probably my fault :lol:
-
troed
- Posts: 936
- Joined: 21 Aug 2017 22:27
Re: Modified TOS to remove resolutions limitation
Amazing stuff! As you all have noticed I've been quite silent for the better part of the last half year* - but coming back to all these developments is pure joy.
I'll get this TOS into my doubleST and get back to playing with that and the HDMI board soonish.
edit: Oh, and of course we should port this mod onto the 2.06 codebase.
/Troed
*) Bought a house. Almost done with the renovation of a (huge) storage room into an awesome (retro) workshop.
I'll get this TOS into my doubleST and get back to playing with that and the HDMI board soonish.
edit: Oh, and of course we should port this mod onto the 2.06 codebase.
/Troed
*) Bought a house. Almost done with the renovation of a (huge) storage room into an awesome (retro) workshop.
-
Smonson
- Posts: 717
- Joined: 28 Oct 2017 10:21
- Location: Canberra, Australia
Re: Modified TOS to remove resolutions limitation
Good to see you Troed!
With the doubleST, I think you rely on an AUTO utility to update the GEM screen parameters, right? You may want to do a further mod and update those in the ROM. I can tell you where they are.
I'm looking forward to seeing the pics of your epic workshop :D
With the doubleST, I think you rely on an AUTO utility to update the GEM screen parameters, right? You may want to do a further mod and update those in the ROM. I can tell you where they are.
I'm looking forward to seeing the pics of your epic workshop :D
Who is online
Users browsing this forum: ClaudeBot, trendiction [bot] and 0 guests