Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
1 user currently in Super Mario World hacking: labmaster | 3 guests
Acmlm's Board - I2 Archive - Super Mario World hacking - Three Bowser lightning questions
  
User name:
Password:
Reply:
 

UserPost
d4s
Posts: 121/325
Originally posted by HyperHacker
It probably does so without checking to see if OAM is accessible first; if SNES works anything like just about every other system, you can only access it during certain periods while the screen is being redrawn. Otherwise it'll just cause bugs, and of course even if it does succeed it'll muck up everything.



while it is true that the vram can only be accessed during vblank on a real snes, this is not the reason its not working.
why?
because all emulators allow writes to vram outside vblank.
this is due to timing issues.

besides, the lightning routine wouldnt dare to manually upload to oam-ram.
no sane person would do that during gameplay(exception: if vblank is forced while loading a level, for example).
theres a buffer for the oam-table in ram wich gets dma'd to oam-ram every frame.
add a pointer that points to the last sprite entry in that table and every routine that feels like doing some sprites can write there and update the pointer afterwards.

some games double-buffer the oam table and alternate between them each frame.
this is also useful if you want to fake more than 128 sprites onscreen.
the tradeoff is sprite flickering, of course.
modifying the oam-table midframe using normal irqs or hdma is more elegant, but not always possible.(very few cycles executable during hblank and sprites mustnt overlap the scanline where the table is modified)
HyperLamer
Posts: 3183/8210
It probably does so without checking to see if OAM is accessible first; if SNES works anything like just about every other system, you can only access it during certain periods while the screen is being redrawn. Otherwise it'll just cause bugs, and of course even if it does succeed it'll muck up everything.

...Perhaps a custom block that triggered this could just back up the OAM somewhere and restore it after the call? I'm pretty sure there's a mirror of it in RAM so timing shouldn't be a major problem, and if it is, the game must have a 'wait for vblank' function somewhere.
blackhole89
Posts: 544/971
The bowser lightning routine, afaik, seems to attempt inserting the bowser ledge (that castle top thingy you stand on in the last battle) into the OAM, but somehow fails at it. That's what produces the glitches.
Sukasa
Posts: 38/1981
Oh...

I guess the lightning routine wouldn't work then. I've been thinking of learning ASM so i could do stuff like this, but I don't know where to get stuff. I'll look around the forums for that.

Thanks for telling me the routine doesn't work though.
Xkeeper 2.0
Posts: 210/1091
Originally posted by BMF54123
Originally posted by mikeyk
Calling the Bowser lightning routine ($03DFCC) does work in a normal level provided that you do not use pallette 0x0, because this pallette gets overwritten by the hard coded Bowser pallette. Besides that limitation, the lightning routine works perfectly.
Oh...well, that's awesome. I could've sworn somebody had tried it before and it didn't work.


That was me, BMF.

Actually, it worked to an extent but it put all sprites on layer 2, screwed up item reserve and left glitch tiles on the top of the screen. :\
Smallhacker
Posts: 1279/2273
Originally posted by The_Raven
Okay, one thing that always confused me, where the heck do you put the code!?

Into a custom block. Program it (in ASM and assemble it, or write the ASM directly as Hex), save as a file, make a new block in Block Tool containing this file and import it to SMW.
Cruel Justice
Posts: 604/1384
Okay, one thing that always confused me, where the heck do you put the code!?
BMF98567
Posts: 644/1261
Originally posted by mikeyk
Calling the Bowser lightning routine ($03DFCC) does work in a normal level provided that you do not use pallette 0x0, because this pallette gets overwritten by the hard coded Bowser pallette. Besides that limitation, the lightning routine works perfectly.
Oh...well, that's awesome. I could've sworn somebody had tried it before and it didn't work.
UnsurpassedDarkness
Posts: 432/746
So
Sukasa
Posts: 33/1981
Hey!

THANKYOU!!!!!

I'm thinking of using that in one level which is covered by a storm.

Thank you again!
mikeyk
Posts: 32/110
Calling the Bowser lightning routine ($03DFCC) does work in a normal level provided that you do not use pallette 0x0, because this pallette gets overwritten by the hard coded Bowser pallette. Besides that limitation, the lightning routine works perfectly.
BMF98567
Posts: 640/1261
Calling the Bowser lightning routine in a normal level won't work, unfortunately...I haven't examined its code, so I don't know what would need to be done in order to make it work. My lightning is all custom code, made from scratch (aside from a random number routine I picked up somewhere), but it's kinda hard-wired into my hack at the moment...no separate custom block/palette ASM yet.
Sukasa
Posts: 19/1981
Hey!

I was thinking about BMF's pallette to ASM control patch. Is it true that the bowser lightning ASM only change pallette number 0x0? if so, are there any other effects that i should watch out for?

Finally, what is the SNES or PC rgb value needed to call the lightning subroutine in a regular level?

Any answers would be greatly appreciated!
Acmlm's Board - I2 Archive - Super Mario World hacking - Three Bowser lightning questions


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.007 seconds.