Jump to content

sage

Members
  • Content Count

    1,240
  • Joined

  • Last visited

Posts posted by sage


  1. 14 hours ago, 8bit-Dude said:

    Thanks for this complete description TailChao. It confirms my initial understanding that producing tracks for HandyMusic is quite a bit more involved than using Chipper (which can render the track within the editor). In an ideal world, someone will someday be interested in producing a tracker for HandyMusic .

    chipper writes outr HandyMusic tracks, too ... but the instruments are not 100% compaible and must be modofied by hand.


  2.  

    AVP Hacking

     

    (some notes I wrote down years ago, think I might share them ...)

     

    Using the "official" ROM from 1993.

     

    Goal:
    Find out why Alien mode is deactivated.
    Activate Alien Mode in Menu. Maybe do a cheat for level select.

     

    Help:
    We know its there because someone (http://zenade.angelfire.com/AVP/lynx/avp.html) found out
    how to activate it by patching into memory as well as selecting the level nr.
    But this Cheat is not really telling where and how to patch ... 😞
    We further know that it was possible to select the alien in the menu in older ROM versions.
    (which I do not have available...)

     

    Findings:
    Alien Mode is in and "just" deactivated in the menu. It can be activated and the item picture in
    the menu is appearing, too. There is some conditional branch before the picture is displayed. But
    it is not clear yet what is this condition... My guess: COMLYNX Mode!
    Comlynx? Indeed there is support for Comlynx in AvP!
    Just connect a second lynx and one player can select marine while the other is predator.
    But: It does not seem to work. At least not with my two Lynxes.
    Add: With three Lynxes every player gets adifferent character ... means the Alien pops up in the menu as expected.

     

    Investigating:
    First, extract files from rom. We get something like 200 file entries, but a lot of them are zero entries.
    File 0 is the title picture (as always).
    Trivia: It is not a single sprite but four, background, alien, vs, predator are seperate sprites.
    File 1: main code/basic fuction stays resident.
    File 2,3,5,7: menu and actual game ... swapped in at the same address as needed.
    File 2 contains Intro?
    File 3 contains the selection menu!
    File 5 is engine.
    File 7 contains the Game Over screen. Remark: switched pics???

    Most of the other files are sprite data, but sometimes with some additional data (table?) in front of it.

    Lets concentrate on the file 3 and look for the menu selection part. And there it is...

            LDX $06        
            LDA #$00       
    L2E22:
            ORA $0A,X      
            DEX            
            BPL L2E22       
            BIT #$03       
            BNE L2E6B      
            BIT #$10 ; Left/Right      
            BEQ L2E46       
            LDA L2E7A ; CURRENT SELECTION     
            DEC            
            CPX #$02  ; And this is crazy... because x is always -1 here!!     
            BPL L2E3B ; And this is crazy... if this should be cmp this makes more sence... but limits      
            AND #$01  ; And this is crazy... the value to 0 and 1 for the selected character
            BRA L2E41 ; And this is crazy...      
    L2E3B:
            CMP #$00       
            BPL L2E41       
            LDA #$02       
    L2E41:
            STA L2E7A ; Store selection     
            BRA L2E5F       
    L2E46:
            BIT #$20 ; Left/Right      
            BEQ L2E5F      
            LDA L2E7A      
            INC            
            CMP #$02  ; And this is crazy, too ... must be CPX as above??      
            BPL L2E56 ; And this is crazy, too ... doesnt make sence     
            AND #$01  ; And this is crazy, too ...     
            BRA L2E5C ; And this is crazy, too ...      
    L2E56:
            CMP #$02       
            BMI L2E5C       
            LDA #$00       
    L2E5C:
            STA L2E7A ; Store selection     
    L2E5F:
            LDA L2E7B ; Animation of Frame or similar?     
            INC            
            AND #$03       
            STA L2E7B      
            JMP L2DBF      
            
            ; The following is interesting, too
    L2E6B:
            LDX $07        
            LDA L2E7A      
            STA $10,X      
            STA $AD        
            JSR $058e      
            JMP $1822      
    
            ; And if we check a bit of code before, we find the following
            ; This is run when we first enter the menu...
    
            LDX $07        
            TXA            
            STA $10,X      
            STA L2E7A      

    What do we learn from this?
    a) there is a bug in the avp code ;-)
    b) selection can be 0,1,2 BUT ther is this CPX on something which limits this to 0 and 1 (alien is 2!)
    c) on start this value is read from $07
    Some very nice piece of code is:

       LDX L2E7A   
       LDY #$07
       LDA L2D88,X
       STA ($AB),Y
       LDY #$09
       LDA L2D8B,X
       STA ($AB),Y
       LDA $AB     
       LDX $AC     
       JSR $056e   
    

    this code is plotting the selection frame ... based on a three entry look-up table. three characters!
    We learn: L056E is plotting a sprite! looking where it is used will find an additional piece of code
    which draws one sprite only under a condition:
       

       LDA $06     
       CMP #$02
       BMI L2DE4    
       LDA #$b0
       LDX #$52
       JSR $056e   
    L2DE4:
    

    What sprite is it? yes, the alien head for the menu. (not shown: right above that was the plotting of marine and predator)

     

    What do we learn?
    Based on the value of $06 the alien head is (not) shown in the menu.
    The same value is used on some loop above the selection code to OR some values which are tested for left/right.
    What does this mean, why do we want to make an OR if we have only one Lynx... and why is all this keypad reading and
    storing (not shown at all) done so terribly complicated... based on some indizes... could it mean...yes indeed!!!
    Checking the main code result in a lot of SERDAT occurances... means: COMLYNX code!!!!
    => a short check with two Lynxes, yes we have comlynx support.
    And the complicated code for selection "just" synchronizes the selection between two(?) Lynxes.

     

    • Like 3

  3. Unlikely. I am fed up with GUI coding. this eats time and sux.

    but i did not changed much in chipper. the last thing was the midi import, which was never release.

     

    I focused a bit on the lynx part in the last year, by adding some kind of midi support.

     

×
×
  • Create New...