Announcement

Collapse
No announcement yet.

NES Game Genie codes by Cyperium

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #91
    Tom & Jerry - The Ultimate Game Of Cat And Mouse! (USA):

    Also known as Tom & Jerry (and Tuffy).


    AESKALLA
    AAEKVLLP
    ATOGSUSZ - Jump in mid-air (no walking animation, when releasing up while climbing you fall down).

    SXKGUESE - Can fall any distance without taking damage. Alternative to the one in the database.

    ATXYXVSZ - Invincible against enemies (not spikes, falling too far or drowning).

    AANKKLIA - Shoot while jumping to be suspended in air (you can still move back and forth), you can then jump away when you want to. Shoot repeatedly to move down.

    LXVYKPAA - Start at ending scene where you have defeated Tom, Tuffy will be rescued even if you don't have the key. Walk to the end of the screen to view ending.

    AEVGAPEA - Spider web has no effect.

    SXOKPVSE - Can move in intro, you need a jump in mid-air code to pass some intros as the trigger is at a specific point at the far right of the screen on some intros, on most you just walk to the end of the screen. Most intros have no hit detection.

    OZXKEOPX - Press UP anywhere to move up (faster than climbing), can't enter doors.

    OZSGSXPX
    OZUGUVPX
    OZXKEOPX - Climb anywhere, can't enter doors.

    AAXKAZAP - Walk on water.



    Some RAM information:
    Code:
    [COLOR=white]0050[/COLOR]:
    04 - Walk right --> 06 --> 0C when stopping.
    08 - Walk left --> 0A --> 0C when stopping.
    0B - Subtract one health point --> 10 --> 13 --> 18 --> 1C --> 20 --> 01.
    10 - Does a sliding move.
    12 - Jump --> 00 when landing.
    16 - Climb up.
    1C - Hold on to ladder.
    1E - Climb down.
    20 - Is set at the beginning of stage.
    26 - Shoot --> 2A.
    38 - Drown.
    3E - Die.
    44 - Auto move in intros --> 14 when exiting intro.
    
    [COLOR=white]004F[/COLOR]:
    00 - Stand.
    01 - Walk.
    03 - Jump.
    04 - Climb.
    0D - Shoot --> 82 --> 03 --> 00
    81 - Take damage.
    8C - Walk into door/walk out of door.
    95 - Drown.
    98 - Auto move in intros.
    D8 - Step on pin.
    
    [COLOR=white]04A7[/COLOR] - Level/area.


    Wizards & Warriors (USA):

    ASOPNXGP - Can levitate higher.

    NNOPNXGO - Can levitate much higher.

    AEOOOXPL - Can levitate as high as you want.

    AANZUYZA
    AINXNYEL - Don't need gems to bribe guard.

    AEKSXSXY - Open any door without key.

    AEKXUEZZ
    AEUXKEPL - Open any chest without key.

    SAEXSTIZ
    ELEXVVSZ
    PEULAAZA - Jump in mid-air (you also fall a bit slower).

    YOELTATP - Don't continually jump when holding jump button (can be used with the jump in mid-air code for cleaner result).



    Ram:
    Code:
    [COLOR=white]04C8[/COLOR]:
    01 - Stand.
    02 - Jump.
    Zoda's Revenge - StarTropics 2 (USA):

    SEXUYOXS
    EXULAPXU - Jump in mid-air (also allows you to move anywhere while jumping, but be sure you don't land where you normally couldn't land or game might softlock or do something unpredictable), jumping too high softlocks the game. Be sure to be at least half a block higher than the platform you jump to (jumping up two blocks on a platform normally isn't possible and the game softlocks if you don't have any height above the ground when you land). The game may become misaligned if you jump over things that you couldn't be above normally (like "ceilings").

    The above code was mainly to answer a walk anywhere request, I hope this will do because a walk through walls code would be nearly or perfectly impossible, the game has checks pretty much everywhere which puts the game in a endless loop if something is unexpected. Even if bypassing those checks the result will be that you are misaligned to the stage. I think this is because there are different altitudes/levels that you can walk on, and passing "under" solid objects confuses the game as that shouldn't be possible.

    This is the walk through walls code I made, which is far from working correctly, but maybe someone might see how it could be done better:
    SXVLILSA
    AEXLYEVY
    SXUUITSA
    SXXLZTSA
    SXKULLSA
    SZVUZTSA
    SXELTTSA
    - Walk through walls, game softlocks sometimes and gets misaligned other times. Unpredictable results may also happen (like suddenly transporting you to a different room). AEXLYEVY disables the "sanity check" that otherwise softlocks the game when moving through walls, but there's many others and if some of them is disabled the game starts running arbitrary code or do something else that's unpredictable.

    To bypass a check just click "Step Into" in the debugger when the game softlocks and disable the check (usually BEQ FE which just redirects it to itself which can be changed to BEQ 00 instead). I will look into this more later as there could be a different way to walk through walls (I've simply changed 85 to A5 so that the x/y position doesn't revert to the previous value when hitting a wall, I tried doing it a different way also but that had problems as well).


    AAVVZKGA - Enable debugging feature "When having entered a dungeon hold SELECT when exiting the dungeon to complete it".

    Ram:
    Code:
    [COLOR=white]004F[/COLOR] - Delta Jump (jump speed).




    Some general debugging information in FCEUX:
    Can be used for breakpoint conditions:

    K = Page. Example; K==#0B only triggers breakpoint if the page is 0B.
    P = Program counter. Example; P!=#BA32 only triggers breakpoint if the instruction is NOT at BA32. Remember to use # and not $.

    P is very useful for breakpoint on reading, maybe a address is read all the time but you need to know if it is read somewhere else, then you can set a P condition to skip that breakpoint so that only the read somewhere else triggers the breakpoint.
    Last edited by Cyperium; 03-14-2020, 06:46:06 AM.
    Check out my YouTube channel PolPon: https://www.youtube.com/channel/UC8C...gJmUA81luZQqZw

    Comment


    • #92
      Jurassic Park (USA):

      SZSZVTSA
      SXUXXTSA
      SZKXXYSA
      SXNXOTSA
      AVEAIOOL - Walk through walls, you sometimes get transported a bit away from where you are (last code is so that you don't turn invisible when getting transported).

      AAVZUITP - Jump in mid-air.




      Contra (USA):

      GONIEPLZ - Jump higher.

      AAKIIVTP
      AAOSZVPG - Walk through walls.

      ATKSZSOZ - Can't die, be careful not to fall into pits. Not added to database as there's already invincibility codes.





      Contra Force (USA):

      AAKZOTPP - Walk through walls.

      TPNZSPZE
      OZNZXOOK - Invincible, unlike code in the database you can jump on moving platforms.

      KXNZLITA - Wrap to top if you fall down a pit.

      APXZAPEI - Walk on water/air in top-down levels.

      TPNZSPZE
      OZNZXOOK
      AAVXSPYZ - Invincible in top-down levels. Note that the first two codes are the invincible on normal levels code so you only need the last one to be invincible also in top-down levels.

      Check out my YouTube channel PolPon: https://www.youtube.com/channel/UC8C...gJmUA81luZQqZw

      Comment


      • #93
        Index won't be updated on first page from this post on (because I think there are bugs that are introduced by editing the first post that can potentially make it vanish, maybe because of too much links? I dunno, not worth the risk though, all I know is that my thread vanished for a few days which is enough to scare me since I've put a lot of effort into this).

        Adventures of Bayou Billy, The (USA):

        SZEEASKX
        SXKAIVKX - Walk through walls.

        AAUEVYLZ - Helicopter is destroyed with one shot.

        ASOPYTEY - Invincible in driving levels.

        AAXPEETA
        AAKOSOYA - Boss and minion of stage 7 is killed with one shot each.





        Guardian Legend, The (USA):

        EUUSIXOZ
        ZSUSTZAX - Nearly invincible, enemies that do harm you often deals less damage. Your shots penetrate through most enemies.

        ESSIGZEY
        ZSSIIZGU - Invincible, you "absorb enemies".

        AEKATZYA
        AAVAPLLA - Walk through walls.

        AIEELTEL - Can buy items even if you haven't got enough chips.

        AAEOAELA - Don't need keys to go through portals. Thanks to KingEdgar0 for RAM address!

        AAVESELG - Show entire map. Thanks to KingEdgar0 for RAM address!

        AAKOYEAA
        SZSOIEGK
        AAVOIEAA
        SZNOLEGK
        AEXOZEAA
        SXUOAEGK
        AEEOGEAA
        SXOOZEGK - Walk freely on map, need walk through walls code for this to be useful.

        VZEEGIIE
        AENSPUPP - Shots penetrate through everything and continually deals damage. Second code is for special cases (like mini-boss).

        AAXIGLZA - One shot kills.
        Last edited by Cyperium; 03-29-2020, 07:46:43 AM.
        Check out my YouTube channel PolPon: https://www.youtube.com/channel/UC8C...gJmUA81luZQqZw

        Comment


        • #94
          Romancia (Japan):

          AVSXNKOZ - Invincible (except for when in water).

          OXUAAOPX - Jump in mid-air/moon jump.

          AEOAPNLZ
          AEEAYYIL - Walk through walls.

          SXEPENSE - Can pass through bridge gap.

          AIKXUIEY - One hit kills.






          CastleVania (USA):

          AAUZPYOY
          TPOXLYZA
          LPUXYNVS - Treasures are revealed without having to do any action, you just need to be at the correct spot.

          SPVZASVS - Treasures don't disappear.

          AANVLYZA - Get 99 hearts when collecting a heart.

          KXESUZKA
          KZSSEZKA - Don't loose hearts when using items.

          AAXNVZGZ
          EYKNEZZE - Use item when having no item to use cross.

          AEEVINII - Collect cross as item instead of triggering the effect. Use with PANSNZIA for any item to use only one heart, otherwise the game will freeze when using up your hearts with the cross.






          Solar Jetman (USA):

          OXVELXOK
          OZEELLSV - Invincible against enemies and bullets.

          AVEESAAZ - Fly through walls.

          SZXOAASA - Take no damage from walls. I found that this already exists in the database but with a different description (Infinite energy) so I didn't add it, I do believe that the description in the database is a bit misleading though as you can still get damage from enemies and thus not have "infinite energy" also you loose energy when thrusting your ship.
          Last edited by Cyperium; 04-06-2020, 05:48:08 PM.
          Check out my YouTube channel PolPon: https://www.youtube.com/channel/UC8C...gJmUA81luZQqZw

          Comment


          • #95
            Flintstones, The - The Rescue of Dino & Hoppy (USA):

            ASSOLTEL - Walk through walls.

            Check out my YouTube channel PolPon: https://www.youtube.com/channel/UC8C...gJmUA81luZQqZw

            Comment


            • #96
              Kabuki - Quantum Fighter (USA):

              ATUZPSOZ
              AVSXPUOZ - Walk through walls (tested on the first stage).




              The process of making this code is documented on my YouTube channel in these two videos:
              Part 1:
              https://www.youtube.com/watch?v=OpanxMqkq6E

              Part 2: Shrinking the amount of codes:
              https://www.youtube.com/watch?v=Gs4snD4aFBI


              My channel (PolPon):
              https://www.youtube.com/channel/UC8C...gJmUA81luZQqZw
              Last edited by Cyperium; 04-15-2020, 11:04:31 AM.
              Check out my YouTube channel PolPon: https://www.youtube.com/channel/UC8C...gJmUA81luZQqZw

              Comment


              • #97
                Super Mario Bros. 3 (USA):

                NESSEPIA - Invincible (without side-effects).

                ZAKSZAAA - Get three tries on spade game (restores abandoned functionality)

                ATNSNXPE
                AVEIEZPE
                AVEIOXSA - Can never die (uses two pulls from the stack, then RTS), not added to database. It has some interesting side-effects to enemies, sometimes stopping them at their track when they are supposed to kill you , fun to experiment with. I created it to try a new method of skipping both the routine and the routine that called it, works fine for that purpose. I can imagine that it can be used when several different routines call one routine (like the dying routine in SMB 3), instead of having to stop that call in every routine you can just do two pulls and an RTS which makes you return two steps back. I'm going to see if this can be applied to other games as well.



                Bubble Bobble (USA):

                PEVKPYAA
                PENGYYAA - Pause to pause everything but you.

                Last edited by Cyperium; 05-01-2020, 04:42:53 AM.
                Check out my YouTube channel PolPon: https://www.youtube.com/channel/UC8C...gJmUA81luZQqZw

                Comment


                • #98
                  Rygar (USA):

                  AEVZTSGA
                  AENXAUGA - Walk through walls (on both sideview and overworld, but on overworld you only walk through walls left/right). Be careful if you walk beyond natural boundaries, some spots may give you Game Over even if you have a walk on water code on. This code doesn't allow you to walk on water.

                  Last edited by Cyperium; 05-03-2020, 07:45:43 PM.
                  Check out my YouTube channel PolPon: https://www.youtube.com/channel/UC8C...gJmUA81luZQqZw

                  Comment


                  • #99
                    Tiny Toon Adventures (USA):


                    List of speeds for all characters:


                    Dizzy Devil:
                    Run - 9359:18
                    Spin - 953D:18
                    Super Speed - N/A
                    Running Fall - 9545:18
                    In Water - Alternates between 9A65:08 and 9A6D:18
                    Super Speed Fall - N/A

                    Buster:
                    Run - 9537:28
                    Spin - N/A
                    Super Speed - 953B:38
                    Running Fall - 953F:28
                    In Water - Alternates between 9A65:08 and 9A6D:18
                    Super Speed Fall - 9543:38

                    Plucky Duck:
                    Run - 9538:28
                    Spin - N/A
                    Super Speed - 953C:34
                    Running Fall - 9540:22
                    In Water - Doesn't set speed limit address 0073 in water (might use some different speed limit there).
                    Super Speed Fall - 9544:28

                    Furrball:
                    Run - 953A:28
                    Spin - N/A
                    Super Speed - 953E:34
                    Running Fall - 9542:22
                    In Water - Alternates between 9A65:08 and 9A6D:18
                    Super Speed Fall - 9546:28


                    These can be changed to completely customize the speeds of the characters in different scenarios.

                    Normal Walking Max Speed (all characters) - 8344:18
                    Maximum Speed Limit - 8432:40

                    RAM:
                    0064 - Speed (walking E8 - 18)
                    0071, 0072 - Absolute speed (walking 0-18)
                    0073 - Max Speed
                    Last edited by Cyperium; 05-24-2020, 07:04:09 PM.
                    Check out my YouTube channel PolPon: https://www.youtube.com/channel/UC8C...gJmUA81luZQqZw

                    Comment


                    • Super Mario Bros. 2 (USA):

                      AXNEVVSA
                      SXNENTGZ
                      OAEAEYTE
                      SXXASONN
                      ZXXAVONN
                      GEXANONY
                      AUXEEONY
                      POXEOONY
                      SXXEXONN
                      LXXEUONN
                      GEXEKONY
                      OKXESONN
                      EKXEVONY
                      EOXENONY
                      ZEUAEONN
                      SXUAOONY
                      SNUAXONY
                      AUUAUONY
                      TEUAKONY
                      SXUASONY
                      ZUUAVONY
                      OKUANONN
                      EKUEEONN
                      EUUEOONY
                      TEUEXONY
                      OXUEUONN
                      AEUEKONY
                      SEUESONN
                      GXUEVONY
                      TEUENONY
                      AVKAEONY
                      SXKAOONY
                      ZSKAXONN
                      PEKAUONN
                      GEKAKONY
                      SEKASONY
                      ZSKAVONN
                      OXKANONN
                      AEKEEONY
                      SEKEOONY
                      OOKEXONN
                      SEKEUONY
                      TKKEKONY
                      OXKESONN
                      EKKEVONN
                      SEKENONY
                      ZUSAEONY
                      ESSAOONY
                      EVSAXONN - Walk On Pits.


                      Code:
                      8EFE:
                      JSR $89A5 - Jump to the subroutine to check if player is in the pit and act accordingly (this replaces STA $0624 at this position).
                      
                      89A5:
                      LDA $042A - Load address to see if player is above the screen.
                      BMI $89BB - If player is above the screen (042A = FF) then exit (otherwise player will walk ontop of the screen as well).
                      LDA $042B - Load players Y screen value to see if player is near the bottom of the screen.
                      CMP #C0   - The value Y is when it is near the bottom of the screen.
                      BCC $89BB - Exit if player is above that point (this keeps the player from walking in the middle of vertical levels).
                      LDA $00F5 - Load controller status to check jump button.
                      BMI $89BB - Jump button was pressed so exit (otherwise you can't jump while on the pit).
                      LDA $0032 - Load players Y value.
                      CMP #C8   - Compare it to the very bottom of the screen.
                      BCS $89C1 - Branch to walk on pit routine if it is equal or below that point.
                      
                      89BB:
                      LDA #00
                      STA $0624 - Load 00 and store to $0624 to restore previous state from the routine we jumped from.
                      RTS       - Exit.
                      
                      89C1:
                      LDA $005A - Load hit detection address.
                      ORA #04   - Set "on ground" state.
                      STA $005A - Store it to the hit detection address.
                      LDA #00
                      STA $0099 - Set on ground status.
                      STA $0046 - Set player's Y velocity to 0.
                      LDA #C8   - Load value that represent the very bottom of the screen.
                      STA $0032 - Store it to the players Y address (to keep player in place).
                      BNE $89BB - Exit.
                      Last edited by Cyperium; 07-28-2020, 05:29:21 PM.
                      Check out my YouTube channel PolPon: https://www.youtube.com/channel/UC8C...gJmUA81luZQqZw

                      Comment


                      • Legend Of Zelda, The (USA):

                        EYKTOGET
                        ENXLZXGG

                        ENXLLXIA
                        LEXLGXTZ
                        AXXLIZIA
                        OXXLTZEI
                        NUXLYXPA
                        KXXLPNXX
                        TSXLZYEY
                        TEXLLYGZ
                        ENXLIYGA
                        TKXLGYET - Press SELECT To Switch Items/Weapons.


                        If you want the selection sound effect when switching weapons/items using SELECT, add this code:
                        AEXLYYAZ


                        Code:
                        Changes marked with green:
                        
                        
                        In the pause routine (when pressing SELECT):
                        07:EC36: A5 F8      LDA $00F8 = #$20         'This checks controller for SELECT
                        07:EC38: 29 20      AND #$20
                        07:EC3A: F0 0D      BEQ $EC49                'If SELECT flag is zero go to check if game is paused.
                        07:EC3C: A5 E0      LDA $00E0 = #$00
                        07:EC3E: 49 01      EOR #$01                 'Register A will always become 1 since E0 will always be 0 here.
                        07:EC40: 85 [COLOR=green]F0[/COLOR]      STA [COLOR=green]$00F0 = #$00[/COLOR]         'I use F0 as a flag to switch items. This is needed since the item selection routine is in a different bank (bank 05).
                        07:EC42: D0 05      BNE $EC49    
                        07:EC44: A9 0F      LDA #$0F
                        07:EC46: 8D 15 40   STA APU_STATUS = #$0F
                        07:EC49: A5 E0      LDA $00E0 = #$00         'Check to see if game is paused, since E0 was never set (was replaced with F0) this will always be 0, as if pause didn't happen.
                        07:EC4B: F0 0B      BEQ $EC58            
                        07:EC4D: A9 05      LDA #$05                 'Prepare for pause.
                        07:EC4F: 20 AC FF   JSR $FFAC                'This routine switches bank to number 5, the value of the A register (I use this fact for the updated code next post).
                        07:EC52: 20 59 B5   JSR $B559                'Goes to a routine that actually does nothing, but could have had a different purpose earlier in development (like hiding sprites when paused or something, since a variable is present that sets the PPU mask flags).
                        07:EC55: 4C 89 ED   JMP $ED89                'Do pause...
                        07:EC58: 20 1D 6E   JSR $6E1D                'No pause...
                        ...continues with normal functionality after this point.
                        
                        
                        In sword-swinging routine:
                        05:B2A1: A5 [COLOR=green]F0[/COLOR]      LDA [COLOR=green]$00F0 = #$00[/COLOR]         'See if the item switch flag is set (replaces check to see if link is stunned).
                        05:B2A3: [COLOR=green]F0 03      BEQ $B2A8[/COLOR]                'If item switch flag is zero, continue normal operation (checking if Link swings sword).
                        05:B2A5: [COLOR=green]20 A1 B7   JSR $B7A1[/COLOR]                'If item switch flag is non-zero, jump to item selection routine (then return to checking if Link swings sword).
                        05:B2A8: A5 F8      LDA $00F8 = #$00
                        05:B2AA: 29 80      AND #$80
                        05:B2AC: F0 03      BEQ $B2B1
                        ...continues with normal operation after this point.
                        
                        
                        
                        In the item selection routine:
                        05:B7A1: [COLOR=green]AC 56 06  LDY $0656 = #$06[/COLOR]          'Load Y with the current item selection position.
                        05:B7A4: [COLOR=green]46 F0     LSR $00F0 = #$01[/COLOR]          'Clear item switch flag.
                        05:B7A6: B0 20     BCS $B7C8                 'If F0 is 1 the LSR above sets the carry, which skips the selection sound effect, add the sound effect code to remedy this (B7A7?20:00  =  AEXLYYAZ).      
                        05:B7A8: A2 01     LDX #$01
                        05:B7AA: 8E 02 06  STX $0602 = #$00
                        05:B7AD: AA        TAX
                        05:B7AE: AD 56 06  LDA $0656 = #$06
                        05:B7B1: 48        PHA                       'Push A (current item selection position) to the stack.
                        05:B7B2: 8A        TXA
                        05:B7B3: 20 C8 B7  JSR $B7C8
                        05:B7B6: 68        PLA                       'Pull A from the stack (current item selection position).
                        05:B7B7: CD 56 06  CMP $0656 = #$06          'Has the current item selection position changed?
                        05:B7BA: F0 08     BEQ $B7C4                 'Yes, then go to B7C4,
                        05:B7BC: AC 56 06  LDY $0656 = #$06
                        05:B7BF: B9 57 06  LDA $0657,Y @ $065A = #$03
                        05:B7C2: D0 03     BNE $B7C7
                        05:B7C4: 4E 02 06  LSR $0602 = #$00
                        05:B7C7: 60        RTS -----------------------------------------
                        05:B7C8: 85 EF     STA $00EF = #$01
                        05:B7CA: A2 09     LDX #$09
                        05:B7CC: 20 21 B8  JSR $B821                 'This routine increases Y and checks boundaries etc.
                        05:B7CF: C0 00     CPY #$00
                        05:B7D1: F0 1F     BEQ $B7F2
                        05:B7D3: C0 03     CPY #$03
                        05:B7D5: F0 09     BEQ $B7E0
                        05:B7D7: B9 57 06  LDA $0657,Y @ $065A = #$03
                        05:B7DA: D0 09     BNE $B7E5
                        05:B7DC: C0 07     CPY #$07
                        05:B7DE: F0 28     BEQ $B808
                        05:B7E0: CA        DEX
                        05:B7E1: 10 E9     BPL $B7CC
                        05:B7E3: A0 00     LDY #$00
                        05:B7E5: C0 02     CPY #$02
                        05:B7E7: D0 05     BNE $B7EE
                        05:B7E9: AD 5A 06  LDA $065A = #$03
                        05:B7EC: F0 DE     BEQ $B7CC
                        05:B7EE: 8C 56 06  STY $0656 = #$06          'This stores the new Y value to the item selection position address after it has been changed properly.
                        05:B7F1: 60        RTS -----------------------------------------
                        ...continues normally from here...
                        Last edited by Cyperium; 10-10-2020, 02:34:53 PM.
                        Check out my YouTube channel PolPon: https://www.youtube.com/channel/UC8C...gJmUA81luZQqZw

                        Comment


                        • Legend Of Zelda (USA), The:

                          New updated code to switch items using SELECT:

                          KZKTEGSE
                          TIKTOGET
                          TAKTXGEI
                          OZSTXGAX
                          PASTUKPI
                          AZSTKGSL
                          OZSTSKGG
                          NLSTVKOA
                          XTSTNKSV
                          GZKVEGAK


                          This code only reside in the pause routine and uses the fact that the pause routine actually changes bank to 05. Managed to shrink the amount of codes to 10.
                          Check out my YouTube channel PolPon: https://www.youtube.com/channel/UC8C...gJmUA81luZQqZw

                          Comment


                          • Metroid (USA):

                            Press START To View Map (updated to solve bugs):

                            ILUKZPXP
                            XGUKLOUK
                            OZUGSXAK
                            AIUGVXAG
                            SAUGNZAZ
                            OGUKEZVO
                            SAUKOXXG
                            XGUKXXSX
                            XZUKUZKA
                            AAUKKXAT
                            SZUKSZAP
                            AIUKVXIA
                            SAUKNXPZ
                            NLKGEZPA
                            SZKGOXSA
                            YGKGXZKE
                            SAKGUXAT
                            ELKGKZAX
                            SZKGSZOZ
                            ZIKGVXXK
                            AGKGNXOX
                            SZKKEZPA
                            PYKKOXOO
                            AGKKXZAE
                            SZKKUXAY
                            YGKKKZSX
                            OTKKSXTO
                            GAKKVXOG
                            SAKKNZPA
                            YGSGEZEN
                            AZSGOZAZ
                            OASGXZSX
                            XGSGUZGN
                            AZSGKZAZ
                            LLSGSZVG
                            NTSGVXXG
                            EPSGNZEZ
                            ALSKEXYU
                            APSKOXOU
                            VTSKXZVA
                            AISKUXAT
                            SZSKKZOP
                            OGSKSZAE
                            PTSKVXEE
                            AASKNZAO
                            SAVGEXEY
                            OGVGOXKX
                            OGVGXZIN
                            SPVGUXAT
                            EPVGKZXZ
                            VTVGSZAE
                            OZVGVXSU
                            AIVGNZTY
                            SAVKEXAT
                            OGVKOXOO
                            AZVKXXVY
                            OAVKUZYN
                            XGVKKXEK
                            APVKSXEV
                            VTVKVZET
                            YGVKNZAO
                            SZNGEZEI
                            XGNGOZKN
                            PTNGXXAV
                            AANGUZAX
                            SANGKZVG
                            XGNGSXXK
                            OGNGVZEX
                            SPNGNXYL
                            EPNKEZOL
                            XINKOZAE
                            AINKSXEA
                            SZNKVZAP
                            ELNKNXEN
                            SEEGEZAL
                            YKEGOZPE
                            AVEGXXAK
                            SEEGUXKZ
                            PNEGKZIN
                            AVEGSXAV
                            SEEGVZXZ
                            ZSEGNZAE
                            AVEKEXOL
                            AOEKOXVN
                            SXEKXZYY
                            NUEKUXSP
                            OVEKKZTN
                            GEEKSXAT
                            SEEKVXEG
                            ASEKNXET
                            AVOGEZET
                            OKOGOZAO
                            PEOGXZEI
                            ESOGUZKY
                            IEOGKXAT
                            OXOGSZAV
                            ZSOGVXSX
                            AXOGNZSA
                            VUOKEXAT
                            XKOKOXZE
                            SXOKXXZA
                            ASOKUXZA
                            SKOKKXZA
                            NUOKSXSA
                            ESOKVZIY
                            TEOKNXAV
                            SXXGEZAT
                            YKXGOXOX
                            SKXGXZAA
                            EUXGUZAX
                            ESXGKZVG
                            AEXGSXXK
                            OXXGVZVV
                            YVXGNZLE
                            AXXKEZEZ
                            VUXKOZAA
                            XKXKXXEO
                            SZNKXXOP
                            NLNKUZVA
                            SANKKXAT
                            GKXKUZOO
                            PSXKKZAE
                            XKXKSZEK
                            OXXKVZAK
                            TVXKNZEU
                            AXUGEZZA
                            VUUGOZOP
                            XKUGXZZE
                            GKUGUXEK
                            PSUGKZES
                            XKUGSZSN
                            SOUGVXKX
                            PEUGNZIY
                            ZEUKEXAT
                            OXUKOZXX
                            PEUKXZAA
                            SOUKUXXE
                            ZEUKKXOP
                            ZEUKSXVY
                            SXUKVZYY
                            XKUKNXEK
                            SOKGEXEV
                            AEKGOZET
                            ZEKGXXGA
                            SXKGUZEI
                            OKKGKZNN
                            SOKGSZAV
                            LEKGVXAG
                            ZEKGNXSZ
                            EVKKEZSE
                            EVKKOXAV
                            EVKKXXZE
                            EVKKUXXX
                            AVKKKXSL
                            APUGYPSE
                            XTUKAPPU


                            Code:
                            showmap:
                            LDA #50
                            STA $C9 'xpos
                            STA $CA 'ypos
                            LDX #00
                            LDA $50 'x map position.
                            STA $B7 'store to $B7 for safekeeping as it is the x map position the game uses.
                            LDA $4F 'y map position.
                            STA $B8 'store to $B8 for safekeeping as it is the y map position the game uses.
                            LDA $5A 'current room number.
                            PHA     'push to stack for safekeeping.
                            LDA $79 'item room music flag.
                            PHA     'push to stack for safekeeping.
                            LDA $4F
                            SBC #04
                            STA $4F 'subtract #04 to the y position (the map should start reading four rooms up and four rooms to the left).
                            JSR subtract4 'subtract #04 to the x position (this is also used for resetting the x position each row).
                            
                            loop:
                            JSR E733      'E733 is part of the get room number from x,y position routine. It returns carry clear if room is valid.
                            BCC placeroom 'places room on the map if it is a valid room.
                            
                            next:
                            CLC
                            INC $50  'increase the x map position.
                            LDA $C9
                            ADC #08
                            STA $C9       'add #08 to xpos (xpos is used to draw the map and the grid size is 8).
                            CMP #95       'have we reached the end of the column?
                            BCC loop      'no, loop.
                            LDA #50       'yes.. 
                            STA $C9       'reset xpos.
                            JSR subtract4 'reset x map pos.
                            CLC
                            INC $4F       'increase map y position.
                            LDA $CA
                            ADC #08
                            STA $CA       'add #08 to ypos (ypos is used to draw the map and the grid size is 8).
                            CMP #95       'have we drawn the entire map?
                            BCC loop      'no, loop.
                            
                            finish:
                            LDA $B7       'restore some key variables to the condition it was before before ending the map routine.
                            STA $50
                            LDA $B8
                            STA $4F
                            PLA
                            STA $79
                            PLA
                            STA $5A
                            RTS
                            
                            subtract4:
                            CLC
                            LDA $B7
                            SBC #04
                            STA $50 'subtract #04 from the x map position. Used for initial value, and to reset the x map position.
                            RTS
                            
                            placeroom:
                            CMP #01          'the get room number function loads #01 into A if it should change to item room music.
                            BNE checkcurrent
                            LDA #5A          'the function indicates item or elevator so load #5A to A which is a arrow tile.
                            JSR addsprite    'add the sprite.
                            
                            checkcurrent:
                            LDA $50
                            CMP $B7          'is the map x position the same as when we started the map?
                            BNE place        'no, place empty room sprite.
                            LDA $4F
                            CMP $B8          'is the map y position the same as when we started the map?
                            BNE place        'no, place empty room sprite.
                            LDA #6F          'yes, both x and y are the same as when we started the map so place filled room tile.
                            JSR addsprite
                            JMP next
                            
                            place:
                            LDA #6E          'place empty room sprite.
                            JSR addsprite
                            JMP next
                            
                            
                            addsprite:
                            STA $0201,x      'tile id is stored here.
                            LDA #01
                            STA $0202,x      'palette number #01
                            LDA $C9
                            STA $0200,x      'y coordinate of sprite.
                            LDA $CA
                            STA $0203,x      'x coordinate of sprite.
                            INX
                            INX
                            INX
                            INX              'increase x for next sprite.
                            RTS
                            Last edited by Cyperium; 08-16-2021, 06:51:16 PM.
                            Check out my YouTube channel PolPon: https://www.youtube.com/channel/UC8C...gJmUA81luZQqZw

                            Comment

                            Working...
                            X