Register | Login | |||||
Main
| Memberlist
| Active users
| Calendar
| Chat
| Online users Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album |
| |
0 users currently in ROM Hacking. |
Acmlm's Board - I3 Archive - ROM Hacking - Making Lightning flash in certain levels of Super Mario Bros. 3 | New poll | | |
Pages: 1 2 3 | Add to favorites | Next newer thread | Next older thread |
User | Post | ||
Skreename Giant Red Paratroopa Since: 11-18-05 Last post: 6317 days Last view: 6310 days |
| ||
If I'm not mistaken, a certain register is typically used for essentially random numbers... but I don't remember which one. If there is one, just grab the value from it each time the screen flashes and use that for the number of frames for the next, or something similar. | |||
DahrkDaiz Nipper Plant U wan hax Mario?! Since: 11-17-05 Last post: 6312 days Last view: 6311 days |
| ||
I've done this whole flash of lighting trick in my hack. I don't want to dig up the code and document it all but what I did was modify the palette copy kept in RAM (changing this in RAM does effect the palette in the PPU) and switching the bg color from white to the original and so on for a few frames then stopping. I take $15 and added it to two other RAM values to get a random number so that the timer is random, but if the value is too low, I modify to bring it above $80 (ORing the value with 1000 000). | |||
never-obsolete Paragoomba Since: 05-14-06 From: AZ Last post: 6312 days Last view: 6312 days |
| ||
what is the significance of $80 and the flashing register, im kinda lost about how it works or what exactly it does? | |||
Giga_Bowser_009 Red Paragoomba Since: 04-16-06 Last post: 6529 days Last view: 6529 days |
| ||
I'm trying to do it exactly the same way JaSp did. Where it detects whether Nothing ($AB) is the first enemy sprite and if it is then it jumps to the Thunder Routine but if it isn't...Well it doesn't. It's easier that way but I'm still having trouble with it. | |||
never-obsolete Paragoomba Since: 05-14-06 From: AZ Last post: 6312 days Last view: 6312 days |
| ||
what is the significance of nothing being the first sprite? wouldn't you want to detect the level and go from there? | |||
Giga_Bowser_009 Red Paragoomba Since: 04-16-06 Last post: 6529 days Last view: 6529 days |
| ||
That's what I'm trying to do. I also want to get that custom ASM routine to where the Lightning flashes white as you fight Bowser. | |||
never-obsolete Paragoomba Since: 05-14-06 From: AZ Last post: 6312 days Last view: 6312 days |
| ||
ok well assemble the routine (first edit to fit your needs), but where im losing you is why are you detecting empty sprites? | |||
Giga_Bowser_009 Red Paragoomba Since: 04-16-06 Last post: 6529 days Last view: 6529 days |
| ||
That's how JaSp did his routine. The nothing enemy sprite is rarely used so I'm wanting to use it for something. | |||
never-obsolete Paragoomba Since: 05-14-06 From: AZ Last post: 6312 days Last view: 6312 days |
| ||
what do you plan to use it for? | |||
Giga_Bowser_009 Red Paragoomba Since: 04-16-06 Last post: 6529 days Last view: 6529 days |
| ||
The Thunder routine. I need to figure out what is wrong with the code and see if deleting the whole level and put Nothing as the first sprite before putting anything else works. (I've got to try that.) | |||
never-obsolete Paragoomba Since: 05-14-06 From: AZ Last post: 6312 days Last view: 6312 days |
| ||
what exactly are you refering to by "nothing sprite"? is it a routine, a ram value, a tile in pattern tables? | |||
Giga_Bowser_009 Red Paragoomba Since: 04-16-06 Last post: 6529 days Last view: 6529 days |
| ||
All right. Nothing ($AB) is an enemy that you can put with SMB3 Workshop. JaSp made a routine which checks to see if that sprite is the first enemy sprite in the level and if it is then it jumps to the thunder routine. Now you get what I'm saying? | |||
never-obsolete Paragoomba Since: 05-14-06 From: AZ Last post: 6312 days Last view: 6312 days |
| ||
ok i see and you place that nothing as the first sprite in the levels you want to use the thunder. then you check against it and branch from there if it is nothing else contiue as normal. fair enough.
do you plan to use the routine i posted, because that was slapped together fairly hastily? also how much space in unused rom do you have for adding the routine? |
|||
Giga_Bowser_009 Red Paragoomba Since: 04-16-06 Last post: 6529 days Last view: 6529 days |
| ||
I have enough unused space around the 003000 offset. I see a bunch FFs there so yeah. I have enough. | |||
never-obsolete Paragoomba Since: 05-14-06 From: AZ Last post: 6312 days Last view: 6312 days |
| ||
well after looking at the mmc3 specs, i believe it is able to support adding more prg and chr banks. if i calculated correctly smb3 only uses half of its potential in both catagories. bank switching would allow more room to toy with and its not that difficult to do. | |||
JaSp Shyguy Since: 11-18-05 From: Paris, France Last post: 6311 days Last view: 6311 days |
| ||
Well, here is my routine with a few coments. It might not be the best anyway because I'm not that good at cleaning up code. If you have any questions, feel free to ask.
Note that with this way, it will flash regularly; I didn't bother to try it checking with two different offsets to create a random factor. |
|||
never-obsolete Paragoomba Since: 05-14-06 From: AZ Last post: 6312 days Last view: 6312 days |
| ||
where you reference the sound register (which is what im guessing it is):
is that something in original code that needed to be added, or what purpose does it serve? and does the routine at $E2C0 have any effect on the flashing or is something else i shouldn't be concerned with? and if the sprite = $AB, then its the color flash, if sprite = $47 its the white/grey flash? in your hack im assuming you enabled sram. (edited by never-obsolete on 05-17-06 09:13 AM) (edited by never-obsolete on 05-17-06 09:39 AM) |
|||
JaSp Shyguy Since: 11-18-05 From: Paris, France Last post: 6311 days Last view: 6311 days |
| ||
$7DB2 is originally part of player2 offsets, it's increased here so that with another custom routine placed somewhere else, when it's equal to 01 it plays the sound; I couldn't write directly to the original sound offsets in that part of the ROM because they were zeroed and thus the sound wouldn't play.
$E2C0 is a subroutine called somewhere in the ROM, that's where I placed my custom JSR $BF10, so I re-placed a JSR $E2C0 at the end of my routine, but it isn't related to my routine. You're right with the sprites. Actually, the colors are defined by the offset $7DB5 : according to its value, a different table of colors is loaded for the flashing routine (the table is custom, it wasn't originally in the game). |
|||
DahrkDaiz Nipper Plant U wan hax Mario?! Since: 11-17-05 Last post: 6312 days Last view: 6311 days |
| ||
Originally posted by never-obsolete Just know I've already expected SMB3 to double it's size and bank swapping is not as easy as you think only because if you start adding enough code, then SMB3 will have executed SO much code that there's a small potential for Vblank to occur mid-bank swap, which basically means your game crashes at random moments (anyone who's beta tested Mario Adventure 2 can attest to this) so you have to figure a way to get around this (I did a small byte check in the PRG bank I was wanting to switch to, if that byte did not match what it should be, attempt to bank swap again.) |
|||
never-obsolete Paragoomba Since: 05-14-06 From: AZ Last post: 6312 days Last view: 6312 days |
| ||
yes ive already taken the NMI into account because ive had similar promblems with different mappers. i had a the nmi check for what the "original" banks should be and switch them, and then just before the rti, switch back. (edited by never-obsolete on 05-17-06 03:53 PM) |
Pages: 1 2 3 | Add to favorites | Next newer thread | Next older thread |
Acmlm's Board - I3 Archive - ROM Hacking - Making Lightning flash in certain levels of Super Mario Bros. 3 | | |