Page 1 of 2 12 LastLast
Results 1 to 25 of 37

Thread: Trying to undestand how to identify a division

  1. #1

    Join Date
    09-03-12
    Posts
    99

    Trying to undestand how to identify a division

    hi all,

    in an old post, JL gave us a full list of division id number,

    Example:


    24 Italian Serie A 9CF570
    25 Italian Serie B 9CF574
    26 Italian Serie C1/A 1A 9CF578
    27 Italian Serie C1/B 1B 9CF57C
    28 Italian Serie C2/A 1C 9CF580
    29 Italian Serie C2/B 1D 9CF584
    30 Italian Serie C2/C 1E 9CF588

    Serie A and Serie B haven't a exa number but only EDI, what does it mean?

    Thank a lot
    Marco

  2. #2

    Join Date
    18-07-15
    Posts
    795
    @clipeus: it's the same thing as I told you on the chatbox yesterday about clubs. For this look in club_comp.dat and it's the DWORD (4 bytes) before the competition name that gives you competition/division id.

    In what you posted, JL did post the ids:

    24 = Serie A. 24 in hex is 18.
    25 = Serie B. 25 in hex is 19.
    26 = Serie C1/A. 26 in hex is 1A.

    etc etc

  3. #3

    Join Date
    09-03-12
    Posts
    99
    Quote Originally Posted by Nick+Co View Post
    @clipeus: it's the same thing as I told you on the chatbox yesterday about clubs. For this look in club_comp.dat and it's the DWORD (4 bytes) before the competition name that gives you competition/division id.

    In what you posted, JL did post the ids:

    24 = Serie A. 24 in hex is 18.
    25 = Serie B. 25 in hex is 19.
    26 = Serie C1/A. 26 in hex is 1A.

    etc etc
    yes Nick, i just have everything i need, cause i need not the exa code but this one 9CF570... if i map all this code, i will understand better the structure of every division isn't?
    have somebody already done this?
    9CF570 serie A and so on?


    thanks a lot Nick
    Answering me you give me a reason to go on ( it's really bad when nobody answer your questions )

    Marco

  4. #4

    Join Date
    18-07-15
    Posts
    795
    https://champman0102.co.uk/showthread.php?t=4795 <--- Look in there for all 9CF codes

  5. The Following User Says Thank You to Nick+Co For This Useful Post:


  6. #5

    Join Date
    09-03-12
    Posts
    99
    Quote Originally Posted by Nick+Co View Post
    https://champman0102.co.uk/showthread.php?t=4795 <--- Look in there for all 9CF codes
    yes!!!

    i was looking for it !!

    So do you think i can overwrite serie c1 a and b code with serie c2 a and b code? Anyone has tryed something similiar?
    Or maybe also change serie B code with serie c2 ( a or b or c isn't important ) to have the playoff in Serie B?

    I wanna try to do this

    Thanks again!!
    Marco

  7. #6

    Join Date
    18-07-15
    Posts
    795
    @clipeus: So do you think i can overwrite serie c1 a and b code with serie c2 a and b code? <--- No I think this is going to be out of your league right now I'm afraid. Maybe try something smaller first.

    Also, you might want to try and write up properly, in detail, with good grammar and punctuation, what you are trying to achieve. Many, including myself, won't know how the lower leagues in Italy are structured. You have posted about this a lot - and I still have no idea what you are trying to achieve. i.e. describe in detail how it is now and how you would like it to be in the future (e.g. what needs to change in detail).

  8. #7

    Join Date
    09-03-12
    Posts
    99
    I thought I didn't need a translator (google) but unfortunately my English is very basic ( good enough to talk with someone when travel but not good enough to explain what i want to do here ). I am sorry I only created confusion


    Italian actual League Structure

    Serie A 20 team
    3 relegations

    Serie B 20 team
    2 direct promotions plus 1 by playoff from 3rd to 8th place : 3 promotions
    3 direct relegations plus 1 by playoff 16th and 17th : 4 relegations

    Serie C 20 teams for each division A,B,C
    1 direct promotions for each division plus the winner of playoff ( and this is very complicated to explain even in italian language ) : 4 promotions
    1 direct relegations for each division plus 2 by playoff from 16th to 19th place of each division : 9 relegations


    My goal is to have playoff in Serie B and 3 division in serie C

    maybe i could swap Serie C1 and Serie C2 ( so we could have 3 division and playoff ) and swap one of Serie C2 divisions with Serie B to have playoff

    I think it's possible ( even if really really difficult ) using those 9FC*** codes we talked about before.


    I think it might be the easiest solution for me because I am unable to write codes


    I hope I have been clearer this time

  9. #8

    Join Date
    18-07-15
    Posts
    795
    Good work in writing it up

    Here's a little patch to get you going:
    Code:
    CPU Disasm
    Address   Hex dump                                                Command                                  Comments
    00646951      66:C786 BE000000 0206                               MOV WORD PTR DS:[ESI+0BE],602
    0064695A      5E                                                  POP ESI
    0064695B      5B                                                  POP EBX
    0064695C      C3                                                  RETN


    See if you can understand what I did to help you learn

    EDIT: For the relegation places too:
    Code:
    CPU Disasm
    Address   Hex dump                                                Command                                  Comments
    00646951      C786 BE000000 02060203                              MOV DWORD PTR DS:[ESI+0BE],3020602
    0064695B      5E                                                  POP ESI
    0064695C      5B                                                  POP EBX
    0064695D      C3                                                  RETN
    Last edited by Nick+Co; 17-06-20 at 12:04 PM.

  10. The Following User Says Thank You to Nick+Co For This Useful Post:


  11. #9

    Join Date
    09-03-12
    Posts
    99
    Great!!! this evening i'll work on it!!!!

    Thank again Nick
    Marco

  12. #10

    Join Date
    09-03-12
    Posts
    99
    in this way we have the positions reserved for playoffs but I think we need to add the playoff fixtures

    I saw that you used nops line to enter these codes


    I tried the playoffs for the promotion, I had an error after updating the season. ( league.cpp )

    I had already managed to define the ranking for the playoffs (looking at the old posts); if I have not misunderstood you have reduced the lines of code to one as in an old post.
    i need the next step understand how to change the fixtures

    Thanks a lot Nick first of all for your patience
    Marco
    Last edited by clipeus; 18-06-20 at 07:30 AM.

  13. #11

    Join Date
    18-07-15
    Posts
    795
    @clipeus: Glad you understand So this was the easiest part of your request. Adding play-off games is possible, but difficult (and ends up being a good bit of code). So hopefully this gives you an idea of the complexity and size of what you are trying to achieve.

    If I get chance I'll look into what it would take to add the promotion playoff games at least.

  14. #12

    Join Date
    09-03-12
    Posts
    99
    Quote Originally Posted by Nick+Co View Post
    @clipeus: Glad you understand So this was the easiest part of your request. Adding play-off games is possible, but difficult (and ends up being a good bit of code). So hopefully this gives you an idea of the complexity and size of what you are trying to achieve.

    If I get chance I'll look into what it would take to add the promotion playoff games at least.

    unfortunately I knew it could be really complex to do this. If and when you can take a look, I'll always be grateful.
    and it was for this reason that I was trying to understand if the Serie B could be replaced with the C1 (A or B are equal) so as to already have the playoffs;

    but I think this road is also not that easy..

    anyway thanks a lot again Nick!
    Marco

  15. #13

    Join Date
    09-03-12
    Posts
    99
    just another info:


    if I wanted to copy some code from one championship to another I would still have to move all the lines of code down to the next nop (empty line)
    if so i'll do some try

  16. #14

    Join Date
    18-07-15
    Posts
    795
    It's not as simple as that

    First see if you can work out which function is creating the fixtures and, perhaps more difficult, find out where it gets called

    If you can do that....


  17. The Following 3 Users Say Thank You to Nick+Co For This Useful Post:


  18. #15

    Join Date
    09-03-12
    Posts
    99
    this game is evil

  19. #16

    Join Date
    18-07-15
    Posts
    795
    this game is evil


    Adding the same play-offs as another league has, like Serie C1, to Serie B, is relatively straightforward it seems:

  20. The Following User Says Thank You to Nick+Co For This Useful Post:


  21. #17

    Join Date
    09-03-12
    Posts
    99
    in Serie B there are 20 teams not 18, so 38 games not 34, in this way we still have to add two teams beyond the playoffs;
    do you add the entire fixture block of serie C1?
    Last edited by clipeus; 18-06-20 at 01:15 PM.

  22. #18

    Join Date
    18-07-15
    Posts
    795
    @clipeus: Yes, this is just a fixture swap for now - but a good basis for you to build on But I think this is going to be a bit too tricky for you!

  23. #19

    Join Date
    09-03-12
    Posts
    99
    i'm not a dreamer... i know it's really difficult for me, also because i don't know how to identify the fixtures block code

    I'll do some tests! maybe i'll be lucky

    thanks a lot again Nick
    Marco

  24. #20

    Join Date
    18-07-15
    Posts
    795
    You're doing the right kind of analysis - spotting "in Serie B there are 20 teams not 18, so 38 games not 34, in this way we still have to add two teams beyond the playoffs". Is the right kind of thinking

    So to help, it's the +3C call to call for fixtures. So Serie B does it here:
    00646946 |. FF52 3C CALL DWORD PTR DS:[EDX+3C]
    (which is just above the patch I posted)

    And that calls a function at:
    Code:
    00645AF0  /.  8A4424 04                                       MOV AL,BYTE PTR SS:[ARG.1]
    Which sets up the fixtures.

    What you can do is set +2C to 2 (which means you want play offs) and then jump from the playoffs code in Serie B (which is incorrect) to Serie C (which is closer) - with a jump like:
    Code:
    0064663F     \E9 704D0000                                     JMP 0064B3B4
    And that gets you:


    But you see how complex it can get

  25. #21

    Join Date
    09-03-12
    Posts
    99
    Quote Originally Posted by Nick+Co View Post
    You're doing the right kind of analysis - spotting "in Serie B there are 20 teams not 18, so 38 games not 34, in this way we still have to add two teams beyond the playoffs". Is the right kind of thinking

    So to help, it's the +3C call to call for fixtures. So Serie B does it here:
    00646946 |. FF52 3C CALL DWORD PTR DS:[EDX+3C]
    (which is just above the patch I posted)

    And that calls a function at:
    Code:
    00645AF0  /.  8A4424 04                                       MOV AL,BYTE PTR SS:[ARG.1]
    Which sets up the fixtures.

    What you can do is set +2C to 2 (which means you want play offs) and then jump from the playoffs code in Serie B (which is incorrect) to Serie C (which is closer) - with a jump like:
    Code:
    0064663F     \E9 704D0000                                     JMP 0064B3B4
    And that gets you:


    But you see how complex it can get
    yes... i see..
    yes really difficult, however I try, it's very interesting to be able to change some aspects of the game.

    thanks for the hints!!

    i'll try this evening
    M

  26. #22

    Join Date
    09-03-12
    Posts
    99
    ok it's really complicated

    i don't understand...
    in my exe ( saturn patch plus yours )

    your offset:
    00645AF0 /. 8A4424 04 MOV AL,BYTE PTR SS:[ARG.1]

    mine:
    00645AF0 . 8A4424 04 MOV AL,BYTE PTR SS:[ESP+4]

    i don't have any +2C to be changed in 2

    yours:
    0064663F \E9 704D0000 JMP 0064B3B4

    mine:
    0064663F . 33DB XOR EBX,EBX

    ok maybe i've to change my code with yours but when i do this, the next two codes change...

    mmmmmmmmh i've to add nop? or to move all the lines down?

  27. #23

    Join Date
    18-07-15
    Posts
    795
    your offset:
    00645AF0 /. 8A4424 04 MOV AL,BYTE PTR SS:[ARG.1]

    mine:
    00645AF0 . 8A4424 04 MOV AL,BYTE PTR SS:[ESP+4]
    ^ These two are the same thing. Double click on the text of the top one and you'll see the edit says ESP+1

    i've to add nop? or to move all the lines down?
    Yes, add NOPs where needed.

  28. #24

    Join Date
    09-03-12
    Posts
    99
    [QUOTE=Nick+Co;485068]^ These two are the same thing. Double click on the text of the top one and you'll see the edit says ESP+1

    even if I click twice the edit does not appear, problem with this site maybe?
    I only see what I wrote and nothing more

  29. #25

    Join Date
    18-07-15
    Posts
    795
    I meant click twice in Olly To being up the Assemble window so you can edit the code (then you'll see Arg.1 is just helper text, the actual code is ESP+4).

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •