Banner
Views: 236,803,861
Time: 2013-05-26 12:51:18 AM
9 users online: aj6666, Akireyano, o Camerin, Fireblast124, o K3fka, LaughingLuigi, mario90, Qwholl, RaindropDry - Guests: 23 - Bots: 12Users: 22,896 (1,291 active)
Latest: TunaTaco
Tip: Don't make Mario die after cutting the goal tape. Fake exits are not cool.
Comprehensive HDMA guide
Forum Index - SMW Hacking - General SMW Hacking Help - Tutorials - Comprehensive HDMA guide
Pages: « 1 2 3 4 5 »
Originally posted by SL
Hey Kaijyuu... if I have well understood you code, it's like:
Indirect
RAM                                                       RAM
scanline count + pointer [updating]       value depending on layer X/Y position [updating]

I find my method (the one you can see in my numerous PMs :p) a bit easier (and faster?):
Indirect
ROM                                                         RAM
scanline count + pointer [frame depending] value depending on layer X/Y position [updating]

What's your opinion about this?

The indirect table can go in ROM or RAM, it doesn't matter. I stuck it in RAM here because I changed it a lot to produce the effect. Were I to not modify it in-game, I probably would've left it in ROM.


Quote
Also, I didn't understand how you avoid the "changing table glitch" without double-buffering...


I didn't avoid it, actually. It still happens, It's just that the glitch here is mostly unnoticeable.

Difficult to explain exactly why it's not noticeable... The scanline count that is changed is near the top of the screen. However, levelasm code is done near the middle of the screen. Both have to be done at the same time for a noticeable glitch to occur, otherwise you just have a small one like here, where I think all that happens is a single scanline is skipped.
Oh ok...


I definitely find my method easier :p
Last question: while double-buffering, isn't that true that you have small lateness of one frame? I mean, the table is uploaded frame X, but is really loaded with HDMA at frame X+1, so there's a sort of latency?
Yes, very true.
I pasted one of the codes directly into LevelASM and inserted with Xkas. When I opened up the ROM in my emulator, I heard the music but nothing was on the screen. I put the HDMA on C7, the title screen level. Any help? P.S. I used the 3rd code for a color gradient.

Could you make a easy code, the darkness is only at the top?
Quote
Could you make a easy code, the darkness is only at the top?


Code
REP #$20 ; 16 bit A LDA #$0000 ; $43X0 = 00 STA $4330 ; $43x1 = 00 LDA #LVL1BRIGHT ; get pointer to brightness table STA $4332 ; store it to low and high byte pointer PHK ; get bank PLY ; STY $4334 ; store to bank pointer byte SEP #$20 ; 8 bit A LDA #$08 ; Enable HDMA on channel 3 TSB $0D9F ; RTS ; return LVL1BRIGHT: db $03,$00 db $03,$01 db $03,$02 db $03,$03 db $03,$04 db $03,$05 db $03,$06 db $03,$07 db $03,$08 db $03,$09 db $03,$0A db $03,$0B db $03,$0C db $03,$0D db $03,$0E db $80,$0F db $80,$0F db $80,$0F db $80,$0F db $80,$0F db $80,$0F db $80,$0F db $80,$0F db $80,$0F db $80,$0F db $80,$0F db $80,$0F db $80,$0F db $80,$0F db $80,$0F db $00
How could one go about making a translucent color gradient that appears above Layer 1, Layer 2 and sprites, similar to the darkness gradient in the examples? What I would like to pull of is some sort of fiery glowing effect that would appear over everything at the bottom of the screen.
That would require some color addition and stuff. Try this code:

LDA #$2F
STA $40
LDA #$02
STA $44
LDA #$1F
STA $0D9D
LDA #$00
STA $0D9E


It'll mess up sprite priorities iirc. I'm not sure how to go about fixing that. Try messing around with the underlined numbers, right now all layers go to the mainscreen.
Thanks for the code everest700
I'm trying to use the wavy background code, but it says level6 is already used. Same thing with levelinit6.
Change the labels to something unique. I was lazy and copy/pasted code from my levelasm :P
Originally posted by Kaijyuu
If BRA only means woman's underwear to you, then you need to go look up an ASM tutorial.


Bra = Underwear?
Quote
Bra = Underwear?

Most the time, yes.

Originally posted by Kaijyuu
Quote
Bra = Underwear?

Most the time, yes.



-No Responce-
Wow this tutorial...
I've searched so long and finally...

YOU JUST ROCK!!!
Last edited on 2011-08-08 09:36:56 AM by Torchkas.
Here's a question: Can you have to HDMA in one level?

- BlackMageMario
Yes that's possible via levelASM.
Actually it's only possible via levelASM or a generator.

This is for making your own HDMA you know.
Originally posted by BlackMageMario
Here's a question: Can you have to HDMA in one level?

- BlackMageMario

In terms of gradients, you can really only have 1 per level (excluding a brightness gradient), since having more than 1 color gradient seems kinda silly. You can definitely have, say, wavy HDMA and a color gradient in the same level, though.

(this is assuming you mean "two" and not "to")
I am at the beginnig of learning HDMA coding. Is it normal that the regs.txt file is so messed up? I canīt look through this mess... :( And how many scanlines has a screen. I
Last edited on 2012-03-08 09:42:30 AM by Vink.
regs.txt looks complicated to anyone. The average person doesn't really need to know everything on it anyways.

A screen is usually 224 scanlines (E0), pretty much the height of a ZSNES snapshot.
Pages: « 1 2 3 4 5 »
Forum Index - SMW Hacking - General SMW Hacking Help - Tutorials - Comprehensive HDMA guide

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

Copyright © 2005 - 2013 - SMW Central
Legal Information - Link To Us


Total queries: 29

Menu