News: 11 March 2016 - Forum Rules, Mobile Version
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Lenophis

Pages: [1]
1
Help Wanted Ads / Super Mario All Stars
« on: May 14, 2017, 01:51:16 pm »
So I'm doing a small hack for Super Mario Bros 3 for Super Mario All Stars, but I've hit a really odd snag I can't figure out.

Going through this door to Boom Boom...


Takes you back to the first room of the fortress.

Going through the spike room door in the world 2 fortress also does the same thing, takes you back to the first room of the fortress. The only thing either of these rooms have in common is both rooms scroll.

I updated the HUD code to support 3-digit coin numbers. If I don't include the updated HUD, the doors work fine. That leads me to believe my HUD code is broken in some fashion:
Code: [Select]
org $29E6ED

LDA $1D80,X  ; with indexing, it should be at $1DA2 for mario
CLC
ADC $0422
STA $1D80,X
BCC _ThirdCoin  ; first logic check, making sure a third digit is incremented!
INC $1D82,X
_ThirdCoin:
; so now we need to do display stuff, essentially just adding in support to increment the third digit
JSL $3BF400  ; update coins
STZ $0422
RTS

padbyte $00 : pad $29E72F


org $3BF400
REP #$20
PHA  ; save upper A before it gets destroyed, just in case it's needed
SEP #$20
LDA $1D82,X
XBA
LDA $1D80,X
REP #$20
CMP #$03E8  ; 1000 coins?
BCC not_maxed_out ; this branch will generally always be taken
; but if for some reason it's not, let's do max numbers
PLA  ; restore A
SEP #$20
LDA #$E8
STA $1D80,X
LDA #$03
STA $1D82,X
LDA #$99
STA $1F30
STA $1F48
STA $1F49
RTL

not_maxed_out:
STA $1F60  ; store it away for now
SEP #$20
LDA #$03  ; 3 loops
STA $1F62
PHY  ; preserve Y, we likely need it
LDY #$00
TYX
mathloop1:
REP #$20
LDA numbertable,X
INX
INX
STA $1F63  ; for math
STZ $1F65  ; and more math
mathloop3:
SEC
LDA $1F60  ; load our original value
SBC $1F63  ; and subtract our LUTs value, either 100, 10, or 1
BCC mathloop2  ; if carry is clear, we wrapped
STA $1F60
INC $1F65
BRA mathloop3
mathloop2:
CLC
ADC $1F63
STA $1F60  ; effectively restoring our original value
SEP #$20
LDA $1F65
ORA #$90
STA $1F67,Y
INY
DEC $1F62
BNE mathloop1
PLY
REP #$20
PLA
SEP #$20
; now that all of the conversions are done, we need to get them to display
LDA $1F68
STA $1F48  ; ten's digit
LDA $1F69
STA $1F49  ; one's digit
LDA $1F67
STA $1F30  ; hundred's digit
RTL

numbertable:
DW $0064
DW $000A
DW $0001

I've used different values for my math, including scratch DP and other locations in ram that don't look like they're used. I've run comparison traces from original and this hack, and no appreciable differences have been spotted. This HUD is updated every frame, but doesn't execute while Mario is in the process of going through a door. The stack is still stable, correct bank is still in play, and register sizes are what they should be.

My best guesses are either I've triggered some goofy copy-protection, or my code is just too slow. If it's too slow, it's only by a matter of cycles, since the vanilla game uses a rather sloppy method to do 2-digit coin display.

Would anyone be willing to take a look at it and see what could be wrong?

2
ROM Hacking Discussion / FF6 randomizer
« on: August 27, 2014, 03:02:03 pm »
Hi ho. Dessyreqt and myself have been working on a little project for Final Fantasy 6, aptly called "FF6 randomizer." You can find it here. It is meant to just have some fun, and if racing is your thing, you can race a buddy with this as well. Current version is VI, released on October 15, 2014.

What this does randomize:
  • Character starting stats. It takes the maximum stat a character has, for instance Gau's 99 battle power, and the lowest, Strago's 10 battle power, and picks a number in that range for each character. Most stats will generally be higher as a result.
  • Treasure chests. All treasure chests in the game, save for the Striker in the Cave of the Veldt, have been put into tiers and will be chosen at random. This means you will not get a Ragnarok in Figaro Castle. If a chest contains a Potion, that chest will have something similar to a Potion. Also because of the tiers, a couple of Monster-in-a-Boxes have been added.
  • Character skillsets. Terra gets Rage? Sabin can Steal? Umaro can Runic? Sure, why not. To account for non-Gau getting Rage, and because of Gau's recruitment in the WoR, Leap has been removed entirely. Don't worry, leaning Rages is very, very easy now.
  • Natural abilities. The starting Rages, Lores, and spells of whoever has those skills has been shuffled around.
  • Shops! Items that appear in shops are shuffled around, except the Sprint Shoes. Any shop that sells the shoes will still have them.
  • Character names and palettes. Should be fairly self-explanatory.
  • Equipment. Specifically, who can equip what. This also accounts for starting equipment.
  • Espers. The spells they teach, and the rate they teach at have been shuffled around. It will be generally easier to learn spells now. However, there is no guarantee every spell will be available.
  • vVI - Colosseum items. The items you win in Dragon's Neck have been shuffled around.
  • vVI - Enemy drops and steals. They have been grouped into a tier system similar to the treasure chests and shops.
  • vVI - The RNG table. How a random number is fetched hasn't been changed, but the table from which those numbers have been generated are.



Bug fixes:
  • vVI - Psycho Cyan. Cyan, under certain circumstances would counter-attack his own attacks, which will eventually kill all enemies on the field.
  • vVI - Vanish/Doom. Vanish will now behave according to how it does in Final Fantasy VI Advance.
  • Evade. The evade stat was never referenced for any dodging, so the stat was useless.

New feature!
The interface of the randomizer will now let you set your configurations of the game before you generate your rom, basically so you never have to do it unless you need to change something mid-game. Whatever settings you use will be saved so you never have to redo them for each new rom.

Just in case the text above doesn't tell the whole story, both Dessy and myself have streamed a few sessions of the randomizer. My older one from mid-July can be found here, and a highlight from Dessy from just 3 days ago (August 24) can be seen here. While the whole video is still there, you can watch that too, but with recent changes to Twitch it won't be available for very long.

What this does not, and will not change, ever:
  • Dialogue
  • Story
:crazy:

So yeah, please check it out, and if you have any bugs to report, do so here so we can squash them! Any feedback is also welcome! Most importantly, have fun! :laugh:


Clarifying who did what:
Dessyreqt did all of the UI/program stuff, and I did all of the game hacking stuff.

3
ROM Hacking Discussion / What's a demo? Open that box and find out.
« on: July 17, 2013, 02:33:56 pm »
The most highly-unexpected-update of all time! May the haters hate and the enjoyers enjoy.

Pages: [1]