Page 74 of 97

Re: ST536 STE EDITION

Posted: 09 Jun 2025 18:50
by exxos
@dml looks like

Code: Select all

if (envr & 0x01)
					s_sort = S_NO;

				s_cache = (envr & 0x02) ? TRUE : FALSE;
				s_stofit = (envr & 0x04) ? TRUE : FALSE;
				s_defdir = (envr & 0x08) ? TRUE : FALSE;
				s_fullpath = (envr & 0x10) ? TRUE : FALSE;
				break;

I think s_cache is being used for the blitter saving / loading.. but need to look into that more..

I guess ill hack bit 5 then :lol:

Capture.PNG

Re: ST536 STE EDITION

Posted: 09 Jun 2025 19:26
by exxos
So what I get in newdesk.inf

Code: Select all

E 18 02 00 04 blitter off, cache off
E 18 12 00 24 blitter on
E 19 12 00 26 blitter on, cache on
E 19 12 00 06 blitter off, cache on

Code: Select all

04 = 00000100: Blitter off, cache off.
24 = 00100100: Blitter on (bit 5 = 0x20), cache off.
26 = 00100110: Blitter on (bit 5 = 0x20), cache on (bit 1 = 0x02).
06 = 00000110: Blitter off, cache on (bit 1 = 0x02).
1.PNG

So it looks to be saving the variables now :stars:

I'm just having troubles figuring out how it loads all this back in currently. I think there is a odd bug somewhere because the blitter bit seems to be saved in byte 2 and byte 4 which makes no sense.

Re: ST536 STE EDITION

Posted: 09 Jun 2025 20:09
by exxos
Saving and loading settings now working :D

It seems I misunderstanding something on how some function works because if I call

Code: Select all

ch_blitter(cbit_save);
To:

Code: Select all

 VOID ch_blitter(P(BOOLEAN) set)
PP(BOOLEAN set;)
{
    int32_t data;
    int16_t temp;
    /* Handle BitBlt */

    if ((temp = Blitmode(-1)) & 0x2) /* Check if Blitter is present */
    {

            Blitmode(cbit_save ? 1 : 0);

        /* Update BITBLT menu item */
        menu_addr[BITBLT].ob_state &= ~DISABLED; /* Enable menu item */
        if (cbit_save)
            menu_addr[BITBLT].ob_state |= CHECKED;
        else
            menu_addr[BITBLT].ob_state &= ~CHECKED;
    } else {
        /* Disable BITBLT menu item if Blitter not present */
        menu_addr[BITBLT].ob_state |= DISABLED;
    }

}
Id assume SET gets the variable passed with ch_blitter(cbit_save) but it seems not.. So I avoided using SET and just "hardwired" cbit_save into the function and it seems to all work now!

I see my confusion before , blitter is saved in byte 1 and cache in byte 4. So I need to get rid of my bit 5 thing really now and it *should* more more compatible with original 206 newdesk.inf then...... Actually nope, oddly cdele_save is used in the first byte and overlaps with the blitter flags.. im just going to keep them seperate cos it doesn't make sense to me. Seems like 2 variables are using the same bit in the first byte somehow :shrug:

So should I now call it EXXOSDESK.INF ?! :lol: :hide:

Re: ST536 STE EDITION

Posted: 09 Jun 2025 20:39
by Cyprian
exxos wrote: 09 Jun 2025 17:44 Image
I like this mod
exxos wrote: 09 Jun 2025 19:26 So what I get in newdesk.inf
there you can find more about NEWDESK.INF
http://cd.textfiles.com/atarilibrary/at ... BOOK/N.TXT

Code: Select all

  #E 98 13 00 04 00 FA 00 00 00 00
...
  2              BLiTTER                0 = off
...
  55     
         1       Cache                  0 = off

Re: ST536 STE EDITION

Posted: 10 Jun 2025 09:45
by exxos
Cyprian wrote: 09 Jun 2025 20:39 there you can find more about NEWDESK.INF
http://cd.textfiles.com/atarilibrary/at ... BOOK/N.TXT
Thanks that helps.

Its

Code: Select all

envr |= (cbit_save << 4);
im a bit confused over currently.

Capture.PNG

Grok says its rotating the bits 4 to the left.. but WHY.. when the bit locations are set with like 0x10 everywhere else.. it doesn't make sense..

This would make it consistent with the rest of the code :stars:

Code: Select all

	if (cbit_save )
		envr |= 0x10;
Anyway, ive used the proper bits for cache and blitter on/off in newdesk.inf so should be fully compatible. But bit odd as Atari went to the trouble of splitting cache and blitter in newdesk.inf, but merged them in the desktop menus. It would have just been simplier to keep them seperate and just untick the blitter in the menu if cache was used...

Sorted now. Just need to sort out what to do with the blank line next. Probably leave it in there and maybe add STram cache feature there.

Capture.PNG

Re: ST536 STE EDITION

Posted: 10 Jun 2025 10:24
by dml
exxos wrote: 10 Jun 2025 09:45 Grok says its rotating the bits 4 to the left.. but WHY.. when the bit locations are set with like 0x10 everywhere else.. it doesn't make sense..
It's storing each parameter as a 4-bit nibble, then packing a pair of parameters into each byte.

So if you're using the 5th bit in any parameter, you may lose it (or get mixed up with other parameters) when they get packed together as 4-bit pairs.

Re: ST536 STE EDITION

Posted: 10 Jun 2025 10:26
by exxos
dml wrote: 10 Jun 2025 10:24 It's storing each parameter as a 4-bit nibble, then packing a pair of parameters into each byte.
So if you're using the 5th bit in any parameter, you may lose it (or get mixed up with other parameters) when they get packed together as 4-bit pairs.
Thanks, yeah just seems really weird to do it that way when the rest of the code does something completely different.

Re: ST536 STE EDITION

Posted: 10 Jun 2025 10:50
by exxos
So I think the first problem is blitter needs to be disabled during boot and only enabled when the newdesk.inf is read. This gives BLTFIX chance to load then.

Re: ST536 STE EDITION

Posted: 10 Jun 2025 10:57
by exxos
It poses an interesting conundrum because if newdesk.inf has the blitter enabled, and BLTFIX isn't loading, the desktop will get trashed and lockup.

IMG_3364.JPG

I suppose BLTFIX should be built into TOS at this point.. that be fun... :hide:

I guess short term at least people will just have to have it as the first AUTO folder program otherwise they going to end in a mess.

Re: ST536 STE EDITION

Posted: 10 Jun 2025 11:42
by exxos
It seems my TOSCOPY.PRG while it compiles in DEVPAC, it doesn't compile with the Atari OS for some reason :(

Capture.PNG

EDIT:
I think its the comments causing it, different syntax..

10 down 2 to go :lol: :pullhair: :pullhair: :pullhair:

2.PNG