Language…
6 users online: Cristian Cardoso, fsvgm777, JezJitzu, KoJi, playagmes169, stormitive - Guests: 238 - Bots: 366
Users: 64,795 (2,377 active)
Latest user: mathew

My patch makes my overworld break.


I'm trying to make a patch that skips the titlescreen and jumps directly to a level, but when the level ends, the overworld is broken.


I think it's something to do with skipping over the overworld decompression routine, but I can't seem to find where that happens.

My asm is rather short:

Code
ORG $009C67                    ; hijack the second thing in the title screen
autoclean JSL leveljump
NOP                            ; r.i.p leftover byte

freecode
leveljump:
LDA.B #$E9                
STA.W $0109                    ; #$E9-24=C5: the intro level number
LDA #$0F
STA $0100                      ; set the gamemode to #$0F, the level fade
RTL


I can't really figure this out, it's my first patch and it's a bit confusing for me.
Any help would be appreciated, thank you.


Discord: Ally 🌠#1540 | Site: ally.moe | GBAtemp: Invision
Join the VVVVVV server! discord.gg/Zf7Nzea




What I thought was wrong, was a mistake from my site... As @WhiteYoshiEgg said, your hijacking place was completely fine ;)

EDIT: I tried to patch that and it also resulted in a broken overworld ... Maybe the problem lies within the clear of the level?

EDIT 2: I doesn't seem, that i can find the problem... Sorry! :(

Result: I'm probably not good enough, to find the problem to this... :/ Maybe someone else can help you! :DI don't know what to put here.
Originally posted by badummzi
You should change the ORG $009C67 to ORG $009C64 ;)

Why would that be?

You don't need to hijack the beginning of a routine - it's perfectly fine to hijack any spot inside it if you know what you're doing. $009C67 works as a hijacking spot, and (looking at the NOP count) it's what Luigi_master intended.

Is there something I'm missing as far as game logic goes?


 
Oof, yeah right O_O I was wrong with that!

Of course $009C67 should work!

Thanks @WhiteYoshiEgg! ;)

Do you have any idea, where the problem could be?I don't know what to put here.
Originally posted by badummzi
Do you have any idea, where the problem could be?

Unfortunately not. #tb{''} Looks like there'd be a bit of research involved.

Maybe you (Luigi_master) could try increasing the game mode one by one? That'd kind of be the lazy way to make sure you're not skipping any code. What I mean is hijacking game mode 02 to go straight to game mode 03, hijacking 03 to go straight to 04, and so on, until 0F. You should check a disassembly for the details of when the original game switches modes and what else is done alongside it.

I'm not sure that will work, and if it does, it might be laggy and/or look weird. (And all that is assuming you still need help with this, two months later.)


 

Oops, I'm a bit late

I've noticed that, when going to the overworld, if you set $0109 to a level, it loads that instead, and when the level is exited, it loads the overworld fine (though I've noticed when activating the message through a message box instead of auto displaying text, the overworld intro march doesn't happen? I think that's simply storing #0C in $13D9, but I'm unsure how I'd get it to trigger when the level ends)

Basically, I can set $0109, initialize graphics and the overworld, and it handles the rest.


Discord: Ally 🌠#1540 | Site: ally.moe | GBAtemp: Invision
Join the VVVVVV server! discord.gg/Zf7Nzea