Banner
Views: 853,144,795
Time:
17 users online: ASMagician Maks,  Atari2.0, bersi, CalHal, Connnnair, DeppySlide,  Doctor No, Golden Yoshi, HD_DankBaron, Ice Man,  JamesD28, MassPunishment, MegaSonic1999, obersteiner86, Sancles, StackDino, Strawb - Guests: 49 - Bots: 57 Users: 47,053 (2,510 active)
Latest: PleaseLikeMePls
Tip: Add decorations to the overworld. Don't leave large empty grass or sea regions.Not logged in.
Supreme OAM handler
Forum Index - Sunken Ghost Ship - C3 Museum - Summer 2015 - Supreme OAM handler
Tags:
Pages: « 1 2 »
Hello all and welcome to VON FAHRENHEIT'S C3 THREAD!

Supreme OAM handler:
We all know and love good ol' edit's no more sprite tile limits patch and this is meant to be a sort of successor to that. So what does this patch actually do? The $0200 block of OAM is alotted to minor extended sprites, extended sprites, smoke sprites, bounce sprites, score sprites and the player. This leaves the entire $0300 block (64 tiles) to be dynamically alotted to regular sprites. This way you can make sprites as large as 128x128 pixels. The patch is compatible with pretty much any custom sprite since it comes with a table where you can easily enter how many tiles each of your currently inserted custom sprites use. This patch is faster than NMSTL. Note that this is a prototype and not really recommended for serious use yet.

Known bugs:
Yoshi gets weird with the OAM handler active.
Mario appears behind whatever he's carrying.

LINK

Here are some screenshots with a lot of sprite tiles onscreen:

The last one uses all 64 sprite tiles.


SMW styled level intros:
Ever wanted to replace "MARIO START !" with some more flavorful text? Me too! I made this patch some time ago but never released it. It replaces the "MARIO START !" and game over messages with very easily customizible messages of hacker's choice. Comes with a GFX file and text table.

LINK

Example screenshot:

allow shy guy emojis in post footers you cowards!
I won't lie, I truly expected a joke or something other than actual ASM code in that link, because this looks freaking awesome. I'd love to see a video of that mech in action, assuming it works like the Megaman X counterpart.


The thing is though, Now that you said what the patch does, like what are the immediate effects of it (for those like myself that don't fully understand the benefits, other than it being a stronger NMSTL patch).

--------------------
I wonder what a HFD opcode would do in ASM...
This is... great, I don't have any other word to say, it's just great.

But...

Code
.Vanilla	LDX $009F,y				;\

Code
		LDA $7FAB9F,x				; | Handle custom sprite


I didn't understand this, why are you using $9F and $7FAB9F?
I kind of expected... well no, not expected, more like wishful thinking, that someone finally made an easier way to give sprite tiles priority over other sprite tiles without having to mess with otherwise-reserved slots, but I mean, if this thing works as NMSTL does (for the end-user, as in the coders), it's definitely nice to have either way.
How much faster than NMSTL is this by the way, in case you have any numbers? Cause as far as I know NMSTL is preeeeetty slow.

--------------------
Your layout has been removed.
Good morning everyone. So to clarify some things:
The result of using the patch is that you can have more tiles onscreen at once; if you wanted you could make a 128x128 sprite without causing things to disappear.
The patch has been updated and now uses an unrolled loop to set sprite OAM index once per frame instead of calling a routine once for every sprite.

Originally posted by leod
How much faster than NMSTL is this by the way, in case you have any numbers? Cause as far as I know NMSTL is preeeeetty slow.


This one is WAY faster than edit's patch. I haven't counted cycles or anything, but reading from a lookup table uses very few cycles compared to checking every single tile's Ypos to get an index. When using the table the processing cost per tile is also static rather than scaling with the number of tiles, which is the main reason edit's patch is so slow.

allow shy guy emojis in post footers you cowards!
So yeah, you get an error patching this:
Label UploadGFX not found [autoclean JML UploadGFX]

Any fix?
Amazing work!

Can I just patch it to a rom that has NSTL applied or do I have to port everything to a new rom?

And does this also work for extended sprites?

--------------------
My Youtube channel

Currently working on:
Project C

Finished project:
Hey, this could be pretty useful. A faster version of No More Sprite Tile Limits? Yes, please. Though I do have a couple questions...I assume that you can move some of the OAM slots around in cases such as if you have a custom sprite status bar (or one of the existing ones), but what if you want to make custom extended sprites, cluster sprites, etc.? How do you get the OAM index for them, especially if they use multiple tiles? In fact, how does it even handle the other sprite types? I assume the slots still overlap as they did in SMW. Did you account for the Sumo Brother flames, which actually use the $0300 block (I think they're the only cluster/extended/etc. sprite to do so)? And what about custom sprites that use a variable number of tiles? My Kamek boss, for instance, uses either 4 or 5 tiles depending on whether or not he has his wand out. I assume you would just put in the largest possible number of tiles that that sprite number can use.
Originally posted by Trollope
So yeah, you get an error patching this:
Label UploadGFX not found [autoclean JML UploadGFX]

Any fix?


Fixed. That's the kind of error that pops up when typing for too long.

Originally posted by NGB
Amazing work!

Can I just patch it to a rom that has NSTL applied or do I have to port everything to a new rom?

And does this also work for extended sprites?


You should be able to patch it over NSTL, but I can't give guarantees. Make a backup and try it. The patch is kind of a prototype though. I'd recommend not using it for anything serious yet.

Originally posted by imamelia
Hey, this could be pretty useful. A faster version of No More Sprite Tile Limits? Yes, please. Though I do have a couple questions...I assume that you can move some of the OAM slots around in cases such as if you have a custom sprite status bar (or one of the existing ones), but what if you want to make custom extended sprites, cluster sprites, etc.? How do you get the OAM index for them, especially if they use multiple tiles? In fact, how does it even handle the other sprite types? I assume the slots still overlap as they did in SMW. Did you account for the Sumo Brother flames, which actually use the $0300 block (I think they're the only cluster/extended/etc. sprite to do so)? And what about custom sprites that use a variable number of tiles? My Kamek boss, for instance, uses either 4 or 5 tiles depending on whether or not he has his wand out. I assume you would just put in the largest possible number of tiles that that sprite number can use.


All your points are quite valid. Most people don't know how to make custom extended/cluster sprites but I suppose I should add support for them anyway. Custom sprites that use a varying number of tiles is probably insignificant and I don't see an efficient way of accounting for it anyway. I'll think about sprite status bars when I update the patch. Right now it's a prototype but I'll finish it as soon as I can.

allow shy guy emojis in post footers you cowards!
I'll try it for my C3LDC entry and let you know if anything strange happens. So far it seems to be working good, and it has gotten me rid of some sprite memory issues I was going through. Good to finally see a potential upgrade to the NMSTL patch!

--------------------
Twitter
I got a beautiful crash. I love flickering red lines...

Maybe I got something else in my rom that's doesn't match up with your patch.
Guess I'll have to port everything, when you have a non prototype version of the patch.
But If this patch does what is it supposed to do, it will be worth the trouble =)

Any clue how long you'll be working on the non prototype version?

--------------------
My Youtube channel

Currently working on:
Project C

Finished project:
So apparently you can only make one C3 thread. I guess that means I'll just have to post my other things here as well. Check main post for updates.

allow shy guy emojis in post footers you cowards!
No, it's because C3 ended.
Also, this sounds cool. Looking forward to it.
That's a clever solution. While it won't give much more OAM slots, keeping compatibility with existing sprites and completely allocate half of OAM for them is rather a good amount for regular sprites.

Nice job.

--------------------
https://www.youtube.com/watch?v=3xkRkaXPN_A
---
GitHub - Twitter - YouTube - Blog - SnesLab Discord
Amazing work! Bwahahahahaha! Actually, I like these screenshots and I think it's great!

--------------------
Believe what you want, not every sentence is true.

Haters will always be haters and try and make you blue.

But blue is a pretty color, it doesn't have to end.

Even if the hate, is hidden within your "Friends".

-Yoka Hiro aka Cwoodsdean
Originally posted by S.R.H.
No, it's because C3 ended.
Also, this sounds cool. Looking forward to it.


It.. ended? Google tells me there are two hours left.


EDIT: Whoops, it's Tuesday now. Man, time sure flies.

allow shy guy emojis in post footers you cowards!
Please tell me how did you do that without literally hijacking every standard and custom sprite graphics routine. Great job!
That second patch sounds pretty awesome sauce, is there a limit to how many player intros you can have, is there a character limit to each message? I also assume that the game over/time out text is a single set message, but man this is actually something pretty fantastic for those that have some comedic taste.

I have to ask though, how does this patch work with 2 players, as SMW has a separate intro for Mario and Luigi? Are there ways to restrict messages for a specific player?

--------------------
I wonder what a HFD opcode would do in ASM...
Originally posted by TLMB
That second patch sounds pretty awesome sauce, is there a limit to how many player intros you can have, is there a character limit to each message? I also assume that the game over/time out text is a single set message, but man this is actually something pretty fantastic for those that have some comedic taste.

I have to ask though, how does this patch work with 2 players, as SMW has a separate intro for Mario and Luigi? Are there ways to restrict messages for a specific player?


The messages are accessed with index registers in 8-bit mode so you can have up to 128 intro messages, which I imagine is way more than you need. It would actually be a good idea to have different messages for player 1 and player 2. The character limit is variable, since the text is displayed in sprite tiles. Some characters are wider than 8 pixels and need more tiles. At most you could have 64 characters, which uses up all 128 sprite tiles (SNES hard limit) but something like 55-60 is probably a more realistic limit because of the variable width.

allow shy guy emojis in post footers you cowards!
What exactly is the OAM patch for?
Pages: « 1 2 »
Forum Index - Sunken Ghost Ship - C3 Museum - Summer 2015 - Supreme OAM handler

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

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


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy