Bond697 icon

Pokemon Crystal RNG Advancement

Bond697 | PRO | 07/18/11 03:33:58 PM UTC | 0 ⭐ | 4710 👁️ | Never ⏰ | []
Z80 Assembler |

0 B

|

None

|

0 👍

/

0 👎

ROM0:02B1 21 9B FF         ld hl,ff9b          // load counter offset to hl
ROM0:02B4 34               inc (hl)            // increment hl by 1(counter++)
ROM0:02B5 F0 04            ld a,(ff00+04)      // set a to the value at FF04
ROM0:02B7 47               ld b,a              // set b to it
ROM0:02B8 F0 E1            ld a,(ff00+e1)      // RNG byte 1 to a
ROM0:02BA 88               adc b               // add a and b(FF04 to FFE1)
ROM0:02BB E0 E1            ld (ff00+e1),a      // store the new a back to FFE1
ROM0:02BD F0 04            ld a,(ff00+04)      // set a to the value at FF04
ROM0:02BF 47               ld b,a              // set b to it
ROM0:02C0 F0 E2            ld a,(ff00+e2)      // RNG byte 2 to a
ROM0:02C2 98               sbc b               // subtract b from a(FF04 to FFE2)
ROM0:02C3 E0 E2            ld (ff00+e2),a      // store the new a back to FFE2

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎