Use different Tileset Layout's w/James Nes Animated Tiles

tbizzle

Well-known member
It would be cool if we could use different tileset layout's with James Nes's Animated tiles tutorial. Currently you can only use "No Path (Main/Screen*3)". Any takers? :)

 

SciNEStist

Well-known member
It is very possible to alter the script to effect different tile layouts. This is done in the doloadscreen16 script editing steps.
In his tutorial, the part that determines the tile layou is where he mentions the "LOAD_MSSS" section.

MSSSS in this case stands for "Main, Screen, Screen, Screen, Screen" which is how the tiles end up in the Main no path option

If you want to use a different tile layout, you would need to find the section you want, and add the code there. For example, the Double Main no hud tile layout would be "Main, Main, Screen, Screen" so you would look for the section that is MMSS

Once you find the area of the script that corrosponds with the tile layout you are looking for, then just follow the same directions.

It's a bit more complicated if you want to animate more than one tile layout as you will need to edit the code a bit, but knowing where to look should get you started.
 

tbizzle

Well-known member
It is actually really easy to do! You just have to add the loop to each tileset layout that you want included.

For example if you want animated tiles whilst using "Double Main" it'd look like this, inside doLoadScreen16:

Code:
;;;DOUBLE MAIN;;;;;;;;;;;;;;;;;;;;;;;

    CMP #%00000000
    BEQ Load_MM
    JMP notMM
Load_MM:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Added Lopp Code for Animated Tiles;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    LDA #$00
    STA tempj                                ;;added code
    MM_CHR_LOAD_LOOP:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    LDA backgroundTilesToLoad
    LSR
    LSR
    LSR
    LSR
    CLC
    ADC #$0F
    STA tempA
    LDA backgroundTilesToLoad
    AND #%00001111
    STA tempB
    LoadChrData tempA, #$10, #$00, #$60, BckCHRAddLo, BckCHRAddHi, tempB
    JSR doWaitFrame
    LDA backgroundTilesToLoad+1
    LSR
    LSR
    LSR
    LSR
    CLC
    ADC #$0F
    STA tempA
    LDA backgroundTilesToLoad+1
    AND #%00001111
    STA tempB
    LoadChrData tempA, #$16, #$00, #$60, BckCHRAddLo, BckCHRAddHi, tempB
    JSR doWaitFrame
    ;; Load Hud
    LoadChrData #$1E, #$1C, #$00, #$40, OtherChrTiles_Lo, OtherChrTiles_Hi, #$00
    JSR doWaitFrame
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ADDED Loop Code for Animated Tiles;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    LDA userScreenByte7
    BEQ +noAnimatedTiles
        INC tempj
        LDA tempj
        CMP #$03
        BEQ +noAnimatedTiles
            SwitchCHRBank tempj
            JMP MM_CHR_LOAD_LOOP
         
    +noAnimatedTiles
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
    JMP doneLoadingChrs
notMM:

Thank you for steering me in the right direction @SciNEStist!
 
Last edited:
Top Bottom