Banner
Views: 763,188,117
Time:
10 users online: AntiDuck,  blaze800000, Haithius, Kingepsilon, Marcozzo Daro, Maxodex, MinecraftGamerLR, Romano338, SimFan96, spinnybingus - Guests: 56 - Bots: 183Users: 40,121 (1,949 active)
Latest: wttita
Not logged in.
RPG-Styled HP and MP Counter Version 1.1
Forum Index - SMW Hacking - Resource & Tool Releases - RPG-Styled HP and MP Counter Version 1.1
Pages: « 1 2 3 »
Oh, and you can use $7F837B, the VRAM upload buffer to render layer 3 tiles dynamically. It's much better than stripe image and more efficient too. Alcaro helped me with this, and the result is like this.

To show Mario's current level, you'd need a RAM Address control that rather than writing a tile to the screen. I remember you could DMA RAM to VRAM and did this myself, but lost the code due to a HD crash.

When using Alcaro's code, don't forget to add this right before the db $FF though:
db $FC,$0A,$17,$0D,$FC,$12,$0D,$0E,$0A,$FC,$0B,$22,$FC,$12,$0C,$0E,$10,$1E,$22
Woah, that's awesome! That's exactly what I was looking for! Thanks! Is there a tutorial for this? Or do you know somebody who can explain it to me? From your video descritpion I take it that you don't know how do do this yourself, right? So maybe Alcaro can help me? I'll look into this!

--------------------
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
I'll start by posting this code, which will mess up the status bar one tile after another. Feel free to ask if you need more help.
Code
header
lorom

!Pos = $010D
!TileProp = $38
!DataPos = $5000 ; top of the screen (note: change it)
; (note: it should be $5??? or you'll propably mess up something else)

org $00A2E6
JSL Main

org $058091
JSL Init
NOP

org $06FB80
Init:
REP #$20
STZ !Pos
SEP #$20
LDA $0100
CMP #$22
RTL


Main:
JSL $028AB1
	PHB
	PHK
	PLB
	PHX			; Change data bank and push X
	REP #$30
	LDA !Pos
	XBA
	AND #$03FF
	TAY
	LDA Data,y
	AND #$00FF
	CMP #$00FF
	BEQ Nothing		;Don't do anything if we're at an FF (terminator) byte
	LDA $13
	AND #$0003
	BNE Nothing
	LDA $7F837B
	TAX
	LDA !Pos
	XBA
	CLC
	ADC #!DataPos
	XBA
	STA $7F837D,x
	INX
	INX
	LDA #$0100
	STA $7F837D,x
	INX
	INX
	LDA !Pos
	XBA
	AND #$03FF
	TAY
	LDA Data,y
	STA $7F837D,x
	INX
	LDA.w #!TileProp+$FF00
	STA $7F837D,x
	INX;\
	TAX; | I could've used TAX SEC here instead,
	CLC;/ but I don't really like the idea of writing that kind of garbage code.
	ADC $7F837B
	STA $7F837B
	LDA !Pos
	XBA
	INC A
	XBA
	STA !Pos
Nothing:
	SEP #$30
	PLX
	PLB
	RTL
Data:
db $FC,$0C,$18,$0D,$0E,$FC,$0B,$22,$FC,$0A,$15,$0C,$0A,$1B,$18,$FC
db $FC,$0C,$18,$0D,$0E,$FC,$0B,$22,$FC,$0A,$15,$0C,$0A,$1B,$18,$FC
db $FC,$0C,$18,$0D,$0E,$FC,$0B,$22,$FC,$0A,$15,$0C,$0A,$1B,$18,$FC
db $FC,$0C,$18,$0D,$0E,$FC,$0B,$22,$FC,$0A,$15,$0C,$0A,$1B,$18,$FC
db $FC,$0C,$18,$0D,$0E,$FC,$0B,$22,$FC,$0A,$15,$0C,$0A,$1B,$18,$FC
db $FC,$0C,$18,$0D,$0E,$FC,$0B,$22,$FC,$0A,$15,$0C,$0A,$1B,$18,$FC
db $FC,$0C,$18,$0D,$0E,$FC,$0B,$22,$FC,$0A,$15,$0C,$0A,$1B,$18,$FC
db $FC,$0C,$18,$0D,$0E,$FC,$0B,$22,$FC,$0A,$15,$0C,$0A,$1B,$18,$FC
db $FC,$0C,$18,$0D,$0E,$FC,$0B,$22,$FC,$0A,$15,$0C,$0A,$1B,$18,$FC
db $FC,$0C,$18,$0D,$0E,$FC,$0B,$22,$FC,$0A,$15,$0C,$0A,$1B,$18,$FC
db $FF

I'd suggest pointing the Data: table to RAM and changing it that way.
Tip: STZ !Pos (!Pos should be some free RAM) to make it print out the text again.
Also, change what !DataPos is, I doubt you want the message to appear in the status bar.
I'd vote use a static stripe image to remove the text.
And no, there's no tutorial for how to use this. Try and see what happens.
(Oh, and feel free to remove the table and write your own, I just couldn't resist)

--------------------
<blm> zsnes users are the flatearthers of emulation

:)

Thanks a lot, this is really awesome! I'm totally going to analyze this and see, what you can do with it. Though I already have a few questions:

1) How can you make it so that the letters have layer priority below the status bar? The method I used for stripe images doesn't work or at least I THINK it doesn't work.
2) How do you even set the starting position of the text? $5000 is the top of the screen, right? But what do I have to change to make the text move in what direction?
3) The properties byte is in YXPCCCTT format?

Hope you can help me. And thanks again, this is really awesome :) !

EDIT:
WTF does "wors" mean :( ?

--------------------
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
For 2, DataPos is where it gets written to. +1 make it increase it's X pos and +20 makes it increase the Y pos by 1. Something like $5803 will write below the status bar.

For 3, just write tiles. The properties byte is already there. !TileProp = $18 is the only YXPCCCTT byte.
Originally posted by Iceguy
For 2, DataPos is where it gets written to. +1 make it increase it's X pos and +20 makes it increase the Y pos by 1. Something like $5803 will write below the status bar.




Originally posted by Iceguy
For 3, just write tiles. The properties byte is already there. !TileProp = $18 is the only YXPCCCTT byte.


Yes, I know there is just one property byte, but I wanted to know what format it uses.

Thanks a lot! This so completely awesome, I can't wait to experiment with it :) ! It's hard to believe not more people are using this in their hacks.

--------------------
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
Originally posted by RPG Hacker
It's hard to believe not more people are using this in their hacks.

It's since I never released it officially earlier. No one can use an unreleased* code, right?
*FuSoYa's pipes doesn't count

--------------------
<blm> zsnes users are the flatearthers of emulation
Originally posted by Alcaro
Originally posted by RPG Hacker
It's hard to believe not more people are using this in their hacks.

It's since I never released it officially earlier. No one can use an unreleased* code, right?


Yeah, that's true. I thought more people knew about this, though.

Another question:



I've done the window as a stripe image and the letters with the VRAM upload buffer. However, the letters always appear behind the window. Is there a way I can change that, or do I have to do both things with the VRAM upload buffer? I've also tried to not set the priority bits of the stripe image tiles, but that just put them in the background.

--------------------
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
Yeah, use the VRAM upload buffer to draw both images. It isn't really a good idea to make two different layer 3 images use different methods of drawing them.

And also, try to not make tiles overlap.
Post your stripe image code and I'll fix it up. (Note: The borders will still overwrite the letters there, but I think that's what you want anyways)

--------------------
<blm> zsnes users are the flatearthers of emulation
It's important to know that the upload buffer (that static stripe images also use) is processed in order than things are added to it. The first thing added is the first thing uploaded and stuff may be overwritten because of this.

You want the upload buffer to clear out any unwanted layer 3 tiles, then add the letters to show. It looks like you were writing transparent tiles after the letters are drawn so they got overwritten and never showed up.
Yes, the position and size of the text box is just for testing purposes, it's not final.

Posting my stripe image code? Okies. It's the exact same code as Ersanio posted in the stripe images thread. I didn't use RLE, though, because I was too lazy to recalculate the screen positions. On a second thought this would be much better since you could edit the textbox length easier.

@smkdan:
Yeah, that's true. I was too lazy to recalculate the screen positions, so I just used tile $FC. I think I'll redo it.

OK, I won't post my stripe image code yet. I'll try this first.

EDIT:
Way better, no?

And yes, I know it's over the border. Just testing, you know.

--------------------
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
Well I haven't done anything with my Patch lately and I probably won't do anything with it for a while, but before this thread sinks into the depths of this forum I'll take my chance and ask a few questions:

1. smkdan mentioned something about clearing unwanted layer 3 tiles. So how do I do that? How do I remove the layer 3 tiles I don't need anymore?
2. Is there a way to move the tiles uploaded to layer 3 this way? I mean like actually move, not just "remove from one tile and write to another tile". You actually have the see the movement (like it goes pixel by pixel, not tile by tile). I give an example: Let's say I'd make that "Level Up" message. Now after a few seconds I'd want the letters to move towards the top of the screen and then just disappear. Is there a way to do that with the upload buffer?
3. Can you make tables that point to tables and if so, how do you do that? Let's say I'm using the upload buffer to display level messages and let's say I have one message per level. The messages themselfs are stored in tables like this:
level105:
db $00,$01,$02,$03
When a message is displayed, it displays the tile specified under that messagetable,x and then increments x and repeats the process. But how do I make my code display the correct message? Like when I'm in level 105 it displays level 105's message, when I'm in level 104 it displays level 104's message. Can I make a table for that as well? Something like:
dl level104
dl level105
dl level106
[...]

Thanks in advance for your help! Wait, I probably have another question. Look at this:

This is a screenshot from Secret of Mana. Now I'm not really a layer expert or something, but I think that both, the text box and the letters, are on layer 3. Secret of Mana gives you the option of customizing your textbox' background. Now I'm not sure about this, but I don't think that Secret of Mana has seperate letter graphics for each background. My guess is that the letters use a transparent color, that lets you see the background behind them. So here is my question: Is that actually possible? Can you display both, the letters and the textbox-background, on layer 3 and replace the transparent color of the layer 3 letters with another layer 3 graphic (in this case the background)? I know this is probably a complicated question, but I hope someone knows the answer.

--------------------
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
My layout has recently been updated, but you still have the old stylesheet cached and things might therefore not look as intended, as such, itís recommended to reload the page.

Hyper‑Bump Re;Birth

With my help, version 1.3 of this patch is being implemented on the GitHub repository and is currently in beta.

Version 1.3 major changes:

  • Converted to a SA‑1 hybrid patch.
  • The patch now uses a coding style thatís more in-line with RPG Hackerís other patches - most configurable settings are now in hpconfig.cfg.
  • Bug fixes and improvementsÖ (see the version 1.3 changelog in the linked GitHub repository for details)

There are still a few bugs left to fix before RPG Hacker will be releasing version 1.3 to SMW Central.

Yep. Note that it might still take a while for the final release, though. Currently in a very busy phase where I barely manage to invest time into anything personal.

--------------------
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
I look forward to using this someday.
Pages: « 1 2 3 »
Forum Index - SMW Hacking - Resource & Tool Releases - RPG-Styled HP and MP Counter Version 1.1

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