News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

Color changing of the needle

Started by Ryoma, August 22, 2021, 06:46:18 PM

Previous topic - Next topic

llm

#30
Quote from: Cas on November 02, 2021, 06:19:29 PM
Oh, well, I really don't want to make it harder for Git to do its work!  I think I would be working on my local copy for testing, but then if I like what I have, I'll just redo the thing working in team, so we don't collide. My interest in these patch dependency trees comes from the idea that perhaps somebody would want to apply certain mods, but not certain others, so I was wondering if there was a clean way to exploit Git so that one could get different sources for any combination of mods... things like that.

a branch is:
-a thing you work on for a while - to be able to commit/track your changes even if you throw it complety away after weeks of work or gets completely merged after finishing it - without stressing other developers
(commit on logical finished steps - no need to keep the commit rate low to visual beautiness, its still possible to combine commits when merging a big new feature)

-some sort fork (with super-special features) that can easily update with the master or can bring back fixes etc. to the master - but keep its very own changes local to the branch

there shoudln't be too many or missue of branches for every itsy bitsy feature
better work with /D[DEFINE] and #IFDEF, #ENDIF to enable/disable some "features"

http://bitsavers.informatik.uni-stuttgart.de/pdf/borland/turbo_assembler/Turbo_Assembler_Version_5_Users_Guide.pdf
Page 24 - how to set DEFINE per command line with /d
Page 184 - Using conditional directives
(test that stuff in a small asm to get familiar with)

something like tasm.exe /dNEEDLE_COLOR

and in code

IFDEF NEEDLE_COLOR
... changed code
ELSE
... original code
ENDIF

the Mod is then a build with serveral of that features activated in the make/batch-file

its the same thing with the /DTARGET=original in the makefile, thats is also IFDEF usage

there is really no need to invent a new style of doing it - branching and feature-configuration is so plain boring that you can copy that nearly from
every (multi developers) open source project around

and try keeping that all as automated as possible - use IFDEF, replace manual hex-editor patching with a script etc., build the variants out of the box
i would got that far to use github project and autobuild that stuff with the CI of github on every change - so there are always fresh build binaries around

Daniel3D

O, I can make a parameter for the Ferrari edition.
So I can build the normal modified version or the same for the Ferrari edition with /dFerrari.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

llm

#32
Quote from: Daniel3D on November 03, 2021, 09:24:18 AM
O, I can make a parameter for the Ferrari edition.
So I can build the normal modified version or the same for the Ferrari edition with /dFerrari.

yes, you can - or else the world would have been very hard for developers, the last 30 years :)

and normaly you do also the complete packaging with make or additional scripts - so also copying files, etc. - everything that is needed to get from source + additional changes to the release version without manual interaction

Cas

Ah, of course!  Yes, "defines" would be the best for this. At this time, it's a very tiny change, but if I see it'll become diverse, I'll start placing "flags".

Now I would like to tackle the matter of the independently configurable colours for both needles.
Earth is my country. Science is my religion.

Duplode

Quote from: Daniel3D on November 02, 2021, 07:30:51 AM
As of this mod the game is not original anymore.
This is the first mod that was only possible by rewriting part of the game engine.

So, a bit of a milestone.

It sure is! Great job!  ;)

For extra peace of mind, I have tested the modified RES file with all GTO winning replays from ZakStunts, as well as in a test replay against Skid. All of them played correctly, and I didn't see graphical artefacts or any other weirdness. That is not surprising, of course -- in particular, over the years Cas and I have tried several times to identify what those bytes are supposed to do, and yet never managed to find anything. Still, that's at least some extra evidence in case anyone ever asks about it  :)

Ryoma

...and now I have to modify a lot of my cars.....

Daniel3D

Quote from: Ryoma on November 04, 2021, 03:03:24 AM
...and now I have to modify a lot of my cars.....
You don't have to.
Only if you want to change the colour.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Daniel3D

#37
Quote from: Duplode on November 04, 2021, 02:23:23 AM
Quote from: Daniel3D on November 02, 2021, 07:30:51 AM
As of this mod the game is not original anymore.
This is the first mod that was only possible by rewriting part of the game engine.

So, a bit of a milestone.

It sure is! Great job!  ;)

For extra peace of mind, I have tested the modified RES file with all GTO winning replays from ZakStunts, as well as in a test replay against Skid. All of them played correctly, and I didn't see graphical artefacts or any other weirdness. That is not surprising, of course -- in particular, over the years Cas and I have tried several times to identify what those bytes are supposed to do, and yet never managed to find anything. Still, that's at least some extra evidence in case anyone ever asks about it  :)
I've been thinking about that. It might be a piece of code that is used in a different display graphic setting. So it might give some issues in EGA CGA or Tandy graphics.
The game executable is only for the MCGA version. But the car.res file that has the bit changed is not limited to the MCGA.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Ryoma

Yes I want red for some Ferrari, the musa and the phedra. Black for the Ypsilon. And verify all 5he real dashboard. I will put a list of change here.

llm

#39
Quote from: Daniel3D on November 03, 2021, 09:24:18 AM
O, I can make a parameter for the Ferrari edition.
So I can build the normal modified version or the same for the Ferrari edition with /dFerrari.

sample code

; http://bitsavers.informatik.uni-stuttgart.de/pdf/borland/turbo_assembler/Turbo_Assembler_Version_5_Users_Guide.pdf
; Chapter 15, Using conditional directives

; run tasm32 ifdef.asm
; run tasm32 ifdef.asm /DMY_MOD
; run tasm32 ifdef.asm /DMY_MOD /DMY_VERSION=1
; run tasm32 ifdef.asm /DMY_MOD /DMY_VERSION=3

; intern Symbols

MY_FLAG EQU "hello"
MY_FLAG2 = 1

ifdef MY_FLAG
%OUT MY_FLAG defined
endif

ifdef MY_FLAG2
  if MY_FLAG2 EQ 1
    %OUT MY_FLAG2 == 1
  endif
endif

; extern Symbols

ifdef MY_MOD
  %OUT do the mod code
else
  %OUT no modding code
endif

ifdef MY_VERSION

  if MY_VERSION eq 1
    %OUT its version 1
  elseif MY_VERSION eq 2
    %OUT its version 2
  else
    .ERR "Unkown version"
  endif

else
  %OUT no version given
endif

end


i did not find out how to print the conent of the symbol with %OUT or DISPLAY
something like %OUT the version: <MY_VERSION>

Daniel3D

#40
Quote from: llm on November 04, 2021, 09:24:08 AM
Quote from: Daniel3D on November 03, 2021, 09:24:18 AM
O, I can make a parameter for the Ferrari edition.
So I can build the normal modified version or the same for the Ferrari edition with /dFerrari.

sample code

; http://bitsavers.informatik.uni-stuttgart.de/pdf/borland/turbo_assembler/Turbo_Assembler_Version_5_Users_Guide.pdf
; Chapter 15, Using conditional directives
etc.


i did not find out how to print the conent of the symbol with %OUT or DISPLAY
something like %OUT the version: <MY_VERSION>
That is ok.
I don't think it is possible with %OUT or DISPLAY to show a text with a variable.
(did a search in the documentation myself)
So if i want a message displayed, i will have to write it.
But thanks for the code and the doc.

QuoteTurbo Assembler provides two directives that let you display a string on the console
during assembly: DISPLAY and %OUT. You can use these directives to report on the
progress of an assembly, either to let you know how far the assembly has progressed, or
to let you know that a certain part of the code has been reached.
The two directives are essentially the same except that
DISPLAY displays a quoted string onscreen,
and %OUT displays a nonquoted string onscreen.

In both Ideal and MASM modes,the syntax for DISPLAY is
DISPLAY "text"
Where text is any message you want to display.
The syntax for %OUT in both Ideal and MASM modes is
%OUT text
Where, again, text is the message that you want displayed.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Ryoma

#41
Here the cars list I want to change :
126C3   Yellow
355   green
408   red
512M   red
512tr   red
637   black
641   black
911   red
959   red
962   yellow
a164   yellow
Beta   red
c1      orange
Corvette   orange
CX      orange
delta hf   yellow
delta s4   red
diablo      orange
gto      red
hyena      red
ecv1      red
ecv2      red
mclaren F1   black
Musa      orange
mythos       red
Phedra      orange
Quattro    Orange
Testarossa   red
V16T      orange
Viper      Orange
XM      Orange
Ypsilon      Black

Daniel3D

#42
Quote from: Ryoma on November 04, 2021, 06:06:37 PM
Here the cars list I want to change :
126C3 Yellow
355 green
408 red
512M red
512tr red
637 black
641 black
911 red
959 red
962 yellow
a164 yellow
Beta red
c1 orange
Corvette orange
CX orange
delta hf yellow
delta s4 red
diablo orange
gto red
hyena red
ecv1 red
ecv2 red
mclaren F1 black
Musa orange
mythos red
Phedra orange
Quattro Orange
Testarossa red
V16T orange
Viper Orange
XM Orange
Ypsilon Black

That is quite a list. But easy to change if you know the Colour values.
But for orange, I do not really see a strong candidate.
0D could be one. (first row, near the end)
39 or 3A in the fourth row could work.
[made a quick reference card for you]
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Ryoma

Done on my méga. I used 39.

Very happy, thanks. It's great step for the game.

Daniel3D

Quote from: Ryoma on November 04, 2021, 08:37:28 PM
Done on my méga. I used 39.

Very happy, thanks. It's great step for the game.
Where is your mega link?
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)