Banner
Views: 755,313,560
Time:
7 users online: bandicoot, ClassicSnesGuy, DPBOX,  Ivy, kiki79250, MrDeePay, Romano338 - Guests: 40 - Bots: 170Users: 39,704 (1,817 active)
Latest: Mrmetech
Tip: Palettes 0-3 do not work correctly on the overworld unless you use LM's option to disable the event reveal animation.Not logged in.
Yoshifanatic's ASM Showoff: The Sequel
Forum Index - Sunken Ghost Ship - C3 Museum - Summer 2016 - Yoshifanatic's ASM Showoff: The Sequel
Pages: « 1 2 »
Happy C3, guys! :) Since last C3, I've been working on quite a bit of ASM related stuff for my next SMW hack (it's a kaizo hack tentatively titled "I Wanna Be The SMW Hack"), and I've got a lot to show off. Anyway, lets cut to the chase and get straight to all the stuff I've coded in the past 6 months:

- Dynamic SMW sprites
I'll let this .gif speak for itself:



What you're seeing is a single test level with a large chunk of SMW's normal sprites all present and none showing any glitched graphics. How did I do this? By both creating a system that allows SMW to dynamically upload sprite graphics as needed and converting many of SMW's regular sprites to make them use said system. However, rather than simply move their graphics routines and make some changes to them (which was the initial plan), I instead created a generic graphics routine that any normal sprite can call to handle their graphics (it combines the function of Suboffscreen0X, GetDrawInfo, and FinishOAMWrite, and it's called after doing some setup that tells the routine where to look for the sprite graphics data) due to this way being an overall better way of implementing this than the previous way I did it.


If you guys would like a demonstration of this functionality, here is a download of an alpha version of my next hack:
Link

Go ahead, place almost any regular sprite into 105 and load it up and it should appear with its correct graphics even though the wrong graphics are intentionally displayed in Lunar Magic. However, these sprites have not been converted yet: Chucks, Ball n' Chain, Wiggler, Big Boo Boss, Magic, Stunned Fish, Sumo Lightning, Climbing Door, Peach, Koopalings, Chained Platforms, Reznor, Stunned Throw Block, Sprite Berry, Stunned Yoshi egg, sprite coins (level end), Flying item sprites, Koopa shell with eyes peeking, All extended, score, cluster, minor extended, bounce, overworld, and coin sprites, and any miscellaneous sprite tiles drawn by routines. Also, some sprites, like Big Boo and Lakitu, show up with the correct graphics, but are glitched in some way or not fully converted yet. In addition, there also seems to be some flaws with the tile allocation system currently, meaning sprites sometimes glitch up when used together. I'll be sure to fix these issues though.


Also, here is a link to a beta version of the patch:
Link

Note: This patch will not work correctly if you try to apply it to a clean SMW ROM because I haven't gotten this to work quite yet in normal SMW. This download is intended to give you guys an idea of the scope of this patch as well as allow the more experienced ASM coders to give feedback (which I'd really appreciate). However, just a quick note if you're going to give feedback on the code:

- The RAM addresses the patch uses are the ones I'm currently using in my hack, as they're basically freeRAM in my hack. They'll likely be changed in the final patch.
- Any routine where this is a comment consisting of three #s basically means that that routine is unfinished.
- Some stuff in this patch is a little experimental (like moving the code that gets the OAM slot to use to within the generic routine rather than have that done in the main sprite loop) and may not be in the final patch if it breaks things horribly.

By the way, because of how big of a patch this is, if anyone wants to help me out with this, let me know.

Chances of this being released as a patch: High (It's going to be a while and it will likely be incompatible with a lot of things, but it will be released eventually.)

- More Extended Sprites






Basically, I've increased the limit of the number that can exist at once by converting minor extended, spinning coins, score, and bounce sprites into extended sprites and changing the RAM addresses used by the extended sprite tables so that the expanded tables can fit. With this change, I can not only have more enemy projectiles on screen, but I can also have more bounce and smoke sprites as well (normally you can only have 4 of either). Of course, because these sprites are now all the same type in my hack, I created a priority system so that the less important sprites (like the graphical effects sprites) can be overwritten by more important sprites, though not every sprite is set to use it at the moment. The current limit is 32 extended sprites, with 3 slots reserved for Mario's fireballs.

In addition, in order for me to make SMW be able to more easily handle having more of these sprites at once, I've made it so that every type of sprite besides regular ones and Mario run their code every other frame instead of every frame. Among the ones that I've converted to work correctly while running at 30 FPS, you shouldn't be able to notice it, neither visually or gameplay wise.

Chances of this being released as a patch: Unknown (I haven't fully finished the implementation of this in my hack, and even if I did, I'm not sure if it'd be worth the compatibility issues).

- Custom Stun State for Sprites:


Basically, what this is is that I've implemented a custom state for sprites that Yoshi puts sprites in when he spits them out. This will allow me to recreate a mechanic from Yoshi's Island that is absent from YSQ where Yoshi is able to hold enemies in his mouth and spit them out, sometimes causing the enemy to do some special behavior, such as swoopers flying away from you at an upwards angle. Currently, I haven't made that many sprites use this, but I plan on giving more sprites custom behaviors. I also plan on adding a custom state for sprites when Yoshi swallows them which will cause different effects depending on what Yoshi swallows.

Also, if you plan on testing this out in the alpha of my hack, know that only the sprites shown in the .gif have any special behaviors. For any other sprite Yoshi can hold in his mouth, their custom stun state is putting them in their normal or regular stunned state.

Chances of this being released as a patch: Low (I'd have to think of a different way of implementing this for the average hack).

- MSU1 Idea
Back in October, I was having an argument with Alcaro about the MSU-1, mainly due to some issues with using the MSU-1 in hacks. One of the issues was that the file size of the PCMs would make hosting them difficult, either here or eleswhere (though for different reasons). I thought of an idea recently that would help a lot with this issue, and that is that, instead of distributing the PCMs directly, why not distribute the songs as MP3s (or another compressed audio format) and provide an easy, automatic way of converting the files into PCMs? To give you guys an idea of how much this saves, I've included 11 MP3s of songs I'm thinking of using in my hack in the download for the alpha of my next hack, which total up to 16.9 MB in size. After double clicking the included .bat file I made and waiting for the conversion to finish, the newly generated PCMs total up to a whopping 186 MB. So basically, I've just reduced the download size to roughly 1/10th of what it would be if you downloaded the PCMs directly. So, not only would this make hosting easier, but it will also make it a lot easier for those with bad internet connections to download the MSU-1 songs. Of course, the there are some issues with this method (won't work on non-windows computers, filesize is still too high if you have a lot of songs, etc.) and there is still the issue of the other two things mentioned (BSNES/Higan only currently, and the unstable format used by the MSU-1), but it's a step in the right direction. I feel more discussion is needed in order for this idea to improve, though. One suggestion I have is that someone ought to make a tool that performs the function of the .bat file and the two programs included in the download, as well as perhaps the tool being able to convert a more compressed audio format than MP3 into PCMs.

Also, if you want to try out the .bat file, you need to go download lame.exe and wav2msu.exe somewhere as well as put these programs, the MP3s, and cmd.exe in the same folder as the .bat file. You'll also need to rename the ROM you apply the IPS patch to to smw.smc.

Chances of this being released as a patch: N/A (This isn't really a patch...)

Name Entry Screen:


Pretty self explanatory. Because this is something that should only come up for a blank save file, I made it so that the game automatically skips the name entry (and the difficulty selection) if you select a used save file. Currently, this doesn't do much, but I do plan on making it so that the name you enter has some effects, such as appearing in place of "Mario" on the save file and possibly having certain names act like cheat codes.

Controls:
D-Pad - Move cursor (Cursor wraps around if you move it where there is no letter)
Y/X - Delete letter, go back to difficulty selection
A/B - Select letter
Start - Make cursor jump to END.

Chances of this being released as a patch: High (If I change how this handles slightly, I can release this, However, the custom name won't be saved unless you use a different patch that lets you save it. Also, any functions that the custom name will have in game are going to be the responsibility of the user to implement).

Custom Save System:


You know how in I Wanna Be The Guy when you reload your last save, it reloads the level and the position you were at when you last saved? Well, that's what I implemented in my hack. Because of this, I've also rewritten SMW's save system so it can handle this.

If you want to test this out in the alpha version of my hack, simply place a regular message box anywhere you want and then place map16 tile 200 under it, and the message box will turn into a save block.

Chances of this being released as a patch: Unknown (While this would be very useful, the current implementation of this in my hack may not be suitable for the average hack).


Anyway, that's it for the new stuff I have to show. Here's a quick update on all the stuff I showed off last C3:


- Lunar Magic ASM Hack Dissassembly
I've dissassembled a bug fix that was made in 2.41 and also updated a few things, like the VRAM patch disassembly. Unless I missed something, the only thing that hasn't been disassembled are the compression patches.

Chances of this being released as a patch: Depends (If Fusoya isn't against it, I'll post all the LM ASM hacks I disassembled so others can better document the ASM hacks as well as have an easier time making patches that won't break compatibility with LM).

- Dynamic Level Loading
Hasn't been touched much. The only thing I did for it recently was further optimize the routine at $058126, which is a routine that stores the BG tilemap to $7EB900 during level load. However, ZSNES doesn't seem to like this change as the BG often ends up garbled and I have no idea why. Also, I seemed to mess something up at one point in the latest aplha, as the X/Y position Mario is placed when the game loads a new area is wrong for some reason.

Chances of this being released as a patch: High (Too awesome for it not to be released eventually)

Edit: Well, I guess the day after C3 started is eventually I guess. :P

For information on how to use this beta patch, check this post:
Link

- Screen Scrolling Pipes
Haven't been touched aside from maybe a bux fix or two.

Chances of this being released as a patch: Depends (If you guys mess around with the ones I have in my hack and find that my screen scrolling pipes are better than the existing ones, then I'll release my screen scrolling pipes).

- Custom Yoshi
I've re-coded the Mario GFX routine to use my generic sprite GFX routine. In addition, I can now specify what pose Mario shows for each pose Yoshi can display as well as the order in which Mario, Yoshi's head, and Yoshi's body are drawn in.

Chances of this being released as a patch: Very Unlikely (This was something I made specifically for my hack)

- IWBTG Style Death Routine
I've made the Mario head be a special state for Mario instead of it being a custom sprite, and I've altered several Mario routines to reflect this. This change made this routine run faster, have less bugs, and allows the Mario head to interact with stuff without any additional code. Also, my custom save system now allows you to reset to where you last saved, and I added an Easter egg if you try to save after Mario has already died.

Chances of this being released as a patch: Unlikely (I might release this, but some aspects of it wouldn't be ported over due to issues with getting my implementation of this working in normal SMW.

- Dynamic SMW Sprites
Scroll up.

Chances of this being released as a patch: Maybe (It's a secret. :P)

- Trigger Spikes
Haven't been touched at all.

Chances of this being released as a patch: High (They'll eventually have a lot of utility as they will have functions besides acting as traps).

Also, here is something that I made a while ago for Yoshi's Strange Quest that I can release, specifically a patch that enables you to scroll the screen vertically with up and down:


Link

Edit: This is how far the camera scrolls down by default:

In the .gif, the screen doesn't scroll down as far because the camera reached the bottom of the level.


Anyway, that's it for what I wanted to show you guys for this C3. I hope you guys liked what I had to show! :) If any of you have any questions, let me know.

--------------------
My Hacks:
Mario's Strange Quest V1.6
Yoshi's Inside Story (on hold)
Yoshi's Strange Quest V1.3 / V1.3.1 Beta 4.6 / Latest Test Build (Mario & Yoshi's Strange Quests)

Other stuff:
My WIP SMW/SMAS+W disassembly
Yoshifanatic's Discord Server: A place for fans of my stuff and/or Yoshi to chat with others.
That name entry system sounds really awesome, nice work!...
How did you do those extra animations for Yoshi?
The gif that you posted about dynamic sprites is very impressive, but it needs to be worked a bit more imo, there's a couple of frames where the turn blocks turns into a flower which looks bad.

Quote
more extended sprites


This one caught my attention since last C3. One question. How are you handling OAM slots for these sprites? Are their slots hardcoded?

Quote
save system


I did something similar for my hack (link is on my title, which is ded for now), I don't remember if I showed a video, but I basically used imamelia's midpoint patch to simulate a save system. It works pretty well.

In general, you showed good stuff. See ya in another C3.
Hey, did you ask fusoya that you can release the Asm hack? If fusoya agrees, are you gunna post it in the documents section?

I PM'ed to fusoya.

--------------------
Give thanks to RPG hacker for working on Asar.
Originally posted by Pikachu
That name entry system sounds really awesome, nice work!...
How did you do those extra animations for Yoshi?


Thanks you. :)

As for the animations, I did that by rewriting Mario's animation routine so that Yoshi is drawn as part of Mario when he is riding Yoshi and making it so that Mario and Yoshi are the same entity when Mario is riding Yoshi. In addition, Mario, Yoshi's head, and Yoshi's body all have their own graphics routine, and the order they are called in varies depending on the pose Yoshi is doing. Mario and Yoshi's body use $13E0 to determine the pose, while Yoshi's head used not only $13E0, but also certain actions affect what pose Yoshi's head will display (if you hold up, all of Yoshi's poses will display him looking up).


Originally posted by LX5
The gif that you posted about dynamic sprites is very impressive, but it needs to be worked a bit more imo, there's a couple of frames where the turn blocks turns into a flower which looks bad.


Thanks. :)

Yeah, I know it needs work. Originally, my dynamic routine handled the OAM slots and the tile slots together, which avoided issues like that, but that system had some major problems. (ex. every time a sprite despawned, it would cause every sprite processed after it to shift all their graphics to the lowest available slot, wasting tons of V-Blank time). So, I recently changed it so that the tile slots and the OAM slots are handled separately and making it so that the game remembers the tile slot each sprite uses, but there is some issues with it as you can tell.

Originally posted by LX5
This one caught my attention since last C3. One question. How are you handling OAM slots for these sprites? Are their slots hardcoded?


I didn't start working on this until after last C3, so maybe you're thinking of something else? As for the OAM slots, I'm using the extended no sprite tile limits patch to handle the OAM slots for the extended sprites. However, I plan on implementing a new system for finding free OAM slots that is similar to the tile allocation that would make it possible for sprites to use any part of the OAM table.

Originally posted by LX5
I did something similar for my hack (link is on my title, which is ded for now), I don't remember if I showed a video, but I basically used imamelia's midpoint patch to simulate a save system. It works pretty well.

In general, you showed good stuff. See ya in another C3.


Neat. The way it's implemented in my hack is that the save blocks save a bunch of stuff to the SRAM, such as Mario's X and Y position, the current level number, various level flags, and some other things, after hitting them, and then when you reload your file either on the title screen or after dying, you'll be placed exactly where you last saved. I don't have to define any midpoint data with this system; I can just place a save block and the midpoint will work without any additional data.

Originally posted by GreenHammerBro
Hey, did you ask fusoya that you can release the Asm hack? If fusoya agrees, are you gunna post it in the documents section?


I haven't asked him yet, but I'll PM him later about it. If he is ok with it, I'll post a link to a copy of galaxyhaxz's SMW source code that has every LM ASM hack I was able to disassemble included in it (I'll only include the changed files, though). However, I should mention that the hijacks are barely commented as I don't know what a lot of them actually do.

--------------------
My Hacks:
Mario's Strange Quest V1.6
Yoshi's Inside Story (on hold)
Yoshi's Strange Quest V1.3 / V1.3.1 Beta 4.6 / Latest Test Build (Mario & Yoshi's Strange Quests)

Other stuff:
My WIP SMW/SMAS+W disassembly
Yoshifanatic's Discord Server: A place for fans of my stuff and/or Yoshi to chat with others.
Nice job. I'll say how I feel about each thing (or at least some of the ones I find more interesting) individually...
- Dynamic graphics loading: Sounds quite useful, but I worry about how much ROM space and processing it takes up.
- Extended sprites: I notice you didn't combine cluster sprites into them as well, but that's okay. I pretty much feel how you do: it's a good idea, but compatibility might be an issue.
- Custom spit state: Interesting. I could see this being good for the right hack.
- Name entry screen: Good idea. Actually, I'm surprised there isn't a patch like this available already. I used such a thing in Peach's Quest, but I never released the code publically.
- Save system: This would be very useful for a Metroidvania hack. I hope you do release it eventually.
- Lunar Magic ASM hack disassembly: It's about time someone made an updated version of this. Now if only FuSoYa would let us use a patch for Lunar Magic's ASM hacks instead of hardcoding them into the tool.
- Dynamic level loading: Assuming you mean making levels continuous and going in multiple directions as in Mega Man games...I want this. I hope you get it all working eventually (I don't care about ZSNES, but it sounds like there are some other bugs to iron out anyway).
The thing that amazes me most: Exanimated Player.

Otherwise, great job on the dynamic Super Mario World sprites. That'll be useful for a lot of people.
Will you be able to spit buzzy beetle shells like a green shell?
I pm to fusoya so you don't have to:

Quote
Hello,

Is it okay if I and/or someone disassemble the rom to find codes inserted by lunar magic and post it in the documents section?


I'll let you know if he decides. Sorry, I should've deleted my previous post earlier.

--------------------
Give thanks to RPG hacker for working on Asar.
Originally posted by imamelia
Nice job. I'll say how I feel about each thing (or at least some of the ones I find more interesting) individually...
- Dynamic graphics loading: Sounds quite useful, but I worry about how much ROM space and processing it takes up.
- Extended sprites: I notice you didn't combine cluster sprites into them as well, but that's okay. I pretty much feel how you do: it's a good idea, but compatibility might be an issue.
- Custom spit state: Interesting. I could see this being good for the right hack.
- Name entry screen: Good idea. Actually, I'm surprised there isn't a patch like this available already. I used such a thing in Peach's Quest, but I never released the code publically.
- Save system: This would be very useful for a Metroidvania hack. I hope you do release it eventually.
- Lunar Magic ASM hack disassembly: It's about time someone made an updated version of this. Now if only FuSoYa would let us use a patch for Lunar Magic's ASM hacks instead of hardcoding them into the tool.
- Dynamic level loading: Assuming you mean making levels continuous and going in multiple directions as in Mega Man games...I want this. I hope you get it all working eventually (I don't care about ZSNES, but it sounds like there are some other bugs to iron out anyway).


Thanks. :)

Here is my response to each of your comments:

- The amount of ROM space used to store the uncompressed graphics isn't too terrible. SMW's sprite graphics take up roughly 4 ROM banks. Of course, when you start adding custom sprites that require their own graphics... yeah. As for the speed, I'd argue that my code actually runs faster (or barely slower) than SMW's code even with the added code needed to store the pointers. That's mainly due to my generic graphics routine, which if you're interested in seeing, it's called "GenericSpriteGFXRt" in DSMWSpr.asm that I linked to.

- I was thinking of converting cluster sprites, but I wasn't sure if I should. I don't think it'd be too hard to convert them, though, at least for my hack.

- I agree. My hack is going to take advantage of this gimmick.

- Yeah, I'm surprised there isn't a patch for this out already.

- I'll likely attempt to release it in the future. The main thing stopping that at the moment is that getting my code for this to work so the average SMW hack could use it going to be tricky at best.

- Here's hoping that FuSoYa is ok with me releasing the ASM for the LM hijacks. Also, I'd love for that to be a thing. Working with SMW's source code can be annoying sometimes because LM checks specific ROM addresses to determine if a hijack is inserted in the ROM and if it sees that it isn't, then it inserts the hijack. So, you can guess what happens when I accidentally shift the code around in certain banks...

- My dynamic level loading works like you described, except that unlike in the Mega Man games, there is absolutely no transition (besides a very brief pause) between the two levels. With this, you'd be able to create levels that give the illusion of having an unusual layout, such as an L shaped level. Here is the .gif I posted showing this off last C3:



As for ZSNES, I don't really care about compatibility with it either, but I'm interested in seeing why it decided to sometimes load BG garbage lately. It seemed to only start doing this after I optimized $058126, which is a routine that stores BG data during level load. Here is my optimized version of that routine if you're wondering:

Code
; The below routine was pretty badly optimized before.
; Previously, there was a bunch of REP and SEPs that literally did nothing.
; This was because they would change the size of A to 16-bit...
; ...change the value of Y, then set A back to 8-bit.
; Also, the routine constantly stored and loaded Y from $02 and $05...
; ...so it could index two indirects, yet one of those indirects...
; ...could be indexed with X as the location it indexes never changes.
; Also, the last part of the routine would unnecessarily load...
; ...and store to $00 during each loop for no reason
CODE_058126:
	PHP
	LDY #$0000
	TYX
CODE_058136:
	LDA [$68],y
	STA $07
	INY
	ASL
	BCC CODE_05816A
	LDA $07
	AND #$7F
	STA $07
	LDA [$68],y
	INY
CODE_05815A:
	STA.l $7EB900,X
	INX
	DEC $07
	BPL CODE_05815A
	BRA CODE_058188

CODE_05816A:
	LDA [$68],y
	INY
	STA.l $7EB900,X
	INX
	DEC $07
	BPL CODE_05816A
CODE_058188:
	LDA [$68],y
	CMP #$FF
	BNE CODE_058136
	INY
	LDA [$68],y
	DEY
	CMP #$FF
	BNE CODE_058136
	LDX #$0000
	REP #$20
	LDA #$90F8
CODE_0581A5:
	CLC
	ADC #$0008
	STA $0FBE,x
	INX
	INX
	CPX #$0400
	BNE CODE_0581A5
	PLP
	RTS



Also, I just thought of it, but perhaps I could post the code I wrote for the dynamic level loading? I wouldn't mind getting some feedback on that. I just have to create a beta patch for it like I did for the dynamic SMW sprites. I'll likely attempt to do that tomorrow.

Originally posted by Skewer
The thing that amazes me most: Exanimated Player.

Otherwise, great job on the dynamic Super Mario World sprites. That'll be useful for a lot of people.


The interesting thing is that I did those player animations with using exanimation.

Anyway, thanks. :)

Originally posted by KingKoopshi64
Will you be able to spit buzzy beetle shells like a green shell?


That can be done easily without any of my custom code. All you have to do is change the buzzy beetle's properties in tweaker so that it can be held in Yoshi's mouth and it will work. I'm not sure why they weren't set to stay in Yoshi's mouth in the original SMW though.

Originally posted by GreenHammerBro
I pm to fusoya so you don't have to:

Quote
Quote
Hello,

Is it okay if I and/or someone disassemble the rom to find codes inserted by lunar magic and post it in the documents section?



I'll let you know if he decides. Sorry, I should've deleted my previous post earlier.


I already PMed him not long after I last posted. XD But, thanks anyway.

--------------------
My Hacks:
Mario's Strange Quest V1.6
Yoshi's Inside Story (on hold)
Yoshi's Strange Quest V1.3 / V1.3.1 Beta 4.6 / Latest Test Build (Mario & Yoshi's Strange Quests)

Other stuff:
My WIP SMW/SMAS+W disassembly
Yoshifanatic's Discord Server: A place for fans of my stuff and/or Yoshi to chat with others.
Everything looks great!

The save system seems like it'd be quite useful in "hella tough but not quite kaizo" hacks like the VIP games and Hyper Mario 1-6 (+ the demo of 7) and such

I'd also love to see more hacks use the upwards and downwards scrolling camera (the 2D Sonic games spoiled me).

Hope I can get this good at ASM sometime soon~
I'm jealous, haha!

Good luck with your hack!

shit i didn't make a reference to fat yoshies
undi
Originally posted by Leomon
Everything looks great!

The save system seems like it'd be quite useful in "hella tough but not quite kaizo" hacks like the VIP games and Hyper Mario 1-6 (+ the demo of 7) and such

I'd also love to see more hacks use the upwards and downwards scrolling camera (the 2D Sonic games spoiled me).

Hope I can get this good at ASM sometime soon~
I'm jealous, haha!

Good luck with your hack!

shit i didn't make a reference to fat yoshies
undi


Thank you. :)

Regarding the save system, it probably would pretty well for hacks like that. If I do get this working for the average hack, this save system could work pretty well as a traditional midpoint system in the average hack. Plus, setting up the midpoints would be more convenient than using the multi midway patch, as all you'd have to do to define a midpoint is place a midpoint block in your level (as opposed to doing that, plus defining a bunch of stuff for each midpoint).

Also, I would too. YSQ doesn't really take advantage of this feature, as it was something I added just for the heck of it. I guess you could say I added it to expand YSQ's feature list. :P

Also, if you're trying to learn how to code, I wish you luck with that! :)





Also, here is a quick update for you guys. I've created a patch for my dynamic level loading stuff, so now you guys can test it out:

Link

However, while this works, I don't recommend using this for a serious hack as it's buggy and not very well optimized. Also, because this patch uses the Super GFX Bypass table that LM inserts to get the graphics file numbers and some other stuff, you're going to need a hex editor to find where LM inserted that (since LM doesn't insert that table in a consistent location). If you haven't touched level 0's GFX and you haven't enabled Super GFX Bypass for that level either, then simply look for this string of numbers in the ROM:

"7F 00 7F 00 7F 00 7F 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF 7F 00 2B 00 2A 00 29 00 28 00"

And then change the define in the patch so it matches the address where you find this string of numbers.

Also, if you did enable Super GFX Bypass in level 0, but didn't touch any of the GFX file numbers (this includes the L3 Bypass as well), look for this string instead:

"7F 80 7F 00 7F 00 7F 00 08 00 1B 00 17 00 14 00 04 00 13 00 01 00 00 00 2B 00 2A 00 29 00 28 00"


Anyway, to use this, insert PreloadTrigger.asm and LoadTrigger.asm with BTSD or GPS, go into DLL.asm and adjust the define for the location of the SGFXB table, go into Exits.asm and type in a secondary entrance number you want Mario to be sent to when triggering a dynamic level load into the table (for where in the table you must type it in, each set of 32 2 byte entries corresponds to a level that's currently loaded, and each 2 byte entry corresponds to a screen number where you placed a preload trigger block. If you want to have a preload trigger be on screen 03 of level 105 and have Mario warp to secondary entrance 005, you'd type 0005 into the 4th entry for level 105's part of the table). Finally, insert DLL.asm with asar.

In game, have Mario touch a preload trigger then the load trigger sometime after it and the new level will begin to load.

There are some things you have to know though:

- The new level has to have the super GFX bypass setting enabled or else the game will load garbage for the graphics.
- The new level also must be set to have custom palette or else that won't work correctly either.
- Currently, if Mario touches the load trigger too early, then the game will only partially load the new level. I'll eventually make it so that the game freezes until the new level finishes preloading so this doesn't happen.
- Install the FastROM patch and insert LM's optimized LC_LZ2 compression patch to speed up the dynamic level loading. This patch currently doesn't support the SA-1, but it will eventually.
- The level layout doesn't visually update immediately after a dynamic level load until you scroll the screen. However, you can take advantage of this by making the screen with the loading block look identical to the part of the new level where Mario warps to to give the illusion that Mario stays in place.

Anyway, let me know what you guys think of my dynamic level loading! :)

--------------------
My Hacks:
Mario's Strange Quest V1.6
Yoshi's Inside Story (on hold)
Yoshi's Strange Quest V1.3 / V1.3.1 Beta 4.6 / Latest Test Build (Mario & Yoshi's Strange Quests)

Other stuff:
My WIP SMW/SMAS+W disassembly
Yoshifanatic's Discord Server: A place for fans of my stuff and/or Yoshi to chat with others.
Can't you use read3() to find the address of that table?
Originally posted by imamelia
Can't you use read3() to find the address of that table?


If that's an asar function, then I didn't know about that. How would I use that to find the address of the SGFXB table?

Edit: If it helps, I just did a quick check of the code LM inserts and it reads from the SGFXB table at $0FF7FF. If I can use the read3() command to set a define, then it won't be necessary to manually look for the SGFXB table. I have no idea how to do that, though.

--------------------
My Hacks:
Mario's Strange Quest V1.6
Yoshi's Inside Story (on hold)
Yoshi's Strange Quest V1.3 / V1.3.1 Beta 4.6 / Latest Test Build (Mario & Yoshi's Strange Quests)

Other stuff:
My WIP SMW/SMAS+W disassembly
Yoshifanatic's Discord Server: A place for fans of my stuff and/or Yoshi to chat with others.
read3() returns 3 bytes starting from where you specify. For instance, read3($008000) would read the bytes at $008000, $008001, and $008002. You can then use that in an org statement or jump, and I think you can even use math with it and nest it. So if you can find where Lunar Magic hijacks to insert that hijack, you could probably do something like org read3($123456)+$1337 or something.
Originally posted by imamelia
read3() returns 3 bytes starting from where you specify. For instance, read3($008000) would read the bytes at $008000, $008001, and $008002. You can then use that in an org statement or jump, and I think you can even use math with it and nest it. So if you can find where Lunar Magic hijacks to insert that hijack, you could probably do something like org read3($123456)+$1337 or something.


I see. Outside of a handful of commands, I don't know much about asar's commands. XD Speaking of which, after some experimentation, it turns out that using read3($0FF7FF) like a define is what I needed to do to get my code to get the location of the SGFXB table no matter where LM inserts it. Needless to say, my patch has been updated to do this now.

--------------------
My Hacks:
Mario's Strange Quest V1.6
Yoshi's Inside Story (on hold)
Yoshi's Strange Quest V1.3 / V1.3.1 Beta 4.6 / Latest Test Build (Mario & Yoshi's Strange Quests)

Other stuff:
My WIP SMW/SMAS+W disassembly
Yoshifanatic's Discord Server: A place for fans of my stuff and/or Yoshi to chat with others.
Wow! This is really impressive! I'll definitely make use of these in my hack :)

Great job!

--------------------
That's some really impressive stuff, yoshifanatic!

I always wanted to do that dynamic sprite loading, even that I discussed various ideas, theories, conditions and other things with various ASMers but none really had the courage to do that. Honestly the gain, even being absurd, would not be worthy the effort. But like when some people said exactly the same for SA-1, some day someone will do what was not possible previously. Now it is your time to make a new revolution to the SMW hacking. Just need to be careful to don't care out people and coders as I ended up doing with SA-1 Pack :P If you manage to pass that, then pretty much you cleared the SMW Central game!

The other things are pretty good too, personally I very likely use that camera hack patch on my patch, as it is pretty useful but I never any idea on how to do that patch without researching forever in SMW code.

Either way, I hope best of you, success in your ASM adventure!

--------------------
GitHub - Twitter - YouTube - Blog - SnesLab Discord
Oh well, this really looks awesome.
Almost unbelievable!

--------------------

The snow is falling on the withering leaves, I am left in the cold, the shadows are crying in the moonlight. Is this night the last of my life?
For the up and down scrolling, when you duck down the screen doesn't scroll enough. Please make it scroll further. For example, make it scroll down to just a tile above the player. Fix this and it will be okay. Thanks.
Pages: « 1 2 »
Forum Index - Sunken Ghost Ship - C3 Museum - Summer 2016 - Yoshifanatic's ASM Showoff: The Sequel

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2019 - SMW Central
Legal Information - Privacy Policy - Link To Us


Total queries: 23

Menu

Follow Us On

  • Facebook
  • Twitter
  • YouTube

Affiliates

  • Talkhaus
  • SMBX Community
  • GTx0
  • Super Luigi Bros
  • ROMhacking.net
  • MFGG
  • Gaming Reinvented