Users browsing this thread: 1 Guest(s)
Slot ability modification

#1
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
Well I didn't knew where to put that info so I decieded to make a thread about. So from the updated C2 and C1 here are some interesting routine for anyone who would like to mess with setzer's slots:

This is the routine for the 3 slots but part some of those calculations are repeated previously for slot 1 and slot 2 and I don't know why yet:

Code:
Main routine?

C1/7FB6:    AD917B      LDA $7B91
C1/7FB9:    F031        BEQ $7FEC
C1/7FBB:    AD8C7B      LDA $7B8C        (Load slot 1 reel position/value)
C1/7FBE:    20E77E      JSR $7EE7        (Convert slot 1 value to symbol value)
C1/7FC1:    8536        STA $36        (save Slot 1 symbol value)
C1/7FC3:    AD8D7B      LDA $7B8D        (Load slot 2 reel position/value)
C1/7FC6:    20F27E      JSR $7EF2        (Convert slot 2 value to symbol value)
C1/7FC9:    8537        STA $37        (save Slot 2 symbol value)
C1/7FCB:    AD8E7B      LDA $7B8E        (Load slot 3 reel position/value)
C1/7FCE:    20FD7E      JSR $7EFD        (Convert slot 3 value to symbol value)
C1/7FD1:    8538        STA $38        (save Slot 3 symbol value)
C1/7FD3:    22A3B4C2    JSR $C2B4A3    (Calculate the value of the slots result)
C1/7FD7:    48          PHA             
C1/7FD8:    20566D      JSR $6D56
C1/7FDB:    68          PLA
C1/7FDC:    99B02B      STA $2BB0,Y
C1/7FDF:    ADCA62      LDA $62CA
C1/7FE2:    99AE2B      STA $2BAE,Y
C1/7FE5:    EE807B      INC $7B80
C1/7FE8:    EECB7B      INC $7BCB
C1/7FEB:    60          RTS

This is where the slot value is calculated:

Code:
C1/7EE7:    4A          LSR A            
C1/7EE8:    4A          LSR A
C1/7EE9:    4A          LSR A
C1/7EEA:    4A          LSR A
C1/7EEB:    0A          ASL A
C1/7EEC:    AA          TAX
C1/7EED:    BF00A8C2    LDA $C2A800,X    (Slot 1 Conversion data?)
C1/7EF1:    60          RTS

C1/7EF2:    4A          LSR A
C1/7EF3:    4A          LSR A
C1/7EF4:    4A          LSR A
C1/7EF5:    4A          LSR A
C1/7EF6:    0A          ASL A
C1/7EF7:    AA          TAX
C1/7EF8:    BF20A8C2    LDA $C2A820,X    (Slot 2 Conversion data?)
C1/7EFC:    60          RTS

C1/7EFD:    4A          LSR A
C1/7EFE:    4A          LSR A
C1/7EFF:    4A          LSR A
C1/7F00:    4A          LSR A
C1/7F01:    0A          ASL A
C1/7F02:    AA          TAX
C1/7F03:    BF40A8C2    LDA $C2A840,X    (Slot 3 Conversion data?)
C1/7F07:    60          RTS

This is where the conversion is done:

Code:
(Slot Reel 1 conversion data - get a slot value based on the reel's current position)
(Note the game scrolls backwards from the starting 7 symbol, so we begin
with C2/A800, then work our way up from the bottom at C2/A81E, and repeat.)
C2/A800: 00 00  (7)
C2/A802: 04 00  (Chocobo)
C2/A804: 05 00  (Diamond)
C2/A806: 03 00  (Ship)
C2/A808: 04 00  (Chocobo)
C2/A80A: 05 00  (Diamond)
C2/A80C: 02 00  (Bar)
C2/A80E: 05 00  (Diamond)
C2/A810: 01 00  (Dragon)
C2/A812: 04 00  (Chocobo)
C2/A814: 05 00  (Diamond)
C2/A816: 03 00  (Ship)
C2/A818: 05 00  (Diamond)
C2/A81A: 02 00  (Bar)
C2/A81C: 03 00  (Ship)
C2/A81E: 01 00  (Dragon)

(Slot Reel 2 conversion data - get a slot value based on the reel's current position)
(Note the game scrolls backwards from the starting 7 symbol, so we begin
with C2/A820, then work our way up from the bottom at C2/A83E, and repeat.)
C2/A820: 00 00  (7)
C2/A822: 04 00  (Chocobo)
C2/A824: 01 00  (Dragon)
C2/A826: 05 00  (Diamond)
C2/A828: 03 00  (Ship)
C2/A82A: 04 00  (Chocobo)
C2/A82C: 01 00  (Dragon)
C2/A82E: 05 00  (Diamond)
C2/A830: 04 00  (Chocobo)
C2/A832: 03 00  (Ship)
C2/A834: 02 00  (Bar)
C2/A836: 05 00  (Diamond)
C2/A838: 04 00  (Chocobo)
C2/A83A: 03 00  (Ship)
C2/A83C: 02 00  (Bar)
C2/A83E: 05 00  (Diamond)

(Slot Reel 3 conversion data - get a slot value based on the reel's current position)
(Note the game scrolls backwards from the starting 7 symbol, so we begin
with C2/A840, then work our way up from the bottom at C2/A85E, and repeat.)
C2/A840: 00 00  (7)
C2/A842: 01 00  (Dragon)
C2/A844: 03 00  (Ship)
C2/A846: 04 00  (Chocobo)
C2/A848: 02 00  (Bar)
C2/A84A: 05 00  (Diamond)
C2/A84C: 04 00  (Chocobo)
C2/A84E: 03 00  (Ship)
C2/A850: 01 00  (Dragon)
C2/A852: 05 00  (Diamond)
C2/A854: 04 00  (Chocobo)
C2/A856: 03 00  (Ship)
C2/A858: 02 00  (Bar)
C2/A85A: 05 00  (Diamond)
C2/A85C: 04 00  (Chocobo)
C2/A85E: 05 00  (Diamond)

And this is where the 3 slots result is calculated:

Code:
(Return a value based on our 3 slot results: 0 for 7-7-Bar, 7 when we don't
have three matching symbols [Lagomorph], or Symbol value + 1 when we have
a matching triplet)

C2/B4A3: A5 36        LDA $36     (get slot 1 [aka reel 1] symbol)
C2/B4A5: C5 37        CMP $37     (compare to slot 2 symbol)
C2/B4A7: D0 06        BNE $B4AF   (branch if they don't match)
C2/B4A9: C5 38        CMP $38     (if they do, compare to slot 3 symbol)
C2/B4AB: D0 02        BNE $B4AF   (branch if that is different)
C2/B4AD: 1A           INC         (if they're all the same, just return
                                   the symbol value + 1)
C2/B4AE: 6B           RTL


C2/B4AF: 05 37        ORA $37
C2/B4B1: D0 08        BNE $B4BB   (branch if either slot 1 or 2 isn't "7")
C2/B4B3: A5 38        LDA $38     (only reach here if Slot 1 and 2 are both "7")
C2/B4B5: C9 02        CMP #$02
C2/B4B7: D0 02        BNE $B4BB   (branch if slot 3 isn't "Bar")
C2/B4B9: 7B           TDC         (if it is, return 0)
C2/B4BA: 6B           RTL

There are way to change those values to change the odds I'm pretty sure but I don't have a proper technique to suggest yet. I'll try to experiment with those routine when I get sometimes.

But the main reason of this thread, and I haven't seen that info elsewhere on the site, is the spell numbers related to slot attacks. I helped someone on the site to swap 7-Flush and calling a random esper. You can swap/change any of the followings and theoratically you can assign other spells, blitz, lores or any magic from 00 to FF. The actual spells assigned match the order in the magic list. So in a perfect world by setting the slot ability to Sabin, you could do his blitz with the slots...I haven't tested such a thing however...

Code:
(Data - spell numbers for Slot attacks)

C2/4E4A: 94   (L.5 Doom -- used by Joker Doom)
C2/4E4B: 94   (L.5 Doom -- used by Joker Doom)
C2/4E4C: 43   (Bahamut)
C2/4E4D: FF   (Nothing -- used by Triple Bar?)
C2/4E4E: 80   (H-Bomb)
C2/4E4F: 7F   (Chocobop)
C2/4E50: 81   (7-Flush)
C2/4E51: FE   (Lagomorph)

I haven't found where the selected spell is loaded but I will continue my researches. Thanks to Assasin for updating the comments in C2 more or less recently (I think...)
  Find
Quote  

#2
Posts: 127
Threads: 8
Thanks Received: 21
Thanks Given: 12
Joined: Jan 2012
Reputation: 13
Status
None
This is very cool. Great findings Madsiur.

I'm interested in if the slot graphics change accordingly if you change the value of the conversion data, did you try this?
  Find
Quote  

#3
Posts: 264
Threads: 12
Thanks Received: 4
Thanks Given: 2
Joined: Oct 2009
Reputation: 6
Status
Lucky-Girl
(02-17-2012, 12:59 PM)m06 Wrote: This is very cool. Great findings Madsiur.

I'm interested in if the slot graphics change accordingly if you change the value of the conversion data, did you try this?

No, the graphics are independent. I'm the one whom he helped switch 7-Flush with Random Esper (Three Bars).

Basically, 3 Diamonds is still the easiest "win" to get; so the game thinks you've won 7-Flush. When it goes to activate your attack as a reward, however; it doesn't do 7-Flush. Instead it activates a random esper, just as winning 3 Bars would do.

In order to change the graphics, you need to use something like YY-CHR.


"The doom and gloom is justified.
A couple of people are going to die.
Even though you can turn back the time,
you're always a moment too late!"
  Find
Quote  

#4
Posts: 2,769
Threads: 88
Thanks Received: 24
Thanks Given: 87
Joined: Jun 2009
Reputation: 25
Status
None
very true

I personally changed the slot graphics for Nattak


"Sometimes ninjas do wrong to each other, and in dat way the force of tha earf' comes around da moon - and at that presence, da dirt, it overshadows the grass, so you're like, I can't cut dis grass, there's no sun comin' through. So in order to enable each other the two fruits have to look each other in da eye and understand we can only be right, as da ripe is wrong, you know what I mean?"

-HNIC
Quote  

#5
Posts: 264
Threads: 12
Thanks Received: 4
Thanks Given: 2
Joined: Oct 2009
Reputation: 6
Status
Lucky-Girl
I've made this threat Sticky, because it's got valuable information that pertains to hacking, especially when it comes to modifying a part of the game few have successfully ventured into, and it cannot afford to get lost in the bowels of the discussion board!

...in easier terms, I made it alot easier to find for future reference. LOL.


"The doom and gloom is justified.
A couple of people are going to die.
Even though you can turn back the time,
you're always a moment too late!"
  Find
Quote  

#6
Posts: 2,769
Threads: 88
Thanks Received: 24
Thanks Given: 87
Joined: Jun 2009
Reputation: 25
Status
None
lol nice


"Sometimes ninjas do wrong to each other, and in dat way the force of tha earf' comes around da moon - and at that presence, da dirt, it overshadows the grass, so you're like, I can't cut dis grass, there's no sun comin' through. So in order to enable each other the two fruits have to look each other in da eye and understand we can only be right, as da ripe is wrong, you know what I mean?"

-HNIC
Quote  

#7
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(02-17-2012, 12:59 PM)m06 Wrote: This is very cool. Great findings Madsiur.

I'm interested in if the slot graphics change accordingly if you change the value of the conversion data, did you try this?
2nd edit: You mean like for slot 1 if you switched 7-Flush with 3 bar swap all the 2 and 5 ? I haven't tested it.

edit: I'll look more deeply into it...probably right after the RNG assignation.

Well those graphics are loaded in a big chunk of 800 bytes and I don't how they are processed because it's a direct VRAM write from $4375 to $2118. It's not like it's different smaller graphics that are loaded and displayed individually on the reel. The game somehow make us think it's that way maybe... If we could identify when the reel stops which graph is displayed and how it would give us a better idea of which offset to change to switch them. I'm still unsure of the feasibility of this...

I had some DMA and VRAM values that helped me understanding these 2 routines. The comment might be a bit off but you can get the main process:

Code:
C1/403F:    201040      JSR $4010      (set the parameters for loading the slots menu graphics & window)
C1/4042:    A410        LDY $10           (load in Y #$380)
C1/4044:    8436        STY $36
C1/4046:    A512        LDA $12           (Load bank of the offset of the menu window graphics)
C1/4048:    A00042      LDY #$4200       (future video address of the menu)
C1/404B:    202B1A      JSR $1A2B       (display the slot menu the same way slot graphics are displayed)
C1/404E:    A20008      LDX #$0800       (graphic size in bytes of the slots graphics altogether?) <-------
C1/4053:    A200F0      LDX #$F000       (Slots graphics starting offset low and medium bytes)
C1/4056:    A00044      LDY #$4400       (future video address)
C1/4059:    A9D2        LDA #$D2       (slots graphics starting offset high byte)
C1/405B:    202B1A      JSR $1A2B      (slot graphics loader?, DMA style)<-------
C1/405E:    A20010      LDX #$1000
C1/4061:    8636        STX $36
C1/4063:    A2C07F      LDX #$7FC0
C1/4066:    A00058      LDY #$5800
C1/4069:    A9C4        LDA #$C4       (FWF position)
C1/406B:    202B1A      JSR $1A2B      (FWF font loader, DMA style)
C1/406E:    AD342F      LDA $2F34      (Wallpaper selection)
C1/4071:    2907        AND #$07
C1/4073:    8D342F      STA $2F34      (Store as wallpaper selection)
C1/4076:    0A          ASL A
C1/4077:    18          CLC
C1/4078:    6D342F      ADC $2F34      (Add in original value [now A holds wallpaper # times 3])

Here's the function that prepare the VRAM transfer or is the actual transfer, but it should reach one of the DMA routine later I think:

Code:
Graphics loading routine                Comments are for from C1/405B but the overall process is the same for other graphics

C1/1A2B:    8B          PHB             (push DB byte onto the stack so PB point to the same bank as DB?)
C1/1A2C:    48          PHA             (Push #$D2 onto the stack)
C1/1A2D:    A900        LDA #$00        (zero A ?)
C1/1A2F:    48          PHA             (push #$00 onto the stack)
C1/1A30:    AB          PLB             (DB = #$00 ?)
C1/1A31:    68          PLA             (a = #$D2)
C1/1A32:    8C1621      STY $2116        (Store #$4400 to Video address)
C1/1A35:    8E7243      STX $4372        (Store #$F000 in Source offset of the 7th DMA channel.)
C1/1A38:    8D7443      STA $4374        (Set $D2 Source bank of the 7th DMA channel.)
C1/1A3B:    A901        LDA #$01
C1/1A3D:    8D7043      STA $4370        (01 is the DMA mode)
C1/1A40:    A918        LDA #$18
C1/1A42:    8D7143      STA $4371        (Destination of the DMA transfer + $2100 ---> $2118 (Video data))
C1/1A45:    A636        LDX $36            (block of 800 bytes with slots graphics)
C1/1A47:    8E7543      STX $4375        (Size of the transfer in bytes.)
C1/1A4A:    A980        LDA #$80
C1/1A4C:    8D0B42      STA $420B        (Enables 8th DMA channel ?)         
C1/1A4F:    AB          PLB             (initial value)
C1/1A50:    60          RTS

[Image: farispiano.gif]

  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite