User avatar
Gernot66

Posted Fri Dec 09, 2022 6:21 am

Something more useful, if anyone likes to use City2IFF at all in OS3.x

As i wrote already City2IFF from the PrintCity add-on appears in wrong colors, not only that it is inversed to OS 1.3 as black they selected register nr. 29 which is out of range in OS 1.3 (2 bitplanes), in OS3.x reg#29 depends on the WB depth you selected, if that is below 6 planes it appears as bright green from on 6 planes (64 colors) it appears as brightest grey which has only little contrast to the white (inversed black).
Until i fixed this using SETCOLOR but the problem is assumed the depth is 5 planes or lower a change of reg#29 will affect the bright green of the basic eight color set. Further it depends on higher depths on the color a backdrop uses a change will affect then this as well and to fix all that you would need to change respecting depth and backdrop if or what and this is simplyfied said turd.

>=64 colors:
006.png
<=32 colors:
004.png
To fix this in a nice manner City2IFF needs a small hack to change register#29 to one of the basic four (or basic eight but i would take only the lower four) and to probably invert the use of reg#1 and reg#2 (b&w). Recently the hack is simple
and it looks like this:
007.png
Principially any of the registers could be used but obviousely the lower four are ideal because they will stay no matter what depth (except for 1 plane).
Means what i set to accent color (bright blue) is usually white under OS1.3, grey would suit as well - a matter of choice, black and white are recently still inverted because i changed reg#29 simply to reg#01 black.

But i'm up to write a patch script which can be applied using "Patch" (writes any data directly to any adress), the advantage of the script is that it is up to you with what you like to replace reg#29 and the rest of colors of the requester.
Just enter your choice to the defaults in the script.
BUT the script isn't ready yet and it doesn't looks as it will be before start of next week.
However you can see already what it will affect.

What the exact idea was to take reg#29 isn't to clear to me, probably because it is out of range (if WB planes are 2 which is given standard for OS1.3) and if you change the color palette the black of the filerequester will stay black
- in OS1.3. However this is the reason for the wrong appearance.

By default the requesters background would equal to the text color (as you can see) but i will give the opportunity to change the requester background to grey or bright blue (or any reg#).

----

And no don't ask me (or do it nonetheless if you like) to hack other proggies which appear near to unreadable in OS3 because the least are such easy to hack as this one. It was that easy because 0x001D (or 0x1D) is rare up to exclusive in City2IFF and it mustn't be the case that the color register use is that simple (and not taken from an own table as i would) and easy to identify. In this case it was very easy and every element of the requester has the color use set seperate (even the bracketet (dir) has an own register use even if that is text as well as well as each text line has an own use).

User avatar
Gernot66

Posted Fri Dec 09, 2022 7:19 am

Something a little else before i go on with the OS1.3 stuff, do with this info what you like:
Program: Icon deluxe
0x089A=0000
Whatever that means ;)
(icon deluxe was published full by the author of it (without save delay) in 1998 i guess, i found the old entry but the link is dead)

User avatar
Gernot66

Posted Thu Dec 15, 2022 6:46 pm

008.png
Not bad and the script to patch the file is ready as well, it allows you to alter the appearance of the requester in a limited manner. You can choose to select a different background or slider color as for text and text background the rest the script decides which color is to alter when respectively is given by the default vaues in the script chnging them changes the appearance.
It is recommended to use only the lowest four color registers since any else will most probably change with the workbench depth whci is the issue with this program in OS3.x

The script uses the program PATCH and the OS3.x requesters

Code: Select all

.KEY PATH,COLOR1,COLOR2,COLOR3,REQFG,SLIDER
.DEF COLOR1 01
.DEF COLOR2 02
.DEF COLOR3 00
.DEF REQFG 01
.DEF SLIDER 00
. -----------------------------------------------------------------------------
. $VERPATCHCity2IFF20221211
. 2022 YOURSOFT UNLIMITED
. -----------------------------------------------------------------------------
. DISCLAIMER: use this script and the PATCH program at own risk
.
. City2IFF patch, patches calls for color register 29 which appears in OS3.x
. in a wrong color which changes depending on WB depth, if WB depth greater
. equal 5 (32 colors) it is the brightest grey which has nearly no contrast
. to white.
. change COLOR1 - COLOR3 defaults to change the appearance to your choice
. preferably use the four basic WB colors or eight including reg. 4 - reg. 7
. higher values will most probably change depending on a WB backdrop.
. COLOR1 = text background
. COLOR2 = text
. COLOR3 = requester background
. usually COLOR3 equals to COLOR2 (OS1.3 black requester & black text)
. NOTE: enter register# in hexadecimal as 8bit word (two digits)
. starting with 0x00 = grey, WB background (01 black, 02 white, 03 accent)
. NOTE: PATCH starts with 0x01 instead 0x00
.
. -----------------------------------------------------------------------------
. filrerequester
. -----------------------------------------------------------------------------
CD >ENV:C2IP
IF "<PATH>" EQ ""
  SET PATH `REQUESTFILE DRAWER $C2IP PATTERN City2IFF TITLE "City2IFF Patch" NOICONS`
  IF $PATH EQ "$C2IP"
    SET C2I "Operation cancelled"
    SKIP #EXIT#
  ENDIF
  IF $PATH EQ ""
    SET C2I "Operation cancelled"
    SKIP #EXIT#
  ENDIF
ELSE
  SET PATH "*"<PATH>*""
ENDIF
.
. -----------------------------------------------------------------------------
. patch
. -----------------------------------------------------------------------------
D:PATCH $PATH h294A -h <COLOR3> ;requester background
D:PATCH $PATH h29AA -h <COLOR2> ;requester field (partially)
D:PATCH $PATH h2A02 -h <COLOR2> ;requester field (general)
D:PATCH $PATH h37C9 -h <COLOR1> ;filelist entry 1
D:PATCH $PATH h37CA -h <COLOR2> ;filelist entry 1
D:PATCH $PATH h37DD -h <COLOR1> ;filelist entry 2
D:PATCH $PATH h37DE -h <COLOR2> ;filelist entry 2
D:PATCH $PATH h37F1 -h <COLOR1> ;filelist entry 3
D:PATCH $PATH h37F2 -h <COLOR2> ;filelist entry 3
D:PATCH $PATH h3805 -h <COLOR1> ;filelist entry 4
D:PATCH $PATH h3806 -h <COLOR2> ;filelist entry 4
D:PATCH $PATH h3819 -h <COLOR1> ;filelist entry 5
D:PATCH $PATH h381A -h <COLOR2> ;filelist entry 5
D:PATCH $PATH h382D -h <COLOR1> ;volumes entry 1
D:PATCH $PATH h382E -h <COLOR2> ;volumes entry 1
D:PATCH $PATH h3841 -h <COLOR1> ;volumes entry 2
D:PATCH $PATH h3842 -h <COLOR2> ;volumes entry 2
D:PATCH $PATH h3855 -h <COLOR1> ;volumes entry 3
D:PATCH $PATH h3856 -h <COLOR2> ;volumes entry 3
D:PATCH $PATH h46C1 -h <COLOR1> ;text "(dir)"
D:PATCH $PATH h46C2 -h <COLOR2> ;text "(dir)"
D:PATCH $PATH h46D7 -h <COLOR1> ;text colon
D:PATCH $PATH h46D8 -h <COLOR2> ;text colon
D:PATCH $PATH h46ED -h <COLOR2> ;system request
D:PATCH $PATH h46EE -h <COLOR1> ;system request
D:PATCH $PATH h472F -h <COLOR2> ;system request
D:PATCH $PATH h4730 -h <COLOR1> ;system request
D:PATCH $PATH h4771 -h <COLOR2> ;system request
D:PATCH $PATH h4772 -h <COLOR1> ;system request
D:PATCH $PATH h484F -h <COLOR1> ;text "Parent"
D:PATCH $PATH h4850 -h <COLOR2> ;text "Parent"
D:PATCH $PATH h48B9 -h <REQFG>  ;text "file"
D:PATCH $PATH h48BA -h <COLOR2> ;text "file"
D:PATCH $PATH h49AB -h <COLOR2> ;system request
D:PATCH $PATH h49AC -h <COLOR1> ;system request
D:PATCH $PATH h49F3 -h <COLOR1> ;text "Cancel"
D:PATCH $PATH h49F4 -h <COLOR2> ;text "Cancel"
D:PATCH $PATH h4A5F -h <REQFG>  ;text "drawer"
D:PATCH $PATH h4A60 -h <COLOR2> ;text "drawer"
D:PATCH $PATH h4AFD -h <COLOR1> ;text "OK"
D:PATCH $PATH h4AFE -h <COLOR2> ;text "OK"
D:PATCH $PATH h4B45 -h <REQFG>  ;text "Volumes"
D:PATCH $PATH h4B46 -h <COLOR3> ;text "Volumes"
D:PATCH $PATH h4B89 -h <COLOR2> ;slider
D:PATCH $PATH h4B8A -h <SLIDER> ;slider
D:PATCH $PATH h4C23 -h <COLOR2> ;system request
D:PATCH $PATH h4C24 -h <COLOR1> ;system request
D:PATCH $PATH h4C3B -h <COLOR2> ;system request
D:PATCH $PATH h4C3C -h <COLOR1> ;system request
D:PATCH $PATH h4505 -s City2IFF[h]
SET C2I "All done" 
.
. -----------------------------------------------------------------------------
LAB #EXIT#
REQUESTCHOICE >NIL: "Patch City2IFF" "$C2I*N*NPatch City2IFF*N2022 YourSoft Unlimited*N*NCity to IFF ©1989 Maxis Software Toys" "  OK  "
DELETE >NIL: ENV:C2IP

The script is as i guess self explaining, i included to it a short FileRequester routine for the OS3 FileRequester, it does two little things, it checks if the returned string equals to the scripts home directory if that is the case it is assumed OK was pressed without selection, then it checks if the returned variable equals to NIL and if that is true CANCEL was selected.
For this use it exits the script but otherwise you might like to skip back to start if OK was pressed without selection while to exit if CANCEL.

The script (and its icon) is mentioned to be placed and run from the "PrintCity" directory though that when executed the requester will already point on the proper (and single) file which turns the filerequester routine to a sheer example, you can't miss the file).

PATCH is meant to be stored in a device named D: which i use to store all CLI programs which aren't OS native (in other terms a tohou-wabohou of files but therefore C: is neat and clean)





Return to “Software”